From 33bcefc45b4a8881310f77a2bbda466a8b0f466a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 18 Jan 2023 11:45:18 +0100 Subject: lib: add my own library functions --- nixos/configurations.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nixos') diff --git a/nixos/configurations.nix b/nixos/configurations.nix index 24256b3..943b59a 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -18,6 +18,9 @@ with nixpkgs.lib; let } ] ++ (optional (hasAttr "machine-${hostname}" self.nixosModules) self.nixosModules."machine-${hostname}"); + specialArgs = { + lib = nixpkgs.lib.extend (prev: final: import ../lib prev); + }; genericSystem = { system ? "x86_64-linux", @@ -26,6 +29,7 @@ with nixpkgs.lib; let ${hostname} = nixpkgs.lib.nixosSystem { system = system; modules = (modules hostname) ++ extra_modules; + specialArgs = specialArgs; }; }; amd64System = genericSystem {}; @@ -96,6 +100,7 @@ with nixpkgs.lib; let nixpkgs = nixpkgs; board = board; modules = modules hostname; + override.specialArgs = specialArgs; }; }; turrisMoxSystem = turrisSystem "mox"; -- cgit v1.2.3