lib/private: update mapHomeManagerUser

This commit is contained in:
Gabriel Arazas 2022-11-26 10:53:42 +08:00
parent cee69d59a0
commit 025d96dbbc

View File

@ -7,19 +7,21 @@ rec {
let let
homeDirectory = "/home/${user}"; homeDirectory = "/home/${user}";
defaultUserConfig = { defaultUserConfig = {
extraGroups = [ "wheel" ]; extraGroups = lib.mkDefault [ "wheel" ];
createHome = true; createHome = lib.mkDefault true;
home = homeDirectory; home = lib.mkDefault homeDirectory;
isNormalUser = lib.mkForce true;
}; };
# TODO: Effectively override the option.
# We assume all users set with this module are normal users.
absoluteOverrides = { isNormalUser = true; };
in in
{ {
imports = [
{ users.users."${user}" = defaultUserConfig; }
];
home-manager.users."${user}" = { ... }: { home-manager.users."${user}" = { ... }: {
imports = [ (getUser "home-manager" user) ]; imports = [ (getUser "home-manager" user) ];
}; };
users.users."${user}" = defaultUserConfig // settings // absoluteOverrides; users.users."${user}" = settings;
}; };
getSecret = path: ../secrets/${path}; getSecret = path: ../secrets/${path};