diff --git a/configs/porani/hardware-configuration.nix b/configs/porani/hardware-configuration.nix index 430b268..c0f4f40 100644 --- a/configs/porani/hardware-configuration.nix +++ b/configs/porani/hardware-configuration.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, ... }: { - imports = [ ]; - + imports = [ + + { + boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; @@ -22,6 +24,36 @@ device = "/dev/sda2"; preLVM = true; }]; + } + + # automount + # --------- + (let + mediaUUID = "3d106f56-89e5-400d-9d6b-1dd957919548"; + in + { + fileSystems."/media" = { + #device = "/dev/disk/by-uuid/162c2f9e-8baa-4433-99fd-bb7e7b69472f"; + 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/162c2f9e-8baa-4433-99fd-bb7e7b69472f"; + what = "/dev/disk/by-uuid/${mediaUUID}"; + where = "/media"; + }]; + }) + ]; + # NTFS support # ------------ @@ -42,26 +74,6 @@ fsType = "ext4"; }; - # automount - # --------- - fileSystems."/media" = { - device = "/dev/disk/by-uuid/162c2f9e-8baa-4433-99fd-bb7e7b69472f"; - 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/162c2f9e-8baa-4433-99fd-bb7e7b69472f"; - where = "/media"; - }]; - swapDevices = [ ]; nix.maxJobs = lib.mkDefault 4;