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
*.qcow2
result
ignored*

View File

@@ -1,14 +1,13 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
with lib;
let cfg = osConfig.custom.graphical.hyprland;
in {
config = lib.mkIf cfg.enable {
programs.swaylock.enable = true;
#programs.swaylock.enable = true;
wayland.windowManager.hyprland = {
enable = true;
#enableNvidiaPatches = true;
xwayland.enable = true;
package = pkgs.unstable.hyprland;
package = pkgs.hyprland;
settings = {
#
# Please note not all available settings / options are set here.
@@ -26,12 +25,13 @@ in {
"eDP-1,1920x1080@60,0x0,1"
#"DP-3,1920x1080@60,1920x0,1"
#",preferred,auto,1,mirror,eDP-1"
",preferred,auto,auto"
] else [
# Default
",preferred,auto,auto"
];
",preferred,auto,auto"
] else
[
# Default
",preferred,auto,auto"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
@@ -56,7 +56,7 @@ in {
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 = {
@@ -72,9 +72,7 @@ in {
#allow_tearing = true;
};
misc = {
vfr = true;
};
misc = { vfr = true; };
decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
@@ -152,7 +150,7 @@ in {
swww = "${pkgs.swww}/bin/swww";
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
swaylock = "${pkgs.swaylock}/bin/swaylock";
#swaylock = "${pkgs.swaylock}/bin/swaylock";
hyprlock = "${pkgs.hyprlock}/bin/hyprlock";
playerctl = "${pkgs.playerctl}/bin/playerctl";
in [
@@ -169,8 +167,10 @@ in {
$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)"
" , 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"
" , XF86MonBrightnessUp, 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.networkmanagerapplet}/bin/nm-applet --indicator &"
"${pkgs.waybar}/bin/waybar &"
"hypridle &"
#"${pkgs.dunst}/bin/dunst &"
];
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -64,7 +64,7 @@
nightlight.enable = true;
#plasma.enable = true;
i3.enable = true;
#hyprland.enable = true;
hyprland.enable = true;
#gnome.enable = true;
#cosmic.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.variant = "us";