From 555e6ae91e77e35c551361f9ac2d405240a58e5a Mon Sep 17 00:00:00 2001 From: foglar Date: Fri, 15 Nov 2024 20:54:41 +0100 Subject: [PATCH] Multi input settings fix --- flake.nix | 4 +-- nixos/desktop/hyprland/hyprland.nix | 14 ++++----- nixos/desktop/hyprland/packages.nix | 45 ++++++++++++++++------------- nixos/desktop/hyprland/waybar.nix | 8 ++--- nixos/packages/applications.nix | 41 ++++++++++++++------------ 5 files changed, 59 insertions(+), 53 deletions(-) diff --git a/flake.nix b/flake.nix index 568ff00..a9e5699 100644 --- a/flake.nix +++ b/flake.nix @@ -26,8 +26,6 @@ stylix.url = "github:danth/stylix"; - zen-browser.url = "github:MarceColl/zen-browser-flake"; - firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; @@ -59,7 +57,7 @@ in { nixosConfigurations = { laptop = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs system pkgs-stable;}; + specialArgs = {inherit inputs system pkgs pkgs-stable;}; modules = [ ./nixos/configuration.nix diff --git a/nixos/desktop/hyprland/hyprland.nix b/nixos/desktop/hyprland/hyprland.nix index 6af3435..b0e3a04 100644 --- a/nixos/desktop/hyprland/hyprland.nix +++ b/nixos/desktop/hyprland/hyprland.nix @@ -1,7 +1,7 @@ { lib, config, - pkgs-stable, + pkgs, ... }: { options = { @@ -25,7 +25,7 @@ services.dunst.enable = true; home.packages = [ - pkgs-stable.toybox + pkgs.toybox ]; stylix.targets = { @@ -126,18 +126,18 @@ "dunst" "wl-paste --type text --watch cliphist store # clipboard store text data" "wl-paste --type image --watch cliphist store # clipboard store image data" - "$scrPath/batterynotify.sh # battery notification" + #"$scrPath/batterynotify.sh # battery notification" - "$scrPath/resetxdgportal.sh # reset XDPH for screenshare" + #"$scrPath/resetxdgportal.sh # reset XDPH for screenshare" #"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH" #"dbus-update-activation-environment --systemd --all # for XDPH" #"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH" - "$scrPath/polkitkdeauth.sh # authentication dialogue for GUI apps" + #"$scrPath/polkitkdeauth.sh # authentication dialogue for GUI apps" ]; "$mod" = "SUPER"; - "$term" = "kitty"; - "$editor" = "code"; + "$term" = "${pkgs.kitty}/bin/kitty"; + "$editor" = "${pkgs.vscode}/bin/code"; "$file" = "dolphin"; "$browser" = "librewolf"; diff --git a/nixos/desktop/hyprland/packages.nix b/nixos/desktop/hyprland/packages.nix index 0fc59c8..d87eb48 100644 --- a/nixos/desktop/hyprland/packages.nix +++ b/nixos/desktop/hyprland/packages.nix @@ -1,25 +1,28 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - hyprlock - hyprpicker - hypridle +{pkgs, pkgs-stable, ...}: { + home.packages = (with pkgs; [ + hyprlock + hyprpicker + hypridle - #swww - playerctl + dunst + libnotify + swayosd - kitty - kitty-img + #swww + playerctl - pavucontrol - hyprshade - swappy - grimblast - dunst - udiskie - wl-clipboard - cliphist - swayosd + kitty + kitty-img + hyprshade + swappy + grimblast + + udiskie + + wl-clipboard + cliphist + (writeShellScriptBin "dontkillsteam" '' if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then xdotool windowunmap $(xdotool getactivewindow) @@ -66,12 +69,14 @@ (writeShellScriptBin "keyboardswitch" '' hyprctl switchxkblayout all next layMain=$(hyprctl -j devices | jq '.keyboards' | jq '.[] | select (.main == true)' | awk -F '"' '{if ($2=="active_keymap") print $4}') - dunstify -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/keyboard.svg + ${libnotify}/bin/notify-send -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/keyboard.svg '') #(writeShellScriptBin "windowpin") #(writeShellScriptBin "logoutlaunch") #(writeShellScriptBin "sysmonlaunch") #(writeShellScriptBin "rofilaunch" '''') - ]; + ]) ++ (with pkgs-stable; [ + pavucontrol + ]); } diff --git a/nixos/desktop/hyprland/waybar.nix b/nixos/desktop/hyprland/waybar.nix index a01593e..9eb9e12 100644 --- a/nixos/desktop/hyprland/waybar.nix +++ b/nixos/desktop/hyprland/waybar.nix @@ -172,8 +172,8 @@ rotate = 0; format = "{icon} {percent}%"; format-icons = ["" "" "" "" "" "" "" "" ""]; - on-scroll-up = " swayosd-client --brightness raise"; - on-scroll-down = " swayosd-client --brightness lower"; + on-scroll-up = "${pkgs.swayosd}/bin/swayosd-client --brightness raise"; + on-scroll-down = "${pkgs.swayosd}/bin/swayosd-client --brightness lower"; min-length = 6; }; @@ -194,7 +194,7 @@ format = "{icon} {volume}"; rotate = 0; format-muted = "婢"; - on-click = "nvidia-offload pavucontrol -t 3"; + on-click = "pavucontrol -t 3"; on-click-middle = "swayosd-client --output-volume mute-toggle"; on-scroll-up = "swayosd-client --output-volume 5"; on-scroll-down = "swayosd-client --output-volume -5"; @@ -216,7 +216,7 @@ rotate = 0; format-source = ""; format-source-muted = ""; - on-click = "nvidia-offload pavucontrol -t 4"; + on-click = "pavucontrol -t 4"; on-click-middle = "swayosd-client --input-volume mute-toggle"; on-scroll-up = "swayosd-client --input-volume 5"; on-scroll-down = "swayosd-client --input-volume -5"; diff --git a/nixos/packages/applications.nix b/nixos/packages/applications.nix index c33bb99..39d66bb 100644 --- a/nixos/packages/applications.nix +++ b/nixos/packages/applications.nix @@ -1,6 +1,7 @@ { lib, pkgs, + pkgs-stable, config, ... }: { @@ -13,25 +14,27 @@ ]; config = lib.mkIf config.applications.enable { - home.packages = with pkgs; [ - librewolf - vesktop - ferdium + home.packages = + (with pkgs; [ + librewolf + ferdium - simple-scan - loupe - - stellarium - libreoffice - localsend - plasma5Packages.kdeconnect-kde - qbittorrent - vlc - #tor-browser - openrocket - spotify - spotube - inkscape - ]; + stellarium + libreoffice + localsend + plasma5Packages.kdeconnect-kde + qbittorrent + vlc + #tor-browser + openrocket + spotify + spotube + inkscape + ]) + ++ (with pkgs-stable; [ + loupe + simple-scan + vesktop + ]); }; }