pulsebert: disable octoprint, audio streaming
This commit is contained in:
parent
1148a5c7cf
commit
b1fe1ea0b3
|
@ -9,7 +9,6 @@
|
||||||
hq.interface = "eth0";
|
hq.interface = "eth0";
|
||||||
hq.statistics.enable = true;
|
hq.statistics.enable = true;
|
||||||
k-ot.enable = true;
|
k-ot.enable = true;
|
||||||
audioServer.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
@ -21,10 +20,7 @@
|
||||||
tmpOnTmpfs = true;
|
tmpOnTmpfs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware.deviceTree.enable = true;
|
||||||
bluetooth.enable = true;
|
|
||||||
deviceTree.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
cores = 2;
|
cores = 2;
|
||||||
|
@ -37,41 +33,8 @@
|
||||||
pkgs.makeModulesClosure (x // { allowMissing = true; });
|
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 = {
|
networking = {
|
||||||
domain = "hq.c3d2.de";
|
domain = "hq.c3d2.de";
|
||||||
firewall = {
|
|
||||||
allowedTCPPorts = [
|
|
||||||
5355 # llmnr
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [
|
|
||||||
5355 # llmnr
|
|
||||||
];
|
|
||||||
};
|
|
||||||
hostName = "pulsebert";
|
hostName = "pulsebert";
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
interfaces.eth0.useDHCP = true;
|
interfaces.eth0.useDHCP = true;
|
||||||
|
@ -138,75 +101,5 @@
|
||||||
wheelNeedsPassword = false;
|
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";
|
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