added home-manager modules as an output in flake.nix, allowing for machine-specific home-manager configs

This commit is contained in:
pagedmov
2024-11-01 21:30:26 -04:00
parent e035de79e4
commit 08bed40c52
8 changed files with 45 additions and 53 deletions

View File

@@ -1,57 +0,0 @@
{
host,
pkgs,
self,
inputs,
username,
wallpaper,
scheme,
config,
...
}: let
nur = config.nur;
desktop = (host == "oganesson");
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "backup";
extraSpecialArgs = {inherit self inputs host wallpaper scheme username nur;};
users.${username} = {
dconf.settings = if desktop then {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
} else {};
programs.home-manager.enable = true;
imports = [
inputs.spicetify-nix.homeManagerModules.default
./hm-modules.nix
];
home = {
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "24.05";
};
};
};
users = {
groups.persist = {};
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = ["wheel" "persist" "libvirtd"];
};
};
};
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
'';
nix.settings.allowed-users = ["${username}"];
}