Reformatted with nixfmt
This commit is contained in:
parent
f51256c3ae
commit
3f16537322
80 changed files with 1454 additions and 992 deletions
|
@ -3,12 +3,19 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption types;
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
cfg = config.aa.nix;
|
||||
selfHostedCacheHost = "https://cache.kilonull.com/";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.aa.nix = {
|
||||
enable = mkEnableOption "manage nix configuration.";
|
||||
package = mkOption {
|
||||
|
@ -26,37 +33,43 @@ in {
|
|||
nixfmt-rfc-style
|
||||
];
|
||||
|
||||
nix = let
|
||||
users = ["root" config.aa.user.name];
|
||||
in {
|
||||
package = cfg.package;
|
||||
nix =
|
||||
let
|
||||
users = [
|
||||
"root"
|
||||
config.aa.user.name
|
||||
];
|
||||
in
|
||||
{
|
||||
package = cfg.package;
|
||||
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
|
||||
builders-use-substitutes = cfg.useSelfhostedCache;
|
||||
substituters =
|
||||
if cfg.useSelfhostedCache
|
||||
then [
|
||||
# TESTING
|
||||
"https://minio.kilonull.com/nix-store"
|
||||
selfHostedCacheHost
|
||||
]
|
||||
else [];
|
||||
trusted-public-keys =
|
||||
mkIf cfg.useSelfhostedCache
|
||||
["gospelCache:9cbn8Wm54BbwpPS0TXw+15wrYZBpfOJt4Fzfbfcq/pc="];
|
||||
builders-use-substitutes = cfg.useSelfhostedCache;
|
||||
substituters =
|
||||
if cfg.useSelfhostedCache then
|
||||
[
|
||||
# TESTING
|
||||
"https://minio.kilonull.com/nix-store"
|
||||
selfHostedCacheHost
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
trusted-public-keys = mkIf cfg.useSelfhostedCache [
|
||||
"gospelCache:9cbn8Wm54BbwpPS0TXw+15wrYZBpfOJt4Fzfbfcq/pc="
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: Configure distributedBuilds and buildMachines?
|
||||
|
||||
gc = {
|
||||
automatic = lib.mkDefault true;
|
||||
dates = lib.mkDefault "weekly";
|
||||
options = lib.mkDefault "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Configure distributedBuilds and buildMachines?
|
||||
|
||||
gc = {
|
||||
automatic = lib.mkDefault true;
|
||||
dates = lib.mkDefault "weekly";
|
||||
options = lib.mkDefault "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue