summaryrefslogtreecommitdiff
path: root/util/host.nix
diff options
context:
space:
mode:
Diffstat (limited to 'util/host.nix')
-rw-r--r--util/host.nix75
1 files changed, 38 insertions, 37 deletions
diff --git a/util/host.nix b/util/host.nix
index 869b674..a008566 100644
--- a/util/host.nix
+++ b/util/host.nix
@@ -1,41 +1,42 @@
-{home-manager, ...}: {
- mkHost = {
- name,
- modules,
- system ? "x86_64-linux",
- specialArgs ? {},
- version ? "22.11",
- pkgs,
- }: {
- ${name} = with pkgs.lib;
- nixosSystem {
- inherit system specialArgs;
- modules =
- [
- ../hosts/common
- ../hosts/${name}
+{ home-manager, ... }: {
+ mkHost =
+ { name
+ , modules
+ , system ? "x86_64-linux"
+ , specialArgs ? { }
+ , version ? "22.11"
+ , pkgs
+ ,
+ }: {
+ ${name} = with pkgs.lib;
+ nixosSystem {
+ inherit system specialArgs;
+ modules =
+ [
+ ../hosts/common
+ ../hosts/${name}
- ({pkgs, ...}: {
- system.stateVersion = version;
- networking.hostName = mkDefault name;
- # enable non-free packages
- nixpkgs.config.allowUnfree = true;
+ ({ pkgs, ... }: {
+ system.stateVersion = version;
+ networking.hostName = mkDefault name;
+ # enable non-free packages
+ nixpkgs.config.allowUnfree = true;
- # Enable nix flakes
- nix.package = pkgs.nixFlakes;
- nix.settings.experimental-features = ["nix-command" "flakes"];
- })
+ # Enable nix flakes
+ nix.package = pkgs.nixFlakes;
+ nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ })
- home-manager.nixosModules.home-manager
- {
- home-manager = {
- useGlobalPkgs = true;
- useUserPackages = true;
- extraSpecialArgs = specialArgs;
- };
- }
- ]
- ++ modules;
- };
- };
+ home-manager.nixosModules.home-manager
+ {
+ home-manager = {
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ extraSpecialArgs = specialArgs;
+ };
+ }
+ ]
+ ++ modules;
+ };
+ };
}