File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 } ;
2525 } ;
2626
27- home . activation . sopsAndroidSecrets = lib . mkIf pkgs . stdenv . hostPlatform . isAndroid (
28- lib . hm . dag . entryAfter [ "writeBoundary" ] ''
29- if [ -f "${ cfg . age . keyFile } " ]; then
30- ${ lib . concatStringsSep "\n " ( lib . mapAttrsToList ( name : secret : ''
31- if [ -n "${ secret . path or "" } " ]; then
32- mkdir -p "$(dirname "${ secret . path } ")"
33- $DRY_RUN_CMD ${ pkgs . sops } /bin/sops --decrypt \
34- --age-key-file "${ cfg . age . keyFile } " \
35- --extract '["${ lib . replaceStrings [ "/" ] [ "\" ][\" " ] name } "]' \
36- ${ secret . sopsFile } > "${ secret . path } " 2>/dev/null || true
37- chmod ${ secret . mode or "0600" } "${ secret . path } "
38- fi
39- '' ) ( lib . filterAttrs ( _ : s : s . path != null && s . path != "" ) cfg . secrets ) ) }
40- fi
41- ''
42- ) ;
27+ home . activation . sopsFallbackSecrets = lib . hm . dag . entryAfter [ "writeBoundary" ] ''
28+ if [ -f "${ cfg . age . keyFile } " ]; then
29+ ${ lib . concatStringsSep "\n " ( lib . mapAttrsToList ( name : secret : ''
30+ if [ -n "${ secret . path or "" } " ] && [ ! -e "${ secret . path } " ]; then
31+ mkdir -p "$(dirname "${ secret . path } ")"
32+ $DRY_RUN_CMD ${ pkgs . sops } /bin/sops --decrypt \
33+ --age-key-file "${ cfg . age . keyFile } " \
34+ --extract '["${ lib . replaceStrings [ "/" ] [ "\" ][\" " ] name } "]' \
35+ ${ secret . sopsFile } > "${ secret . path } " 2>/dev/null || true
36+ chmod ${ secret . mode or "0600" } "${ secret . path } "
37+ fi
38+ '' ) ( lib . filterAttrs ( _ : s : s . path != null && s . path != "" ) cfg . secrets ) ) }
39+ fi
40+ '' ;
4341}
You can’t perform that action at this time.
0 commit comments