diff --git a/bin/extra/build-remote-nixos b/bin/extra/build-remote-nixos index 806bf71..630a950 100755 --- a/bin/extra/build-remote-nixos +++ b/bin/extra/build-remote-nixos @@ -35,9 +35,9 @@ else fi function run { - cmd=${1} - echo -e "$BOLD$cmd$NC on $YELLOW$target_host with $profile through $build_host$NC" - runcmd="nixos-rebuild --target-host $target_host --use-remote-sudo $cmd --flake .#$profile" + remote_cmd=${1} + echo -e "$BOLD$remote_cmd$NC on $YELLOW$target_host with $profile through $build_host$NC" + runcmd="nixos-rebuild --target-host $target_host --use-remote-sudo $remote_cmd --flake .#$profile" echo -e "$BLUE$runcmd$NC" $runcmd } diff --git a/hosts/hl-minipc1.nix b/hosts/hl-minipc1.nix index 3dd472a..1589915 100644 --- a/hosts/hl-minipc1.nix +++ b/hosts/hl-minipc1.nix @@ -52,5 +52,10 @@ in # Firewall networking.firewall.allowedUDPPorts = openPorts; networking.firewall.allowedTCPPorts = openPorts; + # K8s + skyg.nixos.server.k8s = { + enable = true; + isMaster = true; + }; } diff --git a/hosts/hl-minipc2.nix b/hosts/hl-minipc2.nix index bd59a9e..659f613 100644 --- a/hosts/hl-minipc2.nix +++ b/hosts/hl-minipc2.nix @@ -32,5 +32,10 @@ }; }; }; + # K8s + skyg.nixos.server.k8s = { + enable = true; + isMaster = false; + }; } diff --git a/modules/main.nix b/modules/main.nix index 1c36376..6889f43 100644 --- a/modules/main.nix +++ b/modules/main.nix @@ -24,6 +24,10 @@ skyg.core.substituters = localNixCaches; skyg.networkDrives.enable = enableNetworkDrives; skyg.nixos.common.containers = (if os.enable then os.containers else { }); + skyg.nixos.server.k8s = { + masterIP = "10.0.10.6"; + masterHostName = "minipc1.lab.internal"; + }; system.stateVersion = systemStateVersion; nixpkgs.config.allowUnfree = true; nix = { diff --git a/modules/nixos/server/k8s/default.nix b/modules/nixos/server/k8s/default.nix index b608d4d..60cc97d 100644 --- a/modules/nixos/server/k8s/default.nix +++ b/modules/nixos/server/k8s/default.nix @@ -32,7 +32,6 @@ in # packages for administration tasks environment.systemPackages = with pkgs; [ - kompose kubectl kubernetes ];