Add nix module to preserve system flake in generations
This commit is contained in:
parent
45ab2f83aa
commit
96ed6c4c63
|
@ -16,9 +16,10 @@
|
||||||
specialArgs = { inherit system inputs; };
|
specialArgs = { inherit system inputs; };
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./systems/lenovo.nix
|
./modules/preserve-system.nix
|
||||||
./modules/core.nix
|
./modules/core.nix
|
||||||
./modules/user
|
./modules/user
|
||||||
|
./systems/lenovo.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
7
modules/preserve-system.nix
Normal file
7
modules/preserve-system.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# preserve the flake that built the current system generation
|
||||||
|
|
||||||
|
{ inputs, ... }: let
|
||||||
|
inherit (inputs) self;
|
||||||
|
in {
|
||||||
|
environment.etc."current-flake".source = self;
|
||||||
|
}
|
Loading…
Reference in a new issue