pulsebert: update to nixos-20.09 + working octoprint
This commit is contained in:
parent
e66639bad9
commit
44c7b520fe
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
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,26 +119,52 @@
|
||||||
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.
|
services.octoprint = rec {
|
||||||
# services.xserver.enable = true;
|
enable = true;
|
||||||
# services.xserver.layout = "us";
|
port = 80;
|
||||||
# services.xserver.xkbOptions = "eurosign:e";
|
# extraConfig.webcam = {
|
||||||
|
# snapshot = "http://localhost:5050?action=snapshot";
|
||||||
# Enable touchpad support.
|
# stream = "http://octoprint.local:5050?action=stream";
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Enable the KDE Desktop Environment.
|
|
||||||
# services.xserver.displayManager.sddm.enable = true;
|
|
||||||
# services.xserver.desktopManager.plasma5.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
# users.users.jane = {
|
|
||||||
# isNormalUser = true;
|
|
||||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
# };
|
# };
|
||||||
|
# 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: [];
|
||||||
|
};
|
||||||
|
# Allow binding to port 80
|
||||||
|
systemd.services.octoprint.serviceConfig.AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue