mirror of
https://git.in.rschanz.org/ryan77627/guix-config.git
synced 2024-11-07 07:36:09 -05:00
added firefox native
This commit is contained in:
parent
9f69bb20df
commit
297ef48f8e
3 changed files with 85 additions and 2 deletions
20
deploy.sh
20
deploy.sh
|
@ -62,11 +62,31 @@ copy_and_prepare() {
|
|||
echo "Installing non-guix signing keys for substitutes..."
|
||||
curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
|
||||
guix archive --authorize < sign-key.pub
|
||||
}
|
||||
|
||||
install_system() {
|
||||
echo "Beginning install!"
|
||||
guix time-machine -C ./channels.scm -- system -L ./modules --substitute-urls='https://substitutes.nonguix.org https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' init $install_hostname.scm /mnt
|
||||
}
|
||||
|
||||
install_user_env() {
|
||||
# System should be installed now, we can chroot in and configure the user profile now
|
||||
# NOTE: This assumes the user "ryan" for things, so change the USER var if you change your username
|
||||
|
||||
# Mount the special block devices to prepare for chroot
|
||||
mount --rbind /proc /mnt/proc
|
||||
mount --rbind /sys /mnt/sys
|
||||
mount --rbind /dev /mnt/dev
|
||||
|
||||
# chroot into system and run commands
|
||||
USER=ryan
|
||||
chroot /mnt <<EOT
|
||||
|
||||
EOT
|
||||
|
||||
}
|
||||
|
||||
gather_env
|
||||
copy_and_prepare
|
||||
install_system
|
||||
install_user_env
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
(gnu home services gnupg)
|
||||
(gnu home services)
|
||||
(ryan-services pipewire)
|
||||
(ryan-packages freedesktop))
|
||||
(ryan-packages freedesktop)
|
||||
(ryan-packages mozilla))
|
||||
|
||||
(define my-neovim
|
||||
(package
|
||||
|
@ -92,7 +93,7 @@
|
|||
"git"
|
||||
"node"
|
||||
"git-lfs"))
|
||||
(list my-neovim wl-mirror)))
|
||||
(list my-neovim wl-mirror firefox-wayland-new)))
|
||||
|
||||
;; Below is the list of Home services. To search for available
|
||||
;; services, run 'guix home search KEYWORD' in a terminal.
|
||||
|
|
62
modules/ryan-packages/mozilla.scm
Normal file
62
modules/ryan-packages/mozilla.scm
Normal file
|
@ -0,0 +1,62 @@
|
|||
(define-module (ryan-packages mozilla)
|
||||
#: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))
|
||||
|
||||
(define firefox*
|
||||
(package/inherit
|
||||
firefox
|
||||
(inputs
|
||||
(modify-inputs
|
||||
(package-inputs firefox)
|
||||
(delete "pipewire")
|
||||
(append pipewire)))))
|
||||
|
||||
(define-public firefox-wayland-new
|
||||
(package
|
||||
(inherit firefox*)
|
||||
(name "firefox-wayland-new")
|
||||
(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))))))
|
Loading…
Reference in a new issue