From eaa46e70343d8cba4021869b59427e3f61778ee1 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 30 Sep 2024 16:42:58 -0600 Subject: [PATCH] [NixOS] Fix k3s definition --- nixos/k3s.nix | 12 +++++++----- nixos/machines/ryzen-shine.nix | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/nixos/k3s.nix b/nixos/k3s.nix index bc60381f..d223d5f5 100644 --- a/nixos/k3s.nix +++ b/nixos/k3s.nix @@ -3,13 +3,15 @@ with lib; let cfg = config.myModules.railbird-k3s; in { options = { - enable = mkEnableOption "railbird k3s"; - serverAddr = { - type = lib.types.str; - default = ""; + myModules.railbird-k3s = { + enable = mkEnableOption "railbird k3s"; + serverAddr = mkOption { + type = lib.types.str; + default = ""; + }; }; }; - config = { + config = mkIf cfg.enable { age.secrets."1896Folsom-k3s-token.age".file = ./secrets/1896Folsom-k3s-token.age; services.dockerRegistry = { enable = true; diff --git a/nixos/machines/ryzen-shine.nix b/nixos/machines/ryzen-shine.nix index d7dcfab2..5d1be0d8 100644 --- a/nixos/machines/ryzen-shine.nix +++ b/nixos/machines/ryzen-shine.nix @@ -7,7 +7,6 @@ features.full.enable = true; myModules.kubelet.enable = false; - myModules.railbird-k3s.enable = true; myModules.nvidia.enable = true; # Needed for now because monitors have different refresh rates myModules.xmonad.picom.vSync.enable = false; @@ -17,6 +16,7 @@ }; myModules.gitea-runner.enable = true; myModules.postgres.enable = true; + myModules.railbird-k3s.enable = true; boot.loader.systemd-boot.configurationLimit = 5;