nixos/global/oci/default.nix

21 lines
445 B
Nix

{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.oci;
in {
options.global.oci = {
enable = mkEnableOption "oci container runtime";
};
config = mkIf cfg.enable {
virtualisation.podman = {
enable = true;
enableNvidia = with config.global.gui; mkDefault (type == "prime" || type == "nvidia");
dockerCompat = true;
};
users.home.persist.directories = [ ".local/share/containers" ];
};
}