Add nix module to preserve system flake in generations

This commit is contained in:
outfoxxed 2023-06-20 01:41:31 -07:00
parent 45ab2f83aa
commit 96ed6c4c63
Signed by: outfoxxed
GPG Key ID: 4C88A185FB89301E
2 changed files with 9 additions and 1 deletions

View File

@ -16,9 +16,10 @@
specialArgs = { inherit system inputs; };
modules = [
./systems/lenovo.nix
./modules/preserve-system.nix
./modules/core.nix
./modules/user
./systems/lenovo.nix
];
};
};

View 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;
}