treewide: use attrs instead of list for types.loaOf options
This commit is contained in:
@@ -6,7 +6,10 @@ let
|
||||
cfg = config.programs.dconf;
|
||||
|
||||
mkDconfProfile = name: path:
|
||||
{ source = path; target = "dconf/profile/${name}"; };
|
||||
{
|
||||
name = "dconf/profile/${name}";
|
||||
value.source = path;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
@@ -29,8 +32,8 @@ in
|
||||
###### implementation
|
||||
|
||||
config = mkIf (cfg.profiles != {} || cfg.enable) {
|
||||
environment.etc = optionals (cfg.profiles != {})
|
||||
(mapAttrsToList mkDconfProfile cfg.profiles);
|
||||
environment.etc = optionalAttrs (cfg.profiles != {})
|
||||
(mapAttrs' mkDconfProfile cfg.profiles);
|
||||
|
||||
services.dbus.packages = [ pkgs.dconf ];
|
||||
|
||||
|
||||
@@ -76,22 +76,18 @@ in
|
||||
config.users.defaultUserShell;
|
||||
|
||||
environment.etc =
|
||||
[ { # /etc/login.defs: global configuration for pwdutils. You
|
||||
# cannot login without it!
|
||||
source = pkgs.writeText "login.defs" loginDefs;
|
||||
target = "login.defs";
|
||||
}
|
||||
{ # /etc/login.defs: global configuration for pwdutils. You
|
||||
# cannot login without it!
|
||||
"login.defs".source = pkgs.writeText "login.defs" loginDefs;
|
||||
|
||||
{ # /etc/default/useradd: configuration for useradd.
|
||||
source = pkgs.writeText "useradd"
|
||||
''
|
||||
GROUP=100
|
||||
HOME=/home
|
||||
SHELL=${utils.toShellPath config.users.defaultUserShell}
|
||||
'';
|
||||
target = "default/useradd";
|
||||
}
|
||||
];
|
||||
# /etc/default/useradd: configuration for useradd.
|
||||
"default/useradd".source = pkgs.writeText "useradd"
|
||||
''
|
||||
GROUP=100
|
||||
HOME=/home
|
||||
SHELL=${utils.toShellPath config.users.defaultUserShell}
|
||||
'';
|
||||
};
|
||||
|
||||
security.pam.services =
|
||||
{ chsh = { rootOK = true; };
|
||||
|
||||
Reference in New Issue
Block a user