state version pass thru option

This commit is contained in:
John Lancaster
2025-07-01 17:33:15 -05:00
parent 6fd8ceead7
commit 6b78ef3a71
2 changed files with 14 additions and 9 deletions

View File

@@ -8,15 +8,7 @@
# manage.
home.username = config.user;
home.homeDirectory = "/home/${config.user}";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "25.05"; # Please read the comment before changing.
home.stateVersion = config.stateVersion;
# The home.packages option allows you to install Nix packages into your
# environment.

View File

@@ -6,6 +6,19 @@
description = "The username for the Home Manager configuration.";
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
options.stateVersion = lib.mkOption {
type = lib.types.str;
default = "25.05";
description = "The state version when the configuration was initially created";
};
options.profile = lib.mkOption {
type = lib.types.enum [ "personal" "work" ];
default = "personal";