summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorFabian Möller <fabianm88@gmail.com>2020-07-23 17:36:45 +0200
committerFabian Möller <fabianm88@gmail.com>2020-07-23 17:36:45 +0200
commit74430a81ff583040ae94cff21eacec1e4b32b074 (patch)
tree17e78852e3c4d93e1e86424d050bc31a3dd4d6c8 /flake.nix
parent2d6ab6e2f16b578e9b6f87fa5d8fc78b6151d189 (diff)
downloadnixpkgs-74430a81ff583040ae94cff21eacec1e4b32b074.tar
nixpkgs-74430a81ff583040ae94cff21eacec1e4b32b074.tar.gz
nixpkgs-74430a81ff583040ae94cff21eacec1e4b32b074.tar.bz2
nixpkgs-74430a81ff583040ae94cff21eacec1e4b32b074.tar.lz
nixpkgs-74430a81ff583040ae94cff21eacec1e4b32b074.tar.xz
nixpkgs-74430a81ff583040ae94cff21eacec1e4b32b074.tar.zst
nixpkgs-74430a81ff583040ae94cff21eacec1e4b32b074.zip
flake.nix: use lib.extend
This preserves the nixosSystem function if another flake uses lib.extend
itself.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index e37621c6fc1..0f0164de9c1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;