Rebase to flake parts #7

This commit is contained in:
2026-05-08 19:12:16 -03:00
parent 1015cf4577
commit f98606dcce
23 changed files with 1060 additions and 11 deletions
+36
View File
@@ -0,0 +1,36 @@
{ ... }: {
flake.nixosModules.systemDocker =
{ config, lib, pkgs, ... }:
let
cfg = config.chiasson.system.docker;
in
{
options.chiasson.system.docker = {
enable = lib.mkEnableOption ''
`virtualisation.docker` add users to `docker` if they need the socket.
'';
compose.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Install `docker-compose` in `environment.systemPackages`.";
};
daemonSettings = lib.mkOption {
type = lib.types.attrs;
default = { };
description = "Merged into `virtualisation.docker.daemon.settings`.";
};
};
config = lib.mkIf cfg.enable {
virtualisation.docker = {
enable = true;
enableOnBoot = true;
daemon.settings = cfg.daemonSettings;
};
environment.systemPackages = lib.optionals cfg.compose.enable [ pkgs.docker-compose ];
};
};
}