summaryrefslogtreecommitdiff
path: root/util/host.nix
diff options
context:
space:
mode:
Diffstat (limited to 'util/host.nix')
-rw-r--r--util/host.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/util/host.nix b/util/host.nix
new file mode 100644
index 0000000..18e87a9
--- /dev/null
+++ b/util/host.nix
@@ -0,0 +1,28 @@
+{lib, ...}:
+with lib; {
+ mkHost = {
+ name,
+ modules,
+ system ? "x86_64-linux",
+ pkgs,
+ }:
+ nixosSystem {
+ inherit system;
+ modules =
+ [
+ ../hosts/common
+
+ {
+ nixpkgs.pkgs = pkgs;
+ networking.hostName = mkDefault name;
+ }
+
+ home-manager.nixosModules.home-manager
+ {
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ }
+ ]
+ ++ modules;
+ };
+}