diff --git a/hosts/stellaris/default.nix b/hosts/stellaris/default.nix index 9fcfd14..29ae73b 100644 --- a/hosts/stellaris/default.nix +++ b/hosts/stellaris/default.nix @@ -66,9 +66,14 @@ services.network-manager-applet.enable = true; services.blueman-applet.enable = true; wayland.windowManager.hyprland.settings = { + env = [ + "LIBVA_DRIVER_NAME,nvidia" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + ]; + monitor = [ "eDP-1, 2560x1600@240, 0x0, 1.6" - "desc:Microstep MPG321UX OLED 0x01010101, 3840x2160@239.99001, auto-right, 1.6" + "desc:Microstep MPG321UX OLED 0x01010101, @239.99001, auto-right, 1.6" ", preferred, auto, 1" ]; diff --git a/hosts/stellaris/hardware-configuration.nix b/hosts/stellaris/hardware-configuration.nix index 063d643..6acd67d 100644 --- a/hosts/stellaris/hardware-configuration.nix +++ b/hosts/stellaris/hardware-configuration.nix @@ -20,14 +20,7 @@ "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ - "kvm-amd" - "amdgpu" - "nvidia" - "nvidia_drm" - "nvidia_uvm" - ]; - boot.kernelParams = [ "nvidia-drm.modeset=1" ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; boot.loader.systemd-boot.enable = true; @@ -83,20 +76,18 @@ "nvidia" ]; - hardware.graphics = { - enable = true; - enable32Bit = true; - }; - hardware.nvidia = { modesetting.enable = true; powerManagement.enable = false; - powerManagement.finegrained = false; + powerManagement.finegrained = true; open = true; nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.stable; prime = { - sync.enable = true; + offload = { + enable = true; + enableOffloadCmd = true; + }; # nix run github:eclairevoyant/pcids amdgpuBusId = "PCI:7:0:0"; nvidiaBusId = "PCI:1:0:0"; diff --git a/modules/desktop/wm.nix b/modules/desktop/wm.nix index fde3809..4234cae 100644 --- a/modules/desktop/wm.nix +++ b/modules/desktop/wm.nix @@ -127,7 +127,7 @@ in "$mod, semicolon, splitratio, +0.1" "$mod, F, fullscreen, 0" - "$mod, X, exec, hyprlock" + "$mod, X, exec, swaylock" # Move focus "$mod, H, movefocus, l" @@ -402,85 +402,52 @@ in ]; }; - programs.hyprlock = { + programs.swaylock = { enable = true; + + package = pkgs.swaylock-effects; + settings = { - general = { - hide_cursor = true; - ignore_empty_input = true; - }; - - background = [ - { - monitor = ""; - path = "screenshot"; - blur_passes = 3; - blur_size = 8; - } - ]; - - input-field = [ - { - monitor = ""; - size = "320, 58"; - position = "0, -80"; - halign = "center"; - valign = "center"; - dots_center = true; - fade_on_empty = false; - outline_thickness = 3; - inner_color = "rgb(50, 48, 47)"; - outer_color = "rgb(231, 138, 78)"; - font_color = "rgb(212, 190, 152)"; - placeholder_text = "Password..."; - } - ]; - - label = [ - { - monitor = ""; - text = "$TIME"; - color = "rgb(212, 190, 152)"; - font_size = 42; - font_family = "MesloLGS Nerd Font Propo"; - position = "0, 160"; - halign = "center"; - valign = "center"; - } - { - monitor = ""; - text = "cmd[update:1000] date +%d/%m/%Y"; - color = "rgb(212, 190, 152)"; - font_size = 18; - font_family = "MesloLGS Nerd Font Propo"; - position = "0, 120"; - halign = "center"; - valign = "center"; - } - ]; - }; - }; - - services.hypridle = { - enable = true; - settings = { - general = { - lock_cmd = "pidof hyprlock || hyprlock"; - before_sleep_cmd = "loginctl lock-session"; - after_sleep_cmd = "hyprctl dispatch dpms on"; - }; - - listener = [ - { - timeout = 300; - on-timeout = "loginctl lock-session"; - } - { - timeout = 330; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; + ignore-empty-password = true; + daemonize = true; + # fade-in = 0.5; + indicator = true; + clock = true; + datestr = "%d/%m/%Y"; + screenshots = true; + hide-keyboard-layout = true; + indicator-caps-lock = true; + bs-hl-color = "7daea3cc"; + caps-lock-bs-hl-color = "7daea3cc"; + caps-lock-key-hl-color = "d3869bcc"; + font = "MesloLGS Nerd Font Propo"; + font-size = "35"; + indicator-idle-visible = true; + indicator-radius = 100; + indicator-thickness = 7; + inside-color = "32302f66"; + inside-clear-color = "89b48266"; + inside-caps-lock-color = "e78a4e66"; + inside-ver-color = "7daea366"; + inside-wrong-color = "ea696266"; + key-hl-color = "a9b665cc"; + layout-bg-color = "32302f00"; + layout-text-color = "d4be98"; + line-color = "00000000"; + ring-color = "e78a4ecc"; + ring-clear-color = "89b482cc"; + ring-caps-lock-color = "e78a4ecc"; + ring-ver-color = "7daea3cc"; + ring-wrong-color = "ea6962cc"; + separator-color = "00000000"; + text-color = "d4be98"; + text-clear-color = "d4be98"; + text-caps-lock-color = "d4be98"; + text-ver-color = "d4be98"; + text-wrong-color = "d4be98"; + effect-blur = "9x9"; + effect-greyscale = true; + # effect-vignette = "0.5:0.5"; }; }; }; @@ -499,7 +466,7 @@ in hardware.graphics.enable = true; - security.pam.services.hyprlock = { }; + security.pam.services.swaylock = { }; }; }