From ccd83ce53ee1cf893f61678f5ede61fef0064f34 Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 19 Aug 2024 15:58:24 +0200 Subject: [PATCH] feat: switch to updated octoprint --- config/services/octoprint.nix | 9 ++++++--- flake.lock | 17 +++++++++++++++++ flake.nix | 5 ++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/config/services/octoprint.nix b/config/services/octoprint.nix index 366f7be..266ef2d 100644 --- a/config/services/octoprint.nix +++ b/config/services/octoprint.nix @@ -1,5 +1,8 @@ -{ config, ... }: +{ config, inputs, ... }: { + + disabledModules = [ "services/misc/octoprint.nix" ]; + imports = [ "${inputs.nixpkgs-octoprint}/nixos/modules/services/misc/octoprint.nix" ]; wireguard.elisabeth = { client.via = "elisabeth"; firewallRuleForNode.elisabeth.allowedTCPPorts = [ config.services.octoprint.port ]; @@ -16,9 +19,9 @@ port = 3000; enable = true; plugins = ps: with ps; [ ender3v2tempfix ]; - extraConfig = { + settings = { accessControl = { - addRemoteUser = true; + addRemoteUsers = true; trustRemoteUser = true; remoteUserHeader = "X-User"; }; diff --git a/flake.lock b/flake.lock index 9f6aa21..de91911 100644 --- a/flake.lock +++ b/flake.lock @@ -1339,6 +1339,22 @@ "type": "github" } }, + "nixpkgs-octoprint": { + "locked": { + "lastModified": 1724074482, + "narHash": "sha256-yYJ+Tatu1+Mv98MmX5SxlB75XOLhjj7LjH5ipS+xy3A=", + "owner": "patrickdag", + "repo": "nixpkgs", + "rev": "c56804b205f94edeb066cc8460a64cfcd52d798f", + "type": "github" + }, + "original": { + "owner": "patrickdag", + "ref": "octoprint-update", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1685801374, @@ -1697,6 +1713,7 @@ "nixos-hardware": "nixos-hardware", "nixos-nftables-firewall": "nixos-nftables-firewall", "nixpkgs": "nixpkgs_2", + "nixpkgs-octoprint": "nixpkgs-octoprint", "nixpkgs-wayland": "nixpkgs-wayland", "nixvim": "nixvim", "pre-commit-hooks": "pre-commit-hooks_4", diff --git a/flake.nix b/flake.nix index fbfe395..b136240 100644 --- a/flake.nix +++ b/flake.nix @@ -2,11 +2,14 @@ description = "patricks tolle nix config"; inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + nixpkgs-octoprint.url = "github:patrickdag/nixpkgs/octoprint-update"; + nixpkgs-wayland = { url = "github:nix-community/nixpkgs-wayland"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-extra-modules = { url = "github:oddlama/nixos-extra-modules";