diff --git a/lib/mkDarwinHost.nix b/lib/mkDarwinHost.nix index 86ce42f..ab42cc1 100644 --- a/lib/mkDarwinHost.nix +++ b/lib/mkDarwinHost.nix @@ -26,6 +26,9 @@ useUserPackages = true; users.${username}.imports = [ inputs.sops-nix.homeManagerModule # user-level secrets management + ../modules/hosts/common + ../modules/hosts/common/all-gui.nix + ../modules/hosts/darwin/home.nix ../modules/hosts/darwin/${hostname}/${username}.nix ]; }; diff --git a/lib/mkNixosHost.nix b/lib/mkNixosHost.nix index 5926afc..1736949 100644 --- a/lib/mkNixosHost.nix +++ b/lib/mkNixosHost.nix @@ -19,7 +19,9 @@ useGlobalPkgs = true; useUserPackages = true; users.${username}.imports = [ - ../modules/home-manager/hosts/${hostname}/${username}.nix + ../modules/hosts/common + ../modules/hosts/common/linux/home.nix + ../modules/hosts/nixos/${hostname}/${username}.nix ]; }; } @@ -27,7 +29,7 @@ inputs.nix-flatpak.nixosModules.nix-flatpak inputs.sops-nix.nixosModules.sops # system wide secrets management - ../modules/system/common/all-nixos.nix # system-wide stuff + ../modules/hosts/nixos # system-wide stuff ../modules/hosts/nixos/${hostname} # host specific stuff ] ++ additionalModules; }; diff --git a/modules/home-manager/hosts/hetznix01/gene.nix b/modules/home-manager/hosts/hetznix01/gene.nix deleted file mode 100644 index 2645578..0000000 --- a/modules/home-manager/hosts/hetznix01/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "24.05"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/hosts/hetznix02/gene.nix b/modules/home-manager/hosts/hetznix02/gene.nix deleted file mode 100644 index 2645578..0000000 --- a/modules/home-manager/hosts/hetznix02/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "24.05"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/hosts/mini-watcher/gene.nix b/modules/home-manager/hosts/mini-watcher/gene.nix deleted file mode 100644 index 0148f21..0000000 --- a/modules/home-manager/hosts/mini-watcher/gene.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: { - home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ../../common/hm-sops.nix - ]; -} diff --git a/modules/home-manager/hosts/mini-watcher/secrets.yaml b/modules/home-manager/hosts/mini-watcher/secrets.yaml deleted file mode 100644 index 50f2656..0000000 --- a/modules/home-manager/hosts/mini-watcher/secrets.yaml +++ /dev/null @@ -1,22 +0,0 @@ -local_git_config: ENC[AES256_GCM,data:ECcO9NiS6Xo1AevHx/4tIGmhVHTG+WHIJI/RgYLe4DbptPJQFxFMBEk=,iv:xPvAfNywX7Ww3iwZDwQGTa88ZoJZqnIjdNDv4R0iAf0=,tag:bQ7rNxPniyP7SNW8Nz+1rw==,type:str] -local_private_env: ENC[AES256_GCM,data:Eg1IYFMJFysMavh1ssddpO3fzoyrKpA2dfSNSUUUsb/548IxqOktXIArR5bqbWVL//bUmnYI3N37jYRFiQSO,iv:50WBKSSy/Ea6l6kdggeoVCXhRG6lc4QxQBm1CoK2RTc=,tag:USADBcnceslCg3ueSikf+w==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1rpy8edlpgxuf6w75cvlqexuq2xe4c49h9t2ge6jhc3fzczp8vfasnjelwq - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBveXpUSFNmVXJFTy9ieWRv - a1Fpb2xic1lnYW5mZ2VaY1dyOXVUbkNGWnlNCkxKcUZVbm0rRUNydERUeC9ueloy - N3d0NGxyaTFCd1lMUmh2VklqbTZJalkKLS0tIC8xb1VnZU0xbmdObnZIUjRvU01k - bmtPb3hjTkxMaDJwSGQ0amF5ci85UXcK16fgU78H4SK8LKDyYCUgMdRE2ZTygzyE - spYcQ8w+PvQSxLUFJKW6DZdkSXLkNR0HkmVkuSmBKW0lVNWCfXbfvA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-01-28T00:59:32Z" - mac: ENC[AES256_GCM,data:Dcs3LkQtReunJGQl1aBy/fo022r0fwAdjDKRlgGsDtnWWEWZww6+n30yCkMjDrQCZm4NekDCYrEd0Dhq90nLON+vxykojxd/UTBEX86NIxUrGtO3faotP0/buVi59JgqQQqBDB14GpJttZGVr59LVlxieG1PhpmE9lFePpT8eR4=,iv:7KmeBD4Pk+guEW0nb9/W7olsF36bwfZtFkehO5u40po=,tag:PJmbdqiud4FHxbVcZv2png==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.8.1 diff --git a/modules/home-manager/hosts/nixnas1/gene.nix b/modules/home-manager/hosts/nixnas1/gene.nix deleted file mode 100644 index 2645578..0000000 --- a/modules/home-manager/hosts/nixnas1/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "24.05"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/hosts/nixnuc/gene.nix b/modules/home-manager/hosts/nixnuc/gene.nix deleted file mode 100644 index f90b6f7..0000000 --- a/modules/home-manager/hosts/nixnuc/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/common/hm-sops.nix b/modules/hosts/common/hm-sops.nix similarity index 100% rename from modules/home-manager/common/hm-sops.nix rename to modules/hosts/common/hm-sops.nix diff --git a/modules/home-manager/common/linux-apps/hexchat.nix b/modules/hosts/common/linux/apps/hexchat.nix similarity index 100% rename from modules/home-manager/common/linux-apps/hexchat.nix rename to modules/hosts/common/linux/apps/hexchat.nix diff --git a/modules/home-manager/common/linux-apps/pidgin.nix b/modules/hosts/common/linux/apps/pidgin.nix similarity index 100% rename from modules/home-manager/common/linux-apps/pidgin.nix rename to modules/hosts/common/linux/apps/pidgin.nix diff --git a/modules/home-manager/common/linux-apps/tilix.nix b/modules/hosts/common/linux/apps/tilix.nix similarity index 100% rename from modules/home-manager/common/linux-apps/tilix.nix rename to modules/hosts/common/linux/apps/tilix.nix diff --git a/modules/home-manager/common/linux-apps/waybar.nix b/modules/hosts/common/linux/apps/waybar.nix similarity index 100% rename from modules/home-manager/common/linux-apps/waybar.nix rename to modules/hosts/common/linux/apps/waybar.nix diff --git a/modules/home-manager/common/linux-apps/xfce4-terminal.nix b/modules/hosts/common/linux/apps/xfce4-terminal.nix similarity index 100% rename from modules/home-manager/common/linux-apps/xfce4-terminal.nix rename to modules/hosts/common/linux/apps/xfce4-terminal.nix diff --git a/modules/system/common/linux/flatpaks.nix b/modules/hosts/common/linux/flatpaks.nix similarity index 100% rename from modules/system/common/linux/flatpaks.nix rename to modules/hosts/common/linux/flatpaks.nix diff --git a/modules/home-manager/common/all-linux.nix b/modules/hosts/common/linux/home.nix similarity index 100% rename from modules/home-manager/common/all-linux.nix rename to modules/hosts/common/linux/home.nix diff --git a/modules/system/common/linux/internationalisation.nix b/modules/hosts/common/linux/internationalisation.nix similarity index 100% rename from modules/system/common/linux/internationalisation.nix rename to modules/hosts/common/linux/internationalisation.nix diff --git a/modules/system/common/linux/lets-encrypt.nix b/modules/hosts/common/linux/lets-encrypt.nix similarity index 100% rename from modules/system/common/linux/lets-encrypt.nix rename to modules/hosts/common/linux/lets-encrypt.nix diff --git a/modules/system/common/linux/restic.nix b/modules/hosts/common/linux/restic.nix similarity index 100% rename from modules/system/common/linux/restic.nix rename to modules/hosts/common/linux/restic.nix diff --git a/modules/home-manager/hosts/AirPuppet/gene.nix b/modules/hosts/darwin/AirPuppet/gene.nix similarity index 71% rename from modules/home-manager/hosts/AirPuppet/gene.nix rename to modules/hosts/darwin/AirPuppet/gene.nix index 52c837c..644bc76 100644 --- a/modules/home-manager/hosts/AirPuppet/gene.nix +++ b/modules/hosts/darwin/AirPuppet/gene.nix @@ -1,10 +1,5 @@ { username, ... }: { home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-gui.nix - ../../common/all-darwin.nix - ]; sops = { defaultSopsFile = ./secrets.yaml; diff --git a/modules/home-manager/hosts/AirPuppet/secrets.yaml b/modules/hosts/darwin/AirPuppet/secrets.yaml similarity index 100% rename from modules/home-manager/hosts/AirPuppet/secrets.yaml rename to modules/hosts/darwin/AirPuppet/secrets.yaml diff --git a/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix b/modules/hosts/darwin/Blue-Rock/gene.liverman.nix similarity index 77% rename from modules/home-manager/hosts/Blue-Rock/gene.liverman.nix rename to modules/hosts/darwin/Blue-Rock/gene.liverman.nix index 8362e01..7f1fa1a 100644 --- a/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix +++ b/modules/hosts/darwin/Blue-Rock/gene.liverman.nix @@ -1,10 +1,5 @@ { username, ... }: { home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-gui.nix - ../../common/all-darwin.nix - ]; programs = { go = { diff --git a/modules/home-manager/hosts/Blue-Rock/secrets.yaml b/modules/hosts/darwin/Blue-Rock/secrets.yaml similarity index 100% rename from modules/home-manager/hosts/Blue-Rock/secrets.yaml rename to modules/hosts/darwin/Blue-Rock/secrets.yaml diff --git a/modules/hosts/darwin/mightymac/gene.liverman.nix b/modules/hosts/darwin/mightymac/gene.liverman.nix index 3643f6e..90b7af7 100644 --- a/modules/hosts/darwin/mightymac/gene.liverman.nix +++ b/modules/hosts/darwin/mightymac/gene.liverman.nix @@ -1,10 +1,5 @@ { username, ... }: { home.stateVersion = "23.11"; - imports = [ - ../home.nix - ../../common - ../../common/all-gui.nix - ]; programs = { go = { diff --git a/modules/home-manager/hosts/bigboy/gene.nix b/modules/hosts/nixos/bigboy/gene.nix similarity index 79% rename from modules/home-manager/hosts/bigboy/gene.nix rename to modules/hosts/nixos/bigboy/gene.nix index 691a398..962d99e 100644 --- a/modules/home-manager/hosts/bigboy/gene.nix +++ b/modules/hosts/nixos/bigboy/gene.nix @@ -1,11 +1,9 @@ { ... }: { home.stateVersion = "24.05"; imports = [ - ../../common/all-cli.nix ../../common/all-gui.nix - ../../common/all-linux.nix - ../../common/linux-apps/tilix.nix - ../../common/linux-apps/xfce4-terminal.nix + ../../common/linux/apps/tilix.nix + ../../common/linux/apps/xfce4-terminal.nix ]; programs = { diff --git a/modules/system/common/all-nixos.nix b/modules/hosts/nixos/default.nix similarity index 97% rename from modules/system/common/all-nixos.nix rename to modules/hosts/nixos/default.nix index 2eb708a..71b449e 100644 --- a/modules/system/common/all-nixos.nix +++ b/modules/hosts/nixos/default.nix @@ -1,6 +1,6 @@ { hostname, pkgs, username, ... }: { imports = [ - ./linux/internationalisation.nix + ../common/linux/internationalisation.nix ]; environment = { diff --git a/modules/hosts/nixos/hetznix01/gene.nix b/modules/hosts/nixos/hetznix01/gene.nix new file mode 100644 index 0000000..ec20c58 --- /dev/null +++ b/modules/hosts/nixos/hetznix01/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "24.05"; +} diff --git a/modules/hosts/nixos/hetznix01/post-install/default.nix b/modules/hosts/nixos/hetznix01/post-install/default.nix index fbd4ffc..57430f2 100644 --- a/modules/hosts/nixos/hetznix01/post-install/default.nix +++ b/modules/hosts/nixos/hetznix01/post-install/default.nix @@ -2,8 +2,8 @@ domain = "technicalissues.us"; in { imports = [ - ../../../../system/common/linux/lets-encrypt.nix - ../../../../system/common/linux/restic.nix + ../../../common/linux/lets-encrypt.nix + ../../../common/linux/restic.nix ./matrix-synapse.nix ./nginx.nix ]; diff --git a/modules/hosts/nixos/hetznix02/gene.nix b/modules/hosts/nixos/hetznix02/gene.nix new file mode 100644 index 0000000..945badd --- /dev/null +++ b/modules/hosts/nixos/hetznix02/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "24.05"; +} diff --git a/modules/hosts/nixos/nixnas1/default.nix b/modules/hosts/nixos/nixnas1/default.nix index da6853f..7146c5c 100644 --- a/modules/hosts/nixos/nixnas1/default.nix +++ b/modules/hosts/nixos/nixnas1/default.nix @@ -118,6 +118,7 @@ description = "Gene Liverman"; extraGroups = [ "wheel" ]; openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFvLaPTfG3r+bcbI6DV4l69UgJjnwmZNCQk79HXyf1Pt gene@rainbow-planet" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIp42X5DZ713+bgbOO+GXROufUFdxWo7NjJbGQ285x3N gene.liverman@ltnglobal.com" ]; }; diff --git a/modules/hosts/nixos/nixnas1/gene.nix b/modules/hosts/nixos/nixnas1/gene.nix new file mode 100644 index 0000000..b6eed65 --- /dev/null +++ b/modules/hosts/nixos/nixnas1/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "24.05"; +} diff --git a/modules/hosts/nixos/nixnuc/default.nix b/modules/hosts/nixos/nixnuc/default.nix index 12fb394..f511596 100644 --- a/modules/hosts/nixos/nixnuc/default.nix +++ b/modules/hosts/nixos/nixnuc/default.nix @@ -9,8 +9,8 @@ in { ./hardware-configuration.nix ./containers/audiobookshelf.nix ./containers/psitransfer.nix - ../../../system/common/linux/lets-encrypt.nix - ../../../system/common/linux/restic.nix + ../../common/linux/lets-encrypt.nix + ../../common/linux/restic.nix ]; system.stateVersion = "23.11"; diff --git a/modules/hosts/nixos/nixnuc/gene.nix b/modules/hosts/nixos/nixnuc/gene.nix new file mode 100644 index 0000000..21ec006 --- /dev/null +++ b/modules/hosts/nixos/nixnuc/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "23.11"; +} diff --git a/modules/hosts/nixos/rainbow-planet/default.nix b/modules/hosts/nixos/rainbow-planet/default.nix index 85c3fb1..75d5e67 100644 --- a/modules/hosts/nixos/rainbow-planet/default.nix +++ b/modules/hosts/nixos/rainbow-planet/default.nix @@ -1,7 +1,7 @@ { inputs, config, pkgs, username, ... }: { imports = [ ./hardware-configuration.nix - ../../../system/common/linux/flatpaks.nix + ../../common/linux/flatpaks.nix ]; system.stateVersion = "23.05"; diff --git a/modules/home-manager/hosts/rainbow-planet/gene.nix b/modules/hosts/nixos/rainbow-planet/gene.nix similarity index 96% rename from modules/home-manager/hosts/rainbow-planet/gene.nix rename to modules/hosts/nixos/rainbow-planet/gene.nix index 10cde83..daa8345 100644 --- a/modules/home-manager/hosts/rainbow-planet/gene.nix +++ b/modules/hosts/nixos/rainbow-planet/gene.nix @@ -1,14 +1,12 @@ { pkgs, ... }: { home.stateVersion = "23.11"; imports = [ - ../../common/all-cli.nix ../../common/all-gui.nix - ../../common/all-linux.nix - ../../common/linux-apps/hexchat.nix - ../../common/linux-apps/pidgin.nix - ../../common/linux-apps/tilix.nix - ../../common/linux-apps/waybar.nix - ../../common/linux-apps/xfce4-terminal.nix + ../../common/linux/apps/hexchat.nix + ../../common/linux/apps/pidgin.nix + ../../common/linux/apps/tilix.nix + ../../common/linux/apps/waybar.nix + ../../common/linux/apps/xfce4-terminal.nix ]; home.file = {