fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , ...} : 2 3with lib ; 4 5let releaseInfo = lib . importJSON ../../release.json ; 6 7in { 8options = { 9home . stateVersion = mkOption { 10type = types . enum [ 11"18.09" 12"19.03" 13"19.09" 14"20.03" 15"20.09" 16"21.03" 17"21.05" 18"21.11" 19"22.05" 20"22.11" 21"23.05" 22"23.11" 23]; 24description = '' 25It is occasionally necessary for Home Manager to change 26configuration defaults in a way that is incompatible with 27stateful data. This could, for example, include switching the 28default data format or location of a file. 29 30The *state version* indicates which default 31settings are in effect and will therefore help avoid breaking 32program configurations. Switching to a higher state version 33typically requires performing some manual steps, such as data 34conversion or moving files. 35'' ; 36}; 37 38home . version = { 39full = mkOption { 40internal = true ; 41readOnly = true ; 42type = types . str ; 43default = let 44inherit ( config . home . version ) release revision ; 45suffix = 46optionalString ( revision != null ) "+ ${ substring 0 8 revision } " ; 47in " ${ release }${ suffix } " ; 48example = "22.11+213a0629" ; 49description = "The full Home Manager version." ; 50}; 51 52release = mkOption { 53internal = true ; 54readOnly = true ; 55type = types . str ; 56default = releaseInfo . release ; 57example = "22.11" ; 58description = "The Home Manager release." ; 59}; 60 61isReleaseBranch = mkOption { 62internal = true ; 63readOnly = true ; 64type = types . bool ; 65default = releaseInfo . isReleaseBranch ; 66description = '' 67Whether the Home Manager version is from a versioned 68release branch. 69'' ; 70}; 71 72revision = mkOption { 73internal = true ; 74type = types . nullOr types . str ; 75default = let gitRepo = " ${ toString ./../.. } /.git" ; 76in if pathIsGitRepo gitRepo then commitIdFromGitRepo gitRepo else null ; 77description = '' 78The Git revision from which this Home Manager configuration was built. 79'' ; 80}; 81}; 82}; 83}