modules: add octoprint module with plugins
This commit is contained in:
parent
fbf4dc244e
commit
fa670d7289
3 changed files with 60 additions and 5 deletions
|
@ -84,9 +84,5 @@
|
|||
services.languagetool.enable = true;
|
||||
|
||||
# 3D printing
|
||||
services.octoprint = {
|
||||
enable = true;
|
||||
port = 33002;
|
||||
plugins = ps: [ ps.stlviewer ];
|
||||
};
|
||||
local.octoprint.enable = true;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ in
|
|||
extraModules = [
|
||||
hardware.common-cpu-intel
|
||||
../modules/nix.nix
|
||||
../modules/octoprint.nix
|
||||
../modules/wireguard-client.nix
|
||||
../../home/users/jan
|
||||
# ../../home/users/nas
|
||||
|
|
58
nixos/modules/octoprint.nix
Normal file
58
nixos/modules/octoprint.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.local.octoprint;
|
||||
in
|
||||
{
|
||||
options.local.octoprint = with lib; {
|
||||
enable = mkEnableOption "octoprint";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.octoprint = {
|
||||
enable = true;
|
||||
port = 33002;
|
||||
plugins = ps:
|
||||
let
|
||||
octoprintDisplayLayerProgress = ps.buildPlugin rec {
|
||||
pname = "DisplayLayerProgress";
|
||||
version = "1.28.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "OllisGit";
|
||||
repo = "OctoPrint-DisplayLayerProgress";
|
||||
rev = version;
|
||||
sha256 = "sha256-FoQGv7a3ktodyQKOwR69/9Up+wPoW5NDq+k5LfP9WYs=";
|
||||
};
|
||||
};
|
||||
octoprintDashboard = ps.buildPlugin rec {
|
||||
pname = "Dashboard";
|
||||
version = "1.19.10";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "j7126";
|
||||
repo = "OctoPrint-Dashboard";
|
||||
rev = version;
|
||||
sha256 = "sha256-d3HtSgJ9d6k7+F86aDuhq31jWZHdNxncFcK6MYPgUKo=";
|
||||
};
|
||||
};
|
||||
octoprintBedLevelVisualizer = ps.buildPlugin rec {
|
||||
pname = "BedLevelVisualizer";
|
||||
version = "1.1.1";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jneilliii";
|
||||
repo = "OctoPrint-BedLevelVisualizer";
|
||||
rev = version;
|
||||
sha256 = "sha256-6JcYvYgEmphp5zz4xZi4G0yTo4FCIR6Yh+MXYK7H7+w=";
|
||||
};
|
||||
};
|
||||
in
|
||||
[
|
||||
octoprintDisplayLayerProgress
|
||||
octoprintDashboard
|
||||
octoprintBedLevelVisualizer
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue