2019-12-20 05:54:26 +01:00
|
|
|
{ config, lib, pkgs, ... }: {
|
|
|
|
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
2019-10-24 02:20:38 +02:00
|
|
|
|
2019-12-20 05:54:26 +01:00
|
|
|
boot.initrd.availableKernelModules =
|
|
|
|
[ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
2019-10-24 02:20:38 +02:00
|
|
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
|
|
|
# grub configuration
|
|
|
|
# ------------------
|
|
|
|
boot.loader.grub = {
|
2019-12-20 05:54:26 +01:00
|
|
|
device = "/dev/sda";
|
|
|
|
enable = true;
|
2019-10-24 02:20:38 +02:00
|
|
|
version = 2;
|
|
|
|
};
|
|
|
|
|
|
|
|
# lvm volume group
|
|
|
|
# ----------------
|
2019-12-20 05:54:26 +01:00
|
|
|
boot.initrd.luks.devices = [{
|
|
|
|
name = "vg";
|
|
|
|
device = "/dev/sda2";
|
|
|
|
preLVM = true;
|
|
|
|
}];
|
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
|
|
|
|
|
|
|
# root
|
|
|
|
# ----
|
|
|
|
fileSystems."/" = {
|
|
|
|
options = [ "noatime" "nodiratime" "discard" ];
|
2019-12-20 05:54:26 +01:00
|
|
|
device = "/dev/vg/root";
|
|
|
|
fsType = "ext4";
|
2019-10-24 02:20:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# boot
|
|
|
|
# ----
|
|
|
|
fileSystems."/boot" = {
|
|
|
|
device = "/dev/sda1";
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
};
|
2019-12-20 05:54:26 +01:00
|
|
|
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";
|
|
|
|
}];
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
nix.maxJobs = lib.mkDefault 4;
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
|
|
}
|