summaryrefslogtreecommitdiff
path: root/modules/root/software/docker.nix
blob: bf1898ce3824ca4a606d7e3b81d74522e1f77487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ pkgs, lib, config, userDetails, ... }: {
	options = {
		software.development.docker = {
			enable = lib.mkEnableOption "enables docker";
			btrfsSupport = lib.mkEnableOption "changes docker storageDriver to btrfs";
		};
	};

	config = lib.mkIf config.software.development.docker.enable {
		virtualisation.docker = {
			enable = true;
			storageDriver = lib.mkIf config.software.development.docker.btrfsSupport "btrfs";
		};

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

		users.groups.docker.members = [ userDetails.username ];
	};
}