forked from Zynh0722/permafrost
22 lines
465 B
Nix
22 lines
465 B
Nix
|
{ 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 {
|
||
|
systemd.user.services.nyazoom = {
|
||
|
script = ''
|
||
|
DATABASE_URL="sqlite:///var/lib/nyazoom/data" ${lib.getExe nyazoom}
|
||
|
'';
|
||
|
wants = [ "network.target" ];
|
||
|
};
|
||
|
};
|
||
|
}
|