From 10b0df38b4286237b56ff9177f8d4c5676bfb5c1 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 30 Oct 2023 04:22:32 -0400 Subject: tree-wide: refactor i went overboard on modules. this is much comfier --- modules/nixos/features/virtualisation.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/nixos/features/virtualisation.nix (limited to 'modules/nixos/features/virtualisation.nix') diff --git a/modules/nixos/features/virtualisation.nix b/modules/nixos/features/virtualisation.nix new file mode 100644 index 0000000..206a98e --- /dev/null +++ b/modules/nixos/features/virtualisation.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.features.virtualisation; + inherit (lib) mkEnableOption mkIf; +in { + options.features.virtualisation.enable = mkEnableOption "enable podman"; + + config.virtualisation = mkIf cfg.enable { + podman = { + enable = true; + enableNvidia = true; + extraPackages = with pkgs; [podman-compose]; + autoPrune.enable = true; + }; + oci-containers.backend = "podman"; + }; +} -- cgit v1.2.3