diff --git a/configs/hypr/hyprland.conf b/configs/hypr/hyprland.conf index 1740d83..490f40b 100644 --- a/configs/hypr/hyprland.conf +++ b/configs/hypr/hyprland.conf @@ -25,6 +25,7 @@ monitor = $SIDE,1920x1080@60,-1400x-1080,1 # Autostart exec-once = waybar & hyprpaper & dbus-launch kdeconnect-indicator +exec-once = sh -lc 'sleep 5; for _ in $(seq 1 10); do out="$(hyprctl monitors -j | jq -r ''.[] | select(.description == \"LG Electronics LG ULTRAWIDE 512AZWSDD473\") | .name'' | head -n1)"; [ -n "$out" ] && xrandr --output "$out" --primary --auto >/dev/null 2>&1 && exit 0; sleep 2; done' # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf diff --git a/flake.lock b/flake.lock index d6212f9..5e63407 100644 --- a/flake.lock +++ b/flake.lock @@ -89,11 +89,11 @@ ] }, "locked": { - "lastModified": 1775077333, - "narHash": "sha256-OXcxobt7lBkh1B8AjwreU+24myhtKpqeLfAeIyNLFY8=", + "lastModified": 1775425411, + "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=", "owner": "nix-community", "repo": "home-manager", - "rev": "49ca96b2714c5931e17401eff87f3edd42d2b0f2", + "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe", "type": "github" }, "original": { @@ -132,11 +132,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1773851886, - "narHash": "sha256-+3ygZuf5K8mtSGMMEZ/h+vxGvXCu1CmiB+531KMagH8=", + "lastModified": 1776183358, + "narHash": "sha256-uRWaRXGhkyGWMbNgQcmx0+RPzPLenVGopkNHgAEfmBQ=", "owner": "openclaw", "repo": "nix-openclaw", - "rev": "64d410666821866c565e048a4d07d6cf5d8e494e", + "rev": "53aac0dce0810c40c75793fdad3d41b0f7e7baaf", "type": "github" }, "original": { @@ -181,11 +181,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1776169885, - "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=", + "lastModified": 1776548001, + "narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9", + "rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc", "type": "github" }, "original": { @@ -229,11 +229,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1775002709, - "narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=", + "lastModified": 1776434932, + "narHash": "sha256-gyqXNMgk3sh+ogY5svd2eNLJ6oEwzbAeaoBrrxD0lKk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bcd464ccd2a1a7cd09aa2f8d4ffba83b761b1d0e", + "rev": "c7f47036d3df2add644c46d712d14262b7d86c0c", "type": "github" }, "original": { diff --git a/hosts/Nixos/configuration.nix b/hosts/Nixos/configuration.nix index 31f4f44..2fff1d6 100644 --- a/hosts/Nixos/configuration.nix +++ b/hosts/Nixos/configuration.nix @@ -2,46 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, lib, agenix, ... }: - -let - xrandrPrimaryFix = pkgs.writeShellScript "xrandr-primary-fix" '' - set -euo pipefail - - if [ -z "''${DISPLAY:-}" ]; then - exit 0 - fi - - runtime_dir="''${XDG_RUNTIME_DIR:-/tmp}" - lock_path="$runtime_dir/xrandr-primary-fix.$UID.lock" - mkdir -p "$runtime_dir" 2>/dev/null || true - - exec 9>"$lock_path" - if ! ${pkgs.util-linux}/bin/flock -n 9; then - exit 0 - fi - - XRANDR="${pkgs.xorg.xrandr}/bin/xrandr" - AWK="${pkgs.gawk}/bin/awk" - - pick_connected() { - prefix="$1" - "$XRANDR" --query | "$AWK" -v p="$prefix" ' - $2 == "connected" && $1 ~ ("^" p "(-[0-9]+)+$|^" p "[0-9]+$") { print $1; exit } - ' - } - - sleep 15 - - for _ in 1 2 3 4 5; do - dp="$(pick_connected "DP" || true)" - if [ -n "$dp" ]; then - "$XRANDR" --output "$dp" --primary --auto >/dev/null 2>&1 && exit 0 - fi - sleep 2 - done - ''; -in { +{ config, pkgs, lib, agenix, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; @@ -167,7 +128,7 @@ in { gamescope = { enable = true; - # capSysNice = true; + capSysNice = true; }; virt-manager.enable = true; @@ -214,7 +175,7 @@ in { nano.enable = false; steam = { enable = true; - # gamescopeSession.enable = true; + gamescopeSession.enable = true; }; starship.enable = true; java.enable = true; @@ -473,6 +434,7 @@ in { # sound.enable = true; services.pulseaudio.enable = false; hardware.bluetooth.enable = true; + hardware.uinput.enable = true; security.rtkit.enable = true; environment.sessionVariables = { }; @@ -575,16 +537,6 @@ in { nixpkgs.config.allowUnfree = true; - systemd.user.services.xrandr-primary-fix = { - description = "Fix primary display via xrandr after login"; - wantedBy = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - Type = "oneshot"; - ExecStart = xrandrPrimaryFix; - }; - }; - # nixpkgs.config.cudaSupport = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -597,6 +549,7 @@ in { hyfetch cacert fragments + antimicrox kitty lutris protonup-qt