mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-23 08:07:39 +02:00
refactor: Use haumea for filesystem-based module system for flake outputs
refactor: Use hyphen(`-`) for variable names & folder names(except Python), replace all unserscore(`_`) with hyphen(`-`).
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
myvars,
|
||||
...
|
||||
}: let
|
||||
serverName = "k3s-prod-1-master-1";
|
||||
serverIp = myvars.networking.hostAddress.${serverName}.address;
|
||||
package = pkgs.k3s_1_29;
|
||||
in {
|
||||
environment.systemPackages = [package];
|
||||
services.k3s = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
role = "agent";
|
||||
serverAddr = "https://${serverIp}:6443";
|
||||
tokenFile = config.age.secrets."k3s-prod-1-token".path;
|
||||
# https://docs.k3s.io/cli/agent
|
||||
extraFlags =
|
||||
" --node-label=node-type=worker"
|
||||
+ " --data-dir /var/lib/rancher/k3s";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user