This commit is contained in:
Sandro - 2023-04-11 00:23:59 +02:00
parent 0b3bce80fd
commit 186e4971c9
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
3 changed files with 27 additions and 47 deletions

View File

@ -219,7 +219,7 @@
};
};
outputs = inputs@{ self, alert2muc, c3d2-user-module, deployment, fenix, harmonia, heliwatch, microvm, naersk, nixos, nixos-hardware, nixos-modules, buzzrelay, caveman, oparl-scraper, scrapers, secrets, skyflake, sshlogd, sops-nix, spacemsg, ticker, tigger, yammat, zentralwerk, ... }:
outputs = inputs@{ self, alert2muc, c3d2-user-module, deployment, harmonia, heliwatch, microvm, nixos, nixos-hardware, nixos-modules, buzzrelay, caveman, oparl-scraper, scrapers, secrets, skyflake, sshlogd, sops-nix, spacemsg, ticker, tigger, yammat, zentralwerk, ... }:
let
inherit (nixos) lib;
@ -245,9 +245,9 @@
lib.recursiveUpdate result (extractZwHosts zentralwerk.lib.config.site.net."${net}")
) {} [ "core" "cluster" "c3d2" "serv" "flpk" "pub" ];
overlayList = [
self.overlays
];
overlayList = [
self.overlays
];
# Our custom NixOS builder
nixosSystem' =
@ -285,8 +285,6 @@
legacyPackages = lib.attrsets.mapAttrs (_: pkgs: pkgs.appendOverlays overlayList) nixos.legacyPackages;
lib = { inherit hostRegistry; };
packages = import ./packages.nix { inherit hostRegistry inputs lib microvm self; };
nixosConfigurations = {
@ -441,7 +439,9 @@
{
nixpkgs.overlays = [
(final: prev: with final; {
harmonia = harmonia.packages.${system}.harmonia.override { pkgs = prev // { rustPlatform = rustPackages_1_66.rustPlatform; }; };
harmonia = harmonia.packages.${system}.harmonia.override {
pkgs = prev // { inherit (rustPackages_1_66) rustPlatform; };
};
})
];
}

View File

@ -128,13 +128,10 @@
};
};
users.users = lib.mkMerge [
(lib.optionalAttrs config.services.octoprint.enable {
# Allow access to printer serial port and GPIO
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
})
{ }
];
users.users = lib.optionalAttrs config.services.octoprint.enable {
# Allow access to printer serial port and GPIO
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
};
services = {
# Do not log to flash but also breaks journalctl --user
@ -160,46 +157,28 @@
extraConfig = ''
proxy_set_header X-Scheme $scheme;
proxy_set_header Accept-Encoding identity;
client_max_body_size 2000M;
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;";
};
# 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;";
# };
};
};
};
octoprint = rec {
octoprint = {
enable = true;
port = 8080;
extraConfig.webcam = {
snapshot = "http://localhost:3020?action=snapshot";
stream = "https://drkkr.hq.c3d2.de/cam/stream";
};
# plugins = let
# python = pkgs.octoprint.python;
# octoprint-filament-sensor-universal = python.pkgs.buildPythonPackage rec {
# pname = "OctoPrint-Filament-Sensor-Universal";
# version = "1.0.0";
# src = pkgs.fetchFromGitHub {
# owner = "lopsided98";
# repo = pname;
# rev = "8a72696867a9a008c5a79b49a9b029a4fc426720";
# sha256 = "1a7lzmjbwx47qhrkjp3hggiwnx172x4axcz0labm9by17zxlsimr";
# };
# propagatedBuildInputs = [ pkgs.octoprint python.pkgs.libgpiod ];
# };
# #in p: [ octoprint-filament-sensor-universal ];
# in p: [];
# extraConfig.webcam = {
# snapshot = "http://localhost:3020?action=snapshot";
# stream = "https://drkkr.hq.c3d2.de/cam/stream";
# };
};
};

View File

@ -1,4 +1,5 @@
{ hostRegistry, config, lib, pkgs, ... }:
{ config, hostRegistry, lib, pkgs, ... }:
{
networking.hostName = "riscbert";