From 70757c4b1eb0edef16f4df2bf5f02837358b059d Mon Sep 17 00:00:00 2001 From: caem Date: Tue, 25 Jun 2024 01:28:34 +0200 Subject: [PATCH] Add packages and media keys to hyprland --- README.md | 2 +- machines/workstation/configuration.nix | 7 ------- packages/sets/basic.nix | 1 + packages/sets/communication.nix | 1 - packages/sets/multimedia.nix | 29 ++++++++++++++++++++++++++ packages/wm/hyprland.nix | 6 ++---- users/hu/packages/hyprland.nix | 7 +++++++ users/hu/user.nix | 1 + 8 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 packages/sets/multimedia.nix diff --git a/README.md b/README.md index 780a64f..2e56bb2 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,6 @@ Finally, in the config directory run `nixos-install --flake '.#'`, reboot and yo ### Non-NixOS Run the `non-nixos-install.sh` script. It will install both home-manager and nix. -Your user is assumed to be called "blank". You need to replace every instance of it +Your user is assumed to be called "i". You need to replace every instance of it in case you want to use a different username. diff --git a/machines/workstation/configuration.nix b/machines/workstation/configuration.nix index 2b1dbdf..ccabf58 100644 --- a/machines/workstation/configuration.nix +++ b/machines/workstation/configuration.nix @@ -71,13 +71,6 @@ jack.enable = true; }; - # Todo: Reorganize these - environment.systemPackages = with pkgs; [ - neovim - mpv - imagemagick - ]; - nix = { extraOptions = '' experimental-features = nix-command flakes diff --git a/packages/sets/basic.nix b/packages/sets/basic.nix index 5f99878..e892aa4 100644 --- a/packages/sets/basic.nix +++ b/packages/sets/basic.nix @@ -12,5 +12,6 @@ git tree dos2unix + neovim ]; } diff --git a/packages/sets/communication.nix b/packages/sets/communication.nix index 9f9d11c..a21b239 100644 --- a/packages/sets/communication.nix +++ b/packages/sets/communication.nix @@ -5,7 +5,6 @@ tutanota-desktop signal-desktop element-desktop - vesktop ]; } diff --git a/packages/sets/multimedia.nix b/packages/sets/multimedia.nix new file mode 100644 index 0000000..88960a3 --- /dev/null +++ b/packages/sets/multimedia.nix @@ -0,0 +1,29 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + vimiv-qt + mpv + imagemagick + ffmpeg-full + yt-dlp + (pkgs.symlinkJoin { + name = "flowblade"; + paths = [ pkgs.flowblade ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + rm "$out/bin/flowblade" + echo "#!/bin/sh" > "$out/bin/flowblade" + echo "SDL12COMPAT_NO_QUIT_VIDEO=1 \ + GDK_BACKEND=x11 \ + SDL_VIDEODRIVER=x11 \ + ${pkgs.flowblade}/bin/flowblade" >> "$out/bin/flowblade" + chmod 555 "$out/bin/flowblade" + ''; + }) + gimp + inkscape + krita + ]; +} + diff --git a/packages/wm/hyprland.nix b/packages/wm/hyprland.nix index e6085a2..2ad9a3f 100644 --- a/packages/wm/hyprland.nix +++ b/packages/wm/hyprland.nix @@ -10,12 +10,10 @@ rofi-wayland foot wl-clipboard - pcmanfm # TODO: Replace with dolphin and figure out why stylix doesn't theme it. + gnome.nautilus + pavucontrol ]; - # TODO: Use KDE portal features for file pickers and popups - # TODO: Add missing utilities for taking screenshots, recording, etc... - environment.sessionVariables = { LIBVA_DRIVER_NAME = "nvidia"; XDG_SESSION_TYPE = "wayland"; diff --git a/users/hu/packages/hyprland.nix b/users/hu/packages/hyprland.nix index 7b45ef9..de060a8 100644 --- a/users/hu/packages/hyprland.nix +++ b/users/hu/packages/hyprland.nix @@ -65,6 +65,13 @@ bind = [ "$mod, P, exec, $menu" "$mod, RETURN, exec, $terminal" + ", Scroll_Lock, exec, pavucontrol" + "$mod, f, exec, nautilus" + + ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", Pause, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" "$mod SHIFT, C, killactive" "$mod, SPACE, togglefloating" diff --git a/users/hu/user.nix b/users/hu/user.nix index 93ba187..9d0375c 100644 --- a/users/hu/user.nix +++ b/users/hu/user.nix @@ -4,6 +4,7 @@ imports = [ ../../packages/sets/communication.nix ../../packages/sets/games.nix + ../../packages/sets/multimedia.nix ./persist.nix ./packages/nh.nix ./packages/zsh/zsh.nix