From b5a483f88d7ceb8be362f02460bd800978807804 Mon Sep 17 00:00:00 2001 From: irl Date: Mon, 16 Jun 2025 21:36:15 +0100 Subject: [PATCH] feat: ptp link to synology and mount nfs volume --- nixos/hosts/homeserver/default.nix | 14 ++++++++++++++ .../hosts/homeserver/hardware-configuration.nix | 16 +++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/nixos/hosts/homeserver/default.nix b/nixos/hosts/homeserver/default.nix index e1c2a20..fd75c8d 100644 --- a/nixos/hosts/homeserver/default.nix +++ b/nixos/hosts/homeserver/default.nix @@ -18,6 +18,16 @@ networking.hostName = "homeserver"; networking.networkmanager.enable = true; + fileSystems."/mnt/data" = { + device = "172.16.0.1:/volume1/data"; + fsType = "nfs"; + options = [ + "noauto" + "x-systemd.automount" + "x-systemd.idle-timeout=600" + ]; + }; + users.groups.media = { }; users.users.media = { group = "media"; @@ -42,6 +52,10 @@ addresses = true; workstation = true; }; + allowInterfaces = [ + "end0" + "enp2s0u2" + ]; }; services.calibre-server = { diff --git a/nixos/hosts/homeserver/hardware-configuration.nix b/nixos/hosts/homeserver/hardware-configuration.nix index aef56ac..8693644 100644 --- a/nixos/hosts/homeserver/hardware-configuration.nix +++ b/nixos/hosts/homeserver/hardware-configuration.nix @@ -39,13 +39,15 @@ swapDevices = [ ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.end0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; + networking.interfaces = { + end0.useDHCP = lib.mkDefault true; + enp2s0u2.ipv4.addresses = [ + { + address = "172.16.0.2"; + prefixLength = 24; + } + ]; + }; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; }