Loop the mounts

This commit is contained in:
Alexander Wainwright
2025-06-27 23:13:33 +10:00
parent 9e0a23893c
commit 24ae292b41

View File

@@ -1,13 +1,20 @@
{ config, pkgs, inputs, ... }:
{
environment.systemPackages = with pkgs; [
cifs-utils
];
fileSystems."/mnt/kafka/video" = {
device = "//kafka.local/video";
let
smbCommon = {
fsType = "cifs";
options = ["credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
options = [ "credentials=/etc/nixos/smb-secrets,uid=1000,gid=100" ];
};
mounts = {
"/mnt/kafka/archive" = "//kafka.local/archive";
"/mnt/kafka/downloads" = "//kafka.local/downloads";
"/mnt/kafka/backup" = "//kafka.local/backup";
"/mnt/kafka/video" = "//kafka.local/video";
};
in
{
environment.systemPackages = with pkgs; [ cifs-utils ];
fileSystems = builtins.mapAttrs
(mountPoint: device: smbCommon // { inherit device; })
mounts;
}