Mount fractal CIFS shares on the compute nodes.

This commit is contained in:
2023-11-01 08:34:35 +00:00
parent e2706b9367
commit 8c9bd9a0a6
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.cifs-utils ];
environment.etc."nixos/smb-secrets" = {
text = ''
username=compute
password=aaShecheseiwee5eeh2p
'';
mode = "0400";
};
fileSystems."/data/torrent" = {
device = "//fractal/torrent";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
};
fileSystems."/data/media" = {
device = "//fractal/media";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
};
fileSystems."/data/shared" = {
device = "//fractal/shared";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
};
}

View File

@@ -1,6 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [
./cifs-client.nix
./consul.nix ./consul.nix
./glusterfs.nix ./glusterfs.nix
./glusterfs-client.nix ./glusterfs-client.nix