summaryrefslogtreecommitdiff
path: root/modules/nixos/traits/containers.nix
blob: b684803943246834a2be29748cc2f074be31d8ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.traits.containers;
in
{
  options.traits.containers = {
    enable = lib.mkEnableOption "support for containers";
  };

  config = lib.mkIf cfg.enable {
    virtualisation = {
      podman = {
        enable = true;
        extraPackages = [ pkgs.podman-compose ];
        autoPrune.enable = true;
      };

      oci-containers.backend = "podman";
    };
  };
}