From 4da7e34d4278b6b38c6d51bf188b4ddfe95226b3 Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Thu, 13 Aug 2026 16:37:39 -0300 Subject: [PATCH] refactor(hosts): move shared config into hosts/common Assisted-by: pi (claude-opus-5) --- .sops.yaml | 2 +- hosts/{ => common}/eduroam-cert.pem | 0 hosts/{ => common}/secrets.yaml | 0 hosts/{ => common}/wireless.nix | 0 hosts/nixos/common/optional/wireless.nix | 2 +- hosts/nixos/common/users/gabriel/default.nix | 4 ++-- hosts/system-manager/common/optional/wireless.nix | 2 +- hosts/system-manager/common/users/gabriel/default.nix | 4 ++-- 8 files changed, 7 insertions(+), 7 deletions(-) rename hosts/{ => common}/eduroam-cert.pem (100%) rename hosts/{ => common}/secrets.yaml (100%) rename hosts/{ => common}/wireless.nix (100%) diff --git a/.sops.yaml b/.sops.yaml index 2d564ca9..dd6d8a7f 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -13,7 +13,7 @@ keys: - &pleione age1mhlh8lj8jv58xy9mdhsarfyanckyx8c2xdu09xrn23nrc56e94xserztxx - &mgc age1znn83s2w8s6manxmfj488kmrrmp49s2497qvz5kk25xajfyn7cfqk8meu5 creation_rules: - - path_regex: hosts/secrets.ya?ml$ + - path_regex: hosts/common/secrets.ya?ml$ key_groups: - age: - *atlas diff --git a/hosts/eduroam-cert.pem b/hosts/common/eduroam-cert.pem similarity index 100% rename from hosts/eduroam-cert.pem rename to hosts/common/eduroam-cert.pem diff --git a/hosts/secrets.yaml b/hosts/common/secrets.yaml similarity index 100% rename from hosts/secrets.yaml rename to hosts/common/secrets.yaml diff --git a/hosts/wireless.nix b/hosts/common/wireless.nix similarity index 100% rename from hosts/wireless.nix rename to hosts/common/wireless.nix diff --git a/hosts/nixos/common/optional/wireless.nix b/hosts/nixos/common/optional/wireless.nix index 367fa7b0..e3ec845a 100644 --- a/hosts/nixos/common/optional/wireless.nix +++ b/hosts/nixos/common/optional/wireless.nix @@ -1,5 +1,5 @@ {...}: { - imports = [../../../wireless.nix]; + imports = [../../../common/wireless.nix]; hardware.bluetooth = { enable = true; diff --git a/hosts/nixos/common/users/gabriel/default.nix b/hosts/nixos/common/users/gabriel/default.nix index 3be12d34..4204e409 100644 --- a/hosts/nixos/common/users/gabriel/default.nix +++ b/hosts/nixos/common/users/gabriel/default.nix @@ -62,11 +62,11 @@ in { neededForUsers = true; }; brave_api_key = { - sopsFile = ../../../../secrets.yaml; + sopsFile = ../../../../common/secrets.yaml; owner = "gabriel"; }; kagi_session_token = { - sopsFile = ../../../../secrets.yaml; + sopsFile = ../../../../common/secrets.yaml; owner = "gabriel"; }; }; diff --git a/hosts/system-manager/common/optional/wireless.nix b/hosts/system-manager/common/optional/wireless.nix index 9a4983c5..30f14586 100644 --- a/hosts/system-manager/common/optional/wireless.nix +++ b/hosts/system-manager/common/optional/wireless.nix @@ -1,5 +1,5 @@ {...}: { - imports = [../../../wireless.nix]; + imports = [../../../common/wireless.nix]; # The upstream module emits no country line; Ubuntu's netplan-generated # config used to set this, and dropping it would silently relax the diff --git a/hosts/system-manager/common/users/gabriel/default.nix b/hosts/system-manager/common/users/gabriel/default.nix index 165d1caa..1ca3e062 100644 --- a/hosts/system-manager/common/users/gabriel/default.nix +++ b/hosts/system-manager/common/users/gabriel/default.nix @@ -41,11 +41,11 @@ in { sops.secrets = { brave_api_key = { - sopsFile = ../../../../secrets.yaml; + sopsFile = ../../../../common/secrets.yaml; owner = "gabriel"; }; kagi_session_token = { - sopsFile = ../../../../secrets.yaml; + sopsFile = ../../../../common/secrets.yaml; owner = "gabriel"; }; };