try out hyprland again on pc

This commit is contained in:
Kopatz
2024-07-12 17:40:29 +02:00
parent 0ff294f033
commit 0e5969324c
9 changed files with 28 additions and 26 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.idea .idea
*.qcow2 *.qcow2
result result
ignored*

View File

@@ -1,14 +1,13 @@
{ config, osConfig, pkgs, inputs, lib, ... }: { config, osConfig, pkgs, inputs, lib, ... }:
with lib;
let cfg = osConfig.custom.graphical.hyprland; let cfg = osConfig.custom.graphical.hyprland;
in { in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.swaylock.enable = true; #programs.swaylock.enable = true;
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
#enableNvidiaPatches = true; #enableNvidiaPatches = true;
xwayland.enable = true; xwayland.enable = true;
package = pkgs.unstable.hyprland; package = pkgs.hyprland;
settings = { settings = {
# #
# Please note not all available settings / options are set here. # Please note not all available settings / options are set here.
@@ -26,12 +25,13 @@ in {
"eDP-1,1920x1080@60,0x0,1" "eDP-1,1920x1080@60,0x0,1"
#"DP-3,1920x1080@60,1920x0,1" #"DP-3,1920x1080@60,1920x0,1"
#",preferred,auto,1,mirror,eDP-1" #",preferred,auto,1,mirror,eDP-1"
",preferred,auto,auto" ",preferred,auto,auto"
] else [ ] else
# Default [
",preferred,auto,auto" # Default
]; ",preferred,auto,auto"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch # Execute your favorite apps at launch
@@ -56,7 +56,7 @@ in {
touchpad = { natural_scroll = true; }; touchpad = { natural_scroll = true; };
sensitivity = 0; # -1.0 - 1.0, 0 means no modification. sensitivity = if osConfig.networking.hostName == "kop-pc" then -0.1 else 0; # -1.0 - 1.0, 0 means no modification.
}; };
general = { general = {
@@ -72,9 +72,7 @@ in {
#allow_tearing = true; #allow_tearing = true;
}; };
misc = { misc = { vfr = true; };
vfr = true;
};
decoration = { decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
@@ -152,7 +150,7 @@ in {
swww = "${pkgs.swww}/bin/swww"; swww = "${pkgs.swww}/bin/swww";
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep"; pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
swaylock = "${pkgs.swaylock}/bin/swaylock"; #swaylock = "${pkgs.swaylock}/bin/swaylock";
hyprlock = "${pkgs.hyprlock}/bin/hyprlock"; hyprlock = "${pkgs.hyprlock}/bin/hyprlock";
playerctl = "${pkgs.playerctl}/bin/playerctl"; playerctl = "${pkgs.playerctl}/bin/playerctl";
in [ in [
@@ -169,8 +167,10 @@ in {
$mainMod, S, exec, cat ~/songs | shuf -n 1 | sed "s/^/b.p /g" | ${wl-copy}'' $mainMod, S, exec, cat ~/songs | shuf -n 1 | sed "s/^/b.p /g" | ${wl-copy}''
"$mainMod, R, exec, ${swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)" "$mainMod, R, exec, ${swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)"
" , Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}" " , Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}"
"$mainMod, Print, exec, ${grim} -g \"$(${slurp} -d)\" /tmp/$(date +'%s_grim.png')" ''
"Shift_L, Print, exec, ${grim} -g \"$(${slurp} -d)\" ~/Pictures/$(date +'%s_grim.png')" $mainMod, Print, exec, ${grim} -g "$(${slurp} -d)" /tmp/$(date +'%s_grim.png')''
''
Shift_L, Print, exec, ${grim} -g "$(${slurp} -d)" ~/Pictures/$(date +'%s_grim.png')''
"$mainMod, SPACE, exec, ${rofi} -show combi" "$mainMod, SPACE, exec, ${rofi} -show combi"
" , XF86MonBrightnessUp, exec, ${brightnessctl} s +5%" " , XF86MonBrightnessUp, exec, ${brightnessctl} s +5%"
" , XF86MonBrightnessDown, exec, ${brightnessctl} s 5%-" " , XF86MonBrightnessDown, exec, ${brightnessctl} s 5%-"
@@ -250,6 +250,7 @@ in {
"${pkgs.swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)" "${pkgs.swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)"
"${pkgs.networkmanagerapplet}/bin/nm-applet --indicator &" "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator &"
"${pkgs.waybar}/bin/waybar &" "${pkgs.waybar}/bin/waybar &"
"hypridle &"
#"${pkgs.dunst}/bin/dunst &" #"${pkgs.dunst}/bin/dunst &"
]; ];
}; };

View File

@@ -1,5 +1,4 @@
{ config, osConfig, pkgs, inputs, lib, ... }: { config, osConfig, pkgs, inputs, lib, ... }:
with lib;
let cfg = osConfig.custom.graphical.hyprland; let cfg = osConfig.custom.graphical.hyprland;
in { in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@@ -57,6 +56,9 @@ in {
shadow_passes = 2; shadow_passes = 2;
}]; }];
}; };
# don't autostart
systemd.user.services.hypridle.Service.ExecStart = lib.mkForce "true";
services.hypridle.enable = true; services.hypridle.enable = true;
services.hypridle.settings = { services.hypridle.settings = {
general = { general = {

View File

@@ -118,7 +118,7 @@ in {
"hyprland/workspaces" = { "hyprland/workspaces" = {
"disable-scroll" = true; "disable-scroll" = true;
"all-outputs" = true; "all-outputs" = false;
"active-only" = false; "active-only" = false;
"on-click" = "activate"; "on-click" = "activate";
"format" = "{icon} {windows}"; "format" = "{icon} {windows}";

View File

@@ -19,7 +19,6 @@ in {
systemd.services."autovt@tty1".enable = false; systemd.services."autovt@tty1".enable = false;
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.gnome.excludePackages = (with pkgs; [ environment.gnome.excludePackages = (with pkgs; [

View File

@@ -23,7 +23,7 @@ in {
WLR_NO_HARDWARE_CURSORS = "1"; WLR_NO_HARDWARE_CURSORS = "1";
#WLR_DRM_NO_ATOMIC="1"; #WLR_DRM_NO_ATOMIC="1";
#WLR_DRM_DEVICES = "/dev/dri/card0"; #WLR_DRM_DEVICES = "/dev/dri/card0";
WLR_RENDERER_ALLOW_SOFTWARE = "1"; #WLR_RENDERER_ALLOW_SOFTWARE = "1";
} // lib.mkIf config.custom.hardware.nvidia.enable { } // lib.mkIf config.custom.hardware.nvidia.enable {
LIBVA_DRIVER_NAME = "nvidia"; LIBVA_DRIVER_NAME = "nvidia";
# black screen :( # black screen :(
@@ -36,9 +36,6 @@ in {
hardware = { hardware = {
# Opengl # Opengl
opengl.enable = true; opengl.enable = true;
# Most wayland compositors need this
nvidia.modesetting.enable =
lib.mkIf config.custom.hardware.nvidia.enable true;
}; };
xdg.portal.enable = true; xdg.portal.enable = true;

View File

@@ -63,6 +63,7 @@ in {
keepassxc keepassxc
xfce.thunar # file manager xfce.thunar # file manager
discord discord
vesktop
gvfs gvfs
remmina remmina
thunderbird thunderbird

View File

@@ -12,7 +12,7 @@ in {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
}; };
boot.kernelParams = [ "nvidia-drm.fbdev=1" ];
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = { hardware.nvidia = {
# Modesetting is required. # Modesetting is required.

View File

@@ -64,7 +64,7 @@
nightlight.enable = true; nightlight.enable = true;
#plasma.enable = true; #plasma.enable = true;
i3.enable = true; i3.enable = true;
#hyprland.enable = true; hyprland.enable = true;
#gnome.enable = true; #gnome.enable = true;
#cosmic.enable = true; #cosmic.enable = true;
shared.enable = true; shared.enable = true;
@@ -72,7 +72,8 @@
}; };
}; };
nixpkgs.config.permittedInsecurePackages = [ "electron-28.3.3" "electron-27.3.11" ]; nixpkgs.config.permittedInsecurePackages =
[ "electron-28.3.3" "electron-27.3.11" ];
mainUser.layout = "de"; mainUser.layout = "de";
mainUser.variant = "us"; mainUser.variant = "us";