Commit graph

50 commits

Author SHA1 Message Date
NAHO
2e2e96f6b0
treewide: remove blank lines around 'let', 'in', and function arguments (#1700)
Link: https://github.com/nix-community/stylix/pull/1700

Reviewed-by: awwpotato <awwpotato@voidq.com>
2025-07-19 10:41:36 -07:00
NAHO
218d4424b0
treewide: remove redundant stylix.image Nix store copies (#1659)
Link: https://github.com/nix-community/stylix/pull/1659

Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: awwpotato <awwpotato@voidq.com>
2025-07-13 15:21:22 -07:00
awwpotato
67a6479c1a
stylix: use config in literalMD (#1529)
Fixes: 2b231cdc9b ("treewide: use config in literalExpressions (#1517)")
Link: https://github.com/nix-community/stylix/pull/1529

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-06-23 16:28:54 +02:00
Matt Sturgeon
58b1de7ebf
stylix: refactor base16Scheme and lib.stylix.colors assertion (#1446)
Instead of having a nullable `base16Scheme` option, the default will
throw when `stylix.image` is null. Not only does this better represent
the "required" nature of this option, it also ensures the assertion is
evaluated early enough to actually be checked.

This causes the assertion to evaluate when the default definition is
read, instead of later when the `assertions` option is checked.

Link: https://github.com/nix-community/stylix/pull/1446

Tested-by: https://github.com/NovaViper
Approved-by: https://github.com/NovaViper
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-06-13 00:00:37 +02:00
Matt Sturgeon
838df8b8ad
stylix: improve stylix.image type (#1414)
Previously:

- Out-of-store paths were not necessarily copied to store.

- Derivations were needlessly coerced to strings.

- `package` and `path` were both used, despite `path` being a superset
  of `package`.

Link: https://github.com/nix-community/stylix/pull/1414

Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-05-30 02:13:13 +02:00
Matt Sturgeon
3a4599a330
stylix: check base16Scheme is not null before using mkSchemeAttrs (#1408)
Link: https://github.com/nix-community/stylix/pull/1408
Closes: https://github.com/nix-community/stylix/issues/1046
Closes: https://github.com/nix-community/stylix/issues/1385

Reviewed-by: awwpotato <awwpotato@voidq.com>
2025-05-29 10:41:30 -07:00
awwpotato
1c71f3bde2
treewide: use lib.getExe (#1241) 2025-05-10 12:07:43 +01:00
NAHO
45aa31f5a4
stylix: apply standardized message convention (#1155)
Apply the standardized message convention, introduced in commit
5e8be7521e ("treewide: simplify and standardize message convention
(#796)").

Fixes: c8e4a0d218 ("treewide: optionalize stylix.image option (#717)")
Link: https://github.com/danth/stylix/pull/1155

Reviewed-by: awwpotato <153149335+awwpotato@users.noreply.github.com>
2025-04-21 22:32:53 +02:00
Merrkry
a76068262c
palette: fix eval fail when image is null (#941)
Closes: https://github.com/danth/stylix/issues/911
Link: https://github.com/danth/stylix/pull/941

Reviewed-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Tested-by: https://github.com/bLuka
Approved-by: https://github.com/bLuka
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-03-09 16:15:45 +01:00
Flameopathic
3fce9fb038
treewide: propagate inputs and remove templates (#926)
Closes: https://github.com/danth/stylix/issues/238
Link: https://github.com/danth/stylix/pull/926

Reviewed-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-03-09 15:46:36 +01:00
Flameopathic
c8e4a0d218
treewide: optionalize stylix.image option (#717)
Optionalize the stylix.image option when stylix.base16Scheme is set,
making the following Stylix configurations valid:

    [
      // Now it possible to set 'stylix.image = null', if
      // stylix.base16Scheme is set.
      {
        base16Scheme = /* ... */;
      }

      // This configuration was already possible.
      {
        image = /* ... */;
      }

      // This configuration was already possible.
      {
        base16Scheme = /* ... */;
        image = /* ... */;
      }
    ]

Closes: https://github.com/danth/stylix/issues/200
Closes: https://github.com/danth/stylix/issues/442
Link: https://github.com/danth/stylix/pull/717

Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: Daniel Thwaites <danth@danth.me>
2025-02-24 15:13:57 +01:00
Daniel Thwaites
e87bf16df9
stylix: use absolute paths for module imports 2025-02-18 14:37:50 +00:00
Daniel Thwaites
9343b660c9
stylix: fix palette generator caching (#867)
Ensure the palette generator is properly cached by fixing the bug
introduced in commit efb734ff43 ("Prevent scheme generation from
running when result is not used (#56)"), where the added indirection
prevents the output of the palette generator becoming part of the final
system.

Using highestPrio as a condition should prevent the palette generator
being forced to run when the output is not used, which is the issue that
the indirection was meant to solve.

Link: https://github.com/danth/stylix/pull/867

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-02-18 13:34:14 +01:00
NAHO
ad64260a75
treewide: add and apply nixfmt pre-commit hook
Link: https://github.com/danth/stylix/pull/519
2025-01-04 17:48:26 +01:00
hazel
f48cab39ba
doc: document imageScalingMode options (#709)
Document the imageScalingMode options according to swaybg, which should
be mostly universal.

Link: https://github.com/danth/stylix/pull/709

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2024-12-31 18:05:32 +01:00
NAHO
4b15fdcc87
stylix: remove deprecated 'stylix.palette.<BASE>' options at end-of-life
BREAKING CHANGE: Remove the deprecated 'stylix.palette.<BASE>' options.

Link: https://github.com/danth/stylix/pull/514
2024-08-26 17:45:56 +02:00
NAHO
dba4bd2d89
treewide: declare end-of-life for deprecated options
Fixes: 6858d08ed0 ("treewide: add soft deprecation dates (#506)")
Link: https://github.com/danth/stylix/pull/514
2024-08-26 17:45:26 +02:00
NAHO
6858d08ed0
treewide: add soft deprecation dates (#506)
Add soft deprecation dates to guide the hard deprecation transitions.

Fixes: 3567250ba0 ("Properly warn users that stylix.palette.* has been removed")
Fixes: 94aa0fc0fb ("nixvim: rename transparency options to camelCase (#497)")
2024-08-16 19:54:29 +01:00
Gabriel Talbert Bunt
feb2973dfa
doc: specify correct color attribute path (#491)
Colors are accessible under config.lib.stylix.colors, not lib.stylix.colors.

Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2024-07-30 00:21:31 +01:00
Daniel Thwaites
76d6ca2224
treewide: remove use of with lib (#425) 2024-06-14 22:36:25 +01:00
Daniel Thwaites
f060e4059b
stylix: clean up fromOs (#407) 2024-06-11 03:21:04 +02:00
Alexandra Østermark
c760f63a44
stylix: add background image scaling option (#372) 2024-06-03 13:53:09 +01:00
Daniel Thwaites
0fe277a364
treewide: remove lib.mdDoc (#349) 2024-04-22 22:25:40 +01:00
NAHO
406f793045
stylix: escape spaces in wallpaper path (#318)
Fixed version of a0bdd9c15b (#317)
which was reverted in f9b9bc7c8e (#329)

Closes #330

Co-authored-by: Daniel Thwaites <danthwaites30@btinternet.com>
2024-04-11 15:58:36 +01:00
NAHO
f9b9bc7c8e
stylix: do not escape spaces in wallpaper path (#329)
Addresses: https://github.com/danth/stylix/issues/324
Reverts: a0bdd9c15b
2024-04-03 15:26:12 +01:00
Daniel Thwaites
a0bdd9c15b
stylix: escape spaces in wallpaper path (#317) 2024-04-01 14:50:57 +01:00
Luc Chabassier
b17c41ca43
stylix: reduce duplication (#245)
Fixes #234
2024-02-09 15:28:46 +00:00
NAHO
1a5dee1957
treewide: remove tailing whitespaces (#228) 2024-01-25 08:45:05 +00:00
NAHO
606a7983a0
doc: update 'base16.nix' URL (#227) 2024-01-24 12:18:01 +00:00
Daniel Thwaites
d14076e46f
Update flake inputs ⬆️ 2023-07-14 12:50:08 +01:00
Dustin Frisch
7bcf3ce6c9
Fix palette generation when system does not use stylix (#106) 2023-06-06 09:41:31 +00:00
Daniel Thwaites
a3f9fa981b
Convert documentation to mdBook 📝 🔨 2023-03-29 00:54:14 +01:00
Luc Chabassier
efb734ff43
Prevent scheme generation from running when result is not used (#56) 2023-03-10 14:21:16 +00:00
Luc Chabassier
75ae5f52e2
Enable overriding part of theme (#41) 2023-02-25 15:22:00 +00:00
DwarfMaster
3567250ba0 Properly warn users that stylix.palette.* has been removed 2023-02-02 00:44:48 +01:00
DwarfMaster
610632be8e Improved default of options when used from home-manager 2023-02-02 00:22:47 +01:00
DwarfMaster
76a254f9fe Separate stylix into a nixos module and a home-manager module 2023-01-30 19:25:27 +01:00
Daniel Thwaites
1741e9c710
Fix evaluation error when manual scheme is used 🚑 2022-10-30 14:20:55 +00:00
Daniel Thwaites
655fda7894
Don't build a palette which isn't used
If a scheme is specified manually then this avoids generating the
automatic scheme. See #13
2022-10-30 14:17:28 +00:00
Daniel Thwaites
5b45ba84b6
Provide a way to view generated palette 🧑‍💻
Fixes #14
2022-10-30 13:34:30 +00:00
Daniel Thwaites
98114ad3ed
Update other options to suit recent Plymouth changes 📝
This is mainly documentation changes.

Also changed the default of `targets.grub.useImage` to a hard false,
as Plymouth doesn't use the wallpaper image any more.
2022-10-06 15:04:24 +01:00
Daniel Thwaites
cd9788bba6
Protect palette.json from garbage collection
Making palette.json part of the system closure will protect it from
garbage collection, so future configurations can be evaluated without
having to generate the palette again. The generator is not kept, only the
palette which came from it, so this uses very little disk space.

As evaluations will no longer need the palette generator unless the
wallpaper was changed, I've removed the recommendation to add a binary
cache - the overhead of querying the cache for unrelated builds
outweighs the remaining benefits of it.
2022-09-24 20:34:17 +01:00
Daniel Thwaites
0ea346a423
Publish list of NixOS options on GitHub Pages 📝 2022-07-30 15:31:58 +01:00
Daniel Thwaites
324b951687
Improve option description for stylix.palette 💡 2022-07-22 23:08:50 +01:00
Daniel Thwaites
2c8ac84830
Clean up implementation of palette options ♻️
The automatically chosen color is now the default value under `stylix.palette`,
rather than `null`.

The colors from `stylix.palette` are collected to make the default value
of `stylix.base16Scheme`.

If `stylix.base16Scheme` is overridden to an external file, the colors
from that file will NOT be written back to `stylix.palette`. For that
reason, you must still only refer to `lib.stylix.colors` within modules.
2022-07-22 22:46:00 +01:00
Daniel Thwaites
8174101c22
Implement manual palettes
Fixes #1
2022-07-22 17:42:34 +01:00
Daniel Thwaites
6a706cba69 Add polarity option 2022-06-30 18:17:44 +01:00
Daniel Thwaites
c2358177dc
Use an external library for base16 ♻️
https://github.com/SenchoPens/base16.nix
2022-04-23 10:36:20 +01:00
github-actions
f0323ee468 Beautify 7b34be82ff 🎨 2021-10-17 14:05:15 +00:00
Daniel Thwaites
7b34be82ff
Rewrite palette generation in Haskell
This does not rely on an external library for colour selection,
therefore it can be fine-tuned to create a better theme.

Closes #2 because Colorgram is no longer used.
2021-10-17 15:04:19 +01:00