nixos-config/configs/porani/hardware-configuration.nix

80 lines
1.9 KiB
Nix
Raw Normal View History

2019-12-20 05:54:26 +01:00
{ config, lib, pkgs, ... }: {
2019-12-24 00:44:59 +01:00
imports = [
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
2020-01-31 10:40:14 +01:00
# boot loader
# -----------
2019-12-24 00:44:59 +01:00
{
2020-01-31 10:40:14 +01:00
# Use the systemd-boot EFI boot loader, not grub
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
#boot.loader.grub = {
# device = "/dev/sda";
# enable = true;
# version = 2;
#};
}
2019-10-24 02:20:38 +02:00
2020-01-31 10:40:14 +01:00
# kernel
# ------
{
2019-12-24 00:50:10 +01:00
boot.initrd.availableKernelModules =
[ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
2019-12-24 00:44:59 +01:00
}
2019-12-24 00:50:10 +01:00
# automount
# ---------
(let mediaUUID = "3d106f56-89e5-400d-9d6b-1dd957919548";
in {
2019-12-24 00:44:59 +01:00
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";
}];
})
];
2019-10-24 02:20:38 +02:00
# NTFS support
# ------------
2019-12-20 05:54:26 +01:00
environment.systemPackages = [ pkgs.ntfs3g ];
2019-10-24 02:20:38 +02:00
2020-01-31 10:40:14 +01:00
# partitions
# ----------
2020-01-31 11:18:17 +01:00
fileSystems."/" = {
device = "/dev/disk/by-uuid/77a3e839-5a80-4777-93c3-31be7f0cb99d";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FBFB-8DA5";
fsType = "vfat";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/192a8bd6-e5f7-4e66-b69e-f3da701da343";
fsType = "ext4";
};
2020-01-31 11:45:45 +01:00
fileSystems."/backup" = {
device = "/dev/disk/by-uuid/ca895f0e-f932-4a9e-b2ff-a1a488b0953d";
fsType = "ext4";
};
2019-10-24 02:20:38 +02:00
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 4;
2020-01-31 10:40:14 +01:00
2019-10-24 02:20:38 +02:00
}