added root user options

This commit is contained in:
2025-07-03 03:29:20 +00:00
parent b7aa2be8e7
commit a8655471ee
2 changed files with 11 additions and 7 deletions

View File

@@ -15,6 +15,12 @@
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
userOptions = config: {
openssh.authorizedKeys.keyFiles = [ ./personal_keys ];
extraGroups = [ "wheel" ];
shell = lib.mkIf config.shell pkgs.zsh;
};
in
{
homeManagerModules.default = { ... }: {
@@ -35,12 +41,10 @@
inputs.home-manager.nixosModules.default
];
users.users.root = userOptions config;
users.users.${config.user} = {
isNormalUser = true;
home = lib.mkForce "/home/${config.user}";
createHome = true;
extraGroups = [ "wheel" ];
};
} // userOptions config;
home-manager = {
useGlobalPkgs = true;

View File

@@ -23,8 +23,8 @@
] ++ lib.optional config._1password "1password";
};
shellAliases.ls = "${pkgs.eza}/bin/eza -lgos type --no-time";
# initContent = lib.mkIf config._1password ''
# source ${config.home.homeDirectory}/.config/op/plugins.sh
# '';
initContent = lib.mkIf config._1password ''
source ${config.home.homeDirectory}/.config/op/plugins.sh
'';
};
}