feat(nvidia): add proper nvidia drivers
This commit is contained in:
parent
0bcf8a90ed
commit
083d67c1df
3 changed files with 64 additions and 2 deletions
|
@ -8,18 +8,50 @@
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../../scripts/hyprland-tty-launch.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Graphics settings are defined here
|
||||||
|
hardware = {
|
||||||
|
graphics.enable = true;
|
||||||
|
graphics.extraPackages = with pkgs; [
|
||||||
|
nvidia-vaapi-driver
|
||||||
|
ocl-icd
|
||||||
|
cudaPackages.cudatoolkit
|
||||||
|
# clinfo
|
||||||
|
];
|
||||||
|
nvidia = {
|
||||||
|
open = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
videoDrivers = [ "nvidia" ];
|
||||||
|
};
|
||||||
|
|
||||||
# Add hyprland.cachix.org as a binary cache for Hyprland
|
# Add hyprland.cachix.org as a binary cache for Hyprland
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = ["https://hyprland.cachix.org"];
|
substituters = [
|
||||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
"https://hyprland.cachix.org"
|
||||||
|
"https://cuda-maintainers.cachix.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Scripts
|
||||||
|
services.hyprland-tty-launch.enable = true;
|
||||||
|
|
||||||
networking.hostName = "nemesis"; # Define your hostname.
|
networking.hostName = "nemesis"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
@ -68,6 +100,7 @@
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
|
clinfo
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
|
20
scripts/hyprland-tty-launch.nix
Normal file
20
scripts/hyprland-tty-launch.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.services.hyprland-tty-launch.enable = lib.mkEnableOption "Enable launching Hyprland from TTY with UWSM";
|
||||||
|
|
||||||
|
config = lib.mkIf config.services.hyprland-tty-launch.enable {
|
||||||
|
environment.etc."profile.d/hyprland-tty-launch.sh".text = ''
|
||||||
|
#!/bin/$SHELL
|
||||||
|
|
||||||
|
# if uwsm check may-start && uwsm select; then
|
||||||
|
# exec systemd-cat -t uwsm_start uwsm start default
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# OR (to bypass the compositor selection menu):
|
||||||
|
if uwsm check may-start; then
|
||||||
|
exec uwsm start hyprland.desktop
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,6 +9,15 @@
|
||||||
pkgs.kitty
|
pkgs.kitty
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# programs.bash = {
|
||||||
|
# enable = true;
|
||||||
|
# initExtra = ''
|
||||||
|
# if uwsm check may-start && uwsm select; then
|
||||||
|
# exec systemd-cat -t uwsm_start uwsm start default
|
||||||
|
# fi
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "rafiq";
|
userName = "rafiq";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue