about summary refs log tree commit diff
path: root/nixos/modules/misc/version.nix
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-07-31 22:08:29 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-08-01 18:40:36 +0900
commitc7bd26e5376da23e94c49515f0bff60964de4433 (patch)
tree66f154d2cc98271646d33f9850fa936f8cdbe169 /nixos/modules/misc/version.nix
parent1114ab41e6622cc4ac59ffb16e3bd291194e3208 (diff)
version module: refactor with fileContents
Diffstat (limited to 'nixos/modules/misc/version.nix')
-rw-r--r--nixos/modules/misc/version.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix
index 6d4d3a9eea34b..6af310a9d8770 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. <literal>16.03</literal>).";
     };
 
     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. <literal>1160.f2d4ee1</literal>).";
     };
 
     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.";
     };