From 6b78ef3a7156812c7f79272974d1e3b20d8232c5 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Tue, 1 Jul 2025 17:33:15 -0500 Subject: [PATCH] state version pass thru option --- home.nix | 10 +--------- options.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/home.nix b/home.nix index c237da5..ad4ecbd 100644 --- a/home.nix +++ b/home.nix @@ -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. diff --git a/options.nix b/options.nix index ac6fcbb..63d20f6 100644 --- a/options.nix +++ b/options.nix @@ -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";