From 60330b60655b3fa3a18624bdd7069855bb37af99 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Feb 2020 16:00:27 +0100 Subject: [PATCH] flake.nix: Handle missing rev attribute Dirty trees no longer set 'rev', so we need to handle this. --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 3f9e22bdae0f..e2346f99c7aa 100644 --- a/flake.nix +++ b/flake.nix @@ -23,8 +23,8 @@ import ./nixos/lib/eval-config.nix (args // { modules = modules ++ [ { system.nixos.versionSuffix = - ".${lib.substring 0 8 self.lastModified}.${self.shortRev}"; - system.nixos.revision = self.rev; + ".${lib.substring 0 8 self.lastModified}.${self.shortRev or "dirty"}"; + system.nixos.revision = lib.mkIf (self ? rev) self.rev; } ]; });