2024-01-31 05:23:52 +01:00
|
|
|
{ inputs, pkgs, system, ... }: {
|
2023-12-18 11:26:37 +01:00
|
|
|
# Need to increase this because the number of
|
|
|
|
# containers I have drive the defaults over the max
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
"fs.inotify.max_user_watches" = 10485760;
|
|
|
|
"fs.inotify.max_user_instances" = 1024;
|
|
|
|
};
|
2023-12-18 11:26:59 +01:00
|
|
|
|
2023-12-18 11:26:37 +01:00
|
|
|
virtualisation.podman = {
|
|
|
|
enable = true;
|
|
|
|
dockerSocket.enable = true;
|
2023-12-18 11:26:59 +01:00
|
|
|
dockerCompat = true;
|
2023-12-18 11:26:37 +01:00
|
|
|
autoPrune = {
|
|
|
|
enable = true;
|
|
|
|
dates = "weekly";
|
|
|
|
flags = [ "--all" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
podman-compose
|
|
|
|
podman-tui
|
2024-01-31 05:23:52 +01:00
|
|
|
inputs.compose2nix.packages.${system}.default
|
2023-12-18 11:26:37 +01:00
|
|
|
];
|
2024-03-14 01:53:52 +01:00
|
|
|
|
|
|
|
# Add the docker telegraf listener
|
2024-03-14 02:35:04 +01:00
|
|
|
services.telegraf.extraConfig.inputs.docker = {
|
2024-03-14 02:36:49 +01:00
|
|
|
endpoint = "unix://run/podman/podman.sock";
|
2024-03-14 02:35:04 +01:00
|
|
|
};
|
2024-03-14 02:23:28 +01:00
|
|
|
users.users.telegraf.extraGroups = [ "podman" ];
|
2023-12-18 14:20:48 +01:00
|
|
|
}
|