nix/nixos/common/services/docker.nix

27 lines
685 B
Nix
Raw Normal View History

2023-12-13 14:30:17 +09:00
{ inputs, pkgs, ... }: {
2023-12-02 20:11:50 +09:00
boot.kernel.sysctl = {
"fs.inotify.max_user_watches" = 10485760;
"fs.inotify.max_user_instances" = 1024;
};
2023-12-02 22:36:39 +09:00
2023-11-25 15:17:29 +09:00
virtualisation.docker = {
enable = true;
enableOnBoot = true;
autoPrune.enable = true;
autoPrune.dates = "weekly";
storageDriver = "btrfs";
liveRestore = true;
};
2023-12-01 19:58:41 +09:00
2023-12-04 21:48:23 +09:00
environment.systemPackages = with pkgs; [
docker-compose
ctop
2023-12-13 14:30:17 +09:00
inputs.compose2nix.packages.x86_64-linux.default
2024-01-07 21:17:35 +09:00
lazydocker
2023-12-04 21:48:23 +09:00
];
2024-01-18 13:24:02 +09:00
# Add the docker telegraf listener
2024-01-18 13:25:13 +09:00
services.telegraf.extraConfig.inputs.docker = {};
2024-01-18 14:04:35 +09:00
users.users.telegraf.extraGroups = [ "docker" ];
2023-12-02 20:11:50 +09:00
}