nix-daemon: switch to new settings syntax
This commit is contained in:
parent
05f8532173
commit
3d47b2a538
10 changed files with 27 additions and 49 deletions
|
@ -1,5 +1,3 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
imports = [ ./users.nix ];
|
imports = [ ./users.nix ];
|
||||||
|
|
||||||
nix.trustedUsers = [ "@trusted" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,6 @@ let
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
users = {
|
users = {
|
||||||
groups.trusted = {};
|
|
||||||
|
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
users = lib.mapAttrs descToUser users;
|
users = lib.mapAttrs descToUser users;
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,35 +5,36 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nix = {
|
nix = {
|
||||||
binaryCachePublicKeys = [
|
settings.trusted-public-keys = [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
];
|
];
|
||||||
|
|
||||||
binaryCaches = [
|
settings.substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Hard-link duplicated files
|
||||||
|
settings.auto-optimise-store = true;
|
||||||
|
|
||||||
|
# auto-free the /nix/store
|
||||||
|
settings.min-free = asGB 10;
|
||||||
|
settings.max-free = asGB 200;
|
||||||
|
|
||||||
|
# avoid copying unecessary stuff over SSH
|
||||||
|
settings.builders-use-substitutes = true;
|
||||||
|
|
||||||
|
# allow flakes
|
||||||
|
settings.experimental-features = "nix-command flakes";
|
||||||
|
|
||||||
|
# users in trusted group are trusted by the nix-daemon
|
||||||
|
settings.trusted-users = [ "@trusted" ];
|
||||||
|
|
||||||
# useful for ad-hoc nix-shell's for debugging
|
# useful for ad-hoc nix-shell's for debugging
|
||||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
||||||
|
|
||||||
extraOptions = ''
|
|
||||||
# auto-free the /nix/store
|
|
||||||
min-free = ${asGB 10}
|
|
||||||
max-free = ${asGB 200}
|
|
||||||
|
|
||||||
# avoid copying unecessary stuff over SSH
|
|
||||||
builders-use-substitutes = true
|
|
||||||
|
|
||||||
# allow flakes
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
# Hard-link duplicated files
|
|
||||||
autoOptimiseStore = true;
|
|
||||||
|
|
||||||
# Add support for flakes
|
|
||||||
package = pkgs.nixUnstable;
|
|
||||||
|
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
gc.options = "--delete-older-than 30d";
|
gc.options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.groups.trusted = {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,11 +12,8 @@ in
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel" "trusted"
|
||||||
];
|
];
|
||||||
uid = userLib.mkUid "adis";
|
uid = userLib.mkUid "adis";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.trustedUsers = [ "adisbladis" ];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,8 @@ in
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel" "trusted"
|
||||||
];
|
];
|
||||||
uid = userLib.mkUid "flok";
|
uid = userLib.mkUid "flok";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.trustedUsers = [ "flokli" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,8 @@ in
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel" "trusted"
|
||||||
];
|
];
|
||||||
uid = userLib.mkUid "lewo";
|
uid = userLib.mkUid "lewo";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.trustedUsers = [ "lewo" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,8 @@ in
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel" "trusted"
|
||||||
];
|
];
|
||||||
uid = userLib.mkUid "micc";
|
uid = userLib.mkUid "micc";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.trustedUsers = [ "mic92" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,13 +12,8 @@ in
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel" "trusted"
|
||||||
];
|
];
|
||||||
uid = userLib.mkUid "rytm";
|
uid = userLib.mkUid "rytm";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.trustedUsers = [
|
|
||||||
"ryantm"
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,8 @@ in
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel" "trusted"
|
||||||
];
|
];
|
||||||
uid = userLib.mkUid "timo";
|
uid = userLib.mkUid "timo";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.trustedUsers = [ "timo" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,8 @@ in
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel" "trusted"
|
||||||
];
|
];
|
||||||
uid = userLib.mkUid "zimb";
|
uid = userLib.mkUid "zimb";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.trustedUsers = [ "zimbatm" ];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue