feat(nixos): add nvidia drivers to nemesis config

This commit is contained in:
Mohammad Rafiq 2025-02-22 13:53:17 +08:00
parent ef89e56b6e
commit 29b6b3bd4b

View file

@ -1,7 +1,3 @@
# 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, pkgs, inputs, ... }:
{
@ -10,18 +6,36 @@
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
##############################
### Networking ###
##############################
services.xserver.videoDrivers = ["nvidia"];
hardware = {
graphics.enable = true;
nvidia = {
modesetting.enable = true;
powerManagement = {
enable = false;
finegrained = false;
};
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.latest;
};
};
##############################
### Networking ###
##############################
networking.hostName = "nemesis"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
@ -59,6 +73,8 @@
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.variables.EDITOR = "vim";
# List packages installed in system profile. To search, run:
# $ nix search wget
nix.settings.experimental-features = [ "nix-command" "flakes" ];
@ -67,15 +83,6 @@
wget
git
];
environment.variables.EDITOR = "vim";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
@ -84,12 +91,6 @@
enable = true;
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave