-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
feat: add VMWare and WSL fixtures
1 parent
8438ed5
commit 14f5725
Showing
19 changed files
with
380 additions
and
141 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
pkgs, | ||
lib, | ||
config, | ||
... | ||
}: | ||
with lib; | ||
let | ||
cfg = config.caches; | ||
in | ||
{ | ||
config.caches = | ||
let | ||
cacheConfig = importJSON ./caches.json; | ||
|
||
cachixCaches = map ( | ||
{ name, publicKey }: | ||
{ | ||
name = "https://${name}.cachix.org"; | ||
inherit publicKey; | ||
} | ||
) cacheConfig.cachix; | ||
in | ||
mkDefault (cachixCaches ++ cacheConfig.nix); | ||
|
||
options.caches = | ||
with types; | ||
mkOption { | ||
type = listOf (submodule { | ||
options = { | ||
name = mkOption { type = str; }; | ||
publicKey = mkOption { type = str; }; | ||
}; | ||
}); | ||
}; | ||
|
||
config = { | ||
environment.systemPackages = [ pkgs.cachix ]; | ||
|
||
nix.settings = { | ||
trusted-substituters = map ({ name, ... }: name) cfg; | ||
trusted-public-keys = map ({ publicKey, ... }: publicKey) cfg; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1 @@ | ||
{ | ||
pkgs, | ||
lib, | ||
config, | ||
... | ||
}: | ||
with lib; | ||
let | ||
cfg = config.caches; | ||
in | ||
{ | ||
config.caches = | ||
let | ||
cacheConfig = importJSON ./caches.json; | ||
|
||
cachixCaches = map ( | ||
{ name, publicKey }: | ||
{ | ||
name = "https://${name}.cachix.org"; | ||
inherit publicKey; | ||
} | ||
) cacheConfig.cachix; | ||
in | ||
mkDefault (cachixCaches ++ cacheConfig.nix); | ||
|
||
options.caches = | ||
with types; | ||
mkOption { | ||
type = listOf (submodule { | ||
options = { | ||
name = mkOption { type = str; }; | ||
publicKey = mkOption { type = str; }; | ||
}; | ||
}); | ||
}; | ||
|
||
config.nix.settings = { | ||
trusted-substituters = map ({ name, ... }: name) cfg; | ||
trusted-public-keys = map ({ publicKey, ... }: publicKey) cfg; | ||
}; | ||
|
||
config.environment.systemPackages = [ pkgs.cachix ]; | ||
} | ||
{ imports = [ ./common-module.nix ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ imports = [ ./common-module.nix ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ config, lib, ... }: | ||
{ | ||
nix = { | ||
# Add inputs to path for channel compatibility | ||
nixPath = lib.mapAttrsToList (flake: _: "${flake}=flake:${flake}") config.nix.registry; | ||
|
||
settings = { | ||
trusted-users = [ "@admin" ]; | ||
|
||
experimental-features = [ | ||
"nix-command" | ||
"flakes" | ||
"auto-allocate-uids" | ||
]; | ||
|
||
sandbox = false; | ||
cores = 0; | ||
max-jobs = "auto"; | ||
auto-allocate-uids = true; | ||
keep-outputs = true; | ||
keep-derivations = true; | ||
}; | ||
|
||
gc = { | ||
automatic = true; | ||
options = "--delete-older-than 30d"; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.