Testing a self-hosted docker registry
This commit is contained in:
parent
a05179a8f6
commit
ae18e109f4
1 changed files with 32 additions and 26 deletions
|
@ -1,33 +1,39 @@
|
|||
{ inputs, pkgs, system, ... }: {
|
||||
boot.kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 52428800;
|
||||
"fs.inotify.max_user_instances" = 4096;
|
||||
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;
|
||||
# Testing...
|
||||
# "net.core.netdev_max_backlog" = 4000;
|
||||
# "net.ipv4.tcp_max_syn_backlog" = 4096;
|
||||
};
|
||||
|
||||
# Allow Docker containers to access Tailscale network
|
||||
networking.firewall = {
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ 41641 ]; # Tailscale port
|
||||
};
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableOnBoot = true;
|
||||
liveRestore = true;
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = "--all";
|
||||
};
|
||||
|
||||
# Allow Docker containers to access Tailscale network
|
||||
networking.firewall = {
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ 41641 ]; # Tailscale port
|
||||
daemon.settings = {
|
||||
registry-mirrors = [ "https://registry.sysctl.io" ];
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableOnBoot = true;
|
||||
autoPrune.enable = true;
|
||||
autoPrune.dates = "weekly";
|
||||
liveRestore = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
ctop
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
ctop
|
||||
];
|
||||
|
||||
# Add the docker telegraf listener
|
||||
services.telegraf.extraConfig.inputs.docker = {};
|
||||
users.users.telegraf.extraGroups = [ "docker" ];
|
||||
# Add the docker telegraf listener
|
||||
services.telegraf.extraConfig.inputs.docker = {};
|
||||
users.users.telegraf.extraGroups = [ "docker" ];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue