ma share: proxy hetzner via gum
This commit is contained in:
parent
0c334ea99c
commit
f66a4cb237
@ -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"
|
||||
];
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with import <stockholm/lib>;
|
||||
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";
|
||||
|
@ -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"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user