From 9952890751bf3c4a6aa1d6e21cb5fe7da8b3edf1 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Thu, 25 Jul 2024 14:04:19 +0100 Subject: [PATCH] Make zippy a compute node. --- common/cattle-node.nix | 15 --------------- common/consul.nix | 2 +- flake.nix | 2 +- hosts/zippy/default.nix | 2 +- 4 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 common/cattle-node.nix diff --git a/common/cattle-node.nix b/common/cattle-node.nix deleted file mode 100644 index f73097d..0000000 --- a/common/cattle-node.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs, ... }: -{ - imports = [ - ./cifs-client.nix - ./consul.nix - ./glusterfs.nix - ./glusterfs-client.nix - ./impermanence.nix - ./nomad.nix - ./sshd.nix - ./user-ppetru.nix - ./unattended-encryption.nix - ./systemd-boot.nix - ]; -} diff --git a/common/consul.nix b/common/consul.nix index 27d7ff0..d47fe25 100644 --- a/common/consul.nix +++ b/common/consul.nix @@ -12,7 +12,7 @@ in client_addr = "0.0.0.0"; datacenter = "alo"; server = server_enabled; - bootstrap_expect = (builtins.length servers + 2) / 2; + bootstrap_expect = if server_enabled then (builtins.length servers + 2) / 2 else null; retry_join = builtins.filter (elem: elem != config.networking.hostName) servers; telemetry = { prometheus_retention_time = "24h"; diff --git a/flake.nix b/flake.nix index 60783d8..b711f38 100644 --- a/flake.nix +++ b/flake.nix @@ -75,7 +75,7 @@ }; }; zippy = { - hostname = "zippy"; + hostname = "192.168.1.2"; profiles.system = { user = "root"; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.zippy; diff --git a/hosts/zippy/default.nix b/hosts/zippy/default.nix index c0a9a61..87dc687 100644 --- a/hosts/zippy/default.nix +++ b/hosts/zippy/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../common/global - ../../common/cattle-node.nix + ../../common/compute-node.nix ./hardware.nix ];