diff options
author | jeschli <jeschli@gmail.com> | 2018-04-10 18:17:58 +0200 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-04-10 18:17:58 +0200 |
commit | ab7b04f55e9eb331e5f9ed254843ed8e0bcf9d78 (patch) | |
tree | 3c5811972b7fb1c58dbcdc3ac5f52a6bcf9f492b /krebs/3modules/os-release.nix | |
parent | 3f9cbbc8d1f5420ef276633f087e63f700c386e7 (diff) | |
parent | 5b8c4d24e274bbf26e85420fc11b5bf7e24ac22d (diff) |
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'krebs/3modules/os-release.nix')
-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 |