diff --git a/modules/home-manager/users/john.nix b/modules/home-manager/users/john.nix deleted file mode 100644 index 90fb127..0000000 --- a/modules/home-manager/users/john.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ inputs, ... }: -{ - flake.homeModules.john = { - home.username = "john"; - home.homeDirectory = "/home/john"; - home.stateVersion = "25.11"; - xdg.enable = true; - - programs.git.settings.user.name = "John Lancaster"; - programs.git.settings.user.email = "32917998+jsl12@users.noreply.github.com"; - - imports = with inputs.self.homeModules; [ - base - docker - # resticprofile - ]; - }; - - # This is the base homeConfiguration for the john user that will be used if no other - flake.homeConfigurations.john = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; - modules = [ - inputs.self.homeModules.john - - # Include another inline module to set the options created through the jsl-home modules - { - docker.enable = false; - ssh.matchSets = { - certs = true; - homelab = true; - }; - } - ]; - }; -} diff --git a/modules/users/john.nix b/modules/users/john.nix new file mode 100644 index 0000000..27677e9 --- /dev/null +++ b/modules/users/john.nix @@ -0,0 +1,54 @@ +{ inputs, ... }: +let + username = "john"; +in +{ + flake.modules.nixos."${username}" = { pkgs, ... }: { + home-manager.users."${username}" = { + imports = [ + inputs.self.homeModules."${username}" + ]; + }; + users.users."${username}" = { + isNormalUser = true; + shell = pkgs.zsh; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAUa4dcg1TWc4pW++uodyhX4eOqrX/QYIxFWtEP7HFJ john@john-pc-ubuntu" + ]; + }; + programs.zsh.enable = true; + }; + + flake.homeModules."${username}" = { + home.username = "${username}"; + home.homeDirectory = "/home/${username}"; + home.stateVersion = "25.11"; + xdg.enable = true; + + programs.git.settings.user.name = "John Lancaster"; + programs.git.settings.user.email = "32917998+jsl12@users.noreply.github.com"; + + imports = with inputs.self.homeModules; [ + base + docker + # resticprofile + ]; + }; + + # This is the base homeConfiguration for the john user that will be used if no other + flake.homeConfigurations."${username}" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; + modules = [ + inputs.self.homeModules."${username}" + + # Include another inline module to set the options created through the jsl-home modules + { + docker.enable = false; + ssh.matchSets = { + certs = true; + homelab = true; + }; + } + ]; + }; +}