add binary caches
This commit is contained in:
parent
e520257894
commit
04d77743ab
20
modules/nixos/cache.nix
Normal file
20
modules/nixos/cache.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.cache;
|
||||
in {
|
||||
options.myConfig.cache = {
|
||||
enable = lib.mkEnableOption "extra binary caches";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nix.settings = {
|
||||
substituters = ["https://nix-community.cachix.org"];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
}: let
|
||||
cfg = config.myConfig;
|
||||
in {
|
||||
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix];
|
||||
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix ./cache.nix];
|
||||
|
||||
options.myConfig = {
|
||||
enable = lib.mkEnableOption "my custom config";
|
||||
@ -17,6 +17,7 @@ in {
|
||||
bootloader.enable = true;
|
||||
locale.enable = true;
|
||||
rebuild.enable = true;
|
||||
cache.enable = true;
|
||||
|
||||
greetd.enable = lib.mkIf cfg.desktop true;
|
||||
sway.enable = lib.mkIf cfg.desktop true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user