From f66a4cb237d29ae152ebb601b62bb6c9e29e4031 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 23 Sep 2022 23:01:58 +0200 Subject: ma share: proxy hetzner via gum --- makefu/2configs/share/gum-client.nix | 23 +++++++++++++++-------- makefu/2configs/share/gum.nix | 9 ++------- makefu/2configs/share/hetzner-client.nix | 5 +++-- makefu/2configs/share/omo.nix | 6 ++++++ 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/makefu/2configs/share/gum-client.nix b/makefu/2configs/share/gum-client.nix index db2adfb1..5192ef51 100644 --- a/makefu/2configs/share/gum-client.nix +++ b/makefu/2configs/share/gum-client.nix @@ -2,21 +2,28 @@ let automount_opts = - [ "x-systemd.automount" - "noauto" "x-systemd.idle-timeout=600" - "x-systemd.device-timeout=5s" - "x-systemd.mount-timeout=5s" + [ "x-systemd.automount" "noauto" + "x-systemd.idle-timeout=300" + "x-systemd.mount-timeout=60s" ]; - host = "nextgum"; #TODO + host = "gum"; #TODO in { - fileSystems."/media/download" = { - device = "//${host}/download"; + boot.extraModprobeConfig = '' + options cifs CIFSMaxBufSize=130048 + ''; + fileSystems."/media/cloud" = { + device = "//${host}/cloud-proxy"; fsType = "cifs"; options = automount_opts ++ [ "credentials=/var/src/secrets/download.smb" "file_mode=0775" "dir_mode=0775" - "uid=9001" + "bsize=8388608" + "fsc" + "rsize=130048" + "cache=loose" + "uid=${toString config.users.users.download.uid}" + "gid=${toString config.users.groups.download.gid}" "vers=3" ]; }; diff --git a/makefu/2configs/share/gum.nix b/makefu/2configs/share/gum.nix index fd81f28c..9647e0a6 100644 --- a/makefu/2configs/share/gum.nix +++ b/makefu/2configs/share/gum.nix @@ -1,6 +1,5 @@ { config, lib, pkgs, ... }: -with import ; let hostname = config.krebs.build.host.name; in { @@ -11,15 +10,11 @@ in { # home = "/var/empty"; # }; environment.systemPackages = [ pkgs.samba ]; - users.users.download = { - uid = genid "download"; - isNormalUser = true; - }; services.samba = { enable = true; shares = { - download = { - path = "/var/download"; + cloud-proxy = { + path = "/media/cloud"; "read only" = "no"; browseable = "yes"; "guest ok" = "no"; diff --git a/makefu/2configs/share/hetzner-client.nix b/makefu/2configs/share/hetzner-client.nix index 90bc32de..dc863736 100644 --- a/makefu/2configs/share/hetzner-client.nix +++ b/makefu/2configs/share/hetzner-client.nix @@ -21,11 +21,12 @@ in { "dir_mode=0770" "uid=${toString config.users.users.download.uid}" "gid=${toString config.users.groups.download.gid}" - #"vers=3" - "vers=2.1" + "vers=3" + #"vers=2.1" "rsize=65536" "wsize=130048" "iocharset=utf8" + "cache=loose" ]; }; } diff --git a/makefu/2configs/share/omo.nix b/makefu/2configs/share/omo.nix index e53158b8..4756ccf8 100644 --- a/makefu/2configs/share/omo.nix +++ b/makefu/2configs/share/omo.nix @@ -87,6 +87,12 @@ in { "guest ok" = "no"; "valid users" = "makefu"; }; + #cloud = { + # path = "/media/cloud/download/finished"; + # "read only" = "no"; + # browseable = "yes"; + # "guest ok" = "yes"; + #}; }; extraConfig = '' guest account = smbguest -- cgit v1.2.3