summaryrefslogtreecommitdiff
path: root/modules/docker.nix
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-02 21:29:37 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-02 21:29:37 -0500
commit34b0bb8df42194a0ea433592e3cac27546f0af4e (patch)
treef584369db3a6accb74b1a9288c2480f8fd411671 /modules/docker.nix
parent4e4b8068825044ebfd435ec8a6f0e84f5c0c8801 (diff)
downloadnixos-34b0bb8df42194a0ea433592e3cac27546f0af4e.tar.xz
nixos-34b0bb8df42194a0ea433592e3cac27546f0af4e.zip
modularize conf and stuff
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
+ ];
+ };
+}