profiles/filesystem: add cluster-wide default setup option

This commit is contained in:
Gabriel Arazas 2023-07-24 15:23:05 +08:00
parent 305c54996f
commit 22b8cc86e9
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -13,6 +13,7 @@ let
in
{
options.profiles.filesystem = {
tools.enable = lib.mkEnableOption "filesystem-related settings";
setups = {
archive.enable = lib.mkEnableOption "automounting offline archive";
external-hdd.enable = lib.mkEnableOption "automounting personal external hard drive";
@ -21,6 +22,16 @@ in
};
config = lib.mkMerge [
(lib.mkIf cfg.tools.enable {
# Enable WebDAV mounting.
services.davfs2.enable = true;
# Installing filesystem debugging utilities.
environment.systemPackages = with pkgs; [
afuse
];
})
(lib.mkIf cfg.setups.archive.enable {
fileSystems."/mnt/archives" = {
device = "/dev/disk/by-uuid/6ba86a30-5fa4-41d9-8354-fa8af0f57f49";