From ef3b728dd8225e16a3a43b042674361765b41876 Mon Sep 17 00:00:00 2001 From: Simon Parri Date: Thu, 15 May 2025 22:43:10 -0500 Subject: Change modules to pass flake inputs collectively, not individually --- flake.nix | 4 ++-- hosts/ades/default.nix | 6 ++++-- hosts/default.nix | 8 +++++--- hosts/muspell/default.nix | 4 +++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 2effb06..0e63219 100644 --- a/flake.nix +++ b/flake.nix @@ -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" { -- cgit v1.2.3