mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
profiles/filesystem: add personal webstorage setup
This commit is contained in:
parent
8777fc06e8
commit
cf92d4584c
@ -16,6 +16,7 @@ in
|
||||
setups = {
|
||||
archive.enable = lib.mkEnableOption "automounting offline archive";
|
||||
external-hdd.enable = lib.mkEnableOption "automounting personal external hard drive";
|
||||
personal-webstorage.enable = lib.mkEnableOption "automounting of personal WebDAV directory";
|
||||
};
|
||||
};
|
||||
|
||||
@ -60,5 +61,33 @@ in
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.setups.personal-webstorage.enable {
|
||||
assertions = [{
|
||||
assertion = config.services.davfs2.enable;
|
||||
message = ''
|
||||
Mounting WebDAVs is not possible since davfs2 NixOS service is not
|
||||
enabled.
|
||||
'';
|
||||
}];
|
||||
|
||||
# You have to set up the secrets for this somewhere.
|
||||
fileSystems."/mnt/personal-webdav" = {
|
||||
device = "https://dav.mailbox.org/servlet/webdav.infostore";
|
||||
fsType = "davfs";
|
||||
noCheck = true;
|
||||
options = [
|
||||
"rw"
|
||||
"user"
|
||||
"noauto"
|
||||
"nofail"
|
||||
|
||||
"x-systemd.automount"
|
||||
"x-systemd.idle-timeout=300"
|
||||
"x-systemd.mount-timeout=20"
|
||||
"x-systemd.wanted-by=multi-user.target"
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user