mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-14 02:20:53 -06:00
feat: infinitely expansible microvms
This commit is contained in:
parent
a92229390e
commit
4c767d369f
55 changed files with 1089 additions and 1015 deletions
|
|
@ -2,7 +2,8 @@
|
|||
let
|
||||
inherit (flake.config.services) instances;
|
||||
inherit (flake.config.machines.devices) mars deimos ceres;
|
||||
service = instances.wireGuard;
|
||||
serviceCfg = instances.wireGuard;
|
||||
interfaceCfg = serviceCfg.interfaces.interface0;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
|
|
@ -19,8 +20,8 @@ in
|
|||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "${ceres.wireguard.ip0}/24" ];
|
||||
listenPort = service.ports.port1;
|
||||
privateKeyFile = config.sops.secrets."${service.name}/private".path;
|
||||
listenPort = serviceCfg.ports.port1;
|
||||
privateKeyFile = config.sops.secrets."${serviceCfg.name}/private".path;
|
||||
peers = [
|
||||
# if you need to create a new key pair
|
||||
# wg genkey | save --raw --force privatekey
|
||||
|
|
@ -41,7 +42,7 @@ in
|
|||
sops =
|
||||
let
|
||||
sopsPath = secret: {
|
||||
path = "${service.sops.path0}/${service.name}-${secret}";
|
||||
path = "${interfaceCfg.paths.secretPaths.path0}/${serviceCfg.name}-${secret}";
|
||||
owner = "root";
|
||||
mode = "600";
|
||||
};
|
||||
|
|
@ -50,7 +51,7 @@ in
|
|||
secrets = builtins.listToAttrs (
|
||||
map
|
||||
(secret: {
|
||||
name = "${service.name}/${secret}";
|
||||
name = "${serviceCfg.name}/${secret}";
|
||||
value = sopsPath secret;
|
||||
})
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue