This commit is contained in:
2025-04-05 20:01:46 +03:00
parent 73908ecd0a
commit 056e98be6e
7 changed files with 64 additions and 30 deletions

View File

@@ -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

17
flake.lock generated
View File

@@ -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"
}
},

View File

@@ -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

View File

@@ -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";
};

View File

@@ -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
];
}

View File

@@ -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"];

View File

@@ -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