mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 16:17:46 +00:00
30 lines
648 B
Nix
30 lines
648 B
Nix
{ pkgs, lib, config, ... }:
|
|
let
|
|
cfg = config.mods.server.share;
|
|
port = config.mods.server.nginx.ports.share;
|
|
in with lib; {
|
|
options.mods.server = {
|
|
share = {
|
|
enable = mkEnableOption {
|
|
default = false;
|
|
description = "enables zipline server";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
users.groups.zipline = { };
|
|
users.users.zipline = {
|
|
isSystemUser = true;
|
|
group = "zipline";
|
|
};
|
|
services.zipline = {
|
|
enable = true;
|
|
settings = {
|
|
CORE_HOST = "0.0.0.0";
|
|
CORE_PORT = port;
|
|
};
|
|
environmentFiles = [ "/run/secrets/zipline-secret" ];
|
|
};
|
|
};
|
|
}
|