mirror of
https://github.com/danth/stylix
synced 2025-02-16 21:38:40 +00:00
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.
This commit is contained in:
parent
b96059664c
commit
cd9788bba6
3 changed files with 11 additions and 24 deletions
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"outputStores": [
|
||||
{
|
||||
"store": "danth",
|
||||
"authToken": "lEaE5jUApvnP4H7Yi/hHUHdKFpChnQtARUngvzUXYmGeFHJ2q7j/ijBVB/BubFX/ACsnxDDCrQRny+lyQGzcoLwhdCc0lCJ3Xu2gamz3YuNa3bWJ8V9t5Cue3SMXZ2YwrJNG0wUBAqW3lZRdGDqiPJVMlYzgMDN2Gm9MoRkJvhGpeHJ1cgiG/V5yQt/RmUQ331K0bEr1WelDe4uDeEl3h4xF4co7/I/PK7xHWyE/B07q4loFLj5wSuFYi3nmJrYWTi5svco7P2ZYy1A6zAJlW4eC1CIcsJsDE+wrgPCSTit/znlA4De4GWPOZbDgNoEvtGMnst5bBA5GWKLHgt5AQQ==",
|
||||
"type": "cachix"
|
||||
}
|
||||
]
|
||||
}
|
12
README.md
12
README.md
|
@ -42,18 +42,6 @@ for example:
|
|||
Stylix relies on [Home Manager](https://github.com/nix-community/home-manager)
|
||||
for a lot of its work, so that needs to be imported too.
|
||||
|
||||
## Binary cache
|
||||
|
||||
Stylix includes a Haskell program which generates color palettes.
|
||||
To avoid compiling this from source, add the following settings:
|
||||
|
||||
```nix
|
||||
nix.settings = {
|
||||
substituters = "https://danth.cachix.org";
|
||||
trusted-public-keys = "danth.cachix.org-1:wpodfSL7suXRc/rJDZZUptMa1t4MJ795hemRN0q84vI=";
|
||||
};
|
||||
```
|
||||
|
||||
## Wallpaper
|
||||
|
||||
To get started, you need to set a wallpaper image.
|
||||
|
|
|
@ -77,7 +77,15 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# This attrset can be used like a function too, see
|
||||
# https://github.com/SenchoPens/base16.nix#mktheme
|
||||
config.lib.stylix.colors = base16.mkSchemeAttrs cfg.base16Scheme;
|
||||
config = {
|
||||
# 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.
|
||||
system.extraDependencies = [ paletteJSON ];
|
||||
|
||||
# This attrset can be used like a function too, see
|
||||
# https://github.com/SenchoPens/base16.nix#mktheme
|
||||
lib.stylix.colors = base16.mkSchemeAttrs cfg.base16Scheme;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue