global(oci): add podman runtime
This commit is contained in:
parent
a5e7e6a623
commit
0928b4d543
1 changed files with 20 additions and 0 deletions
20
global/oci/default.nix
Normal file
20
global/oci/default.nix
Normal file
|
@ -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" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue