Commit current dotfiles changes
This commit is contained in:
24
nixos/syncthing-private-vault.nix
Normal file
24
nixos/syncthing-private-vault.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cipherDir = "/var/lib/syncthing/sync/Private.encrypted";
|
||||
mountPoint = "/home/imalison/Private";
|
||||
in
|
||||
lib.mkIf config.myModules.syncthing.enable {
|
||||
system.activationScripts.syncthingPrivateVault = {
|
||||
text = ''
|
||||
install -d -o syncthing -g syncthing -m 2770 ${lib.escapeShellArg cipherDir}
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.imalison = {lib, ...}: {
|
||||
home.packages = [pkgs.gocryptfs];
|
||||
|
||||
home.activation.ensureSyncthingPrivateVaultMountpoint = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
mkdir -p ${lib.escapeShellArg mountPoint}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user