diff --git a/global/oci/default.nix b/global/oci/default.nix new file mode 100644 index 00000000..4827c71a --- /dev/null +++ b/global/oci/default.nix @@ -0,0 +1,20 @@ +{ 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" ]; + }; +}