summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/os-release.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-03-13 18:52:07 +0100
committerjeschli <jeschli@gmail.com>2018-03-13 18:55:44 +0100
commit6267aa42509a4f56dc95dfc2db7773c33ca12522 (patch)
tree3d9bcb9e7424ebdd04bf8ddcaf96f11626ea351b /krebs/3modules/os-release.nix
parente7ac3fc703929cd503bc6a01cad449a5b2c328f2 (diff)
parent02f67eed443ba552d775d1a0ab7860d439f7552b (diff)
Merge remote-tracking branch 'origin/master' into HEAD
Diffstat (limited to 'krebs/3modules/os-release.nix')
-rw-r--r--krebs/3modules/os-release.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/krebs/3modules/os-release.nix b/krebs/3modules/os-release.nix
index 0779feede..8f71a357f 100644
--- a/krebs/3modules/os-release.nix
+++ b/krebs/3modules/os-release.nix
@@ -5,7 +5,11 @@ let
nixos-version = "${nixos-version-id} (${config.system.nixosCodeName})";
nixos-pretty-name = "NixOS ${nixos-version}";
- stockholm-version-id = maybeEnv "STOCKHOLM_VERSION" "unknown";
+ stockholm-version-id = let
+ eval = tryEval (removeSuffix "\n" (readFile <stockholm-version>));
+ in
+ if eval.success then eval.value else "unknown";
+
stockholm-version = "${stockholm-version-id}";
stockholm-pretty-name = "stockholm ${stockholm-version}";