From 34b0bb8df42194a0ea433592e3cac27546f0af4e Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Wed, 2 Oct 2024 21:29:37 -0500 Subject: modularize conf and stuff --- modules/docker.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/docker.nix (limited to 'modules/docker.nix') diff --git a/modules/docker.nix b/modules/docker.nix new file mode 100644 index 0000000..d4b6272 --- /dev/null +++ b/modules/docker.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, config, ... }: { + options = { + docker.enable = lib.mkEnableOption "enables docker"; + docker.btrfsSupport = lib.mkEnableOption "changes docker storageDriver to btrfs"; + }; + + config = lib.mkIf config.docker.enable { + virtualisation.docker = { + enable = true; + storageDriver = lib.mkIf config.docker.btrfsSupport "btrfs"; + }; + + environment.systemPackages = with pkgs; [ + docker-compose + ]; + }; +} -- cgit v1.2.3