File tree Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 61
61
;
62
62
# backward compatibility
63
63
inherit ( prev ) ssh-to-pgp ;
64
+
65
+ sops = prev . sops . withAgePlugins ( p : [
66
+ p . age-plugin-fido2-hmac
67
+ ] ) ;
64
68
} ;
65
69
nixosModules = {
66
70
sops = ./modules/sops ;
Original file line number Diff line number Diff line change 240
240
'' ;
241
241
} ;
242
242
243
+ plugins = lib . mkOption {
244
+ type = lib . types . listOf lib . types . package ;
245
+ default = [
246
+ pkgs . age-plugin-fido2-hmac
247
+ ] ;
248
+ description = ''
249
+ List of plugins to use for sops decryption.
250
+ '' ;
251
+ } ;
252
+
243
253
generateKey = lib . mkOption {
244
254
type = lib . types . bool ;
245
255
default = false ;
339
349
) )
340
350
] ;
341
351
352
+ PATH = lib . makeBinPath cfg . age . plugins ;
353
+
342
354
QUBES_GPG_DOMAIN = lib . mkIf cfg . gnupg . qubes-split-gpg . enable (
343
355
lib . mkDefault cfg . gnupg . qubes-split-gpg . domain
344
356
) ;
Original file line number Diff line number Diff line change 329
329
'' ;
330
330
} ;
331
331
332
+ plugins = lib . mkOption {
333
+ type = lib . types . listOf lib . types . package ;
334
+ default = [
335
+ pkgs . age-plugin-fido2-hmac
336
+ ] ;
337
+ description = ''
338
+ List of plugins to use for sops decryption.
339
+ '' ;
340
+ } ;
341
+
332
342
generateKey = lib . mkOption {
333
343
type = lib . types . bool ;
334
344
default = false ;
432
442
lib . mkDefault "${ pkgs . gnupg } /bin/gpg"
433
443
) ;
434
444
445
+ sops . environment . PATH = lib . makeBinPath cfg . age . plugins ;
446
+
435
447
# When using sysusers we no longer are started as an activation script because those are started in initrd while sysusers is started later.
436
448
systemd . services . sops-install-secrets = lib . mkIf ( regularSecrets != { } && useSystemdActivation ) {
437
449
wantedBy = [ "sysinit.target" ] ;
438
450
after = [ "systemd-sysusers.service" ] ;
439
- environment = cfg . environment ;
451
+ environment = cfg . environment // { PATH = lib . mkForce " ${ cfg . environment . PATH } : ${ lib . makeSearchPathOutput "bin" "sbin" cfg . age . plugins } " ; } ;
440
452
unitConfig . DefaultDependencies = "no" ;
453
+ path = config . sops . age . plugins ;
441
454
442
455
serviceConfig = {
443
456
Type = "oneshot" ;
Original file line number Diff line number Diff line change 34
34
{
35
35
wantedBy = [ "systemd-sysusers.service" ] ;
36
36
before = [ "systemd-sysusers.service" ] ;
37
- environment = cfg . environment ;
37
+ environment = cfg . environment // { PATH = lib . mkForce " ${ cfg . environment . PATH } : ${ lib . makeSearchPathOutput "bin" "sbin" cfg . age . plugins } " ; } ;
38
38
unitConfig . DefaultDependencies = "no" ;
39
+ path = config . sops . age . plugins ;
39
40
40
41
serviceConfig = {
41
42
Type = "oneshot" ;
You can’t perform that action at this time.
0 commit comments