From de44f365fb79c132a73799b48996468b0fd2c789 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Thu, 3 Jul 2025 00:27:12 -0500 Subject: [PATCH] shuffled root user options --- flake.nix | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index 2fd8d08..d4e1893 100644 --- a/flake.nix +++ b/flake.nix @@ -65,21 +65,26 @@ home-manager = { useUserPackages = true; extraSpecialArgs = { inherit inputs; }; - users.root.home.stateVersion = config.stateVersion; - users.root.programs.git = { - extraConfig.credential.helper = "store --file ~/.git-credentials"; - }; - users.${config.user} = { - imports = [ - self.homeManagerModules.default { - user = config.user; - stateVersion = config.stateVersion; - profile = config.profile; - shell = config.shell; - ssh = config.ssh; - _1password = config._1password; - } - ] ++ config.extraImports; + users = { + ${config.user} = { + imports = [ + self.homeManagerModules.default { + user = config.user; + stateVersion = config.stateVersion; + profile = config.profile; + shell = config.shell; + ssh = config.ssh; + _1password = config._1password; + } + ] ++ config.extraImports; + }; + } // lib.optionalAttrs config.root { + root = { + home.stateVersion = config.stateVersion; + programs.git = { + extraConfig.credential.helper = "store --file ~/.git-credentials"; + }; + }; }; }; };