Skip to content

Commit

Permalink
WIP #14: partially rework system builder.
Browse files Browse the repository at this point in the history
I was not merging home-manager config correctly. Disable home-manager
config for now.
  • Loading branch information
yipengsun committed Sep 20, 2024
1 parent 36ad9e0 commit 2cadb21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
8 changes: 4 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@
hosts = {
Henri = {
system = "x86_64-linux";
systemSuites = flake.suites.nixos.wsl
suites = flake.suites.nixos.wsl
++
(with flake.users; [ root syp ]);
homeSuites = flake.suites.home.wsl;
#homeSuites = flake.suites.home.wsl;
};
};
hostModuleDir = ./hosts;

# modules applied to all* hosts
nixosModules = [
inputs.agenix.nixosModules.age
inputs.nixos-wsl.nixosModules.wsl
inputs.agenix.nixosModules.default
inputs.nixos-wsl.nixosModules.default
];
homeModules = (loadAsList ./modules/home)
++
Expand Down
16 changes: 4 additions & 12 deletions lib/systemBuilder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,13 @@ let
'';
};

systemSuites = mkOption {
suites = mkOption {
type = types.listOf types.deferredModule;
default = [ ];
description = ''
System suites (NixOS or nix-darwin) to be imported by this host.
'';
};

homeSuites = mkOption {
type = types.listOf types.deferredModule;
default = [ ];
description = ''
Home suites to be imported by this host.
'';
};
};
};

Expand Down Expand Up @@ -103,7 +95,7 @@ let
type = types.listOf types.deferredModule;
default = [ ];
description = ''
Home modules to be imported by all hosts.
Home-manager modules to be imported by all hosts.
'';
};
};
Expand Down Expand Up @@ -144,14 +136,14 @@ let
networking.hostName = hostName;
}
]
++ systemModules ++ hostConfig.systemSuites
++ systemModules ++ hostConfig.suites
++
[
homeManagerSystemModule
{
_file = ./.;
home-manager = {
sharedModules = cfg.homeModules ++ hostConfig.homeSuites;
sharedModules = cfg.homeModules;
useGlobalPkgs = true;
extraSpecialArgs = specialArgs;
};
Expand Down

0 comments on commit 2cadb21

Please sign in to comment.