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