Files
nix/hosts/common/configs/system/podman/default.nix
2025-07-07 09:23:01 +01:00

42 lines
938 B
Nix

{ pkgs, inputs, ... }:
{
imports = [ inputs.quadlet-nix.nixosModules.quadlet ];
# FIXME: https://github.com/containers/crun/pull/1807
nixpkgs.overlays = [
(final: prev: {
crun = prev.crun.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(builtins.fetchurl {
url = "https://patch-diff.githubusercontent.com/raw/containers/crun/pull/1807.patch";
sha256 = "sha256:04s11r4ffjzlxzbwjk2s7vcgykllbmc0jgl0b1va5rxqvxs2c6hb";
})
];
});
})
];
virtualisation = {
podman.enable = true;
containers = {
enable = true;
storage.settings.storage.driver = "btrfs";
};
quadlet = {
enable = true;
autoEscape = true;
};
};
environment = {
persistence."/persist/state"."/var/lib/containers".create = "directory";
systemPackages = with pkgs; [
podman-compose
kompose
];
};
}