about summary refs log tree commit diff
path: root/modules/virtualisation/default.nix
blob: 1aa4cb2fad22e2c2c7b40aca5dbea6bc9f7477d5 (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
{ 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" ];
}