zaphyra's git: nixfiles

zaphyra's nixfiles

commit 8deb89e48f022ed59c916b68f5700a203cad453e
parent 8c2e1d0210dbe735efc66a8a0b3999410a89e571
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Sun, 6 Jul 2025 14:46:18 +0200

config/nixos/presets/networkManagerProfiles: add `grogHomeWifi`
3 files changed, 65 insertions(+), 4 deletions(-)
A
config/nixos/modules/presets/networkManagerProfiles/grogHomeWifi.nix
|
59
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M
hosts/huntii/default.nix
|
1
+
M
secrets/common.yaml
|
9
+++++----
diff --git a/config/nixos/modules/presets/networkManagerProfiles/grogHomeWifi.nix b/config/nixos/modules/presets/networkManagerProfiles/grogHomeWifi.nix
@@ -0,0 +1,59 @@
+{
+  povSelf,
+  inputs,
+  pkgs,
+  lib,
+  config,
+  hostConfig,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options = {
+    enable = {
+      type = types.bool;
+      default = false;
+    };
+    username.type = types.str;
+    envFile.type = types.path;
+  };
+
+  config = lib.mkIf cfg.enable {
+    sops.secrets."environments/networkManagerProfiles/grogHome" = {
+      sopsFile = inputs.self.sopsSecrets.common;
+    };
+
+    networking.networkmanager.ensureProfiles = {
+      environmentFiles = [ config.sops.secrets."environments/networkManagerProfiles/grogHome".path ];
+      profiles."grogHome" = {
+        connection = {
+          id = "grogHome";
+          type = "wifi";
+          uuid = "1bbc0cce-148f-4afa-876e-fa6db67d884e";
+        };
+        ipv4 = {
+          method = "auto";
+        };
+        ipv6 = {
+          addr-gen-mode = "default";
+          method = "auto";
+        };
+        proxy = { };
+        wifi = {
+          mode = "infrastructure";
+          ssid = "$GROG_HOME_SSID";
+        };
+        wifi-security = {
+          key-mgmt = "wpa-psk";
+          psk = "$GROG_HOME_PASS";
+        };
+      };
+    };
+  };
+
+}
diff --git a/hosts/huntii/default.nix b/hosts/huntii/default.nix
@@ -81,6 +81,7 @@
             voidHomeWifi.enable = true;
             zaphyraPhoneWifi.enable = true;
             zaphyraHomeWifi.enable = true;
+            grogHomeWifi.enable = true;
             cccdaWifi = {
               enable = true;
               username = "zaphyra";
diff --git a/secrets/common.yaml b/secrets/common.yaml
@@ -1,12 +1,13 @@
-zaphyraPassword: ENC[AES256_GCM,data:rW2g6n71PA6R5+KZ9i4EZ8doC9JGCLMGf+29r+8zvPMgz2ndJ0Hltkq0I12AQ5GILhS2x6lOLTpTjZ4SkG5PM1FRN/3Vi0wrdQ==,iv:weyksZS/MnkZLlM5nScUD4NvX17XnRG0dmut6Lyjqoo=,tag:scrtArW3n69CDaAPxwbQ8Q==,type:str]
+zaphyraPassword: ENC[AES256_GCM,data:KpSP2+rKaNexWRTSjsKZ1Pu9NwkWr2trx0jzbleS3vp5fwY+oEc3UhnI1G28Jpi+9HoqPtp4RQlmNF+qxRj6CXMEEw8Nxef8wQ==,iv:sTQkID7kgaMrcGUj1FsMF7WaAOhgSCBMZmLcCp52xmw=,tag:870AhaYs+xsWLaibhJZEdg==,type:str]
 resticEnv:
     novus: ENC[AES256_GCM,data:KTTd0UMQiOHrrFIbY9pIJWO9MVIFWs2pvjm4Vo46CE/CrgGfxJur5uYtxHvR94bwaoLXd8RpdlONSRzbShQlH0xE86C/MyRNWiZR5QLyWj6YwzFd+DSdHQD0h0AlRviZY/vFze1EJRPZ0d6XCMJBX+aTizVSxw==,iv:pSfa9Kgpwq/wqn6nOKozgEy2h9C22oVWSCA7X07aW1w=,tag:+aD8wh33mA9hqQ1TKT1m8w==,type:str]
 environments:
     networkManagerProfiles:
         voidPhone: ENC[AES256_GCM,data:7C9QJVQRSrw+P2jCJit3oT+gPxHW9pHx0XFj4uXuAOdR7Xk1cBzOJNiEGaXagycecw9OE+6A+pMuWw==,iv:UHNcKDeVPM3/K2cLEUa7X96dZ+10vTAjXDyNlDRH+8A=,tag:vMyw8f3bYogrgnewZj07ew==,type:str]
         voidHome: ENC[AES256_GCM,data:kxQ7Bn0dULnFQnSR5PozRUK4GUhw3y9ienTyFNwcW1rlZ0d4UpkRRvpG2XehMrEfRaxds0RVboQ8Li3z9Q==,iv:gbB6R0X8Xr+e9/dvSAXuQIIHX3mF9j3H63A+AXXq0hY=,tag:kY/Gs5VSWtwBH2VjDDNYwg==,type:str]
-        zaphyraPhone: ENC[AES256_GCM,data:mghBydVnJ8tuhXBMZKlQIXh06PCQsvcElHyWIya2hLbQlUYyAMD+l8J1Z1tU3RUrSYW3Gd32TdfQpQ==,iv:C9wTZF0HU0NeJcsNUwLpIX0ELUxjgtyDWpdbWiksDSw=,tag:w0alvDbx1cl1e7izVZV9HA==,type:str]
+        zaphyraPhone: ENC[AES256_GCM,data:WxGXvbz20SImLfNTUOpBcWtDq9Ia6bqEQFqkijpNYxgyiv1cloZAcy4ag7n4HOE1vVxIBDNlvCtAzHTWAnzJzw==,iv:pA1HYcOD58ivIbRp/aoiuG6ZK5ZSbxm9F8d0tCIQf/A=,tag:mqpYSMiM55HErXItBrQ59Q==,type:str]
         zaphyraHome: ENC[AES256_GCM,data:xMwLPSh78GIuiVh+4z84QgVQKOU7QW7VGjPJZpBwdZhvgXVQt5cMOmN4DD/Yev+Bme/2C7SigEY8bFJcgpHnbZ6Fp1E=,iv:fJtciKFZ2J3j32xF2L3XHS0cVBhPlOmpUzP4q0A3WHg=,tag:wd2XA4Q5p9TYjp9kfWDjAQ==,type:str]
+        grogHome: ENC[AES256_GCM,data:ASt5/wqH9c1yq6Ig6PAFEHwPEKCsigIDc+svk+H00jwdaFHqtivk2CzZKPfGe5U/keAJIQ0YsEFkuh/637LUCTz0U31MP7glshB+Fc5SBpexfY06r8IeQNyFNGMX,iv:hThh6hJ43LUfzZfprMgu+AtE98YdKuzj2/9nCmGkQJ0=,tag:aomJeVLG0Z6WaYKqy/DOTg==,type:str]
 sops:
     age:
         - recipient: age1laajqafnm4ft2m73wq7yqug4ts04ddn59wlqs4t30upeqa35dpdqu8fu3n

@@ -45,8 +46,8 @@ sops:
             QzEyeUJSNEJaZHk4YjRZaUtmTVhvTUUKu7rzy/mjSduQLR9KrbxlNY6mSUBJoXgp
             cEplNXTnHXUX1PdMLpZnhS/6UMti6LWYqrjXQkkeGJ0B1/Y+5fAV1A==
             -----END AGE ENCRYPTED FILE-----
-    lastmodified: "2025-06-16T12:34:16Z"
-    mac: ENC[AES256_GCM,data:QcjVx4MniB3szyqXo3L6VniPP/3tDWf2Vwh5/9Tvxe/o2FDs/uSAzouKzRiDf+jFJ6l7sY74QoQmKsbZ0eWoIe1dZPEyUZUkbPjpuV3D+wqW1Gf0C6chjgMLS4gbIi5/s2ilHDEhbLFdoB4bGELhWLig+7nQaYuoPxFcc6H1MK8=,iv:Lq+fdFI3Xiqtst6W/bwZ/E+H/CEPcgOOivJ0TfI/9Ow=,tag:ykSpUWc7lLCWTi7PTe5fWw==,type:str]
+    lastmodified: "2025-07-02T09:15:02Z"
+    mac: ENC[AES256_GCM,data:I9fnGIalEKpJqdkxd3UWIGijgbU+bOVXFizi8mboRUJdO0yX1i9c/n52tetRwZX5uYxq5xu9M8OVgDukSbZGGHfanZwp4XKMRTQt0CA79E6j0LMeeHPDmLnc6O0+cr0VdTos/GuTlnljXJ8lKlwAhK8EqAm1mlHTmy4MhOTE+ng=,iv:C+ED4jJPAw1s5DGX96ZVtY8Af0+TGiC9ToioZr99+4Q=,tag:4ZoCmNpeqPn0T4E+/nl8ww==,type:str]
     pgp:
         - created_at: "2025-06-16T13:06:46Z"
           enc: |-