about summary refs log tree commit diff
path: root/ops
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2020-07-05T19·46+0000
committerlukegb <lukegb@tvl.fyi>2020-07-06T22·59+0000
commit57ade16b9d90199eb1bf7ce1b86cc1ffaebdebba (patch)
treeefbfe89be4f9bfccde8ece171021b1fe5cb023ac /ops
parent90f23b8de135074e035a1076fd1aa67a119575f9 (diff)
feat(whitby): add apereo-cas/tvl-sso r/1234
Change-Id: I29f5e762852593f05b9936d5635aadcc7eba283e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/935
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'ops')
-rw-r--r--ops/nixos/tvl-sso/default.nix23
-rw-r--r--ops/nixos/whitby/default.nix1
2 files changed, 24 insertions, 0 deletions
diff --git a/ops/nixos/tvl-sso/default.nix b/ops/nixos/tvl-sso/default.nix
new file mode 100644
index 000000000000..4d030285aec4
--- /dev/null
+++ b/ops/nixos/tvl-sso/default.nix
@@ -0,0 +1,23 @@
+# Configures an Apereo CAS instance for TVL SSO
+{ config, ... }:
+
+let
+  inherit (config.depot.third_party) apereo-cas;
+in {
+  config = {
+    environment.systemPackages = [ apereo-cas ];
+    systemd.services.apereo-cas = {
+      description = "Apereo CAS Single Sign On server";
+      wantedBy = [ "multi-user.target" ];
+      after = [ "network.target" ];
+      serviceConfig = {
+        User = "apereo-cas";
+        Group = "apereo-cas";
+        ExecStart = "${apereo-cas}";
+        Restart = "always";
+      };
+    };
+    users.users.apereo-cas = {};
+    users.groups.apereo-cas = {};
+  };
+}
diff --git a/ops/nixos/whitby/default.nix b/ops/nixos/whitby/default.nix
index e80d5885e1a0..e909f4d1f661 100644
--- a/ops/nixos/whitby/default.nix
+++ b/ops/nixos/whitby/default.nix
@@ -18,6 +18,7 @@ in {
     "${depot.depotPath}/ops/nixos/depot.nix"
     "${depot.depotPath}/ops/nixos/tvl-slapd/default.nix"
     "${depot.depotPath}/ops/nixos/www/login.tvl.fyi.nix"
+    "${depot.depotPath}/ops/nixos/tvl-sso/default.nix"
   ];
 
   hardware = {