diff options
author | Simon Parri <simonparri@ganzeria.com> | 2025-05-15 22:43:10 -0500 |
---|---|---|
committer | Simon Parri <simonparri@ganzeria.com> | 2025-05-15 22:49:32 -0500 |
commit | ef3b728dd8225e16a3a43b042674361765b41876 (patch) | |
tree | 238d0ca43014f55eb79773020c6682a9b1bfbfeb | |
parent | 26397a98ece50645e8ad1f0f0a67da32a4c3b4df (diff) | |
download | nixos-config-ef3b728dd8225e16a3a43b042674361765b41876.tar.gz nixos-config-ef3b728dd8225e16a3a43b042674361765b41876.zip |
Change modules to pass flake inputs collectively, not individually
-rw-r--r-- | flake.nix | 4 | ||||
-rw-r--r-- | hosts/ades/default.nix | 6 | ||||
-rw-r--r-- | hosts/default.nix | 8 | ||||
-rw-r--r-- | hosts/muspell/default.nix | 4 |
4 files changed, 14 insertions, 8 deletions
@@ -9,10 +9,10 @@ }; }; - outputs = { self, nixpkgs, mobile-nixos }: { + outputs = inputs@{ self, ... }: { nixosConfigurations = import ./hosts { - inherit nixpkgs mobile-nixos; + inherit inputs; }; muspell-img = self.nixosConfigurations. diff --git a/hosts/ades/default.nix b/hosts/ades/default.nix index b4cae58..8f3f4e6 100644 --- a/hosts/ades/default.nix +++ b/hosts/ades/default.nix @@ -1,6 +1,8 @@ -{ mkHost, hosts, nixpkgs }: +{ mkHost, hosts, inputs }: -let inherit (nixpkgs.lib.attrsets) +let + inherit (inputs) nixpkgs; + inherit (nixpkgs.lib.attrsets) mergeAttrsList; in mergeAttrsList diff --git a/hosts/default.nix b/hosts/default.nix index 015e307..d5770c6 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,12 +1,14 @@ -{ nixpkgs, mobile-nixos }: +{ inputs }: let + inherit (inputs) nixpkgs; + mkHost = system: hostname: modules: { "${hostname}" = nixpkgs.lib.nixosSystem { inherit system; modules = [ ../modules ../users ] ++ modules; specialArgs = { - inherit hostname nixpkgs mobile-nixos; + inherit hostname inputs; }; }; }; @@ -30,7 +32,7 @@ let hostsImport = file: import file { - inherit nixpkgs mkHost hosts; + inherit inputs mkHost hosts; }; in hosts { diff --git a/hosts/muspell/default.nix b/hosts/muspell/default.nix index d2942c3..97d4b64 100644 --- a/hosts/muspell/default.nix +++ b/hosts/muspell/default.nix @@ -1,5 +1,7 @@ -{ mobile-nixos, lib, pkgs, ... }: +{ inputs, lib, pkgs, ... }: +let inherit (inputs) mobile-nixos; +in { imports = [ (import "${mobile-nixos}/lib/configuration.nix" { |