porani: change /media drive

This commit is contained in:
Ingolf Wagner 2019-12-24 12:44:59 +13:00
parent 05488befc5
commit ac196a752c
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ]; imports = [
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
{
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules =
[ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
@ -22,6 +24,36 @@
device = "/dev/sda2"; device = "/dev/sda2";
preLVM = true; 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 # NTFS support
# ------------ # ------------
@ -42,26 +74,6 @@
fsType = "ext4"; 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 = [ ]; swapDevices = [ ];
nix.maxJobs = lib.mkDefault 4; nix.maxJobs = lib.mkDefault 4;