2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
# TODO: make ecryptfs work in initramfs?
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2024-02-29 20:09:43 +00:00
|
|
|
config = mkIf (config.boot.supportedFilesystems.ecryptfs or false) {
|
2020-04-24 23:36:52 +00:00
|
|
|
system.fsPackages = [ pkgs.ecryptfs ];
|
|
|
|
security.wrappers = {
|
2021-09-22 15:38:15 +00:00
|
|
|
"mount.ecryptfs_private" =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.ecryptfs.out}/bin/mount.ecryptfs_private";
|
|
|
|
};
|
|
|
|
"umount.ecryptfs_private" =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.ecryptfs.out}/bin/umount.ecryptfs_private";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|