diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2022-08-08 11:53:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 11:53:10 +0200 |
commit | 661c29c806409f2883f2445e42583206426ffd46 (patch) | |
tree | aa9e06c7cffb5fe4037d6fd05b39e3e91d1e7644 /nixos/modules/misc/version.nix | |
parent | 251f5be0bc0606fb085d21d3218883187a702782 (diff) | |
parent | 9aa588ecc394f140681a0d68b635b3cf45ade411 (diff) | |
download | nixpkgs-661c29c806409f2883f2445e42583206426ffd46.tar nixpkgs-661c29c806409f2883f2445e42583206426ffd46.tar.gz nixpkgs-661c29c806409f2883f2445e42583206426ffd46.tar.bz2 nixpkgs-661c29c806409f2883f2445e42583206426ffd46.tar.lz nixpkgs-661c29c806409f2883f2445e42583206426ffd46.tar.xz nixpkgs-661c29c806409f2883f2445e42583206426ffd46.tar.zst nixpkgs-661c29c806409f2883f2445e42583206426ffd46.zip |
Merge pull request #181222 from hercules-ci/module-specialArgs
`_module.specialArgs` + unit test for nixos/documentation module
Diffstat (limited to 'nixos/modules/misc/version.nix')
-rw-r--r-- | nixos/modules/misc/version.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index bdc3e5623be..b3cdaf5568d 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -38,12 +38,19 @@ let in { imports = [ + ./label.nix (mkRenamedOptionModule [ "system" "nixosVersion" ] [ "system" "nixos" "version" ]) (mkRenamedOptionModule [ "system" "nixosVersionSuffix" ] [ "system" "nixos" "versionSuffix" ]) (mkRenamedOptionModule [ "system" "nixosRevision" ] [ "system" "nixos" "revision" ]) (mkRenamedOptionModule [ "system" "nixosLabel" ] [ "system" "nixos" "label" ]) ]; + options.boot.initrd.osRelease = mkOption { + internal = true; + readOnly = true; + default = initrdRelease; + }; + options.system = { nixos.version = mkOption { @@ -142,11 +149,6 @@ in "os-release".text = attrsToText osReleaseContents; }; - boot.initrd.systemd.contents = { - "/etc/os-release".source = initrdRelease; - "/etc/initrd-release".source = initrdRelease; - }; - # We have to use `warnings` because when warning in the default of the option # the warning would also be shown when building the manual since the manual # has to evaluate the default. |