From 90b962205c73b525ee2bf090ba0fb3adfa6fca0f Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Wed, 25 Dec 2019 17:37:29 +1300 Subject: [PATCH] workhorse: switch media hard drive --- configs/workhorse/hardware-configuration.nix | 43 +++++++++++--------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/configs/workhorse/hardware-configuration.nix b/configs/workhorse/hardware-configuration.nix index 666be45..7bc601d 100644 --- a/configs/workhorse/hardware-configuration.nix +++ b/configs/workhorse/hardware-configuration.nix @@ -66,25 +66,30 @@ in { }; }; - # automount - # --------- - fileSystems."/media" = { - device = "/dev/disk/by-uuid/f7fa1c0e-ac9f-4955-b4bd-644c1ddb0d89"; - fsType = "ext4"; - options = [ - "nofail" - "noauto" - #"x-systemd.device-timeout=1ms" - ]; - }; - systemd.mounts = [{ - enable = true; - options = "nofail,noauto"; - type = "ext4"; - wantedBy = [ "multi-user.target" ]; - what = "/dev/disk/by-uuid/f7fa1c0e-ac9f-4955-b4bd-644c1ddb0d89"; - where = "/media"; - }]; + imports = [ + # automount + # --------- + (let mediaUUID = "b8ba192e-e2aa-47dd-85ec-dcf97ec9310a"; + in { + fileSystems."/media" = { + device = "/dev/disk/by-uuid/${mediaUUID}"; + fsType = "ext4"; + options = [ + "nofail" + "noauto" + #"x-systemd.device-timeout=1ms" + ]; + }; + systemd.mounts = [{ + enable = true; + options = "nofail,noauto"; + type = "ext4"; + wantedBy = [ "multi-user.target" ]; + what = "/dev/disk/by-uuid/${mediaUUID}"; + where = "/media"; + }]; + }) + ]; }