diff options
Diffstat (limited to 'modules/root/docker.nix')
-rw-r--r-- | modules/root/docker.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/root/docker.nix b/modules/root/docker.nix new file mode 100644 index 0000000..d4b6272 --- /dev/null +++ b/modules/root/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 + ]; + }; +} |