nix/nixos/common/services/docker.nix
2024-08-05 12:20:46 +09:00

27 lines
697 B
Nix

{ inputs, pkgs, system, ... }: {
boot.kernel.sysctl = {
"fs.inotify.max_user_watches" = 52428800;
"fs.inotify.max_user_instances" = 4096;
# Testing...
"net.core.netdev_max_backlog" = 4000;
"net.ipv4.tcp_max_syn_backlog" = 4096;
};
virtualisation.docker = {
enable = true;
enableOnBoot = true;
autoPrune.enable = true;
autoPrune.dates = "weekly";
liveRestore = true;
};
environment.systemPackages = with pkgs; [
docker-compose
ctop
];
# Add the docker telegraf listener
services.telegraf.extraConfig.inputs.docker = {};
users.users.telegraf.extraGroups = [ "docker" ];
}