Import the remaining hardware-config settings
This commit is contained in:
parent
7241484049
commit
a956ecb856
12
hardware-requirements.nix
Normal file
12
hardware-requirements.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
<nixos-hardware/framework>
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
}
|
23
nixos.nix
23
nixos.nix
|
@ -1,20 +1,15 @@
|
||||||
# sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
|
# sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
|
||||||
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
let systemInformation = import ./system-information.nix; in
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = "kudzu";
|
networking.hostName = "kudzu";
|
||||||
|
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[
|
||||||
#
|
|
||||||
# DON'T FORGET to add your hardware config too
|
|
||||||
# https://github.com/NixOS/nixos-hardware/
|
|
||||||
#
|
|
||||||
# Also make sure to move the swap configuration to the hardware config
|
|
||||||
/etc/nixos/hardware-configuration.nix
|
|
||||||
./filesystems.nix
|
./filesystems.nix
|
||||||
|
./hardware-requirements.nix
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -42,6 +37,8 @@
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "America/New_York";
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
|
@ -159,6 +156,7 @@
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -221,4 +219,9 @@
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
hardware.enableAllFirmware = true;
|
||||||
|
hardware.cpu.intel.updateMicrocode = systemInformation.isIntel;
|
||||||
|
|
||||||
|
# high-resolution display
|
||||||
|
hardware.video.hidpi.enable = systemInformation.isHiDPI;
|
||||||
|
}
|
|
@ -2,4 +2,7 @@
|
||||||
rootPartition = "/dev/disk/by-uuid/850e0a62-fd82-4360-b4d7-258817e86380";
|
rootPartition = "/dev/disk/by-uuid/850e0a62-fd82-4360-b4d7-258817e86380";
|
||||||
swapPartition = "/dev/disk/by-uuid/6144d426-6c5f-4a8a-ac16-d4d5eecbf7a0";
|
swapPartition = "/dev/disk/by-uuid/6144d426-6c5f-4a8a-ac16-d4d5eecbf7a0";
|
||||||
efiPartition = "/dev/disk/by-uuid/E5A8-38EA";
|
efiPartition = "/dev/disk/by-uuid/E5A8-38EA";
|
||||||
|
|
||||||
|
isHiDPI = true;
|
||||||
|
isIntel = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue