about summary refs log tree commit diff
path: root/ops/nixos/tvl-sso
diff options
context:
space:
mode:
Diffstat (limited to 'ops/nixos/tvl-sso')
-rw-r--r--ops/nixos/tvl-sso/default.nix23
1 files changed, 23 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 = {};
+  };
+}