Initial commit
This commit is contained in:
commit
a4db9c8516
36 changed files with 15659 additions and 0 deletions
47
virtualization/portainer-quadlet.nix
Normal file
47
virtualization/portainer-quadlet.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# to enable podman & podman systemd generator
|
||||
virtualisation.quadlet.enable = true;
|
||||
users.users.portainer = {
|
||||
autoSubUidGidRange = true;
|
||||
isSystemUser = true;
|
||||
group = "podman";
|
||||
home = "/var/lib/portainer";
|
||||
linger = true;
|
||||
createHome = true;
|
||||
};
|
||||
home-manager.users.portainer = { pkgs, config, ... }: {
|
||||
imports = [ inputs.quadlet-nix.homeManagerModules.quadlet ];
|
||||
virtualisation.quadlet.containers = {
|
||||
portainer = {
|
||||
autoStart = true;
|
||||
serviceConfig = {
|
||||
RestartSec = "10";
|
||||
Restart = "always";
|
||||
User = "portainer";
|
||||
};
|
||||
containerConfig = {
|
||||
cgroupsMode = "disable";
|
||||
image = "docker.io/portainer/portainer-ce:lts";
|
||||
logDriver = "journald";
|
||||
publishPorts = [
|
||||
"0.0.0.0:8080:8080"
|
||||
"0.0.0.0:9000:9000"
|
||||
"0.0.0.0:9443:9443"
|
||||
];
|
||||
userns = "keep-id";
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock:rw"
|
||||
"portainer_portainer_data:/data:rw"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
home.stateVersion = "25.05";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue