Remove file bindmount support from zfs module

This commit is contained in:
Charlotte Van Petegem 2021-06-29 17:01:23 +02:00
parent f0c8da98eb
commit ee95a80263
No known key found for this signature in database
GPG key ID: 019E764B7184435A
2 changed files with 2 additions and 16 deletions

View file

@ -18,10 +18,7 @@
config = lib.mkIf config.chvp.gnupg.enable { config = lib.mkIf config.chvp.gnupg.enable {
chvp.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".gnupg/crls.d"; type = "data"; } { path = ".gnupg"; type = "data"; }
{ path = ".gnupg/private-keys-v1.d"; type = "data"; }
{ path = ".gnupg/pubring.kbx"; type = "data"; file = true; }
{ path = ".gnupg/trustdb.gpg"; type = "data"; file = true; }
]; ];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;

View file

@ -22,7 +22,6 @@
example = [ example = [
{ path = ".config/syncthing"; type = "data"; } { path = ".config/syncthing"; type = "data"; }
{ path = ".cache/nix-index"; type = "cache"; } { path = ".cache/nix-index"; type = "cache"; }
{ path = ".gnupg/pubring.kbx"; type = "data"; file = true; }
]; ];
}; };
backups = lib.mkOption { backups = lib.mkOption {
@ -88,17 +87,7 @@
systemd.services = systemd.services =
let let
makeLinkScript = config: lib.strings.concatStringsSep "\n" (map makeLinkScript = config: lib.strings.concatStringsSep "\n" (map (location: ''mkdir -p "${location.path}"'') config);
(location:
if location.file or false then
''
mkdir -p $(dirname "${location.path}")
[ -f "${location.path}" ] || touch "${location.path}"
''
else
''mkdir -p "${location.path}"''
)
config);
systemLinksScript = makeLinkScript config.chvp.zfs.systemLinks; systemLinksScript = makeLinkScript config.chvp.zfs.systemLinks;
homeLinksScript = makeLinkScript config.chvp.zfs.homeLinks; homeLinksScript = makeLinkScript config.chvp.zfs.homeLinks;
in in