home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 32fbbc7c91b46b3b50fe4a81f18b9b8dce0c5973
parent 5e9cd8674da7e8b6045d75bc8f3295169561a760
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri, 19 Nov 2021 15:19:56 +0100

ops: use hosts.toml in network.nix

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mops/home/network.nix | 10++++------
Mops/hosts.toml | 25++++++++++++++++++++++---
2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/ops/home/network.nix b/ops/home/network.nix @@ -1,6 +1,7 @@ let sources = import ../../nix; pkgs = sources.pkgs { }; + metadata = pkgs.lib.importTOML ../hosts.toml; in { network = { @@ -10,8 +11,7 @@ in "k8sn1" = { config, pkgs, lib, ... }: { deployment.targetUser = "root"; - deployment.targetHost = "192.168.1.130"; - # deployment.targetHost = "k8sn1.home"; + deployment.targetHost = "${metadata.hosts.k8sn1.addrs.v4}"; deployment.tags = [ "kubernetes" "master" ]; deployment.healthChecks = { cmd = [{ @@ -23,15 +23,13 @@ in }; "k8sn2" = { config, pkgs, lib, ... }: { deployment.targetUser = "root"; - deployment.targetHost = "192.168.1.131"; - # deployment.targetHost = "k8sn2.home"; + deployment.targetHost = "${metadata.hosts.k8sn2.addrs.v4}"; deployment.tags = [ "kubernetes" "worker" ]; imports = [ ../../systems/hosts/k8sn2.nix ]; }; "k8sn3" = { config, pkgs, lib, ... }: { deployment.targetUser = "root"; - deployment.targetHost = "192.168.1.132"; - # deployment.targetHost = "k8sn3.home"; + deployment.targetHost = "${metadata.hosts.k8sn3.addrs.v4}"; deployment.tags = [ "kubernetes" "worker" ]; imports = [ ../../systems/hosts/k8sn3.nix ]; }; diff --git a/ops/hosts.toml b/ops/hosts.toml @@ -14,6 +14,11 @@ network = "vpn" ssh = { pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHJ3QqVCUiE4BIFKTJLN6mSnp9bLSnJ3gE8ScbAajGsH vincent@aomi", gpgRemoteForward = true } addrs = { v4 = "192.168.1.23" } +[hosts.aomi.builder] +maxJobs = 8 +systems = [ "x86_64-linux", "aarch64-linux", "armv7l-linux", "armv6l-linux", "powerpc64le-linux", "s390x-linux" ] +features = [ "big-parallel", "kvm", "nixos-test" ] + [hosts.aomi.wireguard] pubkey = "XT4D9YLeVHwMb9R4mhBLSWHYF8iBO" addrs = { v4 = "10.100.0.17" } @@ -23,6 +28,11 @@ network = "vpn" ssh = { pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKP+HQUk3GEjXuAqbb2psiLfLcBd/lcYHx57yANPhdzw vincent@wakasu", gpgRemoteForward = true } addrs = { v4 = "192.168.1.77" } +[hosts.wakasu.builder] +maxJobs = 8 +systems = [ "x86_64-linux", "aarch64-linux", "armv7l-linux", "armv6l-linux", "powerpc64le-linux", "s390x-linux" ] +features = [ "big-parallel", "kvm", "nixos-test" ] + [hosts.wakasu.wireguard] pubkey = "U10ozKSCnTm8aD5i6UULSJHQPouoswtNkwFI3P9Lw3Y=" addrs = { v4 = "10.100.0.8" } @@ -31,6 +41,15 @@ addrs = { v4 = "10.100.0.8" } network = "vpn" addrs = { v4 = "167.99.17.238" } # FIXME probably not right -[hosts.kerkounae.wireguard] +[hosts.kerkouane.wireguard] addrs = { v4 = "10.100.0.1" } -port = 51820- \ No newline at end of file +port = 51820 + +[hosts.k8sn1] +addrs = { v4 = "192.168.1.130" } + +[hosts.k8sn2] +addrs = { v4 = "192.168.1.131" } + +[hosts.k8sn3] +addrs = { v4 = "192.168.1.132" }+ \ No newline at end of file