From 68db37f6c413530f35589d1da2ea758ac274d752 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 23 Sep 2022 23:43:58 +0200 Subject: ma home: add 3dprint, update jellyfin and music --- makefu/2configs/home/3dprint.nix | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 makefu/2configs/home/3dprint.nix (limited to 'makefu/2configs/home/3dprint.nix') diff --git a/makefu/2configs/home/3dprint.nix b/makefu/2configs/home/3dprint.nix new file mode 100644 index 00000000..859a1884 --- /dev/null +++ b/makefu/2configs/home/3dprint.nix @@ -0,0 +1,45 @@ +{ pkgs, ... }: +{ + services.mjpg-streamer = { + enable = true; + inputPlugin = "input_uvc.so -d /dev/web_cam -r 1280x960"; + }; + users.users.octoprint.extraGroups = [ "video" ]; + # allow octoprint to access /dev/vchiq + # also ensure that the webcam always comes up under the same name + services.udev.extraRules = '' + SUBSYSTEM=="vchiq",GROUP="video",MODE="0660" + SUBSYSTEM=="video4linux", ATTR{name}=="UVC Camera (046d:0825)",SYMLINK+="web_cam", MODE="0666", GROUP="video" + ''; + systemd.services.octoprint = { + path = [ pkgs.libraspberrypi ]; + }; + services.octoprint = { + enable = true; + plugins = plugins: with plugins;[ + costestimation + displayprogress + mqtt + stlviewer + themeify + # octolapse + (buildPlugin rec { + pname = "OctoPrint-HomeAssistant"; + version = "3.6.2"; + src = pkgs.fetchFromGitHub { + owner = "cmroche"; + repo = pname; + rev = version; + hash = "sha256-oo9OBmHoJFNGK7u9cVouMuBuUcUxRUrY0ppRq0OS1ro="; + }; + }) + ]; + extraConfig.plugins.mqtt.broker = { + url = "omo.lan"; + # TODO TODO TODO + username = "hass"; + password = "lksue43jrf"; + # TODO TODO TODO + }; + }; +} -- cgit v1.2.3