1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
sopsSecrets,
config,
lib,
...
}:
{
options.zpha.configure.networkManagerProfiles.enable = lib.mkEnableOption "NetworkManager profile";
config = lib.mkIf config.zpha.configure.networkManagerProfiles.enable {
sops.secrets = {
"environments/networkManagerProfiles/zaphyraPhone".sopsFile = sopsSecrets.common;
"environments/networkManagerProfiles/grogHome".sopsFile = sopsSecrets.common;
};
networking.networkmanager.ensureProfiles = {
environmentFiles = [
config.sops.secrets."environments/networkManagerProfiles/zaphyraPhone".path
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";
};
};
"zaphyraPhone" = {
connection = {
id = "zaphyraPhone";
type = "wifi";
uuid = "2dc7bb4a-e016-427d-aeb6-28e7a6b91f41";
};
ipv4 = {
method = "auto";
};
ipv6 = {
addr-gen-mode = "default";
method = "auto";
};
proxy = { };
wifi = {
mode = "infrastructure";
ssid = "$ZAPHYRA_PHONE_SSID";
};
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
psk = "$ZAPHYRA_PHONE_PASS";
};
};
};
};
};
}