From 00cb06aff23f412d67abf214ff0d643389f080c1 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 10 Apr 2021 17:20:35 +0000 Subject: [PATCH] bvm-nixosmgmt: add rundeck --- nix/pkgs/rundeck-bin/module.nix | 27 +++++++++++++++++++++++++++ ops/nixos/bvm-nixosmgmt/default.nix | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 nix/pkgs/rundeck-bin/module.nix 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"; }