Initial import.
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
# Imports
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
# hardware general
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
# boot
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# luks
|
||||
boot.initrd.luks.devices = {
|
||||
# drive1: swap
|
||||
"luks-UUID-1B" = {
|
||||
device = "/dev/disk/by-uuid/UUID-1B";
|
||||
};
|
||||
# drive1: root
|
||||
"luks-UUID-1C" = {
|
||||
device = "/dev/disk/by-uuid/UUID-1C";
|
||||
};
|
||||
# drive2: data
|
||||
"luks-UUID-2A" = {
|
||||
device = "/dev/disk/by-uuid/UUID-2A";
|
||||
allowDiscards = true;
|
||||
#keyFile = "/crypto_keyfile.bin";
|
||||
};
|
||||
};
|
||||
|
||||
# swap
|
||||
swapDevices = [ { device = "/dev/mapper/luks-UUID-1B"; } ];
|
||||
|
||||
# file system
|
||||
fileSystems = {
|
||||
# drive1: boot
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/UUID-1A";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
# drive1: root
|
||||
"/" = {
|
||||
device = "/dev/mapper/UUID-1C";
|
||||
fsType = "ext4";
|
||||
};
|
||||
# drive2: data
|
||||
"/data" = {
|
||||
device = "/dev/mapper/luks-UUID-2A";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
# nvidia
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# opengl
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
# nvtop
|
||||
environment.systemPackages = with pkgs; [
|
||||
#nvtopPackages.amd
|
||||
#nvtopPackages.intel
|
||||
nvtopPackages.nvidia
|
||||
];
|
||||
|
||||
# nvidia twm environment variables
|
||||
environment.sessionVariables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user