File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 116
116
defaultText = "generated from `services.atticd.settings`" ;
117
117
} ;
118
118
119
+ mode = lib . mkOption {
120
+ description = ''
121
+ Mode in which to run the server.
122
+
123
+ 'monolithic' runs all components, and is suitable for single-node deployments.
124
+
125
+ 'api-server' runs only the API server, and is suitable for clustering.
126
+
127
+ 'garbage-collector' only runs the garbage collector periodically.
128
+
129
+ A simple NixOS-based Attic deployment will typically have one 'monolithic' and any number of 'api-server' nodes.
130
+
131
+ There are several other supported modes that perform one-off operations, but these are the only ones that make sense to run via the NixOS module.
132
+ '' ;
133
+ type = lib . types . enum [ "monolithic" "api-server" "garbage-collector" ] ;
134
+ default = "monolithic" ;
135
+ } ;
136
+
119
137
# Internal flags
120
138
useFlakeCompatOverlay = lib . mkOption {
121
139
description = ''
168
186
after = [ "network.target" ]
169
187
++ lib . optionals hasLocalPostgresDB [ "postgresql.service" "nss-lookup.target" ] ;
170
188
serviceConfig = {
171
- ExecStart = "${ cfg . package } /bin/atticd -f ${ checkedConfigFile } " ;
189
+ ExecStart = "${ cfg . package } /bin/atticd -f ${ checkedConfigFile } --mode ${ cfg . mode } " ;
172
190
EnvironmentFile = cfg . credentialsFile ;
173
191
StateDirectory = "atticd" ; # for usage with local storage and sqlite
174
192
DynamicUser = true ;
You can’t perform that action at this time.
0 commit comments