about summary refs log blame commit diff
path: root/ops/modules/tvl-sso/default.nix
blob: 8b413114cc6960701092f5d2d88b888b3cf34b5a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                                               
               

   
                                         






                                                       
                                                         


                             
                                            
                                             


                           



                              


                                 
# Configures an Apereo CAS instance for TVL SSO
{ depot, ... }:

let
  inherit (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" ];
      environment.JDK_JAVA_OPTIONS = "-Xmx512M -Xms512M";
      serviceConfig = {
        User = "apereo-cas";
        Group = "apereo-cas";
        ExecStart = "${apereo-cas}/bin/cas";
        EnvironmentFile = "/etc/cas/secrets";
        Restart = "always";
      };
    };
    users.users.apereo-cas = {
      isSystemUser = true;
      group = "apereo-cas";
    };
    users.groups.apereo-cas = {};
  };
}