From 850e0c3c273d9d8156951dd8d2b707de4e703887 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 16 Jan 2021 04:14:30 +0000 Subject: [PATCH] Switch to NFS --- system/starlight/boot-config.nix | 9 ++++--- system/starlight/hardware-configuration.nix | 26 ++++++++++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/system/starlight/boot-config.nix b/system/starlight/boot-config.nix index 0bf8e24..0ae4704 100644 --- a/system/starlight/boot-config.nix +++ b/system/starlight/boot-config.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let - cifs_opts = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" "uid=${builtins.toString config.users.users.artemis.uid}" "gid=100" ]; - luna_opts = cifs_opts ++ [ "credentials=/var/private/luna_creds" ]; + net_opts = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; + luna_opts = net_opts ++ [ "uid=${builtins.toString config.users.users.artemis.uid}" "gid=100" "credentials=/var/private/luna_creds" ]; in { imports = [ ../../externals/systemd-boot-secure ]; @@ -30,6 +30,7 @@ in allowDiscards = true; }; glimmer = { + device = "/dev/disk/by-uuid/43220fc3-2f33-4915-9365-59eb27b21719"; preLVM = true; allowDiscards = true; }; @@ -37,6 +38,8 @@ in }; }; - fileSystems."/media/luna/media".options = luna_opts; + fileSystems."/media/luna/media".options = net_opts; + fileSystems."/media/luna/photos".options = net_opts; + fileSystems."/media/luna/games".options = net_opts; fileSystems."/media/luna/private".options = luna_opts; } diff --git a/system/starlight/hardware-configuration.nix b/system/starlight/hardware-configuration.nix index 7902fbb..d4c1b5e 100644 --- a/system/starlight/hardware-configuration.nix +++ b/system/starlight/hardware-configuration.nix @@ -47,8 +47,6 @@ fsType = "btrfs"; }; - boot.initrd.luks.devices."glimmer".device = "/dev/disk/by-uuid/43220fc3-2f33-4915-9365-59eb27b21719"; - fileSystems."/var/lib/lxd/shmounts" = { device = "tmpfs"; @@ -75,18 +73,30 @@ options = [ "bind" ]; }; - fileSystems."/media/luna/media" = - { - device = "//10.69.0.69/media"; - fsType = "cifs"; - }; - fileSystems."/media/luna/private" = { device = "//10.69.0.69/private"; fsType = "cifs"; }; + fileSystems."/media/luna/photos" = + { + device = "10.69.0.69:/media/tank/photos"; + fsType = "nfs4"; + }; + + fileSystems."/media/luna/games" = + { + device = "10.69.0.69:/media/tank/games"; + fsType = "nfs4"; + }; + + fileSystems."/media/luna/media" = + { + device = "10.69.0.69:/media/tank/media"; + fsType = "nfs4"; + }; + swapDevices = [{ device = "/dev/disk/by-uuid/b134fecf-719f-45af-b317-001e413f06c4"; }];