39 lines
946 B
Nix
39 lines
946 B
Nix
{ lib, config, pkgs, ... }: {
|
|
|
|
# Allow unfree packages
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# Set the networking hostname:
|
|
networking.hostName = "nixos-laptop";
|
|
|
|
# Configure the fingerprint reader
|
|
services.fprintd = {
|
|
enable = true;
|
|
tod.enable = true;
|
|
tod.driver = pkgs.libfprint-2-tod1-vfs0090;
|
|
};
|
|
|
|
# Enable nVidia PRIME Render Offload and OpenGL
|
|
# https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/p1/3th-gen/nvidia.nix
|
|
hardware = {
|
|
opengl.enable = true;
|
|
opengl.driSupport32Bit = true;
|
|
opengl.driSupport = true;
|
|
|
|
nvidia = {
|
|
open = false;
|
|
powerManagement.enable = true;
|
|
modesetting.enable = true;
|
|
prime = {
|
|
reverseSync.enable = true;
|
|
intelBusId = lib.mkDefault "PCI:0:2:0";
|
|
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
|
};
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
# Fingerprint software
|
|
fprintd
|
|
];
|
|
}
|