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 ./conduit.nix
./mail.nix ./mail.nix
./vault.nix ./vault.nix
./storage.nix
]; ];
nixpkgs.hostPlatform = "aarch64-linux"; 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
'';
}

View file

@ -43,4 +43,8 @@ in {
keys.system.legion keys.system.legion
keys.other.bootstrap keys.other.bootstrap
]; ];
"storage-box-creds.age".publicKeys = [
keys.system.kazuki
keys.other.bootstrap
];
} }

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 84j9mw Ne+o6QDh4zL7sYize81+CsErRJqFPVPvqgKof1NaGXE
cxgH4T1TL1QNebEpJjbhtNzsruScnfiJmooyu1H1hqA
-> ssh-ed25519 GKhvwg D7vjyGI59njgGefZ0siA84egRuXDBJKHMykAfejvbiE
F6g9/HZYUGvH8fwXvn0jUbBpouloFbyD6cSYyj6efcY
--- 6wPtAFTNJYMqW26PpAHohjNjryx/XL7UIo7+91CFjZY
ÖO··ô>àeNê<4E>×2<C397>Ë—]¢C4»lÖ#ómoŸ ’›â‚õ `™%0X X)C:ó[è[<5B><>ü ŠùÏʵè+äÈ*tèm