Change:
Tried updating to latest nixos-unstable, but k3s service won't start due to bug described here (): According to the issue golang 1.20 should be used for building. Steps to reproduce the behavior: to latest nixos-unstable k3s service enabled won't start k3s is starting without errors I downgraded to k3s125 for the time being, this version seems unaffected by the bug, 1.26 and 1.27 both seem to not work properly <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --Please run and paste the result.
Thanks for the clear report, and digging up the upstream issue! Appreciated! I put up a PR to fix this: Since the tests pass there, that seems like a good sign the service starts up after that fix
Thank you for the quick fix, I tried to build your branch on my kind of weak Linux server, but I think it ran out of memory, so I can't test it right now unfortunately. Are there any tests in place for the module that check if it can start correctly? Maybe implementing something like that could save time in the future
There are such tests, yup. On current nixpkgs master: In , only package builds were tested, not individual packages. I think it just impacted so many packages total it wasn't practical to run all the package's tests.
Ah, that makes a lot of sense, my next question would have been why it didn't show up as failing earlier Thanks for the explanation! Did you have a chance to test it with the service? If not, I can boot up my slightly beefier NAS and see if it works there.
The k3s tests in the PR pass, which means the service starts and a pod runs! The tests cover enough that I'm fine trusting them for this fix. I appreciate the offer though!

Discussion:
<del> { lib, stdenv, callPackage }: </del> <ins> { lib, callPackage, ... }@args: </ins> let k3s_builder = import ./builder.nix lib; common = opts: callPackage (k3s_builder opts); <ins> # extraArgs is the extra arguments passed in by the caller to propogate downward. # This is to allow all-packages.nix to do: # #     let k3s_1_23 = (callPackage ./path/to/k3s { #       commonK3sArg = .... #     }).k3s_1_23; extraArgs = builtins.removeAttrs args [ "callPackage" ]; </ins> in { k3s_1_26 = common ((import ./1_26/versions.nix) // { updateScript = [ ./update-script.sh "26" ]; <del> }) { }; </del> <ins> }) extraArgs; </ins> # 1_27 can be built with the same builder as 1_26 k3s_1_27 = common ((import ./1_27/versions.nix) // { updateScript = [ ./update-script.sh "27" ]; <del> }) { }; </del> <ins> }) extraArgs; </ins> }

jwm-settings-manager = callPackage ../applications/window-managers/jwm/jwm-settings-manager.nix { }; <del> k3s_1_24 = callPackage ../applications/networking/cluster/k3s/1_24 { }; k3s_1_25 = callPackage ../applications/networking/cluster/k3s/1_25 { }; inherit (callPackage ../applications/networking/cluster/k3s { }) k3s_1_26 k3s_1_27 ; </del> <ins> k3s_1_24 = callPackage ../applications/networking/cluster/k3s/1_24 { buildGoModule = buildGo120Module; }; k3s_1_25 = callPackage ../applications/networking/cluster/k3s/1_25 { buildGoModule = buildGo120Module; }; inherit (callPackage ../applications/networking/cluster/k3s { buildGoModule = buildGo120Module; }) k3s_1_26 k3s_1_27; </ins> k3s = k3s_1_27; k3sup = callPackage ../applications/networking/cluster/k3sup { };