File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ buildGo123Module {
4141 "cmd/server"
4242 "cmd/proxy"
4343 "cmd/radius"
44+ "cmd/rac"
4445 ] ;
4546 vendorHash = "sha256-aG/VqpmHJeGyF98aS0jgwEAq1R5c8VggeJxLWS9W8HY=" ;
4647 nativeBuildInputs = [ makeWrapper ] ;
Original file line number Diff line number Diff line change 123123 } ;
124124 } ;
125125
126+ # RAC oupost
127+ authentik-rac = {
128+ enable = mkEnableOption "authentik RAC outpost" ;
129+
130+ environmentFile = mkOption {
131+ type = types . nullOr types . path ;
132+ default = null ;
133+ example = "/run/secrets/authentik-rac/authentik-rac-env" ;
134+ description = ''
135+ Environment file as defined in {manpage}`systemd.exec(5)`.
136+
137+ Secrets may be passed to the service without adding them to the world-readable
138+ /nix/store, by specifying the desied secrets as environment variables according
139+ to the authentic documentation.
140+
141+ ```
142+ # example content
143+ AUTHENTIK_TOKEN=<token from authentik for this outpost>
144+ ```
145+ '' ;
146+ } ;
147+ } ;
148+
126149 # RADIUS oupost
127150 authentik-radius = {
128151 enable = mkEnableOption "authentik RADIUS outpost" ;
351374 }
352375 ) )
353376
377+ # RAC outpost
378+ ( mkIf config . services . authentik-rac . enable (
379+ let
380+ cfg = config . services . authentik-rac ;
381+ in
382+ {
383+ systemd . services . authentik-rac = {
384+ wantedBy = [ "multi-user.target" ] ;
385+ wants = [ "network-online.target" ] ;
386+ after = [
387+ "network-online.target"
388+ "authentik.service"
389+ ] ;
390+ serviceConfig = {
391+ RuntimeDirectory = "authentik-rac" ;
392+ UMask = "0027" ;
393+ WorkingDirectory = "%t/authentik-rac" ;
394+ DynamicUser = true ;
395+ ExecStart = "${ config . services . authentik . authentikComponents . gopkgs } /bin/rac" ;
396+ EnvironmentFile = mkIf ( cfg . environmentFile != null ) [ cfg . environmentFile ] ;
397+ Restart = "on-failure" ;
398+ BindReadOnlyPaths = "${ lib . getExe pkgs . guacamole-server } :/opt/guacamole/sbin/guacd" ;
399+ } ;
400+ } ;
401+ }
402+ ) )
403+
354404 # RADIUS outpost
355405 ( mkIf config . services . authentik-radius . enable (
356406 let
You can’t perform that action at this time.
0 commit comments