summaryrefslogtreecommitdiff
path: root/system/virt/docker.nix
blob: 237657468f466d79fc899ab872dcfc85756f4ae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  lib,
  config,
  ...
}: let
  inherit (lib) mkIf;
  cfg = config.virt.docker;
  rootfs = config.fileSystems."/".fsType;
in {
  config = mkIf cfg.enable {
    virtualisation.docker =
      {
        enable = true;
        enableOnBoot = false;
      }
      // mkIf (rootfs == "btrfs") {
        storageDriver = "btrfs";
      };
    users.groups.docker.members = [config.user];
  };
}