nixos/wireless: merge into dust

This commit is contained in:
Guanran Wang 2024-10-01 00:26:30 +08:00
parent 4ce8037078
commit 97f94d43d4
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
6 changed files with 28 additions and 71 deletions

View file

@ -43,11 +43,6 @@ creation_rules:
- *guanranwang
- *tyo0
- *sin0
- path_regex: ^nixos/profiles/wireless/secrets.yaml$
key_groups:
- age:
- *guanranwang
- *dust
# opentofu
- path_regex: ^infra/secrets.yaml$

View file

@ -25,15 +25,25 @@
preservation.nixosModules.preservation
]);
sops.secrets = lib.mapAttrs (_n: v: v // { sopsFile = ./secrets.yaml; }) {
"hashed-passwd" = {
neededForUsers = true;
};
"nix-access-tokens" = {
owner = "guanranwang";
mode = "0440";
};
};
sops.secrets = lib.mapAttrs (_n: v: v // { sopsFile = ./secrets.yaml; }) (
lib.listToAttrs (
lib.map (x: lib.nameValuePair "wireless/${x}" { path = "/var/lib/iwd/${x}.psk"; }) [
"Galaxy S24 EC54"
"ImmortalWrt"
"XYC-SEEWO"
"wangxiaobo"
]
)
// {
"hashed-passwd" = {
neededForUsers = true;
};
"nix-access-tokens" = {
owner = "guanranwang";
mode = "0440";
};
}
);
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";

View file

@ -20,6 +20,8 @@
settings.General.FastConnectable = true;
};
networking.wireless.iwd.enable = true;
boot.loader.timeout = 0;
boot.loader.efi.canTouchEfiVariables = true;

View file

@ -1,5 +1,10 @@
hashed-passwd: ENC[AES256_GCM,data:Ww/aE2CEQG2ZvFALA0cfN/jsmoywTsDLUh9sgVtF6xyNYLLd1+XCbzG9KUJGsB0PXO+ISdL/5ySRCuU8a79FytZdbyZ1FZKTzg==,iv:vLKHMzFjiwp8gW9VhKZq85D2tj+TvJ9iIeQoJBcvCDE=,tag:aZ5JmvrCfE7WQ1FIugpHkQ==,type:str]
nix-access-tokens: ENC[AES256_GCM,data:K9AFK869TWjPFFRSayy0B7nWQQwRt/v2q4+TdUdyv0QtSG1xAd9t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qh1a76kjsZRQgfN4iwA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-09-30T16:17:54Z"
mac: ENC[AES256_GCM,data:yGUiB22nw0HJObLFpIAC9dYMM7oKCsZmxn9VKPTOHfklM9NSxBtpnQG9WuRa1PYt+QiaY/E++ERszpbk3goi9KsnjLpYAx/Nw00W3SS1DIAqzHaV7XM5qlQqhT8ALLbEZBWwYg3VOeJaEMUYRs+yaDHX0PsjHqm1ipLSwfy6AM4=,iv:Z/y1LdqfXoZgPoezF4vpwx1VAbwheagwIg9FHJ4Tdzo=,tag:FlZZALl1vMDndt1+40Br/w==,type:str]
lastmodified: "2024-09-30T16:25:30Z"
mac: ENC[AES256_GCM,data:x3sPlLUTrH1Xqqc3WFEim2dv6R+9TG8HvSOdt3vPwGFBwTmG/ziYp0df4q3VaOEO5HaoEiDxDyUV1zHuBk+SfeMYCW+LZXXuKouAzCLPsbz3c/uD++TA9SdEF/K4Ry7fj5oq9ZtCGBG/U4cZTn7mnJR/nt2ZdBgDlQ983Xkiln4=,iv:ikLweu6DolotfhGzSFETvJt/BVHfd/Ubfv2ZUYtFZ2Y=,tag:HBTcWuD2yMupjA9dnakvPA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.0

View file

@ -1,21 +0,0 @@
{ lib, ... }:
{
sops.secrets = lib.listToAttrs (
lib.map
(
x:
lib.nameValuePair "wireless/${x}" {
path = "/var/lib/iwd/${x}.psk";
sopsFile = ./secrets.yaml;
}
)
[
"Galaxy S24 EC54"
"ImmortalWrt"
"XYC-SEEWO"
"wangxiaobo"
]
);
networking.wireless.iwd.enable = true;
}

View file

@ -1,34 +0,0 @@
wireless:
wangxiaobo: ENC[AES256_GCM,data:D9m+JRZ2Tw1a4mukW+WU3QLYIRiTiRkGz1ddD7zvkctbuYg+BZXtRgDR0FOIn586t0DsgA1wBDEN/WWiLRTrArgWTHiv7OsOa1NI7+BuL1cFb1TNbk04zbtc6cCOpDBH8qivx0jdZIqrJ5JzI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sVQY8ZEBm/ZhizwIgNMayIjUCwlL9UxPOh5BZVaM+NbC2H+9qub6KpdjrObA11+OkDO+D1DLt983uJVI92casNXyO34NSYt4UXDl6dJM8B+rnoFOsHoI4VcbHdIB2AdT9QDGHQ6cpz+uJ9//K4yPaiMuZXoShbrO/ER0a22s0X76gCrJ5TSaUYJCYiRUcgKDmekwK0wrNYeGr6sF3d73In0suj1mVaJzImwHOK1+ujGidYIeWmuBv6v/f9KGaHIeEkC0EiKLsT3lqfHZNHovasoIwedEVROUKGEg8t39sv3kcsQD2FxfKbYiNFcGU+7Hz2sIw5gUjFqs+djN+zyywTmQG//fG8OCjRnX/C5LZ2f6Qil/4Q0mdynLa2bhkpxsKT6Ow22dK3Z0hFPNHii1hlW2l6pBPyMcUCeI9IxFPHhVvP2IA89Jxaj/Z4+vzqGbQ5r1NjG9nLde2BGpK1MeP+3kCZvLMOeuZclmu66t28,iv:RdLGNZAVWOfCfmAOoJ/S3EosHL9VzDDU9HKlFafW2eg=,tag:iYL8DovtLkic/XFBD5fnjQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age129yyxyz686qj88ce5v77ahelqqwt6zz94mzzls0ny4hq76psrd9qhc79kq
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyMDlEUldrMDUzMFFTY0sw
Uld1WTRrUERPbWxnUWlTVTJKQzM0cFR4U3pJCmR1SWV2VWJxaUN6K2RLcDNwQWxZ
S01sVjZHUktveDF4RDZIZjJ3UWhVQkEKLS0tIGdqeHpLQWUxd3V6WVd2ak80MXYv
dW9BS0FSS1ljM2RwTFlsaWl3Zmh5OHMKSpz9jbEMYVvV6QuBP8a9UeHKRhbrewoh
vu3Da65hAcdYFI9sg+p3YRuwaWAD/jQcz39f+s/tCEcR8hyOfxeU1A==
-----END AGE ENCRYPTED FILE-----
- recipient: age193x79xx8snu82w3t3hax6nruuw57g7pduwnkpvzkzmd7fs5jvfrquqa3sl
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJQno2eDJsZlREcW44bDl0
RXh5djJzbTlHRk8zK05XeXBWKzlRQlQySmpJCmV4amxKcG1WTytNNTgvNVRIeFZF
L2VUTmc4UitVYVpycFFtaTExM2tpM00KLS0tIGZGcHNVRVJiSkhUYjZHa1A3a1A2
anlOQ09Eb2lFc05kY3dGNUNwRWVIYzQKVDQK6DwJHr0ujog+LC/usF4jQIN0WxIj
Eqm+ooHFDbOtNmzt4s7iVq0Ml8moUlmWM/VNSCKuaIY+kse4H3Xp+w==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-09-20T17:30:39Z"
mac: ENC[AES256_GCM,data:yyJOLqCF+ZRLFda/E3gCgAv0wB9LbVb4RtBW3IV3+5b0N/1BJxRzzOompfD/JlnTcQz9CA/NPSb2rBt92a3MRdYeoAPv6Gl3Nr23/DJtDYIbz/x+JT/GqrAdso64iPmaQFfhA2QXJbPfGqDy0W3fyYuQViWPV3eE7BXE3TtuHr4=,iv:t8/jVOW2gI7lQf9lqGZHSp+tLSBzNxQMfVXJrrTcmPo=,tag:c9yUOKLK8DGfHDfwW3s22w==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.0