summary refs log blame commit diff
path: root/nixos/modules/misc/label.nix
blob: 5faac8936f8f2dfa7ea0a2b8630d3615505ea5e4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12




                           
                            





                    
                            














                                                                     
                                               


    
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.system.nixos;
in

{

  options.system = {

    nixos.label = mkOption {
      type = types.str;
      description = ''
        NixOS version name to be used in the names of generated
        outputs and boot labels.

        If you ever wanted to influence the labels in your GRUB menu,
        this is the option for you.
      '';
    };

  };

  config = {
    # This is set here rather than up there so that changing it would
    # not rebuild the manual
    system.nixos.label = mkDefault cfg.version;
  };

}