diff options
| author | seth <[email protected]> | 2023-04-17 12:00:55 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-04-17 12:01:21 -0400 |
| commit | 92ca826539092f33c8e19a19c7a9ea0def2aece0 (patch) | |
| tree | c6ff98c3f645f189b559bc1a69904fec217a946c /modules/nixos/virtualisation.nix | |
| parent | 98921a299be9f22bde9204e1fd05d0ea0fb0c6ed (diff) | |
move most configurations to modules
Diffstat (limited to 'modules/nixos/virtualisation.nix')
| -rw-r--r-- | modules/nixos/virtualisation.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/nixos/virtualisation.nix b/modules/nixos/virtualisation.nix new file mode 100644 index 0000000..d3ceb28 --- /dev/null +++ b/modules/nixos/virtualisation.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.nixos.virtualisation; + inherit (lib) mkEnableOption mkIf; +in { + options.nixos.virtualisation.enable = mkEnableOption "enable podman"; + + config = mkIf cfg.enable { + virtualisation = { + podman = { + enable = true; + enableNvidia = true; + extraPackages = with pkgs; [podman-compose]; + autoPrune.enable = true; + }; + oci-containers.backend = "podman"; + }; + }; +} |
