Loop the mounts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user