From 6fe24f311f6eeada43de6c53d59d3fafe71d6bf4 Mon Sep 17 00:00:00 2001 From: notohh <github@notohh.dev> Date: Sat, 8 Feb 2025 13:41:37 -0500 Subject: [PATCH] move modules to hosts/common --- hosts/ame/default.nix | 5 ++--- hosts/arashi/default.nix | 3 +-- hosts/common.nix | 8 -------- {modules => hosts/common}/README.md | 0 hosts/common/default.nix | 17 +++++++++++++++++ {modules => hosts/common}/fonts.nix | 0 {modules => hosts/common}/nix.nix | 0 {modules => hosts/common}/openssh.nix | 0 {modules => hosts/common}/prometheus.nix | 0 {modules => hosts/common}/security.nix | 0 {modules => hosts/common}/sops.nix | 2 +- {modules => hosts/common}/system.nix | 0 {modules => hosts/common}/time.nix | 0 {modules => hosts/common}/users.nix | 0 {modules => hosts/common}/virtualisation.nix | 0 hosts/haru/default.nix | 3 +-- hosts/kariru/default.nix | 3 +-- hosts/kaze/default.nix | 3 +-- hosts/sakura/default.nix | 3 +-- hosts/sora/default.nix | 3 +-- hosts/tsuki/default.nix | 6 +++--- hosts/tsuru/default.nix | 3 +-- hosts/yuki/default.nix | 3 +-- hosts/yuki/services/hass/config.nix | 2 +- modules/default.nix | 13 ------------- 25 files changed, 32 insertions(+), 45 deletions(-) delete mode 100644 hosts/common.nix rename {modules => hosts/common}/README.md (100%) create mode 100644 hosts/common/default.nix rename {modules => hosts/common}/fonts.nix (100%) rename {modules => hosts/common}/nix.nix (100%) rename {modules => hosts/common}/openssh.nix (100%) rename {modules => hosts/common}/prometheus.nix (100%) rename {modules => hosts/common}/security.nix (100%) rename {modules => hosts/common}/sops.nix (62%) rename {modules => hosts/common}/system.nix (100%) rename {modules => hosts/common}/time.nix (100%) rename {modules => hosts/common}/users.nix (100%) rename {modules => hosts/common}/virtualisation.nix (100%) delete mode 100644 modules/default.nix diff --git a/hosts/ame/default.nix b/hosts/ame/default.nix index 71b9842..cb91f4e 100644 --- a/hosts/ame/default.nix +++ b/hosts/ame/default.nix @@ -3,9 +3,8 @@ _: { ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules - ../../modules/fonts.nix + ../common + ../common/fonts.nix ]; programs.hyprland.enable = true; diff --git a/hosts/arashi/default.nix b/hosts/arashi/default.nix index 053a564..8b8526d 100644 --- a/hosts/arashi/default.nix +++ b/hosts/arashi/default.nix @@ -3,8 +3,7 @@ ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules + ../common ]; users = { diff --git a/hosts/common.nix b/hosts/common.nix deleted file mode 100644 index 919e406..0000000 --- a/hosts/common.nix +++ /dev/null @@ -1,8 +0,0 @@ -{inputs, ...}: { - imports = [ - inputs.sops-nix.nixosModules.sops - inputs.home-manager.nixosModules.home-manager - inputs.nur.modules.nixos.default - # inputs.attic.nixosModules.atticd - ]; -} diff --git a/modules/README.md b/hosts/common/README.md similarity index 100% rename from modules/README.md rename to hosts/common/README.md diff --git a/hosts/common/default.nix b/hosts/common/default.nix new file mode 100644 index 0000000..cd5b6e0 --- /dev/null +++ b/hosts/common/default.nix @@ -0,0 +1,17 @@ +{inputs, ...}: { + imports = [ + inputs.sops-nix.nixosModules.sops + inputs.home-manager.nixosModules.home-manager + inputs.nur.modules.nixos.default + inputs.nix-topology.nixosModules.default + ./prometheus.nix + ./security.nix + ./users.nix + ./nix.nix + ./system.nix + ./openssh.nix + ./virtualisation.nix + ./sops.nix + ./time.nix + ]; +} diff --git a/modules/fonts.nix b/hosts/common/fonts.nix similarity index 100% rename from modules/fonts.nix rename to hosts/common/fonts.nix diff --git a/modules/nix.nix b/hosts/common/nix.nix similarity index 100% rename from modules/nix.nix rename to hosts/common/nix.nix diff --git a/modules/openssh.nix b/hosts/common/openssh.nix similarity index 100% rename from modules/openssh.nix rename to hosts/common/openssh.nix diff --git a/modules/prometheus.nix b/hosts/common/prometheus.nix similarity index 100% rename from modules/prometheus.nix rename to hosts/common/prometheus.nix diff --git a/modules/security.nix b/hosts/common/security.nix similarity index 100% rename from modules/security.nix rename to hosts/common/security.nix diff --git a/modules/sops.nix b/hosts/common/sops.nix similarity index 62% rename from modules/sops.nix rename to hosts/common/sops.nix index e79cf14..5db3874 100644 --- a/modules/sops.nix +++ b/hosts/common/sops.nix @@ -1,6 +1,6 @@ _: { sops = { - defaultSopsFile = ../secrets/secrets.yaml; + defaultSopsFile = ../../secrets/secrets.yaml; age.keyFile = "/home/notoh/.config/sops/age/keys.txt"; }; } diff --git a/modules/system.nix b/hosts/common/system.nix similarity index 100% rename from modules/system.nix rename to hosts/common/system.nix diff --git a/modules/time.nix b/hosts/common/time.nix similarity index 100% rename from modules/time.nix rename to hosts/common/time.nix diff --git a/modules/users.nix b/hosts/common/users.nix similarity index 100% rename from modules/users.nix rename to hosts/common/users.nix diff --git a/modules/virtualisation.nix b/hosts/common/virtualisation.nix similarity index 100% rename from modules/virtualisation.nix rename to hosts/common/virtualisation.nix diff --git a/hosts/haru/default.nix b/hosts/haru/default.nix index 945b49b..27e514e 100644 --- a/hosts/haru/default.nix +++ b/hosts/haru/default.nix @@ -3,8 +3,7 @@ ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules + ../common ]; users = { diff --git a/hosts/kariru/default.nix b/hosts/kariru/default.nix index 53b937f..0069e3a 100644 --- a/hosts/kariru/default.nix +++ b/hosts/kariru/default.nix @@ -3,8 +3,7 @@ ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules + ../common ]; users = { diff --git a/hosts/kaze/default.nix b/hosts/kaze/default.nix index 86d9731..161e8c4 100644 --- a/hosts/kaze/default.nix +++ b/hosts/kaze/default.nix @@ -3,8 +3,7 @@ ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules + ../common ]; users = { diff --git a/hosts/sakura/default.nix b/hosts/sakura/default.nix index 4355e29..73384fb 100644 --- a/hosts/sakura/default.nix +++ b/hosts/sakura/default.nix @@ -3,8 +3,7 @@ _: { ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules + ../common ]; users = { diff --git a/hosts/sora/default.nix b/hosts/sora/default.nix index 6b808e7..c352a42 100644 --- a/hosts/sora/default.nix +++ b/hosts/sora/default.nix @@ -3,8 +3,7 @@ _: { ./hardware.nix ./networking.nix ./services - ../common.nix - ../../modules + ../common ]; services.snowflake-proxy.enable = true; diff --git a/hosts/tsuki/default.nix b/hosts/tsuki/default.nix index 0459266..b69bdcb 100755 --- a/hosts/tsuki/default.nix +++ b/hosts/tsuki/default.nix @@ -10,10 +10,10 @@ ./services ./networking.nix ./gaming.nix - ../common.nix + ./topology.nix + ../common + ../common/fonts.nix ../../home/wayland - ../../modules - ../../modules/fonts.nix ]; virtualisation = { diff --git a/hosts/tsuru/default.nix b/hosts/tsuru/default.nix index 67df882..1b85e28 100644 --- a/hosts/tsuru/default.nix +++ b/hosts/tsuru/default.nix @@ -3,8 +3,7 @@ ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules + ../common ]; users = { diff --git a/hosts/yuki/default.nix b/hosts/yuki/default.nix index d04b201..c8d505d 100644 --- a/hosts/yuki/default.nix +++ b/hosts/yuki/default.nix @@ -3,8 +3,7 @@ ./hardware.nix ./services ./networking.nix - ../common.nix - ../../modules + ../common ]; users = { diff --git a/hosts/yuki/services/hass/config.nix b/hosts/yuki/services/hass/config.nix index c73ff39..7253367 100644 --- a/hosts/yuki/services/hass/config.nix +++ b/hosts/yuki/services/hass/config.nix @@ -2,7 +2,7 @@ _: { services.home-assistant.config = { lovelace.mode = "yaml"; http = { - server_host = "0.0.0.0"; + server_host = ["0.0.0.0"]; server_port = 8123; }; homeassistant = { diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index fb3ae59..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -_: { - imports = [ - ./prometheus.nix - ./security.nix - ./users.nix - ./nix.nix - ./system.nix - ./openssh.nix - ./virtualisation.nix - ./sops.nix - ./time.nix - ]; -}