mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
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
@ -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 New Issue
Block a user