File tree Expand file tree Collapse file tree 2 files changed +20
-8
lines changed
Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 123123 # --with-key=host-only. If migrating from a TPM host, delete the old key:
124124 # rm /var/lib/libvirt/secrets/secrets-encryption-key
125125 # systemctl restart virt-secret-init-encryption
126- systemd . services . virt-secret-init-encryption . serviceConfig . ExecStart = lib . mkForce [
127- ""
128- "${ pkgs . runtimeShell } -c 'umask 0077 && (${ pkgs . coreutils } /bin/dd if=/dev/random status=none bs=32 count=1 | ${ pkgs . systemd } /bin/systemd-creds encrypt --with-key=host-only --name=secrets-encryption-key - /var/lib/libvirt/secrets/secrets-encryption-key)'"
129- ] ;
126+ systemd . services . virt-secret-init-encryption = {
127+ description = "Initialize libvirt secrets encryption key" ;
128+ wantedBy = [ "multi-user.target" ] ;
129+ before = [ "libvirtd.service" ] ;
130+ unitConfig . ConditionPathExists = "!/var/lib/libvirt/secrets/secrets-encryption-key" ;
131+ serviceConfig = {
132+ Type = "oneshot" ;
133+ RemainAfterExit = true ;
134+ ExecStart = [
135+ ""
136+ "${ pkgs . runtimeShell } -c '${ pkgs . coreutils } /bin/mkdir -p /var/lib/libvirt/secrets && umask 0077 && (${ pkgs . coreutils } /bin/dd if=/dev/random status=none bs=32 count=1 | ${ pkgs . systemd } /bin/systemd-creds encrypt --with-key=host-only --name=secrets-encryption-key - /var/lib/libvirt/secrets/secrets-encryption-key)'"
137+ ] ;
138+ } ;
139+ } ;
130140 }
131141
132142 ( lib . mkIf cfg . iommu . enable {
Original file line number Diff line number Diff line change 88 [ ] ;
99
1010 home . activation . jetbrains-keymaps = lib . hm . dag . entryAfter [ "writeBoundary" ] ''
11- ${ pkgs . findutils } /bin/find ${ config . home . homeDirectory } /.config/JetBrains \
12- -type d \
13- -wholename '*/JetBrains/*/keymaps' '!' -path '*/settingsSync/*' \
14- -exec cp -f "${ cfg-meta . paths . users } /pavel/hm/keymap-idea-linux.xml" {}/Magen.xml \;
11+ if [ -d "${ config . home . homeDirectory } /.config/JetBrains" ]; then
12+ ${ pkgs . findutils } /bin/find ${ config . home . homeDirectory } /.config/JetBrains \
13+ -type d \
14+ -wholename '*/JetBrains/*/keymaps' '!' -path '*/settingsSync/*' \
15+ -exec cp -f "${ cfg-meta . paths . users } /pavel/hm/keymap-idea-linux.xml" {}/Magen.xml \;
16+ fi
1517 '' ;
1618
1719
You can’t perform that action at this time.
0 commit comments