backwards: Use secretsFile for networking.wireless

This commit is contained in:
Alexander Heldt
2024-09-17 21:17:42 +02:00
parent 6906fca9f9
commit 2f22d66628
4 changed files with 15 additions and 6 deletions

View File

@@ -1,10 +1,22 @@
{ config, ... }:
{
networking = {
hostName = "backwards";
networkmanager.enable = false;
wireless.enable = true;
#wireless.networks are defined in the secret `wpa_supplicant.conf`
wireless = {
enable = true;
secretsFile = config.age.secrets.wireless-network-secrets.path;
networks = {
"w1-f1_5G" = {
pskRaw = "ext:w1-f1_psk";
};
};
};
defaultGateway = "192.168.50.1";
nameservers = [ "1.1.1.1" ];
@@ -24,9 +36,6 @@
};
age.secrets = {
"wpa_supplicant.conf" = {
file = ../../../../secrets/backwards/wpa_supplicant.conf.age;
path = "/etc/wpa_supplicant.conf";
};
"wireless-network-secrets".file = ../../../../secrets/backwards/wireless-network-secrets.age;
};
}

Binary file not shown.

View File

@@ -38,7 +38,7 @@ in {
"backwards/alex.backwards-codeberg.org.pub.age".publicKeys = [ backwards alex ];
"backwards/alex.backwards-git.ppp.pm.age".publicKeys = [ backwards alex ];
"backwards/alex.backwards-git.ppp.pm.pub.age".publicKeys = [ backwards alex ];
"backwards/wpa_supplicant.conf.age".publicKeys = [ backwards alex ];
"backwards/wireless-network-secrets.age".publicKeys = [ backwards alex ];
"tadpole/root.tadpole.age".publicKeys = [ tadpole alex ];
"tadpole/root.tadpole.pub.age".publicKeys = [ tadpole alex ];