From c63e81fc778068242b6675ad76c3e5903abd3657 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Tue, 5 Sep 2023 21:07:58 -0400 Subject: [PATCH] make better --- home-config/home-configuration.scm | 11 ++-- home-config/nix-home-manager/home.nix | 2 + modules/home-config/base-system.scm | 2 + modules/home-packages/audio.scm | 79 +++++++++++++++++++++++++++ modules/home-packages/easyeffects.scm | 56 ------------------- modules/home-packages/mozillia.scm | 65 ++++++++++++++++++++++ 6 files changed, 154 insertions(+), 61 deletions(-) create mode 100644 modules/home-packages/audio.scm delete mode 100644 modules/home-packages/easyeffects.scm create mode 100644 modules/home-packages/mozillia.scm diff --git a/home-config/home-configuration.scm b/home-config/home-configuration.scm index 707c8df..54db4d1 100644 --- a/home-config/home-configuration.scm +++ b/home-config/home-configuration.scm @@ -17,7 +17,8 @@ (gnu home services gnupg) (gnu home services) (home-services pipewire) - (home-packages easyeffects)) + (home-packages mozillia) + (home-packages audio)) (define my-neovim (package @@ -56,7 +57,6 @@ "mpv" "git" "pinentry" - "firefox" "ungoogled-chromium" "element-desktop" "nm-tray" @@ -65,18 +65,19 @@ "brightnessctl" "neofetch" "python" - "openjdk" - "maven" "make" "tree" + "rlwrap" + "netcat" "rust-libc" "rust-gcc" "ripgrep" "fd" + "node" "tree-sitter-cli" "python-pynvim")) - (list my-neovim easyeffects))) + (list my-neovim easyeffects firefox-wayland-new))) ;; Below is the list of Home services. To search for available ;; services, run 'guix home search KEYWORD' in a terminal. diff --git a/home-config/nix-home-manager/home.nix b/home-config/nix-home-manager/home.nix index 1964f1c..3aff1c6 100644 --- a/home-config/nix-home-manager/home.nix +++ b/home-config/nix-home-manager/home.nix @@ -23,6 +23,8 @@ rustup glibc gcc + jdk + maven ]; # Let Home Manager install and manage itself. diff --git a/modules/home-config/base-system.scm b/modules/home-config/base-system.scm index 0276bfd..452ba55 100644 --- a/modules/home-config/base-system.scm +++ b/modules/home-config/base-system.scm @@ -92,6 +92,8 @@ "linux-pam" "pulseaudio" ;;"pipewire" + "libx11" + "xorg-server-xwayland" "fprintd" "wireplumber" "virt-manager" diff --git a/modules/home-packages/audio.scm b/modules/home-packages/audio.scm new file mode 100644 index 0000000..10f2f4d --- /dev/null +++ b/modules/home-packages/audio.scm @@ -0,0 +1,79 @@ +(define-module (home-packages audio) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix build-system meson) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (gnu packages) + #:use-module (gnu packages glib) + #:use-module (gnu packages audio) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages gtk) + #:use-module (gnu packages xiph) + #:use-module (gnu packages tbb) + #:use-module (gnu packages gettext) + #:use-module (gnu packages gnome) + #:use-module (gnu packages pretty-print) + #:use-module (gnu packages algebra) + #:use-module (gnu packages cpp) + #:use-module (gnu packages linux) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages cmake) + #:use-module (gnu packages maths) + #:use-module (gnu packages pkg-config)) + +(define-public easyeffects + (package + (name "easyeffects") + (version "7.0.1") + (arguments + (list + #:modules + '((guix build utils) + (guix build meson-build-system)) + #:imported-modules + (append %meson-build-system-modules) + #:tests? #f)) + (native-inputs (list gettext-minimal + itstool + desktop-file-utils + `(,glib "bin") + `(,gtk+ "bin") + pkg-config + cmake + appstream-glib + gtk)) + (inputs (list zita-convolver + rnnoise + tbb + fftwf + lilv + fmt + rubberband + speexdsp + nlohmann-json + pipewire + libadwaita + libsigc++ + libbs2b + libsndfile + libsamplerate + libebur128 + libportal + gsl + speex + `(,util-linux "lib"))) + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/wwmm/easyeffects/archive/refs/tags/v" version + ".tar.gz")) + (sha256 + (base32 + "05j52fy51zjai7n0j23chydfgkfq9n82h2ih806z3b47zhk2h2j2")))) + (build-system meson-build-system) + (synopsis "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications") + (description "This package provides @code{easyeffects}, which is an audio application for use atop of @code{pipewire} + that allows effects that modify sound sources and sinks." + (home-page "https://github.com/wwmm/easyeffects") + (license license:gpl3+))) diff --git a/modules/home-packages/easyeffects.scm b/modules/home-packages/easyeffects.scm deleted file mode 100644 index a675168..0000000 --- a/modules/home-packages/easyeffects.scm +++ /dev/null @@ -1,56 +0,0 @@ -(define-module (home-packages easyeffects) - #:use-module (guix download) - #:use-module (guix packages) - #:use-module (guix gexp) - #:use-module (gnu packages) - #:use-module (gnu packages gettext) - #:use-module (gnu packages glib) - #:use-module (gnu packages gtk) - #:use-module (gnu packages pkg-config) - #:use-module (guix build-system meson) - #:use-module (guix licenses) - #:use-module (guix packages) - #:use-module (guix utils)) - -(define-public easyeffects - (package - (name "easyeffects") - (version "6.3.0") - (native-inputs - `(("gettext" ,gettext-minimal) - ("glib:bin" ,glib "bin") - ("pkg-config" ,pkg-config) - ("gtk" ,gtk))) - (inputs - (append (specifications->packages (list "itstool" - "zita-convolver" - "rnnoise" - "tbb" - "pipewire" - "glib" - "libadwaita" - "libsigc++" - "lilv" - "libbs2b" - "libsndfile" - "fftwf" - "libebur128" - "libsamplerate" - "rubberband" - "speexdsp" - "nlohmann-json" - "fmt" - "gtk+:bin" - "desktop-file-utils")))) - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/wwmm/easyeffects/archive/refs/tags/v" version - ".tar.gz")) - (sha256 - (base32 - "08l84qbv7jwnq1ffpf9sw013bshnkn18h487gpqhn5s4ha4gchkg")))) - (build-system meson-build-system) - (synopsis "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications") - (description "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications") - (home-page "https://github.com/wwmm/easyeffects") - (license gpl3+))) diff --git a/modules/home-packages/mozillia.scm b/modules/home-packages/mozillia.scm new file mode 100644 index 0000000..c8cb793 --- /dev/null +++ b/modules/home-packages/mozillia.scm @@ -0,0 +1,65 @@ +(define-module (home-packages mozillia) + #:use-module (gnu) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages bash) + #:use-module (gnu packages linux) + #:use-module (nonguix build-system binary) + #:use-module (guix build-system trivial) + #:use-module (nongnu packages mozilla) + #:export (firefox-wayland-new + firefox*)) + +(define firefox* + (package/inherit + firefox + (inputs + (modify-inputs + (package-inputs firefox) + (delete "pipewire") + (append pipewire))))) + +(define firefox-wayland-new + (package + (inherit firefox*) + (name "firefox-wayland") + (native-inputs '()) + (inputs + `(("bash" ,bash-minimal) + ("pipewire" ,pipewire) + ("firefox" ,firefox*))) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((bash (assoc-ref %build-inputs "bash")) + (firefox (assoc-ref %build-inputs "firefox")) + (pipewire (assoc-ref %build-inputs "pipewire")) + (out (assoc-ref %outputs "out")) + (exe (string-append out "/bin/firefox"))) + (mkdir-p (dirname exe)) + + (call-with-output-file exe + (lambda (port) + ;; NOTE: added "export LD_LIBRARY_PATH=pipewire" + ;; maybe this can be done better with `wrap-programm' + (format port "#!~a \n +export LD_LIBRARY_PATH=~a \n +export MOZ_ENABLE_WAYLAND=1 \n +exec ~a $@\n" + (string-append bash "/bin/bash") + (string-append pipewire "/lib") + (string-append firefox "/bin/firefox")))) + (chmod exe #o555) + + ;; Provide the manual and .desktop file. + (copy-recursively (string-append firefox "/share") + (string-append out "/share")) + (substitute* (string-append + out "/share/applications/firefox.desktop") + ((firefox) out)) + #t)))))) +