diff --git a/aspects/users/user.nix b/aspects/users/user.nix index e37c038..e3f8530 100644 --- a/aspects/users/user.nix +++ b/aspects/users/user.nix @@ -1,85 +1,22 @@ -{ inputs, lib, ... }: +{ ... }: { - flake = { - modules.nixos.user = - { pkgs, ... }: - { - users.users.user = { - isNormalUser = true; - shell = pkgs.fish; - extraGroups = [ - "networkmanager" - "wheel" - ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQPkAyy+Du9Omc2WtnUF2TV8jFAF4H6mJi2D4IZ1nzg user@himalia" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3Y0PVpGfJHonqDS7qoCFhqzUvqGq9I9sax+F9e/5cs user@io" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL user@rotterdam" - ]; - hashedPassword = "$6$Pj7v/CpstyuWQQV0$cNujVDhfMBdwlGVEnnd8t71.kZPixbo0u25cd.874iaqLTH4V5fa1f98V5zGapjQCz5JyZmsR94xi00sUrntT0"; - }; - }; - - homeConfigurations = { - "user@rotterdam" = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = { - inherit inputs; - hostname = "rotterdam"; - }; - modules = [ - { nixpkgs.overlays = [ inputs.self.overlays.default ]; } - { - home = { - username = "user"; - homeDirectory = "/home/user"; - stateVersion = "22.05"; - }; - } - ((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_user) - ] - ++ (with inputs.self.modules.homeManager; [ - # system aspects - base - cli - desktop - gaming - - # other aspects - stylix - niri - ]); - }; - - "user@io" = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = { - inherit inputs; - hostname = "io"; - }; - modules = [ - { nixpkgs.overlays = [ inputs.self.overlays.default ]; } - { - home = { - username = "user"; - homeDirectory = "/home/user"; - stateVersion = "22.05"; - }; - } - ((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_user) - ] - ++ (with inputs.self.modules.homeManager; [ - # system aspects - base - cli - desktop - - # other aspect - stylix - niri - ]); + flake.modules.nixos.user = + { pkgs, ... }: + { + users.users.user = { + isNormalUser = true; + shell = pkgs.fish; + extraGroups = [ + "networkmanager" + "wheel" + ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQPkAyy+Du9Omc2WtnUF2TV8jFAF4H6mJi2D4IZ1nzg user@himalia" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3Y0PVpGfJHonqDS7qoCFhqzUvqGq9I9sax+F9e/5cs user@io" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL user@rotterdam" + ]; + hashedPassword = "$6$Pj7v/CpstyuWQQV0$cNujVDhfMBdwlGVEnnd8t71.kZPixbo0u25cd.874iaqLTH4V5fa1f98V5zGapjQCz5JyZmsR94xi00sUrntT0"; }; }; - }; } diff --git a/aspects/users/user_io.nix b/aspects/users/user_io.nix new file mode 100644 index 0000000..c956b1c --- /dev/null +++ b/aspects/users/user_io.nix @@ -0,0 +1,32 @@ +{ inputs, lib, ... }: + +{ + flake."user@io" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { + inherit inputs; + hostname = "io"; + }; + modules = [ + { nixpkgs.overlays = [ inputs.self.overlays.default ]; } + { + home = { + username = "user"; + homeDirectory = "/home/user"; + stateVersion = "22.05"; + }; + } + ((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_user) + ] + ++ (with inputs.self.modules.homeManager; [ + # system aspects + base + cli + desktop + + # other aspect + stylix + niri + ]); + }; +} diff --git a/aspects/users/user_rotterdam.nix b/aspects/users/user_rotterdam.nix new file mode 100644 index 0000000..56b2dc1 --- /dev/null +++ b/aspects/users/user_rotterdam.nix @@ -0,0 +1,35 @@ +{ inputs, lib, ... }: + +{ + flake.homeConfigurations = { + "user@rotterdam" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { + inherit inputs; + hostname = "rotterdam"; + }; + modules = [ + { nixpkgs.overlays = [ inputs.self.overlays.default ]; } + { + home = { + username = "user"; + homeDirectory = "/home/user"; + stateVersion = "22.05"; + }; + } + ((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_user) + ] + ++ (with inputs.self.modules.homeManager; [ + # system aspects + base + cli + desktop + gaming + + # other aspects + stylix + niri + ]); + }; + }; +}