Skip to content

Commit

Permalink
add nerdctl wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Nov 28, 2023
1 parent 733f338 commit 58b769e
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions modules/nixos/containerd.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
{
pkgs,
config,
lib,
...
}: let
groupName = "containerd";
nerdctl = pkgs.nerdctl.override {
makeWrapper = pkgs.makeBinaryWrapper;
};
in {
environment.systemPackages =[
nerdctl
];

Expand All @@ -24,4 +34,18 @@
requires = ["containerd.service"];
};
};

users.groups.${groupName} = {
members = config.users.groups.wheel.members;
};

security.wrappers = {
"nerdctl" = {
setuid = true;
owner = "root";
group = groupName;
permissions = "u+rx,g+rx";
source = lib.getExe nerdctl;
};
};
}

0 comments on commit 58b769e

Please sign in to comment.