Merge branch 'master' of ssh://gitea.c3d2.de:2222/C3D2/nix-config into master

This commit is contained in:
Daniel Poelzleithner 2021-01-03 15:00:55 +01:00
commit 873a957e52
4 changed files with 75 additions and 16 deletions

View File

@ -43,7 +43,7 @@
proxyTo = { host = "172.22.99.170"; httpPort = 80; httpsPort = 443; }; proxyTo = { host = "172.22.99.170"; httpPort = 80; httpsPort = 443; };
} }
{ {
hostNames = [ "error.hq.c3d2.de.de" ]; hostNames = [ "error.hq.c3d2.de" ];
proxyTo = { host = "172.20.73.47"; httpPort = 80; httpsPort = 443; }; proxyTo = { host = "172.20.73.47"; httpPort = 80; httpsPort = 443; };
} }
]; ];

View File

@ -77,5 +77,13 @@ in
url = "https://dresden.bits-und-baeume.org/termine.ics"; url = "https://dresden.bits-und-baeume.org/termine.ics";
color = "#3FBF3F"; color = "#3FBF3F";
}; };
exma-stuta = {
url = "https://www.exmatrikulationsamt.de/ics/v1/stuta.ics";
color = "#7F7FFF";
};
exma-nawa = {
url = "https://www.exmatrikulationsamt.de/ics/v1/nawa.ics";
color = "#3F3FBF";
};
}; };
} }

View File

@ -4,9 +4,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let
octoprintPort = 8080;
in
{ {
imports = [ # Include the results of the hardware scan. imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix <this-host/hardware-configuration.nix>
]; ];
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
@ -119,27 +122,75 @@
services.avahi = { services.avahi = {
enable = true; enable = true;
publish.enable = true; publish.enable = true;
publish.addresses = true;
publish.userServices = true; publish.userServices = true;
}; };
# Enable the X11 windowing system. security.acme = {
# services.xserver.enable = true; acceptTerms = true;
# services.xserver.layout = "us"; email = "mail@c3d2.de";
# services.xserver.xkbOptions = "eurosign:e"; };
services.nginx = {
enable = true;
#recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts = {
"drkkr.hq.c3d2.de" = {
default = true;
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString octoprintPort}";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Scheme $scheme;
proxy_set_header Accept-Encoding identity;
'';
};
};
};
};
services.octoprint = rec {
enable = true;
port = octoprintPort;
# extraConfig.webcam = {
# snapshot = "http://localhost:5050?action=snapshot";
# stream = "http://octoprint.local:5050?action=stream";
# };
# plugins = let
# python = pkgs.octoprint.python;
# Enable touchpad support. # octoprint-filament-sensor-universal = python.pkgs.buildPythonPackage rec {
# services.xserver.libinput.enable = true; # pname = "OctoPrint-Filament-Sensor-Universal";
# version = "1.0.0";
# Enable the KDE Desktop Environment. # src = pkgs.fetchFromGitHub {
# services.xserver.displayManager.sddm.enable = true; # owner = "lopsided98";
# services.xserver.desktopManager.plasma5.enable = true; # repo = pname;
# rev = "8a72696867a9a008c5a79b49a9b029a4fc426720";
# sha256 = "1a7lzmjbwx47qhrkjp3hggiwnx172x4axcz0labm9by17zxlsimr";
# };
# Define a user account. Don't forget to set a password with passwd. # propagatedBuildInputs = [ pkgs.octoprint python.pkgs.libgpiod ];
# users.users.jane = { # };
# isNormalUser = true; # #in p: [ octoprint-filament-sensor-universal ];
# extraGroups = [ "wheel" ]; # Enable sudo for the user. # in p: [];
};
# Allow access to printer serial port and GPIO
users.users.${config.services.octoprint.user}.extraGroups = [ "dialout" "gpio" ];
# services.mjpg-streamer = {
# enable = true;
# inputPlugin = "input_uvc.so -r 1280x720";
# }; # };
# Allow gpio group to access GPIO devices
users.groups.gpio = { };
services.udev.extraRules = ''
KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"
'';
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave

View File

@ -40,7 +40,7 @@ in {
}; };
}; };
pulsebert = pkgs.krops.writeDeploy "pulsebert" { pulsebert = pkgs.krops.writeDeploy "pulsebert" {
source = hostSource "pulsebert" "nixos-unstable"; source = hostSource "pulsebert" "nixos-20.09";
target = lib.mkTarget "k-ot@pulsebert.hq.c3d2.de" // { target = lib.mkTarget "k-ot@pulsebert.hq.c3d2.de" // {
sudo = true; sudo = true;
}; };