From 7dd2f89c211738c07d8c206ff699ffe9294447ee Mon Sep 17 00:00:00 2001 From: Emmet Date: Sun, 24 Mar 2024 10:14:15 -0500 Subject: [PATCH] Docker automatically selects storage driver --- profiles/homelab/base.nix | 2 +- profiles/work/configuration.nix | 2 +- system/app/docker.nix | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/profiles/homelab/base.nix b/profiles/homelab/base.nix index cfb8a96..a66ac09 100644 --- a/profiles/homelab/base.nix +++ b/profiles/homelab/base.nix @@ -6,7 +6,7 @@ ../../system/hardware/time.nix # Network time sync ../../system/security/doas.nix ../../system/security/gpg.nix - ( import ../../system/app/docker.nix {storageDriver = "btrfs"; inherit userSettings pkgs lib;} ) + ( import ../../system/app/docker.nix {storageDriver = null; inherit pkgs userSettings lib;} ) ]; # Fix nix path diff --git a/profiles/work/configuration.nix b/profiles/work/configuration.nix index 561aa66..7f71f46 100644 --- a/profiles/work/configuration.nix +++ b/profiles/work/configuration.nix @@ -16,7 +16,7 @@ (./. + "../../../system/wm"+("/"+userSettings.wm)+".nix") # My window manager #../../system/app/flatpak.nix ../../system/app/virtualization.nix - ( import ../../system/app/docker.nix {storageDriver = "btrfs"; inherit userSettings lib;} ) + ( import ../../system/app/docker.nix {storageDriver = null; inherit pkgs userSettings lib;} ) ../../system/security/doas.nix ../../system/security/gpg.nix ../../system/security/blocklist.nix diff --git a/system/app/docker.nix b/system/app/docker.nix index fa652cc..0923aaa 100644 --- a/system/app/docker.nix +++ b/system/app/docker.nix @@ -1,4 +1,4 @@ -{ lib, userSettings, storageDriver ? null, ... }: +{ pkgs, lib, userSettings, storageDriver ? null, ... }: assert lib.asserts.assertOneOf "storageDriver" storageDriver [ null @@ -18,4 +18,8 @@ assert lib.asserts.assertOneOf "storageDriver" storageDriver [ autoPrune.enable = true; }; users.users.${userSettings.username}.extraGroups = [ "docker" ]; + environment.systemPackages = with pkgs; [ + docker-compose + lazydocker + ]; }