tvl-depot/ops/nixos/tvl-sso/default.nix
Luke Granger-Brown cb52c9e41d chore(ops/nixos/tvl-sso): add secrets
Change-Id: I29f5e762852593f05b9936d5635aadcc7eba2840
Reviewed-on: https://cl.tvl.fyi/c/depot/+/951
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-06 23:08:00 +00:00

24 lines
648 B
Nix

# 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}/bin/cas";
EnvironmentFile = "/etc/cas/secrets";
Restart = "always";
};
};
users.users.apereo-cas = {};
users.groups.apereo-cas = {};
};
}