forcing root user name

This commit is contained in:
John Lancaster
2025-07-03 18:06:16 -05:00
parent 6094dd062d
commit 16bdff2d69
2 changed files with 16 additions and 16 deletions

View File

@@ -21,6 +21,18 @@
extraGroups = lib.optionals config.root [ "wheel" ];
shell = lib.mkIf config.shell pkgs.zsh;
};
homeManagerModules = config: [
self.homeManagerModules.default {
user = config.user;
stateVersion = config.stateVersion;
profile = config.profile;
shell = config.shell;
ssh = config.ssh;
_1password = config._1password;
}
] ++ config.extraImports;
in
{
homeManagerModules.default = { ... }: {
@@ -67,24 +79,12 @@
extraSpecialArgs = { inherit inputs; };
users = {
${config.user} = {
imports = [
self.homeManagerModules.default {
user = config.user;
stateVersion = config.stateVersion;
profile = config.profile;
shell = config.shell;
ssh = config.ssh;
_1password = config._1password;
}
] ++ config.extraImports;
imports = homeManagerModules config;
};
} // lib.optionalAttrs config.root {
root = {
home.stateVersion = config.stateVersion;
imports = [
./nixosModules/options.nix
./homeManagerModules/git.nix
];
# home.stateVersion = config.stateVersion;
imports = homeManagerModules (config // { user = "root"; });
};
};
};