faucet(fs): bind /tmp to on-disk storage

This commit is contained in:
514fpv 2024-01-04 15:03:54 +08:00
parent 59f5674a91
commit 07fbfbd8d7
Signed by: koishi
SSH key fingerprint: SHA256:VkIdW3jUIiqecV2WNAje2fGU5lEhN0XZ58DN0NS4pv0

View file

@ -73,7 +73,12 @@ in {
fileSystems."/nix/persist" = mkIf cfg.extPersist.enable fileSystems."/nix/persist" = mkIf cfg.extPersist.enable
{ inherit (cfg.extPersist) device fsType options; { inherit (cfg.extPersist) device fsType options;
neededForBoot = true; neededForBoot = true;
depends = "/nix"; depends = [ "/nix" ];
};
fileSystems."/tmp" =
{ device = "/nix/tmp";
options = [ "bind" ];
depends = [ "/nix/tmp" ];
}; };
services.fstrim.enable = mkIf ((cfg.type == "ext4") || (cfg.type == "xfs")) true; services.fstrim.enable = mkIf ((cfg.type == "ext4") || (cfg.type == "xfs")) true;