diff --git a/nix/pkgs/rundeck-bin/module.nix b/nix/pkgs/rundeck-bin/module.nix new file mode 100644 index 0000000000..ecba3b39cf --- /dev/null +++ b/nix/pkgs/rundeck-bin/module.nix @@ -0,0 +1,27 @@ +{ 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"; + }; + }; + }; +} diff --git a/ops/nixos/bvm-nixosmgmt/default.nix b/ops/nixos/bvm-nixosmgmt/default.nix index 0f4ce9594a..e35a30c76b 100644 --- a/ops/nixos/bvm-nixosmgmt/default.nix +++ b/ops/nixos/bvm-nixosmgmt/default.nix @@ -6,6 +6,7 @@ { imports = [ ../lib/bvm.nix + ../../../nix/pkgs/rundeck-bin/module.nix ]; # Networking! @@ -19,5 +20,7 @@ }; my.ip.tailscale = "100.65.226.19"; + services.rundeck.enable = true; + system.stateVersion = "21.05"; }