41 lines
983 B
Nix
41 lines
983 B
Nix
{ pkgs, config, ... }:
|
|
{
|
|
environment.systemPackages = [
|
|
pkgs.rclone
|
|
pkgs.samba
|
|
pkgs.cifs-utils
|
|
];
|
|
environment.etc."rclone-mnt.conf".text = ''
|
|
[myremote]
|
|
type = sftp
|
|
host = u504615.your-storagebox.de
|
|
user = u504615
|
|
key_file = ${config.age.secrets.hetzner-key.path}
|
|
'';
|
|
|
|
age.secrets.smbsecret = {
|
|
file = ../../keys/smbshare;
|
|
owner = "ren";
|
|
};
|
|
|
|
fileSystems."/mnt/sbox" = {
|
|
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=0770,file_mode=0770,gid=993";
|
|
|
|
in
|
|
[ "${automount_opts},credentials=${config.age.secrets.smbsecret.path}" ];
|
|
};
|
|
|
|
fileSystems."/mnt/scratch" = {
|
|
device = "/dev/sdb";
|
|
options = [
|
|
"defaults"
|
|
"discard"
|
|
"nofail"
|
|
];
|
|
};
|
|
}
|