File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 9797 '' ;
9898 default = [ ] ;
9999 } ;
100+
101+ subuid = lib . mkOption {
102+ type = lib . types . listOf lib . types . str ;
103+ description = ''
104+ List of subuid entries to configure in {file}`/etc/nsswitch.conf`.
105+
106+ Note that "files" is always prepended.
107+
108+ This option only takes effect if nscd is enabled.
109+ '' ;
110+ default = [ ] ;
111+ } ;
112+
113+ subgid = lib . mkOption {
114+ type = lib . types . listOf lib . types . str ;
115+ description = ''
116+ List of subgid entries to configure in {file}`/etc/nsswitch.conf`.
117+
118+ Note that "files" is always prepended.
119+
120+ This option only takes effect if nscd is enabled.
121+ '' ;
122+ default = [ ] ;
123+ } ;
100124 } ;
101125 } ;
102126
133157 services: ${ lib . concatStringsSep " " config . system . nssDatabases . services }
134158 protocols: files
135159 rpc: files
160+
161+ subuid: ${ lib . concatStringsSep " " config . system . nssDatabases . subuid }
162+ subgid: ${ lib . concatStringsSep " " config . system . nssDatabases . subgid }
136163 '' ;
137164
138165 system . nssDatabases = {
145172 ( lib . mkOrder 1499 [ "dns" ] )
146173 ] ;
147174 services = lib . mkBefore [ "files" ] ;
175+ subuid = lib . mkBefore [ "files" ] ;
176+ subgid = lib . mkBefore [ "files" ] ;
148177 } ;
149178 } ;
150179}
Original file line number Diff line number Diff line change 307307 allowed_uids = lib . concatStringsSep ", " cfg . ifpAllowedUids ;
308308 } ;
309309 } ;
310+ subIDsIntegration = true ;
310311 } ;
311312
312313 networking . timeServers = lib . optional cfg . useAsTimeserver cfg . server ;
Original file line number Diff line number Diff line change 9393 Kerberos will be configured to cache credentials in SSS.
9494 '' ;
9595 } ;
96+
97+ subIDsIntegration = lib . mkOption {
98+ type = lib . types . bool ;
99+ default = false ;
100+ description = ''
101+ Whether to use SSS as a source for subuid and subgid.
102+ '' ;
103+ } ;
104+
96105 environmentFile = lib . mkOption {
97106 type = lib . types . nullOr lib . types . path ;
98107 default = null ;
246255 services . openssh . authorizedKeysCommand = "/etc/ssh/authorized_keys_command" ;
247256 services . openssh . authorizedKeysCommandUser = "nobody" ;
248257 } )
258+
259+ ( lib . mkIf cfg . subIDsIntegration {
260+ system . nssDatabases . subuid = [ "sss" ] ;
261+ system . nssDatabases . subgid = [ "sss" ] ;
262+ } )
249263 ] ;
250264
251265 meta . maintainers = with lib . maintainers ; [ bbigras ] ;
You can’t perform that action at this time.
0 commit comments