hosts/kazuki: connect a storage box

This commit is contained in:
Nikodem Rabuliński 2024-02-06 13:18:07 +01:00
parent 4bceebb1fd
commit d8ff83529c
4 changed files with 40 additions and 0 deletions

View file

@ -12,6 +12,7 @@
./conduit.nix
./mail.nix
./vault.nix
./storage.nix
];
nixpkgs.hostPlatform = "aarch64-linux";

28
hosts/kazuki/storage.nix Normal file
View file

@ -0,0 +1,28 @@
{
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"
"noauto"
"x-systemd.idle-timeout=60"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"credentials=${config.age.secrets.storage-box-creds.path}"
];
};
networking.firewall.extraCommands = ''
iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns
'';
}