make home configs actually evaluate

This commit is contained in:
Peder Bergebakken Sundt 2023-06-20 01:39:35 +02:00
parent c83b9d5d32
commit f023f7b250
1 changed files with 15 additions and 11 deletions

View File

@ -65,7 +65,7 @@
remote-exec = prev.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" { }; remote-exec = prev.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" { };
})]; })];
}; };
mkConfig = hostname: system: modules: nixlib.nixosSystem { mkConfig = hostname: domain: system: modules: nixlib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
@ -77,8 +77,8 @@
packages = self.packages.${system}; packages = self.packages.${system};
}; };
networking.hostName = hostname; networking.hostName = hostname;
networking.domain = "pbsds.net"; networking.domain = domain;
networking.search = [ "pbsds.net" ]; networking.search = [ domain ];
nixpkgs.overlays = [ # TODO: consider nixpkgs.config.packageOverrides nixpkgs.overlays = [ # TODO: consider nixpkgs.config.packageOverrides
#(final: prev: self.packages.${system}) #(final: prev: self.packages.${system})
(final: prev: { (final: prev: {
@ -109,20 +109,24 @@
nixosConfigurations = let nm = nixos-hardware.nixosModules; in { nixosConfigurations = let nm = nixos-hardware.nixosModules; in {
# TODO: move nixos-hardware imports to the nixos configs? # TODO: move nixos-hardware imports to the nixos configs?
noximilien = mkConfig "noximilien" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel ]); noximilien = mkConfig "noximilien" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel ]);
bolle = mkConfig "bolle" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel ]); bolle = mkConfig "bolle" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel ]);
nord = mkConfig "nord" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel-cpu-only common-gpu-amd ]); nord = mkConfig "nord" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel-cpu-only common-gpu-amd ]);
sopp = mkConfig "sopp" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel common-gpu-nvidia-nonprime ]); sopp = mkConfig "sopp" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel common-gpu-nvidia-nonprime ]);
}; };
homeConfigurations = forAllSystems ({ pkgs, system, ... }: let homeConfigurations = forAllSystems ({ pkgs, system, ... }: let
mkHome = modules: home-manager.lib.homeManagerConfiguration { mkHome = user: home: modules: home-manager.lib.homeManagerConfiguration {
inherit pkgs modules; inherit pkgs;
modules = modules ++ [{
home.username = user;
home.homeDirectory = home;
}];
extraSpecialArgs = { packages = self.packages.${system}; }; extraSpecialArgs = { packages = self.packages.${system}; };
}; };
in { in {
pbsds = mkHome [ ./users/pbsds/home ]; pbsds = mkHome "pbsds" "/home/pbsds" [ ./users/pbsds/home ];
pbsds-gnome = mkHome [ ./users/pbsds/home/gnome.nix ]; pbsds-gnome = mkHome "pbsds" "/home/pbsds" [ ./users/pbsds/home/gnome.nix ];
}); });
devShells = forAllSystems ({ system, pkgs, ... }: let devShells = forAllSystems ({ system, pkgs, ... }: let