about summary refs log blame commit diff
path: root/modules/virtualisation/default.nix
blob: 8d9f14d91063268505f986ac4be35672f0db675c (plain) (tree)
1
2
3
4
5
6
7
8
9
 




         
                    
              
                    




                                 
      
                           
                                  
    
 

                                           

    

                                                                           
 
{
  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"];
}