feat: use overlays for swayosd

This commit is contained in:
matt1432 2023-06-19 19:27:38 -04:00
parent e12135c3e8
commit 0e125b262f
5 changed files with 54 additions and 63 deletions

View file

@ -25,20 +25,39 @@
}); });
}; };
home.packages = with pkgs; [ home.packages = with pkgs;
(with xorg; [
xhost # for gparted
xcursorthemes
]) ++
(with python311Packages; [
pyclip
]) ++
(with plasma5Packages; [
qtstyleplugin-kvantum
breeze-icons
dolphin # install plugins
kio-admin # dbus issues
]) ++
(with gnome; [
gnome-calculator
seahorse
adwaita-icon-theme
]) ++
[
swayosd
httrack httrack
lisgd lisgd
zeal zeal
acpi acpi
xorg.xhost # for gparted?
libsForQt5.dolphin # get plugins
libsForQt5.kio-admin # doesn't work
libreoffice-fresh # TODO: add spelling stuff libreoffice-fresh # TODO: add spelling stuff
neofetch neofetch
photoqt photoqt
progress progress
python311Packages.pyclip
python311Packages.pyclip
tlp tlp
wl-color-picker # add bind for this in hyprland wl-color-picker # add bind for this in hyprland
xclip xclip
@ -55,9 +74,6 @@
spicetify-cli # TODO spicetify-cli # TODO
vlc vlc
discord discord
spotify
libsForQt5.qtstyleplugin-kvantum
libsForQt5.breeze-icons
alacritty alacritty
brightnessctl brightnessctl
pulseaudio pulseaudio
@ -66,7 +82,6 @@
firefox firefox
tree tree
mlocate mlocate
gcc
mosh mosh
rsync rsync
tmux tmux
@ -80,15 +95,11 @@
hyprpaper hyprpaper
python3 python3
rofi-wayland rofi-wayland
wev
networkmanagerapplet networkmanagerapplet
nextcloud-client nextcloud-client
tutanota-desktop tutanota-desktop
galaxy-buds-client galaxy-buds-client
gnome.gnome-calculator
swaynotificationcenter swaynotificationcenter
#swayosd
(with import <nixpkgs> {}; callPackage ../pkgs/swayosd.nix {})
swayidle swayidle
wl-clipboard wl-clipboard
cliphist cliphist
@ -99,13 +110,10 @@
grim grim
slurp slurp
swappy swappy
gnome.seahorse
neovim neovim
fontfor fontfor
qt5ct qt5ct
lxappearance lxappearance
gnome3.adwaita-icon-theme
xorg.xcursorthemes
imagemagick imagemagick
usbutils usbutils
catppuccin-plymouth catppuccin-plymouth

View file

@ -4,10 +4,11 @@
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./cfg/home-manager.nix
./cfg/boot.nix ./cfg/boot.nix
./cfg/security.nix ./cfg/security.nix
./cfg/extra-hardware.nix ./cfg/extra-hardware.nix
./overlays/list.nix
./cfg/home-manager.nix
]; ];
services.xserver = { services.xserver = {
@ -44,6 +45,8 @@
lxd.enable = true; lxd.enable = true;
}; };
services.dbus.enable = true;
xdg.portal.enable = true; xdg.portal.enable = true;
xdg.portal.extraPortals = [ xdg.portal.extraPortals = [
pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-hyprland
@ -69,15 +72,12 @@
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xorg.xhost
wl-clipboard wl-clipboard
brightnessctl
pulseaudio pulseaudio
alsa-utils alsa-utils
wget wget
tree tree
mlocate mlocate
gcc
rsync rsync
tmux tmux
git git
@ -89,8 +89,6 @@
ripgrep ripgrep
python3 python3
neovim neovim
gnome3.adwaita-icon-theme
xorg.xcursorthemes
imagemagick imagemagick
usbutils usbutils
catppuccin-plymouth catppuccin-plymouth

7
nixos/overlays/list.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
(import ./swayosd.nix)
];
}

View file

@ -0,0 +1,18 @@
final: prev: {
swayosd = prev.swayosd.overrideAttrs (oldAttrs: rec {
src = prev.fetchFromGitHub {
owner = "ErikReider";
repo = "SwayOSD";
rev = "c573f5ce94e2017d37b3dd3c2c1363bb1c6f82a3";
hash = "sha256-cPom4dU+64TdCIi9D+GZN+EJltgXWy8fezEL1r9kUDo=";
};
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (prev.lib.const {
name = "swayosd-vendor.tar.gz";
inherit src;
outputHash = "sha256-rSz7edA/G446eJGy5qYx9xOpMhsTpA9H43b45bLArHU=";
});
});
}

View file

@ -1,40 +0,0 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, wrapGAppsHook
, gtk-layer-shell
, libpulseaudio
}:
rustPlatform.buildRustPackage {
pname = "swayosd";
version = "unstable-2023-05-09";
src = fetchFromGitHub {
owner = "ErikReider";
repo = "SwayOSD";
rev = "c573f5ce94e2017d37b3dd3c2c1363bb1c6f82a3";
hash = "sha256-cPom4dU+64TdCIi9D+GZN+EJltgXWy8fezEL1r9kUDo=";
};
cargoHash = "sha256-fkPpkXvq2ms6+Vt12cnsjKkbJdN2JgVrRxGRH9qaGD8=";
nativeBuildInputs = [
wrapGAppsHook
pkg-config
];
buildInputs = [
gtk-layer-shell
libpulseaudio
];
meta = with lib; {
description = "A GTK based on screen display for keyboard shortcuts";
homepage = "https://github.com/ErikReider/SwayOSD";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ aleksana ];
platforms = platforms.linux;
};
}