settei/hosts/kazuki/storage.nix

29 lines
758 B
Nix

{
config,
pkgs,
...
}: {
age.secrets = {
storage-box-creds.file = ../../secrets/storage-box-creds.age;
};
environment.systemPackages = with pkgs; [cifs-utils];
fileSystems."/storage-box" = {
fsType = "cifs";
device = "//u389358.your-storagebox.de/backup";
options = [
"iocharset=utf8"
"x-systemd.automount"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"uid=${toString config.users.users.atticd.uid}"
"gid=${toString config.users.groups.atticd.gid}"
"credentials=${config.age.secrets.storage-box-creds.path}"
"cache=none"
];
};
networking.firewall.extraCommands = ''
iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns
'';
}