From 5d14d515e082e572bc9d8f45e455dd977db76677 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 8 Mar 2026 11:38:26 -0500 Subject: [PATCH] separated home-manager module for user config --- modules/home-manager/profiles/desktop.nix | 1 - modules/home-manager/users/john.nix | 26 ++------------- modules/home-manager/users/sydney.nix | 5 --- modules/users/john.nix | 39 +++++++++++++++++++++++ modules/users/sydney.nix | 8 +++++ 5 files changed, 50 insertions(+), 29 deletions(-) delete mode 100644 modules/home-manager/users/sydney.nix create mode 100644 modules/users/john.nix create mode 100644 modules/users/sydney.nix diff --git a/modules/home-manager/profiles/desktop.nix b/modules/home-manager/profiles/desktop.nix index 006b98e..6865ec7 100644 --- a/modules/home-manager/profiles/desktop.nix +++ b/modules/home-manager/profiles/desktop.nix @@ -16,7 +16,6 @@ ]; }; - flake.homeConfigurations.desktop = inputs.home-manager.lib.homeManagerConfiguration { pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; modules = with inputs.self.homeModules; [ diff --git a/modules/home-manager/users/john.nix b/modules/home-manager/users/john.nix index ed270c2..0447a60 100644 --- a/modules/home-manager/users/john.nix +++ b/modules/home-manager/users/john.nix @@ -1,30 +1,10 @@ -{ inputs, self, ... }: -let - userName = "john"; -in { - flake.homeModules."${userName}" = { - home.username = userName; - home.homeDirectory = "/home/${userName}"; + flake.homeModules.users.john = { + home.username = "john"; + home.homeDirectory = "/home/john"; home.stateVersion = "25.11"; programs.git.settings.user.name = "John Lancaster"; programs.git.settings.user.email = "32917998+jsl12@users.noreply.github.com"; }; - - flake.modules.nixos.user = - { pkgs, ... }: - { - users.users."${userName}" = { - name = "${userName}"; - shell = pkgs.zsh; - }; - programs.zsh.enable = true; - - home-manager.users."${userName}" = { - imports = [ - inputs.self.homeModules."${userName}" - ]; - }; - }; } diff --git a/modules/home-manager/users/sydney.nix b/modules/home-manager/users/sydney.nix deleted file mode 100644 index 327052c..0000000 --- a/modules/home-manager/users/sydney.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - flake.homeModules.onepassword = { - # TODO: Port `_1password = true` behavior into an explicit Home Manager module. - }; -} \ No newline at end of file diff --git a/modules/users/john.nix b/modules/users/john.nix new file mode 100644 index 0000000..0c24d1d --- /dev/null +++ b/modules/users/john.nix @@ -0,0 +1,39 @@ +{ inputs, ... }: +let + userName = "john"; +in +{ + flake.modules.nixos.user = + { pkgs, ... }: + { + users.users."${userName}" = { + name = "${userName}"; + shell = pkgs.zsh; + }; + programs.zsh.enable = true; + + home-manager.users."${userName}" = { + imports = [ + inputs.self.homeModules."${userName}" + ]; + }; + }; + + flake.homeConfigurations.${userName} = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; + modules = [ + inputs.self.homeModules.users."${userName}" + + # Include another inline module to set the options created through the jsl-home modules + { + homeManagerFlakeDir = "~/.config/home-manager"; + docker.enable = true; + ssh.matchSets = { + certs = true; + appdaemon = true; + homelab = true; + }; + } + ]; + }; +} diff --git a/modules/users/sydney.nix b/modules/users/sydney.nix new file mode 100644 index 0000000..52c8c17 --- /dev/null +++ b/modules/users/sydney.nix @@ -0,0 +1,8 @@ +{ inputs, self, ... }: +let + userName = "sydney"; +in +{ + flake.homeModules."${userName}" = { + }; +} \ No newline at end of file