Add smb mount instead
This commit is contained in:
parent
dac753ceab
commit
8c9c8310b3
5 changed files with 49 additions and 26 deletions
|
|
@ -3,6 +3,7 @@
|
|||
environment.systemPackages = [
|
||||
pkgs.rclone
|
||||
pkgs.samba
|
||||
pkgs.cifs-utils
|
||||
];
|
||||
environment.etc."rclone-mnt.conf".text = ''
|
||||
[myremote]
|
||||
|
|
@ -12,16 +13,21 @@
|
|||
key_file = ${config.age.secrets.hetzner-key.path}
|
||||
'';
|
||||
|
||||
age.secrets.smbsecret = {
|
||||
file = ../../keys/smbshare;
|
||||
owner = "ren";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/sbox" = {
|
||||
device = "myremote:/";
|
||||
fsType = "rclone";
|
||||
options = [
|
||||
"nodev"
|
||||
"nofail"
|
||||
"allow_other"
|
||||
"args2env"
|
||||
"config=/etc/rclone-mnt.conf"
|
||||
];
|
||||
device = "//u504615.your-storagebox.de/backup";
|
||||
fsType = "cifs";
|
||||
options =
|
||||
let
|
||||
# this line prevents hanging on network split
|
||||
automount_opts = "rw,x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,dir_mode=0777";
|
||||
|
||||
in
|
||||
[ "${automount_opts},credentials=${config.age.secrets.smbsecret.path}" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/scratch" = {
|
||||
|
|
|
|||
|
|
@ -20,24 +20,27 @@
|
|||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.rclone ];
|
||||
environment.etc."rclone-mnt.conf".text = ''
|
||||
[myremote]
|
||||
type = sftp
|
||||
host = u504615.your-storagebox.de
|
||||
user = u504615
|
||||
key_file = ${config.age.secrets.hetzner-key.path}
|
||||
'';
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.rclone
|
||||
pkgs.samba
|
||||
pkgs.cifs-utils
|
||||
];
|
||||
|
||||
age.secrets.smbsecret = {
|
||||
file = ../../keys/smbshare;
|
||||
owner = "selene";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/sbox" = {
|
||||
device = "myremote:/";
|
||||
fsType = "rclone";
|
||||
options = [
|
||||
"nodev"
|
||||
"nofail"
|
||||
"allow_other"
|
||||
"args2env"
|
||||
"config=/etc/rclone-mnt.conf"
|
||||
];
|
||||
device = "//u504615.your-storagebox.de/backup";
|
||||
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=${config.age.secrets.smbsecret.path}" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue