diff options
author | makefu <github@syntax-fehler.de> | 2018-03-07 01:49:57 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-03-07 01:49:57 +0100 |
commit | 6b647a237a5f4db23b7eff70f305be7106da7711 (patch) | |
tree | 3542eabb416599e0d2dea8a2f2358f27f4b911e2 /krebs/3modules/os-release.nix | |
parent | 194e7011d42ed75c76dc7a7efea450ba6497d2f1 (diff) | |
parent | 02f67eed443ba552d775d1a0ab7860d439f7552b (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules/os-release.nix')
-rw-r--r-- | krebs/3modules/os-release.nix | 6 |
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}"; |