unify home-manager configurations of workmac and main laptop

- manually inspected changes of "workmac" branch
- modularised out some config parts into modules
This commit is contained in:
Trolli Schmittlauch 2024-03-17 19:18:53 +01:00
parent 2bdff39416
commit f14b290937
12 changed files with 875 additions and 472 deletions

View file

@ -66,19 +66,17 @@
};
mkHomeManager =
confName: user: system: # unfortunately, home-manager configs are still system-specific
# FIXME: this is thus still linux-x86_64 specific
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
{
imports = [
nur.hmModules.nur
# TODO: $name can be utilised to conditionally load other config files
./home/home.nix
./home/common.nix
./home/${confName}.nix
];
# extends the home config
home.username = user;
home.homeDirectory = "/home/${user}";
}
];
# Optionally use extraSpecialArgs
@ -108,7 +106,13 @@
lanzaboote.nixosModules.lanzaboote
];
};
homeConfigurations.spiollinux = mkHomeManager "spiollinux" "spiollinux" systems.x86_64-linux;
homeConfigurations = {
spiollinux-desktop = mkHomeManager "desktop" "spiollinux" systems.x86_64-linux;
os-workmac = mkHomeManager "workmac" "os" systems.aarch64-darwin;
};
lib = {
inherit mkHomeManager;
};
}
// utils.lib.eachDefaultSystem (
system: