From cfe396cd5312f23a8d146f6e2b96d908751e3cbe Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Tue, 28 Sep 2021 01:40:42 +0300 Subject: [PATCH] move filesystem config from dell file --- machines/Dell-Laptop/default.nix | 34 -------------------------------- profiles/filesystems.nix | 25 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 34 deletions(-) diff --git a/machines/Dell-Laptop/default.nix b/machines/Dell-Laptop/default.nix index bd757d3..320cd41 100644 --- a/machines/Dell-Laptop/default.nix +++ b/machines/Dell-Laptop/default.nix @@ -49,40 +49,6 @@ services.fwupd.enable = true; - fileSystems = { - "/media/local/files" = { - fsType = "ntfs"; - device = "/dev/disk/by-partuuid/506c04f2-ecb1-4747-843a-576163828373"; - options = [ - "nofail" - "uid=${toString config.users.users.alukard.uid}" - "gid=${toString config.users.groups.smbgrp.gid}" - "dmask=027" - "fmask=137" - "rw" - ]; - }; - "/media/local/sys" = { - fsType = "ntfs"; - device = "/dev/disk/by-partuuid/bf5cdb93-fce3-4b02-8ba5-e43483a3a061"; - options = [ - "nofail" - "uid=${toString config.users.users.alukard.uid}" - "gid=${toString config.users.groups.smbgrp.gid}" - "dmask=027" - "fmask=137" - "ro" - ]; - }; - }; - - # systemd.services.unbind-usb2 = { - # script = '' - # echo 'usb2' | tee /sys/bus/usb/drivers/usb/unbind - # ''; - # wantedBy = [ "multi-user.target" ]; - # }; - systemd.services.unbind-usb2 = { wantedBy = [ "multi-user.target" ]; serviceConfig = { diff --git a/profiles/filesystems.nix b/profiles/filesystems.nix index 3ac13a3..6adc78c 100644 --- a/profiles/filesystems.nix +++ b/profiles/filesystems.nix @@ -76,6 +76,31 @@ with deviceSpecific; ]; }; + "/media/local/files" = lib.mkIf (device == "Dell-Laptop") { + fsType = "ntfs"; + device = "/dev/disk/by-partuuid/506c04f2-ecb1-4747-843a-576163828373"; + options = [ + "nofail" + "uid=${toString config.users.users.alukard.uid}" + "gid=${toString config.users.groups.users.gid}" + "dmask=027" + "fmask=137" + "rw" + ]; + }; + "/media/local/sys" = lib.mkIf (device == "Dell-Laptop") { + fsType = "ntfs"; + device = "/dev/disk/by-partuuid/bf5cdb93-fce3-4b02-8ba5-e43483a3a061"; + options = [ + "nofail" + "uid=${toString config.users.users.alukard.uid}" + "gid=${toString config.users.groups.users.gid}" + "dmask=027" + "fmask=137" + "ro" + ]; + }; + # Music folder # TODO: FIXIT "/home/alukard/Music" = {