summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/os-release.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-03-18 17:31:59 +0100
committerlassulus <lassulus@lassul.us>2018-03-21 10:20:08 +0100
commite5f3827fc84ba1c769c1422d92fa93ebcb0fc5d1 (patch)
treec3a1f99fc1f6c3c9beb2726d3c1f9a2e031560eb /krebs/3modules/os-release.nix
parent26eb236cd9cce469be2a7cb227083742e037fac8 (diff)
os-release: follow renamed modules
Diffstat (limited to 'krebs/3modules/os-release.nix')
-rw-r--r--krebs/3modules/os-release.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/krebs/3modules/os-release.nix b/krebs/3modules/os-release.nix
index 8f71a357f..5fbfe6614 100644
--- a/krebs/3modules/os-release.nix
+++ b/krebs/3modules/os-release.nix
@@ -1,8 +1,11 @@
{ config, ... }:
with import <stockholm/lib>;
let
- nixos-version-id = "${config.system.nixosVersion}";
- nixos-version = "${nixos-version-id} (${config.system.nixosCodeName})";
+ nixos-version-id = if (hasAttr "nixos" config.system) then
+ "${config.system.nixos.version}" else "${config.system.nixosVersion}";
+ nixos-codeName = if (hasAttr "nixos" config.system) then
+ "${config.system.nixos.codeName}" else "${config.system.nixosCodeName}";
+ nixos-version = "${nixos-version-id} (${nixos-codeName})";
nixos-pretty-name = "NixOS ${nixos-version}";
stockholm-version-id = let