factor out sources from flake stuff

This commit is contained in:
Kiara Grouwstra 2025-07-01 11:15:39 +02:00 committed by kiara Grouwstra
parent 5a3cbe4d83
commit 3978f96bf4
5 changed files with 16 additions and 6 deletions

View file

@ -2,6 +2,7 @@
self, self,
inputs, inputs,
lib, lib,
sources,
... ...
}: }:
@ -27,7 +28,9 @@ in
../common/nixosTest.nix ../common/nixosTest.nix
./nixosTest.nix ./nixosTest.nix
]; ];
_module.args.inputs = inputs; _module.args = {
inherit inputs sources;
};
inherit targetMachines pathToRoot pathFromRoot; inherit targetMachines pathToRoot pathFromRoot;
}; };
}; };
@ -44,7 +47,9 @@ in
inputs.nixops4-nixos.modules.nixops4Resource.nixos inputs.nixops4-nixos.modules.nixops4Resource.nixos
../common/targetResource.nix ../common/targetResource.nix
]; ];
_module.args.inputs = inputs; _module.args = {
inherit inputs sources;
};
inherit nodeName pathToRoot pathFromRoot; inherit nodeName pathToRoot pathFromRoot;
nixos.module = nixos.module =
{ pkgs, ... }: { pkgs, ... }:

View file

@ -3,6 +3,7 @@
lib, lib,
pkgs, pkgs,
config, config,
sources,
... ...
}: }:
@ -14,8 +15,6 @@ let
types types
; ;
sources = import ../../../npins;
in in
{ {
_class = "nixos"; _class = "nixos";

View file

@ -3,6 +3,7 @@
lib, lib,
config, config,
hostPkgs, hostPkgs,
sources,
... ...
}: }:
@ -61,7 +62,9 @@ in
{ {
deployer = { deployer = {
imports = [ ./deployerNode.nix ]; imports = [ ./deployerNode.nix ];
_module.args.inputs = inputs; _module.args = {
inherit inputs sources;
};
enableAcme = config.enableAcme; enableAcme = config.enableAcme;
acmeNodeIP = config.nodes.acme.networking.primaryIPAddress; acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
}; };

View file

@ -31,6 +31,9 @@
inherit nixpkgs; inherit nixpkgs;
}; };
self = self'; self = self';
specialArgs = {
inherit sources;
};
} }
( (
{ inputs, ... }: { inputs, ... }:

View file

@ -1,6 +1,7 @@
{ {
inputs, inputs,
lib, lib,
sources,
... ...
}: }:
@ -13,7 +14,6 @@ let
filterAttrs filterAttrs
; ;
inherit (lib.attrsets) genAttrs; inherit (lib.attrsets) genAttrs;
sources = import ../../npins;
## Given a machine's name and whether it is a test VM, make a resource module, ## Given a machine's name and whether it is a test VM, make a resource module,
## except for its missing provider. (Depending on the use of that resource, we ## except for its missing provider. (Depending on the use of that resource, we