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
{
povSelf,
inputs,
pkgs,
lib,
config,
hostConfig,
...
}:
let
inherit (lib) types;
cfg = lib.getAttrFromPath povSelf config;
in
{
options.enable = {
type = types.bool;
default = false;
};
config = lib.mkIf cfg.enable {
sops.secrets."environments/networkManagerProfiles/zaphyraPhone" = {
sopsFile = inputs.self.sopsSecrets.common;
};
networking.networkmanager.ensureProfiles = {
environmentFiles = [ config.sops.secrets."environments/networkManagerProfiles/zaphyraPhone".path ];
profiles."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";
};
};
};
};
}