summaryrefslogtreecommitdiff
path: root/modules/docker.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/docker.nix')
-rw-r--r--modules/docker.nix17
1 files changed, 17 insertions, 0 deletions
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
+ ];
+ };
+}