From c7bd26e5376da23e94c49515f0bff60964de4433 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Sun, 31 Jul 2016 22:08:29 +0900 Subject: [PATCH] version module: refactor with fileContents --- nixos/modules/misc/version.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index 6d4d3a9eea34..6af310a9d877 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -49,21 +49,21 @@ in nixosRelease = mkOption { readOnly = true; type = types.str; - default = readFile releaseFile; + default = fileContents releaseFile; description = "The NixOS release (e.g. 16.03)."; }; nixosVersionSuffix = mkOption { internal = true; type = types.str; - default = if pathExists suffixFile then readFile suffixFile else "pre-git"; + default = if pathExists suffixFile then fileContents suffixFile else "pre-git"; description = "The NixOS version suffix (e.g. 1160.f2d4ee1)."; }; nixosRevision = mkOption { internal = true; type = types.str; - default = if pathExists revisionFile then readFile revisionFile else "master"; + default = if pathExists revisionFile then fileContents revisionFile else "master"; description = "The Git revision from which this NixOS configuration was built."; };