Archived
1
0

fix: Tell all units to wait for shared folder

This commit is contained in:
Gürkan 2023-12-28 21:38:19 +01:00
parent 0324ac7400
commit af289ec659

View File

@ -19,9 +19,32 @@
ExecStart = "${pkgs.cryptsetup}/bin/cryptsetup open /encrypted-file encVol -d /root/.decrypt-file";
ExecStop = "${pkgs.cryptsetup}/bin/cryptsetup close encVol";
};
};
# And now the depending services
systemd.services = {
"rustypaste".unitConfig.RequiresMountsFor = "/shared";
"syncthing".unitConfig.RequiresMountsFor = "/shared";
"dovecot2".unitConfig.RequiresMountsFor = "/shared";
"opendkim".unitConfig.RequiresMountsFor = "/shared";
"postfix".unitConfig.RequiresMountsFor = "/shared";
"bind".unitConfig.RequiresMountsFor = "/shared";
"remark-gurkanin".unitConfig.RequiresMountsFor = "/shared";
"remark-siktirin".unitConfig.RequiresMountsFor = "/shared";
"nginx".unitConfig.RequiresMountsFor = "/shared";
"acme-gurkan.in".unitConfig.RequiresMountsFor = "/shared";
"acme-mail.gurkan.in".unitConfig.RequiresMountsFor = "/shared";
"acme-siktir.in".unitConfig.RequiresMountsFor = "/shared";
};
fileSystems."/shared" = {
# @Bug not working with encrypted "files" as block devices
# encrypted = {
# enable = true;
# label = "encVol";
# keyFile = "/root/.decrypt-file";
# blkDev = "/encrypted-file";
# };
device = "/dev/mapper/encVol";
fsType = "btrfs";
options = ["noatime"];