diff --git a/config/hypr/config/autoexec.conf b/config/hypr/config/autoexec.conf index 96dbce4..c55cd13 100644 --- a/config/hypr/config/autoexec.conf +++ b/config/hypr/config/autoexec.conf @@ -1,11 +1,14 @@ # Polkit exec-once = systemctl --user start /nix/store/*-hyprpolkitagent-*/libexec/hyprpolkitagent +# Waybar +exec-once = "GTK_THEME=Adwaita waybar -c ~/config/config/waybar/config -s ~/config/config/waybar/style.css" + # Wallpaper -exec-once = hyprpaper +exec-once = swww-daemon # Notification Manager -exec-once = dunst & +exec-once = dunst # Clipboard Manager exec-once = wl-paste --watch cliphist store diff --git a/flake.lock b/flake.lock index deda222..f041a53 100644 --- a/flake.lock +++ b/flake.lock @@ -570,6 +570,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1743420942, + "narHash": "sha256-b/exDDQSLmENZZgbAEI3qi9yHkuXAXCPbormD8CSJXo=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "de6fc5551121c59c01e2a3d45b277a6d05077bc4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1742889210, @@ -697,6 +713,7 @@ "hyprland": "hyprland", "hyprsysteminfo": "hyprsysteminfo", "nix-flatpak": "nix-flatpak", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_4" } }, diff --git a/flake.nix b/flake.nix index a1e9e74..ab35c5b 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,7 @@ hyprland.url = "github:hyprwm/Hyprland"; hyprsysteminfo.url = "github:hyprwm/hyprsysteminfo"; ghostty.url = "github:ghostty-org/ghostty"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; home-manager = { url = "github:nix-community/home-manager"; @@ -28,6 +29,7 @@ inherit inputs; }; modules = [ + inputs.nixos-hardware.nixosModules.common-gpu-nvidia inputs.home-manager.nixosModules.default inputs.catppuccin.nixosModules.catppuccin inputs.nix-flatpak.nixosModules.nix-flatpak diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index b17d7bc..f1f137b 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -283,6 +283,15 @@ userEmail = "ocbwoy3@ocbwoy3.dev"; }; + programs.obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + wlrobs + obs-backgroundremoval + obs-pipewire-audio-capture + ]; + }; + home.stateVersion = "24.11"; }; diff --git a/hosts/default/packages.nix b/hosts/default/packages.nix index 9abd6ef..e529e26 100644 --- a/hosts/default/packages.nix +++ b/hosts/default/packages.nix @@ -101,7 +101,6 @@ blueman arrpc playerctl - obs-studio mangohud jq github-cli @@ -119,7 +118,8 @@ gimp mpv nixfmt-rfc-style - + cudaPackages.cudatoolkit + cudaPackages.cudnn ]; } diff --git a/modules/nixos/nvidia.nix b/modules/nixos/nvidia.nix index a00b06a..3de8a5b 100644 --- a/modules/nixos/nvidia.nix +++ b/modules/nixos/nvidia.nix @@ -7,15 +7,19 @@ options nvidia_drm modeset=1 fbdev=1 ''; - environment.variables.LIBVA_DRIVER_NAME = "nvidia"; - environment.variables.GBM_BACKEND = "nvidia-drm"; - environment.variables.__GLX_VENDOR_LIBRARY_NAME = "nvidia"; - environment.variables.NVD_BACKEND = "direct"; - environment.variables.EGL_PLATFORM = "wayland"; - environment.variables.VDPAU_DRIVER = "va_gl"; - environment.variables.WAYLAND_DISPLAY = "wayland-1"; - environment.variables.DISPLAY = ":0"; - environment.variables.XDG_CURRENT_DESKTOP = "Hyprland"; + environment.variables = { + LIBVA_DRIVER_NAME = "nvidia"; + GBM_BACKEND = "nvidia-drm"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + NVD_BACKEND = "direct"; + EGL_PLATFORM = "wayland"; + VDPAU_DRIVER = "va_gl"; + WAYLAND_DISPLAY = "wayland-1"; + DISPLAY = ":0"; + XDG_CURRENT_DESKTOP = "Hyprland"; + MOZ_ENABLE_WAYLAND = "1"; # Enable Wayland for Firefox + CHROMIUM_FLAGS = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-gpu-rasterization --enable-zero-copy"; # Enable Wayland and hardware acceleration for Chromium + }; environment.sessionVariables = { NIXOS_OZONE_WL = 1; @@ -26,38 +30,37 @@ EGL_PLATFORM = "wayland"; }; - hardware.graphics = { + + hardware.graphics = { # hardware.graphics since NixOS 24.11 enable = true; # driSupport = true; - # driSupport32bit = true; extraPackages = with pkgs; [ - intel-media-driver - intel-vaapi-driver + nvidia-vaapi-driver libvdpau-va-gl - vulkan-validation-layers + vaapiVdpau + libvdpau ]; }; - # environment.variables.VDPAU_DRIVER = "va_gl"; - # environment.variables.LIBVA_DRIVER_NAME = "nvidia"; - hardware.nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + offload.enableOffloadCmd = true; + }; modesetting.enable = true; powerManagement.enable = false; powerManagement.finegrained = false; open = false; nvidiaSettings = true; - # prime = { - # offload = { - # enable = true; - # enableOffloadCmd = true; - # }; - # intelBusId = "PCI:0:2:0"; - # nvidiaBusId = "PCI:1:0:0"; - # }; package = config.boot.kernelPackages.nvidiaPackages.stable; }; + boot.kernelModules = [ "nvidia-uvm" "nvidia-drm" ]; + boot.blacklistedKernelModules = [ "nouveau" ]; + + boot.kernelParams = [ "acpi_osi=Linux" ]; + services.xserver.enable = true; services.xserver.videoDrivers = ["nvidia"]; diff --git a/scripts/select-wallpaper.sh b/scripts/select-wallpaper.sh index 664635b..8617ce8 100644 --- a/scripts/select-wallpaper.sh +++ b/scripts/select-wallpaper.sh @@ -16,7 +16,7 @@ if [ ${#WALLPAPER} -gt 0 ] ; then notify-send -t 2000 -u low "OCbwoy3's Dotfiles" "Setting wallpaper" - swww img $HOME/Pictures/Wallpapers/$WALLPAPER --transition-fps 300 --transition-duration 2 & + swww img $HOME/Pictures/Wallpapers/$WALLPAPER --transition-fps 300 --transition-duration 2 --transition-type simple --transition-step 3 & # bash ~/dotfiles/scripts/hot-reload.sh else