···3535 nixosLabel = mkOption {
3636 type = types.str;
3737 description = ''
3838- NixOS version name to be used in the names of generated
3939- outputs and boot labels.
4040-4141- If you ever wanted to influence the labels in your GRUB menu,
4242- this is option is for you.
4343-4444- Can be set directly or with <envar>NIXOS_LABEL</envar>
4545- environment variable for <command>nixos-rebuild</command>,
4646- e.g.:
4747-4848- <screen>
4949- #!/bin/sh
5050- today=`date +%Y%m%d`
5151- branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')`
5252- revision=`(cd nixpkgs ; git rev-parse HEAD)`
5353- export NIXOS_LABEL="$today.$branch-''${revision:0:7}"
5454- nixos-rebuild switch</screen>
3838+ Label to be used in the names of generated outputs and boot
3939+ labels.
5540 '';
5641 };
5742···10287 system = {
10388 # These defaults are set here rather than up there so that
10489 # changing them would not rebuild the manual
105105- nixosLabel = mkDefault (maybeEnv "NIXOS_LABEL" cfg.nixosVersion);
106106- nixosVersion = mkDefault (maybeEnv "NIXOS_VERSION" (cfg.nixosRelease + cfg.nixosVersionSuffix));
9090+ nixosLabel = mkDefault cfg.nixosVersion;
9191+ nixosVersion = mkDefault (cfg.nixosRelease + cfg.nixosVersionSuffix);
10792 nixosRevision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId);
10893 nixosVersionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId));
10994