diff options
author | lassulus <git@lassul.us> | 2023-06-10 12:50:53 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-06-21 14:47:04 +0200 |
commit | e174ef53caafbcee1e8a2ee83d6195f97afb9388 (patch) | |
tree | 630c6d61843c4a6df904327316f8c3a02a68dd3d /krebs/3modules/os-release.nix | |
parent | d59586939d9530ee55a4c5a3310ae13042127e09 (diff) |
flake: init
Diffstat (limited to 'krebs/3modules/os-release.nix')
-rw-r--r-- | krebs/3modules/os-release.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/krebs/3modules/os-release.nix b/krebs/3modules/os-release.nix index 5fbfe6614..bfd352825 100644 --- a/krebs/3modules/os-release.nix +++ b/krebs/3modules/os-release.nix @@ -1,5 +1,5 @@ -{ config, ... }: -with import <stockholm/lib>; +{ config, lib, ... }: +with lib; let nixos-version-id = if (hasAttr "nixos" config.system) then "${config.system.nixos.version}" else "${config.system.nixosVersion}"; @@ -9,7 +9,7 @@ let nixos-pretty-name = "NixOS ${nixos-version}"; stockholm-version-id = let - eval = tryEval (removeSuffix "\n" (readFile <stockholm-version>)); + eval = builtins.tryEval (removeSuffix "\n" (readFile <stockholm-version>)); in if eval.success then eval.value else "unknown"; |