mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-28 14:50:55 +01:00
feat: add non local machines to snowfield
This commit is contained in:
parent
9407534cd3
commit
58a3dd5088
2 changed files with 60 additions and 72 deletions
|
@ -10,6 +10,8 @@ let
|
||||||
{ machine.meta = raw; }
|
{ machine.meta = raw; }
|
||||||
];
|
];
|
||||||
}).config.machine.meta;
|
}).config.machine.meta;
|
||||||
|
|
||||||
|
non_local_machines = (import ./snowfield.nix).machines;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
importConfig =
|
importConfig =
|
||||||
|
@ -52,15 +54,17 @@ rec {
|
||||||
|
|
||||||
mapAttrsWithMerge = f: set: listToAttrsWithMerge (map (attr: f attr set.${attr}) (attrNames set));
|
mapAttrsWithMerge = f: set: listToAttrsWithMerge (map (attr: f attr set.${attr}) (attrNames set));
|
||||||
|
|
||||||
snowfield = mapAttrs (
|
snowfield =
|
||||||
name: _value:
|
(mapAttrs (
|
||||||
let
|
name: _value:
|
||||||
machineF = import (../machines + "/${name}/default.nix");
|
let
|
||||||
in
|
machineF = import (../machines + "/${name}/default.nix");
|
||||||
evalMeta
|
in
|
||||||
(machineF ((mapAttrs (_: _: null) (builtins.functionArgs machineF)) // { inherit inputs; }))
|
evalMeta
|
||||||
.machine.meta
|
(machineF ((mapAttrs (_: _: null) (builtins.functionArgs machineF)) // { inherit inputs; }))
|
||||||
) (final.filterAttrs (_: v: v == "directory") (readDir ../machines));
|
.machine.meta
|
||||||
|
) (final.filterAttrs (_: v: v == "directory") (readDir ../machines)))
|
||||||
|
// mapAttrs (_: evalMeta) non_local_machines;
|
||||||
|
|
||||||
dns = import ./dns.nix {
|
dns = import ./dns.nix {
|
||||||
lib = final;
|
lib = final;
|
||||||
|
|
|
@ -1,102 +1,88 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
|
# Metadata of machines whose configuration is not handled by this repository
|
||||||
|
|
||||||
machines = {
|
machines = {
|
||||||
|
|
||||||
doma-backups = {
|
doma-backups = {
|
||||||
subdomains = [ "doma-backups.julienmalka.me" ];
|
subdomains = [ "doma-backups.julienmalka.me" ];
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.0.250";
|
local.ipv4 = "192.168.0.250";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:6b86:c2c:2141:6702";
|
||||||
ipv6 = {
|
|
||||||
public = "2a01:e0a:de4:a0e1:6b86:c2c:2141:6702";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
proxmox-nixos-infra = {
|
proxmox-nixos-infra = {
|
||||||
subdomains = [ "proxmox-nixos-update-logs.saumon.network" ];
|
subdomains = [ "proxmox-nixos-update-logs.saumon.network" ];
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.0.177";
|
local.ipv4 = "192.168.0.177";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:eb2:caa1::78";
|
||||||
ipv6 = {
|
|
||||||
public = "2a01:e0a:de4:a0e1:eb2:caa1::78";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
doma-zulip = {
|
doma-zulip = {
|
||||||
subdomains = [ "zulip.julienmalka.me" ];
|
subdomains = [ "zulip.julienmalka.me" ];
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.0.187";
|
local.ipv4 = "192.168.0.187";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:6830:ddff:fe52:a444";
|
||||||
ipv6 = {
|
|
||||||
public = "2a01:e0a:de4:a0e1:6830:ddff:fe52:a444";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pve1 = {
|
pve1 = {
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.1.1";
|
local.ipv4 = "192.168.1.1";
|
||||||
vpn = "100.100.45.3";
|
vpn.ipv4 = "100.100.45.3";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b62";
|
||||||
ipv6 = {
|
vpn.ipv6 = "fd7a:115c:a1e0::3";
|
||||||
public = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b62";
|
|
||||||
vpn = "fd7a:115c:a1e0::3";
|
|
||||||
};
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
pve2 = {
|
pve2 = {
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.1.2";
|
local.ipv4 = "192.168.1.2";
|
||||||
vpn = "100.100.45.15";
|
vpn.ipv4 = "100.100.45.15";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:aaa1:59ff:fec7:1d6";
|
||||||
ipv6 = {
|
vpn.ipv6 = "fd7a:115c:a1e0::f";
|
||||||
public = "2a01:e0a:de4:a0e1:aaa1:59ff:fec7:1d6";
|
|
||||||
vpn = "fd7a:115c:a1e0::f";
|
|
||||||
};
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
pve3 = {
|
pve3 = {
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.1.3";
|
local.ipv4 = "192.168.1.3";
|
||||||
vpn = "100.100.45.16";
|
vpn.ipv4 = "100.100.45.16";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:aaa1:59ff:fec1:aa10";
|
||||||
ipv6 = {
|
vpn.ipv6 = "fd7a:115c:a1e0::10";
|
||||||
public = "2a01:e0a:de4:a0e1:aaa1:59ff:fec1:aa10";
|
|
||||||
vpn = "fd7a:115c:a1e0::10";
|
|
||||||
};
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
pve4 = {
|
pve4 = {
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.1.4";
|
local.ipv4 = "192.168.1.4";
|
||||||
vpn = "100.100.45.17";
|
vpn.ipv4 = "100.100.45.17";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b76";
|
||||||
ipv6 = {
|
vpn.ipv6 = "fd7a:115c:a1e0::11";
|
||||||
public = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b76";
|
|
||||||
vpn = "fd7a:115c:a1e0::11";
|
|
||||||
};
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
saves-paris = {
|
saves-paris = {
|
||||||
subdomains = [ "saves-paris.luj" ];
|
subdomains = [ "saves-paris.luj" ];
|
||||||
ipv4 = {
|
ips = {
|
||||||
public = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
local = "192.168.4.5";
|
local.ipv4 = "192.168.4.5";
|
||||||
vpn = "100.100.45.4";
|
vpn.ipv4 = "100.100.45.4";
|
||||||
};
|
public.ipv6 = "2a01:e0a:de4:a0e1:3af3:abff:fe6a:1f54";
|
||||||
ipv6 = {
|
vpn.ipv6 = "fd7a:115c:a1e0::4";
|
||||||
public = "2a01:e0a:de4:a0e1:3af3:abff:fe6a:1f54";
|
|
||||||
vpn = "fd7a:115c:a1e0::4";
|
|
||||||
};
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
|
@ -104,11 +90,9 @@
|
||||||
|
|
||||||
saves-lyon = {
|
saves-lyon = {
|
||||||
subdomains = [ "saves-lyon.luj" ];
|
subdomains = [ "saves-lyon.luj" ];
|
||||||
ipv4 = {
|
ips = {
|
||||||
vpn = "100.100.45.20";
|
vpn.ipv4 = "100.100.45.20";
|
||||||
};
|
vpn.ipv6 = "fd7a:115c:a1e0::14";
|
||||||
ipv6 = {
|
|
||||||
vpn = "fd7a:115c:a1e0::14";
|
|
||||||
};
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
|
|
Loading…
Add table
Reference in a new issue