first commit
This commit is contained in:
commit
2a3ea31491
52 changed files with 2991 additions and 0 deletions
71
hosts/hetzner/filesystem.nix
Normal file
71
hosts/hetzner/filesystem.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
volume-id = "scsi-0HC_Volume_104473479";
|
||||
in
|
||||
{
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /mnt/ 0755 root root -"
|
||||
|
||||
"d /mnt/box 0770 root root -"
|
||||
|
||||
"d /mnt/box/immich 0770 immich immich -"
|
||||
"d /mnt/box/immich 0770 immich immich -"
|
||||
"d /mnt/box/immich/library 0770 immich immich -"
|
||||
"d /mnt/box/immich/upload 0770 immich immich -"
|
||||
"d /mnt/box/immich/thumbs 0770 immich immich -"
|
||||
"d /mnt/box/immich/encoded-video 0770 immich immich -"
|
||||
"d /mnt/box/immich/profile 0770 immich immich -"
|
||||
"d /mnt/box/immich/backups 0770 immich immich -"
|
||||
|
||||
"d /mnt/volume 0777 root root -"
|
||||
"d /mnt/volume/postgresql 0700 postgres postgres -"
|
||||
"d /mnt/volume/forgejo 0750 forgejo forgejo -"
|
||||
|
||||
"d /mnt/volume/immich 0750 immich immich -"
|
||||
];
|
||||
|
||||
fileSystems."/mnt/data/postgres" = {
|
||||
device = "/dev/disk/by-id/${volume-id}";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@postgres"
|
||||
"nodatacow" # <--- Disables Copy-on-Write for performance
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/data/immich" = {
|
||||
device = "/dev/disk/by-id/${volume-id}";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@immich"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/data/forgejo" = {
|
||||
device = "/dev/disk/by-id/${volume-id}";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@forgejo"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
|
||||
#fileSystems."/mnt/box" = {
|
||||
# device = "//u536222.your-storagebox.de/backup";
|
||||
# fsType = "cifs";
|
||||
# options = [
|
||||
# "x-systemd.automount"
|
||||
# "noauto"
|
||||
# "rw"
|
||||
# "credentials=${config.sops.secrets.storage_box_credentials.path}"
|
||||
# "uid=900"
|
||||
# "gid=100"
|
||||
# "file_mode=0660"
|
||||
# "dir_mode=0770"
|
||||
# ];
|
||||
#};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue