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 =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../scripts/hyprland-tty-launch.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = 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
|
||||
nix.settings = {
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
substituters = [
|
||||
"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.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
|
@ -68,6 +100,7 @@
|
|||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
firefox
|
||||
clinfo
|
||||
];
|
||||
|
||||
# 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
|
||||
];
|
||||
|
||||
# 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 = {
|
||||
enable = true;
|
||||
userName = "rafiq";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue