chore: init

This commit is contained in:
Nick 2025-10-01 19:51:55 -05:00
commit 1b2c1ea359
891 changed files with 37053 additions and 0 deletions

View file

@ -0,0 +1,38 @@
{ config, flake, ... }:
let
inherit (flake.config.services.instances) wireGuard;
inherit (flake.config.machines.devices) mars;
service = wireGuard;
in
{
networking = {
wireguard.interfaces = {
wg0 = {
ips = [ "${mars.wireguard.ip0}/32" ];
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
};
};
};
sops =
let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}-pass";
owner = "root";
mode = "600";
};
in
{
secrets = builtins.listToAttrs (
map
(secret: {
name = "${service.name}-${secret}";
value = sopsPath secret;
})
[
"mars-private"
"mars-public"
]
);
};
}