about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-21 17:30:36 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-22 00:18:59 +0200
commite61b9e42193a505a1dce75c82d4bf236598c0f10 (patch)
tree4c2c74e28226546edfcbc0755998e4a88351f0f9
parentMove hosts declaration to flake.nix (diff)
downloadnixos-config-e61b9e42193a505a1dce75c82d4bf236598c0f10.tar.gz
nixos-config-e61b9e42193a505a1dce75c82d4bf236598c0f10.tar.bz2
nixos-config-e61b9e42193a505a1dce75c82d4bf236598c0f10.zip
mkHost: Add extraModules argument
-rw-r--r--flake.nix5
-rw-r--r--hosts/default.nix6
2 files changed, 5 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index 7338341..97627c2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -32,8 +32,8 @@
       dotfiles = ./dotfiles;
 
       hosts = [
-        { host = "phobos"; system = "x86_64-linux"; extraOverlays = [ ]; timezone = secrets.main_timezone; location = secrets.main_location; }
-        { host = "luna"; system = "x86_64-linux"; extraOverlays = [ ]; timezone = secrets.main_timezone; location = secrets.main_location; }
+        { host = "phobos"; system = "x86_64-linux"; extraOverlays = [ ]; extraModules = [ ]; timezone = secrets.main_timezone; location = secrets.main_location; }
+        { host = "luna"; system = "x86_64-linux"; extraOverlays = [ ]; extraModules = [ ]; timezone = secrets.main_timezone; location = secrets.main_location; }
       ];
 
       hardwares = [
@@ -47,7 +47,6 @@
         inherit (nixpkgs) lib;
         inherit inputs nixpkgs home-manager;
         inherit user secrets dotfiles hosts hardwares;
-        extraModules = [ ];
       };
     in
     {
diff --git a/hosts/default.nix b/hosts/default.nix
index 6be70b0..2624f14 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -1,6 +1,6 @@
-{ lib, inputs, secrets, dotfiles, hosts, hardwares, extraModules, isNixOS, isIso, isHardware, user, nixpkgs, home-manager, ... }:
+{ lib, inputs, secrets, dotfiles, hosts, hardwares, isNixOS, isIso, isHardware, user, nixpkgs, home-manager, ... }:
 let
-  mkHost = { host, hardware, system, timezone, location, extraOverlays }: extraModules: isNixOS: isIso: isHardware:
+  mkHost = { host, hardware, system, timezone, location, extraOverlays, extraModules }: isNixOS: isIso: isHardware:
     let
       pkgs = import nixpkgs {
         inherit system;
@@ -60,4 +60,4 @@ in
     Map each element of the list applying the mkHost function to its elements and returning a set in the listToAttrs format
     builtins.listToAttrs on the result
   */
-builtins.listToAttrs (map (mInput@{ host, hardware, system, timezone, location, extraOverlays }: { name = host + "-" + hardware; value = mkHost mInput extraModules isNixOS isIso isHardware; }) permutatedHosts)
+builtins.listToAttrs (map (mInput@{ host, hardware, ... }: { name = host + "-" + hardware; value = mkHost mInput isNixOS isIso isHardware; }) permutatedHosts)