Skip to content

Commit

Permalink
flake.nix: use lib.extend
Browse files Browse the repository at this point in the history
This preserves the nixosSystem function if another flake uses lib.extend
itself.
  • Loading branch information
B4dM4n committed Jul 23, 2020
1 parent 2d6ab6e commit 74430a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flake.nix
Expand Up @@ -18,17 +18,17 @@

in
{
lib = lib // {
lib = lib.extend (final: prev: {
nixosSystem = { modules, ... } @ args:
import ./nixos/lib/eval-config.nix (args // {
modules = modules ++
[ { system.nixos.versionSuffix =
".${lib.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
system.nixos.revision = lib.mkIf (self ? rev) self.rev;
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
system.nixos.revision = final.mkIf (self ? rev) self.rev;
}
];
});
};
});

checks.x86_64-linux.tarball = jobs.tarball;

Expand Down

0 comments on commit 74430a8

Please sign in to comment.