service/octoprint: modularize

This commit is contained in:
Felix Buehler 2022-12-05 21:32:35 +01:00
parent 9cf7be677d
commit 29c8b6e3b1
4 changed files with 35 additions and 17 deletions

View file

@ -12,8 +12,9 @@
./navidrome
./nextcloud
./nginx
./passworts
./octoprint
./paperless
./passworts
./rss-bridge
./ssh-server
];

View file

@ -0,0 +1,33 @@
# 3d-printing software
{ config, lib, pkgs, ... }:
let
cfg = config.my.services.minecraft-server;
in
{
options.my.services.octoprint = with lib; {
enable = mkEnableOption "Octoprint Server";
plugins = mkOption {
type = types.functionTo (types.listOf types.package);
default = plugins: [ ];
defaultText = literalExpression "plugins: []";
example = literalExpression "plugins: with plugins; [ themeify stlviewer ]";
description = lib.mdDoc "Additional plugins to be used. Available plugins are passed through the plugins input.";
};
};
config = lib.mkIf cfg.enable {
services.octoprint = {
enable = true;
plugins = plugins: with plugins; [
costestimation
displayprogress
m86motorsoff
stlviewer
telegram
titlestatus
];
};
networking.firewall.allowedTCPPorts = [ 5000 ];
};
}