diff options
author | lassulus <lassulus@lassul.us> | 2018-03-18 17:31:59 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-03-21 10:20:08 +0100 |
commit | e5f3827fc84ba1c769c1422d92fa93ebcb0fc5d1 (patch) | |
tree | c3a1f99fc1f6c3c9beb2726d3c1f9a2e031560eb /krebs/3modules | |
parent | 26eb236cd9cce469be2a7cb227083742e037fac8 (diff) |
os-release: follow renamed modules
Diffstat (limited to 'krebs/3modules')
-rw-r--r-- | krebs/3modules/os-release.nix | 7 |
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 |