Revert refactoring of flake.nix

Apparently refactoring home-manager in the way that I did
causes it to crash at switch-time. I have no idea why,
but it's gone now.
This commit is contained in:
Kiana Sheibani 2022-01-11 22:38:54 -05:00
parent 39a45b3ec5
commit 32c4116c66

View file

@ -17,29 +17,38 @@ outputs = { self,
username = "kiana"; username = "kiana";
moduleArgs = inputs // { inherit system username; }; moduleArgs = inputs // { inherit system username; };
lib = nixpkgs.lib; lib = nixpkgs.lib;
modulesFor = system:
[
{ _module.args = moduleArgs; }
./common/config
./${system}/config
home-manager.nixosModules.home-manager
{ home-manager = {
useGlobalPkgs = true;
users.${username} = import ./${system}/home-manager;
extraSpecialArgs = moduleArgs;
}; }
];
in { in {
nixosConfigurations = { nixosConfigurations = {
"kiana-desktop" = lib.makeOverridable lib.nixosSystem { "kiana-desktop" = lib.makeOverridable lib.nixosSystem {
inherit system; inherit system;
modules = modulesFor "desktop"; modules = [
{ _module.args = moduleArgs; }
./common/config
./desktop/config
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./desktop/home-manager;
home-manager.extraSpecialArgs = moduleArgs;
}
];
}; };
"kiana-laptop" = lib.makeOverridable lib.nixosSystem { "kiana-laptop" = lib.makeOverridable lib.nixosSystem {
inherit system; inherit system;
modules = modulesFor "laptop"; modules = [
{ _module.args = moduleArgs; }
./common/config
./laptop/config
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./laptop/home-manager;
home-manager.extraSpecialArgs = moduleArgs;
}
];
}; };
}; };
}; };