diff options
author | tv <tv@krebsco.de> | 2018-04-03 23:20:32 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2018-04-03 23:20:32 +0200 |
commit | eb684c7618697b370cf69c175ef43e0ced361407 (patch) | |
tree | 2d81470fdf4063379270cfa32a2a3b6c4aa01008 /krebs/3modules/os-release.nix | |
parent | 3108c4323806eee9798a6ba42977ea8f16343731 (diff) | |
parent | 1604ecfc706d2921248d0c9ac7cef02274842272 (diff) |
Merge remote-tracking branch 'prism/master'
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 |