Add portainer service
This commit is contained in:
@ -9,6 +9,9 @@
|
|||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
|
|
||||||
|
# Include Services
|
||||||
|
./services/portainer.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
@ -77,6 +80,7 @@
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
lazygit
|
lazygit
|
||||||
keychain
|
keychain
|
||||||
|
alejandra
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
26
ServeNix/services/portainer.nix
Normal file
26
ServeNix/services/portainer.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{config, lib, pkgs, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
virtualisation.oci-containers.containers.portainer = {
|
||||||
|
image = "portainer/portainer-ce:latest";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
"8000:8000"
|
||||||
|
"9443:9443"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
"portainer_config:/data"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--restart=always" # Conflicts with NixOS' default of using --rm
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user