From d73f9921bfd6bf8bd949be1a469ef769f0a4c307 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Mon, 4 Dec 2023 10:51:22 +0100 Subject: [PATCH] Allow overriding the nixosSystem function. This is useful to add additional defaults or when nixpkgs was patched and we want to use the patched module sources instead of this specified in the flake inputs. --- flake.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ce2e5b3..836e51b 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,7 @@ nixosGenerate = { pkgs ? null, lib ? nixpkgs.lib, + nixosSystem ? nixpkgs.lib.nixosSystem, format, system ? null, specialArgs ? {}, @@ -82,7 +83,7 @@ ) customFormats; formatModule = builtins.getAttr format (self.nixosModules // extraFormats); - image = nixpkgs.lib.nixosSystem { + image = nixosSystem { inherit pkgs specialArgs; system = if system != null