blob: 43c748c06ce1916a5da1547527a062bb224962d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{
config,
lib,
pkgs,
...
}: let
cfg = config.traits.containers;
in {
options.traits.containers = {
enable = lib.mkEnableOption "containers support";
};
config.virtualisation = lib.mkIf cfg.enable {
podman = {
enable = true;
enableNvidia = lib.mkDefault (builtins.elem "nvidia" (config.services.xserver.videoDrivers or []));
extraPackages = with pkgs; [podman-compose];
autoPrune.enable = true;
};
oci-containers.backend = "podman";
};
}
|