mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
stirling-pdf: Init module
This commit is contained in:
parent
de266a8d91
commit
734602820b
2 changed files with 43 additions and 1 deletions
35
modules/system/services/stirling-pdf.nix
Normal file
35
modules/system/services/stirling-pdf.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.services.stirling-pdf;
|
||||
in
|
||||
{
|
||||
options.custom.services.stirling-pdf = {
|
||||
enable = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 56191;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
meta = {
|
||||
domains.list = [ cfg.domain ];
|
||||
ports.tcp.list = [ cfg.port ];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.stirling-pdf = {
|
||||
image = "stirlingtools/stirling-pdf";
|
||||
environment = {
|
||||
DISABLE_ADDITIONAL_FEATURES = "false";
|
||||
SYSTEM_ENABLEANALYTICS = "false";
|
||||
LANGS = "de_DE";
|
||||
};
|
||||
ports = [ "127.0.0.1:${builtins.toString cfg.port}:8080" ];
|
||||
pull = "newer";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue