big refactor
This commit is contained in:
7
nixos/docker/default.nix
Normal file
7
nixos/docker/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./portainer.nix
|
||||
./watchtower.nix
|
||||
];
|
||||
}
|
||||
13
nixos/docker/portainer.nix
Normal file
13
nixos/docker/portainer.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
virtualisation.oci-containers.containers.portainer-agent = {
|
||||
image = "portainer/agent:latest"; # Use the latest Portainer agent image
|
||||
ports = [
|
||||
"9001:9001" # Expose the Portainer agent API port
|
||||
];
|
||||
volumes = [
|
||||
"/etc/zoneinfo/${config.time.timeZone}:/etc/localtime:ro"
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
};
|
||||
}
|
||||
11
nixos/docker/watchtower.nix
Normal file
11
nixos/docker/watchtower.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
virtualisation.oci-containers.containers.watchtower = {
|
||||
image = "containrrr/watchtower:latest";
|
||||
volumes = [
|
||||
"/etc/zoneinfo/${config.time.timeZone}:/etc/localtime:ro"
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
environment = {WATCHTOWER_SCHEDULE = "0 0 3 * * *";};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user