Octoprint container on universe

This commit is contained in:
Nathan McCarty 2023-08-05 16:19:58 -04:00
parent ac4d80a7c5
commit 4649a228c6
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
1 changed files with 15 additions and 0 deletions

View File

@ -69,4 +69,19 @@
# Setup home manager # Setup home manager
home-manager.users.nathan = import ./home.nix; home-manager.users.nathan = import ./home.nix;
# Containers
virtualisation.oci-containers.containers = {
# Octoprint
"octoprint" = {
image = "octoprint/octoprint";
environment = { "ENABLE_MJPG_STREAMER" = "true"; };
ports = [ "80:80" ];
volumes = [ "/var/octoprint:/octoprint" ];
extraOptions = [
"--device=/dev/video0:/dev/video0"
"--device=/dev/video1:/dev/video1"
"--device=/dev/ttyUSB0:/dev/ttyUSB0"
];
};
};
} }