Loop the mounts
This commit is contained in:
parent
9e0a23893c
commit
24ae292b41
1 changed files with 16 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue