mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
wifi in sops
This commit is contained in:
parent
3f38b5a386
commit
449a0fa5b0
|
|
@ -6,3 +6,7 @@ creation_rules:
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *dlaptop
|
- *dlaptop
|
||||||
|
- path_regex: secrets/wifi/[^/]+$
|
||||||
|
key_groups:
|
||||||
|
- age:
|
||||||
|
- *dlaptop
|
||||||
|
|
@ -1,5 +1,18 @@
|
||||||
{ config, lib, ...}:
|
{ config, lib, ...}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Get the list of all secret files
|
||||||
|
secretsDir = ../../secrets/wifi;
|
||||||
|
secretFiles = builtins.attrNames (builtins.readDir secretsDir);
|
||||||
|
|
||||||
|
# Generate an attribute set where each attribute corresponds to a secret file
|
||||||
|
wifiSecrets = lib.genAttrs secretFiles (secret: {
|
||||||
|
sopsFile = ../../secrets/wifi/${secret};
|
||||||
|
format = "ini";
|
||||||
|
path = "/etc/NetworkManager/system-connections/${builtins.replaceStrings [".ini"] [""] secret}.nmconnection";
|
||||||
|
mode = "0400";
|
||||||
|
});
|
||||||
|
in
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../secrets/generic.yaml;
|
defaultSopsFile = ../../secrets/generic.yaml;
|
||||||
|
|
@ -7,23 +20,32 @@
|
||||||
#age.keyFile = "/home/delta/.config/sops/age/keys.txt";
|
#age.keyFile = "/home/delta/.config/sops/age/keys.txt";
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
secrets.qqq = {
|
secrets = {
|
||||||
|
qqq = {
|
||||||
mode = "0400"; owner = "delta"; group = "users";
|
mode = "0400"; owner = "delta"; group = "users";
|
||||||
};
|
};
|
||||||
|
|
||||||
secrets.cloudflared = {
|
cloudflared = {
|
||||||
mode = "0400"; owner = "cloudflared"; group = "cloudflared";
|
mode = "0400"; owner = "cloudflared"; group = "cloudflared";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"myservice/my_subdir/my_secret" = {};
|
||||||
|
|
||||||
secrets."myservice/my_subdir/my_secret" = {};
|
singbox-aus = {
|
||||||
|
|
||||||
secrets.singbox-aus = {
|
|
||||||
sopsFile = ../../secrets/singbox-aus.bin;
|
sopsFile = ../../secrets/singbox-aus.bin;
|
||||||
format = "binary";
|
format = "binary";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
owner = "socks";
|
owner = "socks";
|
||||||
group = "socks";
|
group = "socks";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#HomeNet = {
|
||||||
|
# sopsFile = ../../secrets/wifi/HomeNet.ini;
|
||||||
|
# format = "ini";
|
||||||
|
# path = "/etc/NetworkManager/system-connections/HomeNet.nmconnection";
|
||||||
|
# mode = "0400";
|
||||||
|
#};
|
||||||
|
|
||||||
|
} // wifiSecrets;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue