mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
flake.nix: use lib.extend
This preserves the nixosSystem function if another flake uses lib.extend itself.
This commit is contained in:
parent
2d6ab6e2f1
commit
74430a81ff
@ -18,17 +18,17 @@
|
|||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
lib = lib // {
|
lib = lib.extend (final: prev: {
|
||||||
nixosSystem = { modules, ... } @ args:
|
nixosSystem = { modules, ... } @ args:
|
||||||
import ./nixos/lib/eval-config.nix (args // {
|
import ./nixos/lib/eval-config.nix (args // {
|
||||||
modules = modules ++
|
modules = modules ++
|
||||||
[ { system.nixos.versionSuffix =
|
[ { system.nixos.versionSuffix =
|
||||||
".${lib.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
|
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
|
||||||
system.nixos.revision = lib.mkIf (self ? rev) self.rev;
|
system.nixos.revision = final.mkIf (self ? rev) self.rev;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
};
|
});
|
||||||
|
|
||||||
checks.x86_64-linux.tarball = jobs.tarball;
|
checks.x86_64-linux.tarball = jobs.tarball;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user