Skip to content

Commit

Permalink
added an overlay to upgrade k3s and added an extra flag to k3s
Browse files Browse the repository at this point in the history
Signed-off-by: Robbie Buxton <[email protected]>

Co-authored-by: Antoine Roy-Gobeil <[email protected]>
Co-authored-by: Robbie Buxton <[email protected]>
  • Loading branch information
RobbieBuxton and antoinerg committed Jan 22, 2024
1 parent ff0e45a commit 4f36292
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions modules/flake/overlays.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@
{
# Provide overlay to add `nix-snapshotter`.
flake.overlays.default = self: super: {
nix-snapshotter = self.callPackage ../../package.nix {};
nix-snapshotter = self.callPackage ../../package.nix { };

# Depends on PR merged into main, but not yet in a release tag.
# Depends on PR merged into main, but not yet in nixpkgs. Included in 2.0.0-beta.1 and later.
# See: https://github.com/containerd/containerd/pull/9028
containerd = super.containerd.overrideAttrs(o: {
containerd = super.containerd.overrideAttrs (o: {
src = self.fetchFromGitHub {
inherit (o.src) owner repo;
rev = "779875a057ff98e9b754371c193fe3b0c23ae7a2";
hash = "sha256-sXMDMX0QPbnFvRYrAP+sVFjTI9IqzOmLnmqAo8lE9pg=";
};
});


# Fixes https://github.com/pdtpartners/nix-snapshotter/issues/102 due to 23.11 only supporting v1.27.6 while we need v1.27.7.
# Remove once we upgrade to the next stable release.
k3s = super.k3s.overrideAttrs (oldAttrs: {
k3sRepo = super.fetchgit {
url = "https://github.com/k3s-io/k3s";
rev = "v1.27.9+k3s1";
sha256 = "sha256-Zr9Zp9pi7S3PCTveiuSb0RebiGZrxxKC+feTAWO47Js=";
};
});
};

perSystem = { system, ... }: {
Expand Down
1 change: 1 addition & 0 deletions modules/nixos/k3s.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ in {
enable = true;
extraFlags = toString [
"--container-runtime-endpoint unix:///run/containerd/containerd.sock"
"--image-service-endpoint unix:///run/nix-snapshotter/nix-snapshotter.sock"
];
};

Expand Down

0 comments on commit 4f36292

Please sign in to comment.