mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
feat: added samba mount for audiobookshelf
This commit is contained in:
parent
eb63e130eb
commit
4d1a19edfd
3 changed files with 15 additions and 18 deletions
|
@ -15,8 +15,9 @@ let
|
|||
;
|
||||
inherit (flake.config.services.instances)
|
||||
samba
|
||||
jellyfin
|
||||
audiobookshelf
|
||||
;
|
||||
|
||||
synologySecrets = config.sops.secrets."network/synology".path;
|
||||
ceresSecrets = config.sops.secrets."network/server".path;
|
||||
in
|
||||
|
@ -38,6 +39,11 @@ in
|
|||
"samba0"
|
||||
];
|
||||
|
||||
sambaFolders = [
|
||||
audiobookshelf.name
|
||||
jellyfin.name
|
||||
];
|
||||
|
||||
synologyMounts = synologyDrive: {
|
||||
name = "${synology.${synologyDrive}.mount}";
|
||||
value = {
|
||||
|
@ -58,10 +64,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
sambaMounts = sambaDrive: {
|
||||
name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}";
|
||||
sambaMounts = sambaDrive: folder: {
|
||||
name = "${ceres.${sambaDrive}.mount}/${folder}";
|
||||
value = {
|
||||
device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}";
|
||||
device = "${ceres.${sambaDrive}.device}/${folder}";
|
||||
fsType = "cifs";
|
||||
options = ceres.${sambaDrive}.options ++ [
|
||||
"credentials=${ceresSecrets}"
|
||||
|
@ -82,7 +88,9 @@ in
|
|||
}
|
||||
// (builtins.listToAttrs (map synologyMounts synologyDrives))
|
||||
// (builtins.listToAttrs (map storageMounts storageDrives))
|
||||
// (builtins.listToAttrs (map sambaMounts sambaDrives));
|
||||
// (builtins.listToAttrs (
|
||||
builtins.concatMap (drive: map (folder: sambaMounts drive folder) sambaFolders) sambaDrives
|
||||
));
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/8b1d43a7-baf8-4d15-a1ad-dc0c9dda6970"; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue