From 7c310e8d28ef23066cec5367e9834d648442a4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 7 Apr 2021 20:46:10 +0200 Subject: [PATCH 1/2] nixos/k3s: add to environment.systemPackages for adminstration --- nixos/modules/services/cluster/k3s/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix index e62fbc94415..afcc7abec4c 100644 --- a/nixos/modules/services/cluster/k3s/default.nix +++ b/nixos/modules/services/cluster/k3s/default.nix @@ -81,6 +81,8 @@ in # supporting it, or their bundled containerd systemd.enableUnifiedCgroupHierarchy = false; + environment.systemPackages = [ config.services.k3s.package ]; + systemd.services.k3s = { description = "k3s service"; after = mkIf cfg.docker [ "docker.service" ]; From 03582eb6e3c6124a74604c96029f085839022989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 5 Jun 2021 07:48:20 +0200 Subject: [PATCH 2/2] nixos/k3s: add zfs to path --- nixos/modules/services/cluster/k3s/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix index afcc7abec4c..729c261b10e 100644 --- a/nixos/modules/services/cluster/k3s/default.nix +++ b/nixos/modules/services/cluster/k3s/default.nix @@ -87,6 +87,7 @@ in description = "k3s service"; after = mkIf cfg.docker [ "docker.service" ]; wantedBy = [ "multi-user.target" ]; + path = optional config.boot.zfs.enabled config.boot.zfs.package; serviceConfig = { # See: https://github.com/rancher/k3s/blob/dddbd16305284ae4bd14c0aade892412310d7edc/install.sh#L197 Type = if cfg.role == "agent" then "exec" else "notify";