2024-12-27 01:46:11 -08:00
|
|
|
{ lib, config, inputs, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
nyazoom = inputs.nyazoom.packages.${pkgs.system}.default;
|
|
|
|
|
|
|
|
cfg = config.permafrost.nyazoom;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.permafrost.nyazoom = {
|
|
|
|
enable = lib.mkEnableOption "permafrost nixos module";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-12-27 02:58:39 -08:00
|
|
|
systemd.services.nyazoom = {
|
2024-12-27 01:46:11 -08:00
|
|
|
script = ''
|
|
|
|
DATABASE_URL="sqlite:///var/lib/nyazoom/data" ${lib.getExe nyazoom}
|
|
|
|
'';
|
|
|
|
wants = [ "network.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|