ECryptfs: Difference between revisions

From NixOS Wiki
imported>Fadenb
m Syntaxhighlight
imported>Minion3665
Add pkgs to the ecryptfs systemPackages expression
Line 1: Line 1:
[http://ecryptfs.org/ eCryptfs] is a cryptographic filesystem encrypting each file individually. To install <code>ecryptfs</code> add the following to <code>environment.systemPackages</code>:
[http://ecryptfs.org/ eCryptfs] is a cryptographic filesystem encrypting each file individually. To install <code>ecryptfs</code> add the following to <code>environment.systemPackages</code>:


<syntaxhighlight lang="nix">{
<syntaxhighlight lang="nix">{ pkgs, ... }: {
   environment.systemPackages = [
   environment.systemPackages = with pkgs; [
     ecryptfs
     ecryptfs
     ecryptfs-helper
     ecryptfs-helper

Revision as of 23:57, 5 March 2023

eCryptfs is a cryptographic filesystem encrypting each file individually. To install ecryptfs add the following to environment.systemPackages:

{ pkgs, ... }: {
  environment.systemPackages = with pkgs; [
    ecryptfs
    ecryptfs-helper
  ];
}

ecryptfs-helper contains utilities to facilitate e.g. encrypting your home folder, mounting it as user, and data recovery.

man ecryptfs-setup-private describes how to encrypt your home folder.

To automatically mount your private folder on login with PAM, add this to your config:

{
  security.pam.enableEcryptfs = true;
}