nixos/nix: move trusted-user to config

This avoids having to define root when trying to add another user as
trusted user, similar to the other options.
This commit is contained in:
Sandro Jäckel 2024-06-09 22:31:44 +02:00
parent 7feaafb5f1
commit 280e9a5ca4
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
3 changed files with 3 additions and 3 deletions

View File

@ -302,7 +302,6 @@ in
trusted-users = mkOption {
type = types.listOf types.str;
default = [ "root" ];
example = [ "root" "alice" "@wheel" ];
description = ''
A list of names of users that have additional rights when
@ -376,6 +375,7 @@ in
environment.etc."nix/nix.conf".source = nixConf;
nix.settings = {
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
trusted-users = [ "root" ];
substituters = mkAfter [ "https://cache.nixos.org/" ];
system-features = mkDefault (
[ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++

View File

@ -125,7 +125,7 @@ with lib;
'';
# allow nix-copy to live system
nix.settings.trusted-users = [ "root" "nixos" ];
nix.settings.trusted-users = [ "nixos" ];
# Install less voices for speechd to save some space
services.speechd.package = pkgs.speechd.override {

View File

@ -123,7 +123,7 @@ in
max-free = cfg.max-free;
trusted-users = [ "root" user ];
trusted-users = [ user ];
};
services = {