From 1835aa04051f2f0c41017423f2bcba6c549f26b0 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 5 Jan 2025 16:19:45 -0600 Subject: overhual --- modules/root/software/docker.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/root/software/docker.nix (limited to 'modules/root/software/docker.nix') diff --git a/modules/root/software/docker.nix b/modules/root/software/docker.nix new file mode 100644 index 0000000..bf1898c --- /dev/null +++ b/modules/root/software/docker.nix @@ -0,0 +1,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 ]; + }; +} -- cgit v1.2.3