mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
version module: refactor with fileContents
This commit is contained in:
parent
1114ab41e6
commit
c7bd26e537
@ -49,21 +49,21 @@ in
|
|||||||
nixosRelease = mkOption {
|
nixosRelease = mkOption {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = readFile releaseFile;
|
default = fileContents releaseFile;
|
||||||
description = "The NixOS release (e.g. <literal>16.03</literal>).";
|
description = "The NixOS release (e.g. <literal>16.03</literal>).";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosVersionSuffix = mkOption {
|
nixosVersionSuffix = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
type = types.str;
|
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>).";
|
description = "The NixOS version suffix (e.g. <literal>1160.f2d4ee1</literal>).";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosRevision = mkOption {
|
nixosRevision = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
type = types.str;
|
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.";
|
description = "The Git revision from which this NixOS configuration was built.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user