1
1
Fork 0
nixos/options/custom/services/modufur.nix

30 lines
699 B
Nix
Raw Normal View History

{
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"];
};
};
};
}