about summary refs log tree commit diff
path: root/modules/virtualisation/default.nix
blob: 8d9f14d91063268505f986ac4be35672f0db675c (plain) (blame)
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,
  pkgs,
  user,
  ...
}: {
  virtualisation = {
    docker = {
      enable = true;
      storageDriver = "btrfs";
      rootless = {
        enable = true;
        setSocketVariable = true;
      };
    };
    libvirtd.enable = true;
    virtualbox.host.enable = true;
  };

  environment.systemPackages = with pkgs; [
    docker-compose
  ];

  users.users.${user}.extraGroups = ["libvirtd" "docker"];
  users.extraGroups.vboxusers.members = ["user-with-access-to-virtualbox"];
}