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 # Polkit
exec-once = systemctl --user start /nix/store/*-hyprpolkitagent-*/libexec/hyprpolkitagent 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 # Wallpaper
exec-once = hyprpaper exec-once = swww-daemon
# Notification Manager # Notification Manager
exec-once = dunst & exec-once = dunst
# Clipboard Manager # Clipboard Manager
exec-once = wl-paste --watch cliphist store exec-once = wl-paste --watch cliphist store

17
flake.lock generated
View File

@@ -570,6 +570,22 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1742889210, "lastModified": 1742889210,
@@ -697,6 +713,7 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprsysteminfo": "hyprsysteminfo", "hyprsysteminfo": "hyprsysteminfo",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
} }
}, },

View File

@@ -8,6 +8,7 @@
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
hyprsysteminfo.url = "github:hyprwm/hyprsysteminfo"; hyprsysteminfo.url = "github:hyprwm/hyprsysteminfo";
ghostty.url = "github:ghostty-org/ghostty"; ghostty.url = "github:ghostty-org/ghostty";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
@@ -28,6 +29,7 @@
inherit inputs; inherit inputs;
}; };
modules = [ modules = [
inputs.nixos-hardware.nixosModules.common-gpu-nvidia
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
inputs.catppuccin.nixosModules.catppuccin inputs.catppuccin.nixosModules.catppuccin
inputs.nix-flatpak.nixosModules.nix-flatpak inputs.nix-flatpak.nixosModules.nix-flatpak

View File

@@ -283,6 +283,15 @@
userEmail = "ocbwoy3@ocbwoy3.dev"; 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"; home.stateVersion = "24.11";
}; };

View File

@@ -101,7 +101,6 @@
blueman blueman
arrpc arrpc
playerctl playerctl
obs-studio
mangohud mangohud
jq jq
github-cli github-cli
@@ -119,7 +118,8 @@
gimp gimp
mpv mpv
nixfmt-rfc-style nixfmt-rfc-style
cudaPackages.cudatoolkit
cudaPackages.cudnn
]; ];
} }

View File

@@ -7,15 +7,19 @@
options nvidia_drm modeset=1 fbdev=1 options nvidia_drm modeset=1 fbdev=1
''; '';
environment.variables.LIBVA_DRIVER_NAME = "nvidia"; environment.variables = {
environment.variables.GBM_BACKEND = "nvidia-drm"; LIBVA_DRIVER_NAME = "nvidia";
environment.variables.__GLX_VENDOR_LIBRARY_NAME = "nvidia"; GBM_BACKEND = "nvidia-drm";
environment.variables.NVD_BACKEND = "direct"; __GLX_VENDOR_LIBRARY_NAME = "nvidia";
environment.variables.EGL_PLATFORM = "wayland"; NVD_BACKEND = "direct";
environment.variables.VDPAU_DRIVER = "va_gl"; EGL_PLATFORM = "wayland";
environment.variables.WAYLAND_DISPLAY = "wayland-1"; VDPAU_DRIVER = "va_gl";
environment.variables.DISPLAY = ":0"; WAYLAND_DISPLAY = "wayland-1";
environment.variables.XDG_CURRENT_DESKTOP = "Hyprland"; 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 = { environment.sessionVariables = {
NIXOS_OZONE_WL = 1; NIXOS_OZONE_WL = 1;
@@ -26,38 +30,37 @@
EGL_PLATFORM = "wayland"; EGL_PLATFORM = "wayland";
}; };
hardware.graphics = {
hardware.graphics = { # hardware.graphics since NixOS 24.11
enable = true; enable = true;
# driSupport = true; # driSupport = true;
# driSupport32bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-media-driver nvidia-vaapi-driver
intel-vaapi-driver
libvdpau-va-gl libvdpau-va-gl
vulkan-validation-layers vaapiVdpau
libvdpau
]; ];
}; };
# environment.variables.VDPAU_DRIVER = "va_gl";
# environment.variables.LIBVA_DRIVER_NAME = "nvidia";
hardware.nvidia = { hardware.nvidia = {
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload.enableOffloadCmd = true;
};
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = false; powerManagement.enable = false;
powerManagement.finegrained = false; powerManagement.finegrained = false;
open = false; open = false;
nvidiaSettings = true; nvidiaSettings = true;
# prime = {
# offload = {
# enable = true;
# enableOffloadCmd = true;
# };
# intelBusId = "PCI:0:2:0";
# nvidiaBusId = "PCI:1:0:0";
# };
package = config.boot.kernelPackages.nvidiaPackages.stable; 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.enable = true;
services.xserver.videoDrivers = ["nvidia"]; 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" 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 # bash ~/dotfiles/scripts/hot-reload.sh
else else