nixos-configs/modules/services/docker.nix
Paul-Henri Froidmont 75d5fa6417
Fix backlight control
2023-03-23 01:56:21 +01:00

25 lines
488 B
Nix

{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.services.docker;
in {
options.modules.services.docker = { enable = mkBoolOpt false; };
config = mkIf cfg.enable {
virtualisation = {
docker = {
enable = true;
autoPrune.enable = true;
enableOnBoot = mkDefault false;
};
};
users.users.${config.user.name}.extraGroups = [ "docker" ];
environment.systemPackages = with pkgs; [ docker-compose ];
};
}