summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorseth <[email protected]>2023-02-15 02:52:52 -0500
committerseth <[email protected]>2023-02-15 02:52:52 -0500
commit2633e7bcf3b42447d88dbb5645c2f7d0cb9a1418 (patch)
treef1f62bffb2189cb65ae649e44bb3fc1a4b558960 /util
parented5a2aabd9d2253f9f7a9739f8b911f24f36101a (diff)
improve mkHost
Diffstat (limited to 'util')
-rw-r--r--util/host.nix6
-rw-r--r--util/user.nix27
2 files changed, 18 insertions, 15 deletions
diff --git a/util/host.nix b/util/host.nix
index 637f0f3..c1dc5dd 100644
--- a/util/host.nix
+++ b/util/host.nix
@@ -5,8 +5,8 @@
system ? "x86_64-linux",
version ? "22.11",
pkgs,
- }:
- with pkgs.lib;
+ }: {
+ ${name} = with pkgs.lib;
nixosSystem {
inherit system;
modules =
@@ -22,7 +22,6 @@
# Enable nix flakes
nix.package = pkgs.nixFlakes;
- nix.settings.experimental-features = ["nix-command" "flakes"];
})
home-manager.nixosModules.home-manager
@@ -33,4 +32,5 @@
]
++ modules;
};
+ };
}
diff --git a/util/user.nix b/util/user.nix
index e69d46c..3d16651 100644
--- a/util/user.nix
+++ b/util/user.nix
@@ -4,20 +4,23 @@
stateVersion ? "22.11",
system ? "x86_64-linux",
channel,
+ modules,
}:
home-manager.lib.homeManagerConfiguration {
pkgs = channel.legacyPackages.${system};
- modules = [
- ../users/${username}/home.nix
- {
- nixpkgs.config.allowUnfree = true;
- systemd.user.startServices = true;
- home = {
- inherit username stateVersion;
- homeDirectory = "/home/${username}";
- };
- programs.home-manager.enable = true;
- }
- ];
+ modules =
+ [
+ ../users/${username}/home.nix
+ {
+ nixpkgs.config.allowUnfree = true;
+ systemd.user.startServices = true;
+ home = {
+ inherit username stateVersion;
+ homeDirectory = "/home/${username}";
+ };
+ programs.home-manager.enable = true;
+ }
+ ]
+ ++ modules;
};
}