1
1
Fork 0
nixos/options/custom/services/modufur.nix
Myned 7e47ef95ef
custom: add sync directory option
Signed-off-by: Myned <dev@bjork.tech>
2024-11-17 14:14:42 -06:00

29 lines
699 B
Nix

{
config,
lib,
pkgs,
...
}:
with lib; let
poetry = "${pkgs.poetry}/bin/poetry";
cfg = config.custom.services.modufur;
in {
options.custom.services.modufur.enable = mkOption {default = false;};
config = mkIf cfg.enable {
#!! Imperative source control
#?? git clone https://github.com/Myned/modufur
systemd.user.services.modufur = {
description = ["Modufur"];
requires = ["default.target"];
after = ["default.target"];
wantedBy = ["default.target"];
serviceConfig = {
WorkingDirectory = ["/home/${config.custom.username}/.git/modufur"];
ExecStart = ["${poetry}/bin/poetry run python -OO run.py >&2"];
};
};
};
}