78 lines
1.5 KiB
Nix
78 lines
1.5 KiB
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
{
|
||
|
imports =
|
||
|
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||
|
];
|
||
|
|
||
|
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||
|
boot.kernelModules = [ "kvm-intel" ];
|
||
|
boot.extraModulePackages = [ ];
|
||
|
|
||
|
# grub configuration
|
||
|
# ------------------
|
||
|
boot.loader.grub = {
|
||
|
device = "/dev/sda";
|
||
|
enable = true;
|
||
|
version = 2;
|
||
|
};
|
||
|
|
||
|
# lvm volume group
|
||
|
# ----------------
|
||
|
boot.initrd.luks.devices = [
|
||
|
{
|
||
|
name = "vg";
|
||
|
device = "/dev/sda2";
|
||
|
preLVM = true;
|
||
|
}
|
||
|
];
|
||
|
|
||
|
# NTFS support
|
||
|
# ------------
|
||
|
environment.systemPackages = [
|
||
|
pkgs.ntfs3g
|
||
|
];
|
||
|
|
||
|
# root
|
||
|
# ----
|
||
|
fileSystems."/" = {
|
||
|
options = [ "noatime" "nodiratime" "discard" ];
|
||
|
device = "/dev/vg/root";
|
||
|
fsType = "ext4";
|
||
|
};
|
||
|
|
||
|
# 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"
|
||
|
];
|
||
|
};
|
||
|
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;
|
||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||
|
}
|