2020-07-05 21:46:17 +02:00
|
|
|
# Configures an Apereo CAS instance for TVL SSO
|
2021-04-02 14:18:50 +02:00
|
|
|
{ depot, ... }:
|
2020-07-05 21:46:17 +02:00
|
|
|
|
|
|
|
let
|
2021-04-02 14:18:50 +02:00
|
|
|
inherit (depot.third_party) apereo-cas;
|
2020-07-05 21:46:17 +02:00
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
environment.systemPackages = [ apereo-cas ];
|
|
|
|
systemd.services.apereo-cas = {
|
|
|
|
description = "Apereo CAS Single Sign On server";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
after = [ "network.target" ];
|
2021-06-30 04:13:59 +02:00
|
|
|
environment.JDK_JAVA_OPTIONS = "-Xmx512M -Xms512M";
|
2020-07-05 21:46:17 +02:00
|
|
|
serviceConfig = {
|
|
|
|
User = "apereo-cas";
|
|
|
|
Group = "apereo-cas";
|
2020-07-07 01:05:01 +02:00
|
|
|
ExecStart = "${apereo-cas}/bin/cas";
|
2020-07-07 01:05:22 +02:00
|
|
|
EnvironmentFile = "/etc/cas/secrets";
|
2020-07-05 21:46:17 +02:00
|
|
|
Restart = "always";
|
|
|
|
};
|
|
|
|
};
|
2021-04-13 12:21:42 +02:00
|
|
|
users.users.apereo-cas = {
|
|
|
|
isSystemUser = true;
|
|
|
|
group = "apereo-cas";
|
|
|
|
};
|
2020-07-05 21:46:17 +02:00
|
|
|
users.groups.apereo-cas = {};
|
|
|
|
};
|
|
|
|
}
|