nixos/global/oci/default.nix

21 lines
443 B
Nix
Raw Normal View History

2024-01-11 13:59:55 +08:00
{ 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;
2024-01-27 22:14:03 +08:00
enableNvidia = with config.global.gpu; mkDefault type == "prime" || type == "nvidia";
2024-01-11 13:59:55 +08:00
dockerCompat = true;
};
users.home.persist.directories = [ ".local/share/containers" ];
};
}