diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-10-16 11:40:45 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-10-16 11:40:45 -0700 |
commit | 88902c97050fd66059feab31b5d03e7d81eeed45 (patch) | |
tree | 7846cda51ec8e2635b1711968c28c94cad309096 /hosts/arrakis | |
parent | 60934e02c79ae0bde56cbbbdd68cdd09bf8dfb61 (diff) | |
download | nix-88902c97050fd66059feab31b5d03e7d81eeed45.tar nix-88902c97050fd66059feab31b5d03e7d81eeed45.tar.gz nix-88902c97050fd66059feab31b5d03e7d81eeed45.tar.bz2 nix-88902c97050fd66059feab31b5d03e7d81eeed45.tar.lz nix-88902c97050fd66059feab31b5d03e7d81eeed45.tar.xz nix-88902c97050fd66059feab31b5d03e7d81eeed45.tar.zst nix-88902c97050fd66059feab31b5d03e7d81eeed45.zip |
Add NFS server @arrakis
Diffstat (limited to '')
-rw-r--r-- | hosts/arrakis/hardware-configuration.nix | 88 | ||||
-rw-r--r-- | hosts/arrakis/services.nix | 9 |
2 files changed, 68 insertions, 29 deletions
diff --git a/hosts/arrakis/hardware-configuration.nix b/hosts/arrakis/hardware-configuration.nix index 4e67e65..8a439ab 100644 --- a/hosts/arrakis/hardware-configuration.nix +++ b/hosts/arrakis/hardware-configuration.nix @@ -16,42 +16,72 @@ zfs.extraPools = [ "data" ]; }; - fileSystems."/" = - { device = "rpool/local/root"; - fsType = "zfs"; - }; + fileSystems."/" = { + device = "rpool/local/root"; + fsType = "zfs"; + }; - fileSystems."/efiboot/efi1" = - { device = "/dev/disk/by-label/ESP1"; - fsType = "vfat"; - options = [ "X-mount.mkdir" "iocharset=iso8859-1" ]; - }; + fileSystems."/efiboot/efi1" = { + device = "/dev/disk/by-label/ESP1"; + fsType = "vfat"; + options = [ "X-mount.mkdir" "iocharset=iso8859-1" ]; + }; - fileSystems."/efiboot/efi2" = - { device = "/dev/disk/by-label/ESP2"; - fsType = "vfat"; - options = [ "X-mount.mkdir" "iocharset=iso8859-1" ]; - }; + fileSystems."/efiboot/efi2" = { + device = "/dev/disk/by-label/ESP2"; + fsType = "vfat"; + options = [ "X-mount.mkdir" "iocharset=iso8859-1" ]; + }; - fileSystems."/nix" = - { device = "rpool/local/nix"; - fsType = "zfs"; - }; + fileSystems."/nix" = { + device = "rpool/local/nix"; + fsType = "zfs"; + }; - fileSystems."/root" = - { device = "rpool/user/home/root"; - fsType = "zfs"; - }; + fileSystems."/root" = { + device = "rpool/user/home/root"; + fsType = "zfs"; + }; - fileSystems."/home/nipsy" = - { device = "rpool/user/home/nipsy"; - fsType = "zfs"; - }; + fileSystems."/home/nipsy" = { + device = "rpool/user/home/nipsy"; + fsType = "zfs"; + }; + + fileSystems."/srv/nfs/keepers" = { + device = "/data/home/nipsy/downloads/keepers"; + options = [ + "bind" + "defaults" + "nofail" + "x-systemd.requires=zfs-mount.service" + ]; + }; - swapDevices = - [ { device = "/dev/disk/by-label/swap1"; } - { device = "/dev/disk/by-label/swap2"; } + fileSystems."/srv/nfs/movies" = { + device = "/data/home/nipsy/downloads/movies"; + options = [ + "bind" + "defaults" + "nofail" + "x-systemd.requires=zfs-mount.service" ]; + }; + + fileSystems."/srv/nfs/tv" = { + device = "/data/home/nipsy/downloads/tv"; + options = [ + "bind" + "defaults" + "nofail" + "x-systemd.requires=zfs-mount.service" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-label/swap1"; } + { device = "/dev/disk/by-label/swap2"; } + ]; hardware = { bluetooth.enable = true; diff --git a/hosts/arrakis/services.nix b/hosts/arrakis/services.nix index 79f614f..8054fb8 100644 --- a/hosts/arrakis/services.nix +++ b/hosts/arrakis/services.nix @@ -5,6 +5,8 @@ directory = * ''; + networking.firewall.allowedTCPPorts = [ 2049 ]; + security.acme = { acceptTerms = true; certs."arrakis.bitgnome.net".postRun = '' @@ -62,6 +64,13 @@ jellyfin.enable = true; + nfs.server = { + enable = true; + exports = '' + /srv/nfs 192.168.1.0/24(ro,all_squash,insecure,crossmnt,subtree_check,fsid=0) + ''; + }; + nginx = { enable = true; |