depot/nix/pkgs/rundeck-bin/module.nix

27 lines
642 B
Nix

{ config, lib, depot, ... }:
let
inherit (lib) mkEnableOption mkOption mkIf types;
cfg = config.services.rundeck;
in {
options.services.rundeck = {
enable = mkEnableOption "rundeck";
package = mkOption {
default = depot.pkgs.rundeck-bin;
defaultText = "depot.pkgs.rundeck-bin";
type = types.package;
};
};
config = mkIf cfg.enable {
systemd.services.rundeckd = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/rundeckd -b /var/lib/rundeck";
StateDirectory = "rundeck";
};
};
};
}