aboutsummaryrefslogtreecommitdiff
path: root/lib/nix-furnace
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-01-08 09:43:14 -0600
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-01-08 09:43:14 -0600
commit5474e411f4898b00014c1599bec4d26eb2741ad1 (patch)
tree230b2102c9e9c7cae89a963bd29b384720812522 /lib/nix-furnace
parent614601493f48de9ecb4ff34edbe0d27d8ac60ed1 (diff)
clean up nix-furnace
Diffstat (limited to 'lib/nix-furnace')
-rw-r--r--lib/nix-furnace/mkSystem.nix106
1 files changed, 26 insertions, 80 deletions
diff --git a/lib/nix-furnace/mkSystem.nix b/lib/nix-furnace/mkSystem.nix
index e547eb2..85f952c 100644
--- a/lib/nix-furnace/mkSystem.nix
+++ b/lib/nix-furnace/mkSystem.nix
@@ -8,10 +8,9 @@ let
inputs,
hostname,
username,
- module_types,
}:
inputs.nixpkgs.lib.nixosSystem {
- specialArgs = {inherit inputs my-lib hostname;};
+ specialArgs = {inherit inputs my-lib;};
modules = [
{networking.hostName = hostname;}
@@ -33,87 +32,34 @@ let
|> my-lib.flatten);
}
- # Home-sided modules
- (
- if (builtins.elem "home" module_types)
- then {
- imports = [
- inputs.home-manager.nixosModules.home-manager
- ];
- home-manager = {
- backupFileExtension = "bak";
- useGlobalPkgs = true;
- useUserPackages = true;
- extraSpecialArgs = {inherit inputs my-lib;};
- users.${username} = {
- imports =
- [
- ../../modules/options.nix
- ../../hosts/${hostname}/config.nix
- (lazyImport ../../hosts/${hostname}/home.nix)
- {
- home.preferXdgDirectories = true;
- }
- ]
- ++ (listModules
- |> (builtins.map (modName: [
- (lazyImport ../../modules/${modName}/options.nix)
- (lazyImport ../../modules/${modName}/home/default.nix)
- ]))
- |> my-lib.flatten);
- };
- };
- }
- else {}
- )
-
# Hjem-sided modules
- (
- if (builtins.elem "hjem" module_types)
- then {
- imports = [
- inputs.hjem.nixosModules.hjem
- ];
- hjem = {
- extraModules =
- [
- ../../modules/options.nix
- ../../hosts/${hostname}/config.nix
- (lazyImport ../../hosts/${hostname}/hjem.nix)
- ]
- ++ (listModules
- |> (builtins.map (modName: [
- (lazyImport ../../modules/${modName}/options.nix)
- (lazyImport ../../modules/${modName}/hjem/default.nix)
- ]))
- |> my-lib.flatten);
- specialArgs = {inherit inputs my-lib;};
- users.${username} = {
- enable = true;
- user = username;
- directory = "/home/${username}";
- };
+ {
+ imports = [
+ inputs.hjem.nixosModules.hjem
+ ];
+ hjem = {
+ extraModules =
+ [
+ ../../modules/options.nix
+ ../../hosts/${hostname}/config.nix
+ (lazyImport ../../hosts/${hostname}/hjem.nix)
+ ]
+ ++ (listModules
+ |> (builtins.map (modName: [
+ (lazyImport ../../modules/${modName}/options.nix)
+ (lazyImport ../../modules/${modName}/hjem/default.nix)
+ ]))
+ |> my-lib.flatten);
+ specialArgs = {inherit inputs my-lib;};
+ users.${username} = {
+ enable = true;
+ user = username;
+ directory = "/home/${username}";
};
- }
- else {}
- )
+ };
+ }
];
};
-
- mkSystemManagerSystem = {
- inputs,
- hostname,
- }:
- inputs.system-manager.lib.makeSystemConfig {
- modules =
- [../../modules/options.nix ../../hosts/${hostname}/system.nix]
- ++ (listModules
- |> (builtins.map (modName: [
- (lazyImport ../../modules/${modName}/options.nix)
- (lazyImport ../../modules/${modName}/system/default.nix)
- ]))
- |> my-lib.flatten);
- };
in {
- inherit mkNixosSystem mkSystemManagerSystem;
+ inherit mkNixosSystem;
}