system/modules/nixos/services/octoprint.nix

59 lines
1.6 KiB
Nix
Raw Permalink Normal View History

{ lib, pkgs, config, ... }:
let
2024-04-16 02:51:46 +03:00
cfg = config.local.services.octoprint;
in
{
2024-04-16 02:51:46 +03:00
options.local.services.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
];
};
};
}