Compare
43ea80ea908a4c7070e09f70d4fc63acd34cdace
…
broken-new-portal
· 25 commits
Commits
@@ -3,6 +3,10 @@
(operating-system
(inherit base-operating-system)
+ (kernel-arguments (append (list "intel_iommu=on")
+ %default-kernel-arguments))
+ (initrd-modules (cons* "vfio_pci" "vfio" "vfio_iommu_type1"
+ %base-initrd-modules))
(host-name "RyanThinkpad")
(mapped-devices (list (mapped-device
(source (uuid
@@ -0,0 +1,6 @@
+(use-modules (guix ci))
+
+(list (channel-with-substitutes-available
+ %default-guix-channel
+ "https://ci.guix.gnu.org")
+ )
@@ -3,7 +3,7 @@
(url "https://git.savannah.gnu.org/git/guix.git")
(branch "master")
(commit
- "d43b53c476b4e9322b31274b788e851d37e72302")
+ "40e78353a4699b8edb6600d82df648914c9110b9")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
@@ -14,7 +14,7 @@
(url "https://gitlab.com/nonguix/nonguix")
(branch "master")
(commit
- "1a3082c574077aaf6771ff927e725fc390a2d531")
+ "bb184bd0a8f91beec3a00718759e96c7828853de")
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
@@ -25,7 +25,7 @@
(url "https://codeberg.org/hako/rosenthal.git")
(branch "trunk")
(commit
- "129ca6fe164bf8b5a37357bab8c5229b611f1df2")
+ "58ad8f96b670fd58c474d188be7ae8fa0840b791")
(introduction
(make-channel-introduction
"7677db76330121a901604dfbad19077893865f35"
@@ -0,0 +1,93 @@
+#!/run/current-system/profile/bin/bash
+
+gather_env() {
+ # Gather needed information
+ echo -n "Type 'e' for encrypted or 'd' for decrypted install: "
+ read install_type
+
+ echo -n "Type system hostname: "
+ read install_hostname
+
+ echo -n "Type device file for ROOT data: "
+ read root_dev
+
+ echo -n "Type device file for BOOT data: "
+ read boot_dev
+
+ echo -n "Type device file for SWAP: "
+ read swap_dev
+
+}
+
+copy_and_prepare() {
+ # Associate devs with uuids
+ root_uuid=`blkid $root_dev | awk -F\" '{print $2}'`
+ boot_uuid=`blkid $boot_dev | awk -F\" '{print $2}'`
+ swap_uuid=`blkid $swap_dev | awk -F\" '{print $2}'`
+ # Let's a go!
+ echo "Information gathered. Deploying Guix on $root_dev ($root_uuid) with boot on $boot_dev ($boot_uuid) and swap on $swap_dev ($swap_uuid)"
+ echo -n "Proceed? (y/n): "
+ read install_choice
+
+ if [ "$install_choice" != "y" ]
+ then
+ echo "Bailing!"
+ exit 1
+ fi
+
+ # We are installing!
+ # Copy template to root of repo
+ if [ "$install_type" == "e" ]
+ then
+ cp ./modules/ryan-config/deploy-templates/HostTemplateEncrypted ./$install_hostname.scm
+ elif [ "$install_type" == "d" ]
+ then
+ cp ./modules/ryan-config/deploy-templates/HostTemplate ./$install_hostname.scm
+ else
+ echo "Invalid install type (not d or e), bailing!"
+ exit 1
+ fi
+
+ # Correct the information
+ sed -i "s/ChangeMe_ROOT/$root_uuid/" ./$install_hostname.scm
+ sed -i "s/ChangeMe_BOOTEFI/$boot_uuid/" ./$install_hostname.scm
+ sed -i "s/ChangeMe_SWAP/$swap_uuid/" ./$install_hostname.scm
+ sed -i "s/ChangeMe_HOST/$install_hostname/" ./$install_hostname.scm
+
+ # Install!
+ echo "Mounting /gnu/store to destination disk..."
+ herd start cow-store /mnt
+
+ # Install the non-guix signing keys
+ 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
+
+ # Copy some files over to prepare for reboot
+ USER=ryan
+ guix shell git -- git clone https://git.stationery.faith/ryan77627/guix-dotfiles /mnt/home/$USER/.config/guix
+
+ cp ~/guix-dotfiles/$install_hostname.scm /mnt/home/$USER/.config/guix/$install_hostname.scm
+ cp ~/guix-dotfiles/modules/ryan-config/user_first_run.sh /mnt/home/$USER/.bashrc
+
+ chown 1000:1000 -R /mnt/home/ryan
+
+}
+
+gather_env
+copy_and_prepare
+install_system
+install_user_env
+
+# Reboot the machine at this point!
+reboot
@@ -138,6 +138,7 @@ C = :multipart text/html<Enter>
[terminal]
$noinherit = true
$ex = <C-x>
+<C-q> = :close<Enter>
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
@@ -1,13 +1,15 @@
+window:
+ opacity: 0.70
font:
size: 15
normal:
- family: "Monofur for Powerline"
+ family: "Monofur Nerd Font Mono"
style: Regular
bold:
- family: "Monofur for Powerline"
+ family: "Monofur Nerd Font Mono"
style: Bold
italic:
- family: "Monofur for Powerline"
+ family: "Monofur Nerd Font Mono"
style: Italic
@@ -10,7 +10,7 @@ export PATH=$PATH:~/.nix-profile/bin
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
-if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
+if [ -z "$SSH_CLIENT" ] && [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec Hyprland
fi
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFont-Bold.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFont-BoldItalic.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFont-Italic.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFont-Regular.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontMono-Bold.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontMono-BoldItalic.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontMono-Italic.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontMono-Regular.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontPropo-Bold.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontPropo-BoldItalic.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontPropo-Italic.ttf differ
Binary files /dev/null and b/home-config/fonts/AnonymicePro/AnonymiceProNerdFontPropo-Regular.ttf differ
@@ -0,0 +1,94 @@
+Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com),
+with Reserved Font Name Anonymous Pro.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,8 @@
+
+# Nerd Fonts
+
+This is an archived font from a Nerd Fonts release.
+
+For more information see:
+* https://github.com/ryanoasis/nerd-fonts/
+* https://github.com/ryanoasis/nerd-fonts/releases/latest/
@@ -0,0 +1,20 @@
+------------------------------------------------------------------------
+The monofur typeface by tobias b koehler (unci@tigerden.com)
+------------------------------------------------------------------------
+
+This is a monospaced geometric rounded sans serif font based on the
+eurofurence typeface family.
+
+The character set includes Roman, Greek and Cyrillic characters as well
+as box drawing characters. File format is TrueType for PC (under
+Windows, Linux etc).
+
+These fonts are freeware and can be distributed as long as they are
+together with this text file. I would appreciate it though if you could
+contact me at unci@tigerden.com if you put them on a server. Free
+samples from commercial users are always very welcome. :)
+
+For more information, please see the uncifonts WWW page at:
+http://mercurio.iet.unipi.it/users/tobias/uncifonts.html
+
+Have fun! tobias b koehler, 2000-04-02
\ No newline at end of file
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFont-Bold.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFont-Italic.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFont-Regular.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFontMono-Bold.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFontMono-Italic.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFontMono-Regular.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFontPropo-Bold.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFontPropo-Italic.ttf differ
Binary files /dev/null and b/home-config/fonts/MonofurNerdFont/MonofurNerdFontPropo-Regular.ttf differ
@@ -0,0 +1,8 @@
+
+# Nerd Fonts
+
+This is an archived font from a Nerd Fonts release.
+
+For more information see:
+* https://github.com/ryanoasis/nerd-fonts/
+* https://github.com/ryanoasis/nerd-fonts/releases/latest/
@@ -16,7 +16,9 @@
(gnu home services desktop)
(gnu home services gnupg)
(gnu home services)
- (ryan-services pipewire))
+ (ryan-services pipewire)
+ (ryan-packages freedesktop)
+ (ryan-packages mozilla))
(define my-neovim
(package
@@ -33,17 +35,22 @@
"abook"
"libnotify"
"fzf"
+ "waypipe"
+ "gnunet"
"qrencode"
"binutils"
"gcc-toolchain"
"borg"
"restic"
+ "rsync"
+ "pv"
"python-msgpack"
"libreoffice"
"flatpak"
"gnupg"
"lsof"
"pavucontrol"
+ "netcat"
"bind:utils"
"font-cns11643"
"syncthing"
@@ -88,7 +95,7 @@
"git"
"node"
"git-lfs"))
- (list my-neovim)))
+ (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.
@@ -30,6 +30,9 @@
yt-dlp
xdg-desktop-portal-hyprland
pass
+ rustup
+ gcc
+ pkg-config
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
@@ -5,6 +5,8 @@ set sw=4
set sts=4
set et
set mouse=
+set cursorline
+set cc=79
call plug#begin(stdpath('data') . '/plugged')
"Plug 'prabirshrestha/vim-lsp'
@@ -3,14 +3,15 @@
"position": "top",
"height": 30,
- "modules-left": ["wlr/workspaces", "hyprland/submap"],
+ "modules-left": ["hyprland/workspaces", "hyprland/submap"],
"modules-center": ["hyprland/window"],
"modules-right": ["tray", "custom/spotify", "custom/weather", "custom/mail", "custom/storage", "backlight", "bluetooth", "pulseaudio", "network", "idle_inhibitor", "battery", "clock"],
"hyprland/submap": {
"format": " {}"
},
- "wlr/workspaces": {
- "format": "{name}",
+ "hyprland/workspaces": {
+ "format": "{id}",
+ "all-outputs": false,
"disable-scroll": true
},
"hyprland/window": {
@@ -36,10 +37,10 @@
"bat":"BAT1"
},
"bluetooth": {
- "format": "",
- "format-disabled": "",
- "format-connected": "",
- "format-connected-battery": " {device_battery_percentage}%",
+ "format": "",
+ "format-disabled": "",
+ "format-connected": "",
+ "format-connected-battery": " {device_battery_percentage}%",
"on-click": "blueman-manager",
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
@@ -75,9 +76,9 @@
"interval": 2,
"return-type": "json",
"exec": "~/.config/waybar/modules/spotify.sh",
- "exec-if": "pgrep spotifyd",
+ "exec-if": "~/.config/waybar/modules/check-for-music.sh",
"escape": true,
- "on-click": "~/.config/waybar/modules/spotify-play-pause.sh play-pause"
+ "on-click": "playerctl play-pause"
},
"custom/storage": {
"format-alt": "{} ",
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [[ $(playerctl metadata --format '{{lc(status)}}' | grep playing) -eq 0 ]]; then
+ exit 0
+else
+ exit 1
+fi
@@ -1,12 +1,12 @@
#!/bin/sh
-class=$(playerctl metadata --player=spotifyd --format '{{lc(status)}}')
-icon=""
+class=$(playerctl metadata --format '{{lc(status)}}')
+icon=""
if [[ $class == "playing" ]]; then
- info=$(playerctl metadata --player=spotifyd --format '{{artist}} - {{title}}')
+ info=$(playerctl metadata --format '{{artist}} - {{title}}')
if [[ ${#info} > 40 ]]; then
- info=$(echo $info | cut -c1-40)"..."
+ info=$(playerctl metadata --format '{{title}}' | cut -c1-40)"..."
fi
text=$info" "$icon
elif [[ $class == "paused" ]]; then
@@ -1,7 +1,7 @@
* {
border: none;
border-radius: 0;
- font-family: Sans;
+ font-family: AnonymicePro Nerd Font;
font-size: 15px;
box-shadow: none;
text-shadow: none;
@@ -170,10 +170,13 @@
(service nix-service-type)
(service libvirt-service-type
(libvirt-configuration
- (libvirt libvirt-new)
+ (libvirt libvirt-ovmf)
(unix-sock-group "libvirt")))
(service virtlog-service-type)
- (service bluetooth-service-type)
+ (service bluetooth-service-type
+ (bluetooth-configuration
+ (experimental #t)
+ (fast-connectable? #t)))
(udev-rules-service 'fido2 libfido2 #:groups '("plugdev")))
;; This is the default list of services we
@@ -0,0 +1,19 @@
+(use-modules (ryan-config base-system)
+ (gnu))
+
+(operating-system
+ (inherit base-operating-system)
+ (host-name "ChangeMe_HOST")
+ (file-systems (cons* (file-system
+ (mount-point "/")
+ (device (uuid "ChangeMe_ROOT"
+ 'ext4))
+ (type "ext4"))
+ (file-system
+ (mount-point "/boot/efi")
+ (device (uuid "ChangeMe_BOOTEFI"
+ 'fat32))
+ (type "vfat")) %base-file-systems))
+ (swap-devices
+ (list
+ (swap-space (target (uuid "ChangeMe_SWAP"))))))
@@ -0,0 +1,24 @@
+(use-modules (ryan-config base-system)
+ (gnu))
+
+(operating-system
+ (inherit base-operating-system)
+ (host-name "ChangeMe_HOST")
+ (mapped-devices (list (mapped-device
+ (source (uuid
+ "ChangeMe_ROOT"))
+ (target "sysroot")
+ (type luks-device-mapping))))
+ (file-systems (cons* (file-system
+ (mount-point "/")
+ (device "/dev/mapper/sysroot")
+ (type "ext4")
+ (dependencies mapped-devices))
+ (file-system
+ (mount-point "/boot/efi")
+ (device (uuid "ChangeMe_BOOTEFI"
+ 'fat32))
+ (type "vfat")) %base-file-systems))
+ (swap-devices
+ (list
+ (swap-space (target (uuid "ChangeMe_SWAP"))))))
@@ -0,0 +1,20 @@
+#!/run/current-system/profile/bin/bash
+
+# This should run on user first logon, so let's a go!
+# First, we should run a guix pull
+
+guix pull
+
+hash guix
+
+guix home -L ~/.config/guix/modules reconfigure ~/.config/guix/home-config/home-configuration.scm
+
+sudo herd restart nix-daemon
+
+nix-channel --update
+
+nix-shell '<home-manager>' -A install
+
+source ~/.bashrc
+
+home-manager switch
@@ -4,6 +4,9 @@
#:use-module (guix gexp)
#:use-module (guix build-system meson)
#:use-module (guix build-system qt)
+ #:use-module (guix build-system cmake)
+ #:use-module (guix build utils)
+ #:use-module (guix build glib-or-gtk-build-system)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix utils)
@@ -15,6 +18,10 @@
#:use-module (gnu packages cmake)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages man)
#:use-module (rosenthal packages wm)
#:use-module (gnu packages wm))
@@ -34,7 +41,7 @@
(native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr)
(append wlroots)))))
-(define-public xdg-desktop-portal-hyprland
+(define xdg-desktop-portal-hyprland-old-original
(package
(name "xdg-desktop-portal-hyprland")
(version "0.5.0")
@@ -97,4 +104,108 @@
(description "test")
(license license:bsd-3)))
+(define-public wl-mirror
+ (package
+ (name "wl-mirror")
+ (version "0.13.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Ferdi265/wl-mirror")
+ (commit (string-append "v" version))
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vkd73x5r2585s3w1ckvslc2mq9qbzrm5xkwg8gpy9ydaxhn8hmp"))))
+ (inputs (list wayland egl-wayland mesa))
+ (native-inputs (list pkg-config scdoc wayland-protocols))
+ (build-system cmake-build-system)
+ (arguments (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'touch
+ (lambda _
+ (invoke "touch" "proto/wayland-protocols/.git")
+ (invoke "touch" "proto/wlr-protocols/.git"))))))
+ (home-page "bleh")
+ (synopsis "mirror displays")
+ (description "mirror displays")
+ (license license:expat)))
+
+(define-public xdg-desktop-portal-hyprland
+ (package
+ (name "xdg-desktop-portal-hyprland")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05gcdg3fw7plc9fri6rpq9la1xjij93jqkqmq57mrqjgwg3jlmrb"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:imported-modules
+ (append %meson-build-system-modules
+ %qt-build-system-modules)
+ #:modules
+ '((guix build utils)
+ (guix build meson-build-system)
+ ((guix build qt-build-system) #:prefix qt:))
+ #:tests? #f ;No tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (find-files "." "\\.cp?*$")
+ (("/bin/sh") "sh")
+ (("\\<(sh|grim|slurp)\\>" _ cmd)
+ (search-input-file inputs (string-append "/bin/" cmd)))
+ (("\"(hyprland-share-picker)\"" _ cmd)
+ (string-append "\"" #$output "/bin/" cmd "\"")))))
+ ;; After building the portal, we need to build the share selector
+ ;; using qt
+ (add-after 'install 'chdir
+ (lambda _
+ (chdir "../source/hyprland-share-picker/")))
+ (add-after 'chdir 'qt-build
+ (lambda* (#:key (make-flags '()) (parallel-build? #t)
+ #:allow-other-keys)
+ ((assoc-ref qt:%standard-phases 'build)
+ #:make-flags make-flags
+ #:parallel-build? parallel-build?)))
+ (add-after 'qt-build 'install-hyprland-share-picker
+ (lambda _
+ (install-file "build/hyprland-share-picker"
+ (string-append #$output "/bin"))))
+ (add-after 'install-hyprland-share-picker 'qt-wrap
+ (assoc-ref qt:%standard-phases 'qt-wrap)))))
+ (native-inputs (list cmake-minimal pkg-config))
+ (inputs
+ (list bash-minimal
+ basu
+ grim
+ hyprland-protocols
+ libinih
+ mesa
+ pipewire
+ sdbus-c++
+ qtbase-5
+ slurp
+ `(,util-linux "lib")
+ wayland
+ wayland-protocols))
+ (home-page "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
+ (synopsis "XDG Desktop Portal backend for Hyprland")
+ (description
+ "This package provides @code{xdg-desktop-portal-hyprland}, which extends
+@code{xdg-desktop-portal-wlr} for Hyprland with support for
+@code{xdg-desktop-portal} screenshot and casting interfaces, while adding a few
+extra portals specific to Hyprland, mostly for window sharing.")
+ (license license:expat)))
+
xdg-desktop-portal-hyprland
@@ -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))))))
@@ -10,40 +10,36 @@
#:use-module (gnu packages firmware)
#:use-module (guix gexp))
-(define ovmf-new
- (package
- (inherit ovmf)
- (name "ovmf-new")
- (arguments
- (substitute-keyword-arguments (package-arguments ovmf)
- ((#:phases phases)
- #~(modify-phases #$phases
- (replace 'install
- (lambda _
- (let ((fmw (string-append #$output "/share/firmware")))
- (mkdir-p fmw)
- (copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw))))))))))
-
-(define-public libvirt-new
+(define-public libvirt-ovmf
(package
(inherit libvirt)
- (name "libvirt-new")
+ (name "libvirt-ovmf")
(inputs
(modify-inputs (package-inputs libvirt)
- (append ovmf-new)))))
+ (append qemu)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments libvirt)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'install 'install-firmware
+ (lambda _
+ (let ((fmw (string-append #$output "/share/qemu")))
+ (mkdir-p fmw)
+ (copy-recursively #$(file-append qemu "/share/qemu") fmw))))))))))
(define-public virt-manager-ovmf
- (package
- (inherit virt-manager)
- (name "virt-manager-ovmf")
- (arguments
- (substitute-keyword-arguments (package-arguments virt-manager)
- ((#:phases phases)
- #~(modify-phases #$phases
- (add-after 'install 'ovmf
- (lambda _
- (let ((fmw (string-append #$output "/usr/share/OVMF")))
- (mkdir-p fmw)
- (copy-recursively #$(file-append ovmf-new "/share/firmware") fmw)
- ;(mkdir-p fmw)
- (copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw))))))))))
+ (package
+ (inherit virt-manager)
+ (name "virt-manager-ovmf")
+ (inputs
+ (modify-inputs (package-inputs virt-manager)
+ (append qemu)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments virt-manager)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'install 'install-firmware
+ (lambda _
+ (let ((fmw (string-append #$output "/share/qemu")))
+ (mkdir-p fmw)
+ (copy-recursively #$(file-append qemu "/share/firmware") fmw))))))))))