74 lines
2.0 KiB
Nix
74 lines
2.0 KiB
Nix
# Edit this configuration file to define what should be installed on
|
||
# your system. Help is available in the configuration.nix(5) man page
|
||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||
|
||
{ config, lib, pkgs, core_inputs, ... }:
|
||
|
||
{
|
||
|
||
options = {
|
||
sysconfig.laptop.enable = lib.mkEnableOption "uses laptop config";
|
||
};
|
||
|
||
config = lib.mkIf config.sysconfig.laptop.enable {
|
||
|
||
assertions = [
|
||
{
|
||
assertion = !config.sysconfig.homebox.enable;
|
||
message = "sysconfig laptop conflicts with homebox";
|
||
}
|
||
];
|
||
|
||
sysconfig.generic.enable = lib.mkForce false;
|
||
|
||
imports = [];
|
||
|
||
boot = {
|
||
loader = {
|
||
systemd-boot.enable = true;
|
||
efi.canTouchEfiVariables = true;
|
||
};
|
||
kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||
};
|
||
|
||
hardware = {
|
||
opengl = {
|
||
enable = true;
|
||
driSupport = true;
|
||
extraPackages = with pkgs; [
|
||
nvidia-vaapi-driver
|
||
];
|
||
};
|
||
|
||
nvidia = {
|
||
modesetting.enable = true;
|
||
open = false; #suspend fails with open drivers
|
||
nvidiaSettings = true;
|
||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||
prime = {
|
||
intelBusId = "PCI:0:2:0";
|
||
nvidiaBusId = "PCI:1:0:0";
|
||
# #sync.enable = true;
|
||
offload = {
|
||
enable = true;
|
||
enableOffloadCmd = true;
|
||
};
|
||
};
|
||
};
|
||
|
||
bluetooth.enable = true;
|
||
|
||
pulseaudio.enable = false;
|
||
};
|
||
|
||
services = {
|
||
xserver = {
|
||
enable = true;
|
||
videoDrivers = [ "nvidia" ];
|
||
};
|
||
|
||
displayManager.enable = true;
|
||
};
|
||
};
|
||
}
|