Add programs.ecryptfs
for mount wrappers.
The `ecryptfs` package refers to the setuid wrapper paths, but they do not exist so far in NixOS.
This commit is contained in:
parent
3c15feef77
commit
5d778d1f03
2 changed files with 32 additions and 0 deletions
|
@ -163,6 +163,7 @@
|
|||
./programs/direnv.nix
|
||||
./programs/dmrconfig.nix
|
||||
./programs/droidcam.nix
|
||||
./programs/ecryptfs.nix
|
||||
./programs/environment.nix
|
||||
./programs/evince.nix
|
||||
./programs/extra-container.nix
|
||||
|
|
31
nixos/modules/programs/ecryptfs.nix
Normal file
31
nixos/modules/programs/ecryptfs.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.ecryptfs;
|
||||
|
||||
in {
|
||||
options.programs.ecryptfs = {
|
||||
enable = mkEnableOption (lib.mdDoc "ecryptfs setuid mount wrappers");
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
security.wrappers = {
|
||||
|
||||
"mount.ecryptfs_private" = {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${lib.getBin pkgs.ecryptfs}/bin/mount.ecryptfs_private";
|
||||
};
|
||||
"umount.ecryptfs_private" = {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${lib.getBin pkgs.ecryptfs}/bin/umount.ecryptfs_private";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue