pulsebert: disable octoprint, audio streaming
This commit is contained in:
parent
1148a5c7cf
commit
b1fe1ea0b3
|
@ -9,7 +9,6 @@
|
|||
hq.interface = "eth0";
|
||||
hq.statistics.enable = true;
|
||||
k-ot.enable = true;
|
||||
audioServer.enable = true;
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
@ -21,10 +20,7 @@
|
|||
tmpOnTmpfs = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
deviceTree.enable = true;
|
||||
};
|
||||
hardware.deviceTree.enable = true;
|
||||
|
||||
nix.settings = {
|
||||
cores = 2;
|
||||
|
@ -37,41 +33,8 @@
|
|||
pkgs.makeModulesClosure (x // { allowMissing = true; });
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
python3 = prev.python3.override {
|
||||
packageOverrides = python-final: python-prev: {
|
||||
aiohttp = python-prev.aiohttp.overrideAttrs ({ nativeBuildInputs ? [],... }: {
|
||||
nativeBuildInputs = nativeBuildInputs ++ [python-final.setuptools];
|
||||
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
|
||||
pystray = python-prev.pystray.overrideAttrs (_: {
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
|
||||
samplerate = python-prev.samplerate.overrideAttrs (_: {
|
||||
dontUseSetuptoolsCheck = true;
|
||||
});
|
||||
};
|
||||
};
|
||||
python3Packages = final.python3.pkgs;
|
||||
})
|
||||
];
|
||||
|
||||
networking = {
|
||||
domain = "hq.c3d2.de";
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
5355 # llmnr
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
5355 # llmnr
|
||||
];
|
||||
};
|
||||
hostName = "pulsebert";
|
||||
useDHCP = false;
|
||||
interfaces.eth0.useDHCP = true;
|
||||
|
@ -138,75 +101,5 @@
|
|||
wheelNeedsPassword = false;
|
||||
};
|
||||
|
||||
services = {
|
||||
# Do not log to flash but also breaks journalctl --user
|
||||
# journald.extraConfig = ''
|
||||
# Storage=volatile
|
||||
# '';
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"drkkr.hq.c3d2.de" = {
|
||||
default = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.octoprint.port}";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header Accept-Encoding identity;
|
||||
client_max_body_size 200M;
|
||||
'';
|
||||
};
|
||||
# locations."/cam/stream" = {
|
||||
# proxyPass = "http://localhost:3020/?action=stream";
|
||||
# extraConfig = "proxy_pass_request_headers off;";
|
||||
# };
|
||||
# locations."/cam/capture" = {
|
||||
# proxyPass = "http://localhost:3020/?action=snapshot";
|
||||
# extraConfig = "proxy_pass_request_headers off;";
|
||||
# };
|
||||
};
|
||||
"drucker.hq.c3d2.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".return = "307 https://drkkr.hq.c3d2.de/";
|
||||
};
|
||||
"pulsebert.hq.c3d2.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8888";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
octoprint = {
|
||||
enable = true;
|
||||
port = 8080;
|
||||
# extraConfig.webcam = {
|
||||
# snapshot = "http://localhost:3020?action=snapshot";
|
||||
# stream = "https://drkkr.hq.c3d2.de/cam/stream";
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
systemd.user.services.ledfx = {
|
||||
after = [ "pipewire.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.ledfx}/bin/ledfx";
|
||||
};
|
||||
};
|
||||
|
||||
users.users = lib.optionalAttrs config.services.octoprint.enable {
|
||||
# Allow access to printer serial port and GPIO
|
||||
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue