Factor out general desktop packages

This commit is contained in:
Nathan McCarty 2023-06-20 02:26:30 -04:00
parent f078caccaa
commit f8733d3498
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
4 changed files with 58 additions and 43 deletions

View File

@ -7,12 +7,12 @@ let
in lib.mkMerge [ in lib.mkMerge [
(lib.mkIf hyprland { (lib.mkIf hyprland {
wayland.windowManager.hyprland.extraConfig = '' wayland.windowManager.hyprland.extraConfig = ''
bind = $mainMod, R, exec, ${fuzzel-command} --prompt=' ' bind = SUPER, R, exec, ${fuzzel-command} --prompt=' '
# Clipboard history management # Clipboard history management
exec-once=wl-paste --watch cliphist store exec-once=wl-paste --watch cliphist store
bind = $mainMod, X, exec, cliphist list | ${fuzzel-command} --prompt=' ' --dmenu | cliphist decode | wl-copy bind = SUPER, X, exec, cliphist list | ${fuzzel-command} --prompt=' ' --dmenu | cliphist decode | wl-copy
# Shortcut dispatcher # Shortcut dispatcher
bind = $mainMod, W, exec, ${shortcuts}/bin/shortcuts ~/.config/shortcuts/shortcuts.toml bind = SUPER, W, exec, ${shortcuts}/bin/shortcuts ~/.config/shortcuts/shortcuts.toml
''; '';
}) })
# General configuration # General configuration

View File

@ -0,0 +1,53 @@
{ config, lib, pkgs, inputs, ... }:
let
fuzzel-command = config.nathan.config.desktop.fuzzel-command;
hyprland = config.nathan.programs.hyprland.enable;
targets = config.nathan.config.desktop.targets;
shortcuts = inputs.self.packages.${pkgs.system}.shortcuts;
in lib.mkMerge [
# General configuration
(lib.mkIf hyprland {
home.packages = with pkgs; [
# General
killall
# Display management
wdisplays
# glib for sound stuff
glib
# For private browsing
tor-browser-bundle-bin
# For non-emacs pdf reading
evince
# Productivity
libreoffice-fresh
font-awesome
# for image viewing
inputs.self.packages.${pkgs.system}.swayimg
# For fancy x11 scaling
sommelier
];
# Bluetooth applet
services.blueman-applet.enable = true;
#########################
## EasyEffects
#########################
services.easyeffects.enable = true;
#########################
## Default applications
#########################
xdg.mimeApps.defaultApplications = {
# Make all supported images open in swayimg
"image/jpeg" = [ "swayimg.desktop" ];
"image/png" = [ "swayimg.desktop" ];
"image/gif" = [ "swayimg.desktop" ];
"image/svg+xml" = [ "swayimg.desktop" ];
"image/webp" = [ "swayimg.desktop" ];
"image/avif" = [ "swayimg.desktop" ];
"image/tiff" = [ "swayimg.desktop" ];
"image/bmp" = [ "swayimg.desktop" ];
"application/pdf" = [ "org.gnome.Evince.desktop" ];
"text/html" = [ "firefox.desktop" ];
};
})
]

View File

@ -11,7 +11,7 @@ in lib.mkMerge [
(lib.mkIf hyprland { (lib.mkIf hyprland {
wayland.windowManager.hyprland.extraConfig = '' wayland.windowManager.hyprland.extraConfig = ''
# Notif bind # Notif bind
bind = $mainMod, T, exec, swaync-client -t -sw bind = SUPER, T, exec, swaync-client -t -sw
''; '';
}) })
# General configuration # General configuration

View File

@ -6,33 +6,17 @@ in with lib; {
./desktop/locking.nix ./desktop/locking.nix
./desktop/fuzzel.nix ./desktop/fuzzel.nix
./desktop/notifs.nix ./desktop/notifs.nix
./desktop/general.nix
]; ];
config = mkIf nathan.programs.hyprland.enable ({ config = mkIf nathan.programs.hyprland.enable ({
home.packages = with pkgs; [ home.packages = with pkgs; [
# General
killall
# Display management
wdisplays
# glib for sound stuff
glib
# Screenshots # Screenshots
(inputs.hyprland-contrib.packages.${pkgs.system}.grimblast.override { (inputs.hyprland-contrib.packages.${pkgs.system}.grimblast.override {
hyprland = config.wayland.windowManager.hyprland.package; hyprland = config.wayland.windowManager.hyprland.package;
}) })
# for image viewing
inputs.self.packages.${pkgs.system}.swayimg
# For private browsing
tor-browser-bundle-bin
# For non-emacs pdf reading
evince
# Productivity
libreoffice-fresh
## Hyprland addons ## Hyprland addons
font-awesome
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hyprpaper inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hyprpaper
inputs.self.packages.${pkgs.system}.pyprland inputs.self.packages.${pkgs.system}.pyprland
# For fancy x11 scaling
sommelier
# Auto workspace renaming # Auto workspace renaming
inputs.self.packages.${pkgs.system}.hyprland-autoname-workspaces inputs.self.packages.${pkgs.system}.hyprland-autoname-workspaces
]; ];
@ -289,28 +273,6 @@ in with lib; {
''; '';
onChange = "systemctl --user restart pypr"; onChange = "systemctl --user restart pypr";
}; };
# Bluetooth applet
services.blueman-applet.enable = true;
#########################
## EasyEffects
#########################
services.easyeffects.enable = true;
#########################
## Default applications
#########################
xdg.mimeApps.defaultApplications = {
# Make all supported images open in swayimg
"image/jpeg" = [ "swayimg.desktop" ];
"image/png" = [ "swayimg.desktop" ];
"image/gif" = [ "swayimg.desktop" ];
"image/svg+xml" = [ "swayimg.desktop" ];
"image/webp" = [ "swayimg.desktop" ];
"image/avif" = [ "swayimg.desktop" ];
"image/tiff" = [ "swayimg.desktop" ];
"image/bmp" = [ "swayimg.desktop" ];
"application/pdf" = [ "org.gnome.Evince.desktop" ];
"text/html" = [ "firefox.desktop" ];
};
}); });
} }