nix-daemon: switch to new settings syntax

This commit is contained in:
Jörg Thalheim 2022-01-29 11:24:20 +01:00
parent 05f8532173
commit 3d47b2a538
10 changed files with 27 additions and 49 deletions

View file

@ -1,5 +1,3 @@
{ ... }: {
imports = [ ./users.nix ];
nix.trustedUsers = [ "@trusted" ];
}

View file

@ -48,8 +48,6 @@ let
};
in {
users = {
groups.trusted = {};
mutableUsers = false;
users = lib.mapAttrs descToUser users;
};

View file

@ -5,35 +5,36 @@ let
in
{
nix = {
binaryCachePublicKeys = [
settings.trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
binaryCaches = [
settings.substituters = [
"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
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.options = "--delete-older-than 30d";
};
users.groups.trusted = {};
}

View file

@ -12,11 +12,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel"
"wheel" "trusted"
];
uid = userLib.mkUid "adis";
};
nix.trustedUsers = [ "adisbladis" ];
}

View file

@ -11,10 +11,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel"
"wheel" "trusted"
];
uid = userLib.mkUid "flok";
};
nix.trustedUsers = [ "flokli" ];
}

View file

@ -11,10 +11,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel"
"wheel" "trusted"
];
uid = userLib.mkUid "lewo";
};
nix.trustedUsers = [ "lewo" ];
}

View file

@ -11,10 +11,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel"
"wheel" "trusted"
];
uid = userLib.mkUid "micc";
};
nix.trustedUsers = [ "mic92" ];
}

View file

@ -12,13 +12,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel"
"wheel" "trusted"
];
uid = userLib.mkUid "rytm";
};
nix.trustedUsers = [
"ryantm"
];
}

View file

@ -13,10 +13,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel"
"wheel" "trusted"
];
uid = userLib.mkUid "timo";
};
nix.trustedUsers = [ "timo" ];
}

View file

@ -13,11 +13,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel"
"wheel" "trusted"
];
uid = userLib.mkUid "zimb";
};
nix.trustedUsers = [ "zimbatm" ];
}