Compare commits
4 Commits
e88f1c93c5
...
a5e3f613c2
| Author | SHA1 | Date | |
|---|---|---|---|
| a5e3f613c2 | |||
| 8b8fac2d89 | |||
| 31d79ba75b | |||
| 6faf148fde |
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
# Cluster node configuration
|
# Cluster node configuration
|
||||||
# Extends minimal-node with cluster-specific services (Consul, GlusterFS, CIFS, NFS)
|
# Extends minimal-node with cluster-specific services (Consul, GlusterFS, CIFS, NFS)
|
||||||
@@ -11,7 +11,14 @@
|
|||||||
./nfs-services-client.nix # New: NFS client for /data/services
|
./nfs-services-client.nix # New: NFS client for /data/services
|
||||||
];
|
];
|
||||||
|
|
||||||
# Wait for eno1 to be routable before considering network online
|
options.networking.cluster.primaryInterface = lib.mkOption {
|
||||||
# (hosts with different primary interfaces should override this)
|
type = lib.types.str;
|
||||||
systemd.network.wait-online.extraArgs = [ "--interface=eno1:routable" ];
|
default = "eno1";
|
||||||
|
description = "Primary network interface for cluster communication (Consul, NFS, etc.)";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Wait for primary interface to be routable before considering network online
|
||||||
|
systemd.network.wait-online.extraArgs = [ "--interface=${config.networking.cluster.primaryInterface}:routable" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ in
|
|||||||
services.consul = {
|
services.consul = {
|
||||||
enable = true;
|
enable = true;
|
||||||
webUi = true;
|
webUi = true;
|
||||||
interface.advertise = "eno1";
|
interface.advertise = config.networking.cluster.primaryInterface;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
client_addr = "0.0.0.0";
|
client_addr = "0.0.0.0";
|
||||||
datacenter = "alo";
|
datacenter = "alo";
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ in
|
|||||||
services."backup-persist" = {
|
services."backup-persist" = {
|
||||||
description = "Backup persistent data with Kopia";
|
description = "Backup persistent data with Kopia";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "root";
|
User = "root";
|
||||||
ExecStart = "${backupScript}";
|
ExecStart = "${backupScript}";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
# sometimes the impermanence bind mount is stopped when sops needs these
|
# sometimes the impermanence bind mount is stopped when sops needs these
|
||||||
age.sshKeyPaths = [
|
age.sshKeyPaths = [
|
||||||
"${config.custom.impermanence.persistPath}/etc/ssh/ssh_host_ed25519_key"
|
"${config.custom.impermanence.persistPath}/etc/ssh/ssh_host_ed25519_key"
|
||||||
"${config.custom.impermanence.persistPath}/etc/ssh/ssh_host_rsa_key"
|
|
||||||
];
|
];
|
||||||
defaultSopsFile = ./../../secrets/common.yaml;
|
defaultSopsFile = ./../../secrets/common.yaml;
|
||||||
secrets = {
|
secrets = {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
MOSH_SERVER_NETWORK_TMOUT = 604800;
|
MOSH_SERVER_NETWORK_TMOUT = 604800;
|
||||||
NOMAD_ADDR = "http://nomad.service.consul:4646";
|
NOMAD_ADDR = "http://nomad.service.consul:4646";
|
||||||
LESS = "-F -i -M -+S -R -w -X -z-4";
|
LESS = "-F -i -M -+S -R -w -X -z-4";
|
||||||
SYSTEMD_LESS = "FiM+SRwXz-4";
|
SYSTEMD_LESS = "FiM+SRwX";
|
||||||
NIX_LD = "${pkgs.glibc}/lib/ld-linux-x86-64.so.2";
|
NIX_LD = "${pkgs.glibc}/lib/ld-linux-x86-64.so.2";
|
||||||
NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
|
NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
|
||||||
pkgs.stdenv.cc.cc
|
pkgs.stdenv.cc.cc
|
||||||
|
|||||||
@@ -16,5 +16,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "beefy";
|
networking.hostName = "beefy";
|
||||||
|
networking.cluster.primaryInterface = "enp1s0";
|
||||||
services.tailscaleAutoconnect.authkey = "tskey-auth-k79UsDTw2v11CNTRL-oYqji35BE9c7CqM89Dzs9cBF14PmqYsi";
|
services.tailscaleAutoconnect.authkey = "tskey-auth-k79UsDTw2v11CNTRL-oYqji35BE9c7CqM89Dzs9cBF14PmqYsi";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,13 +21,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "chilly";
|
networking.hostName = "chilly";
|
||||||
|
networking.cluster.primaryInterface = "br0";
|
||||||
services.tailscaleAutoconnect.authkey = "tskey-auth-kRXS9oPyPm11CNTRL-BE6YnbP9J6ZZuV9dHkX17ZMnm1JGdu93";
|
services.tailscaleAutoconnect.authkey = "tskey-auth-kRXS9oPyPm11CNTRL-BE6YnbP9J6ZZuV9dHkX17ZMnm1JGdu93";
|
||||||
services.consul.interface.advertise = lib.mkForce "br0";
|
|
||||||
|
|
||||||
networking.useNetworkd = true;
|
networking.useNetworkd = true;
|
||||||
systemd.network.enable = true;
|
systemd.network.enable = true;
|
||||||
# Wait for br0 to be routable before considering network online
|
|
||||||
systemd.network.wait-online.extraArgs = [ "--interface=br0:routable" ];
|
|
||||||
# not useful and potentially a security loophole
|
# not useful and potentially a security loophole
|
||||||
services.resolved.llmnr = "false";
|
services.resolved.llmnr = "false";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user