Compare
d20c4d322ffa60e28bb83e9c9a7bbb60e1e92f55
…
pres
· 74 commits
Commits
@@ -0,0 +1,29 @@
+# Guix Installation
+
+## Installing Guix
+
+### Instructions
+
+- Create USB with Guix installation image
+- Boot and create partitions using graphical installer
+- Bail out right before installation begins, go to terminal
+ - Mount cow-store using herd start cow-store /mnt
+ - Download latest version of configuration using `curl -o main.tar.gz --insecure --follow https://git.ryanserver.home.arpa/ryan77627/guix-config/archive/main.tar.gz` and unpack using tar
+ - Authorize nonguix channel using `curl -o signkey.pub https://substitutes.nonguix.org/signing-key.pub and guix archive --authorize < signkey.pub`
+ - Modify/add system config for system and initialize using `guix time-machine -C channels.scm -- system -L modules/ --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org https://substitutes.nonguix.org' init system.scm /mnt`
+ - When installed, proceed
+- Reboot into system, assign root and ryan user a password
+- Setup system completely
+ - Clone guix-config to proper location
+ - Reconfigure system
+ - `sudo -E guix time-machine -C channels.scm -- system -L modules reconfigure system.scm` <---- may not be needed
+ - `guix pull`
+ - `hash guix`
+ - `sudo guix system -L modules reconfigure system.scm`
+ - Configure GUIX Home
+ - Install Nix Home Manager
+ - May need to sudo herd restart nix-daemon or reconfigure system to get nix working???
+ - `nix-channel --update`
+ - `nix-shell '<home-manager>' -A install`
+ - `home-manager switch`
+- Everything should now be set up and ready to use :)
@@ -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
@@ -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,149 @@
+#!/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
+ curl -o sign-key-r.pub http://129.21.94.53:8000/signing-key.pub
+ guix archive --authorize < sign-key.pub
+ guix archive --authorize < sign-key-r.pub
+}
+
+install_system() {
+ echo "Beginning install!"
+ guix time-machine -C ./channels.scm -- system -L ./modules --substitute-urls='http://129.21.94.53:8080/ 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
+
+}
+
+if [[ $* == *-p ]]
+then
+ echo "Installing non-guix signing keys for substitutes..."
+ curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
+ curl -o sign-key-r.pub http://129.21.94.53:8000/signing-key.pub
+ guix archive --authorize < sign-key.pub
+ guix archive --authorize < sign-key-r.pub
+ guix time-machine -C ./channels.scm -- pull
+ exit 0
+elif [[ $* == *-i ]]
+then
+ gather_env
+ # 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_system
+ install_user_env
+ exit 0
+fi
+
+gather_env
+copy_and_prepare
+install_system
+install_user_env
+
+# Reboot the machine at this point!
+#reboot
@@ -0,0 +1,21 @@
+[Personal]
+source = imaps://ryan%40rschanz.org@mail.rschanz.org:993
+source-cred-cmd = pass emails/personal 2>/dev/null | tr -d '\n'
+outgoing = smtps://ryan%40rschanz.org@mail.rschanz.org:465
+outgoing-cred-cmd = pass emails/personal 2>/dev/null | tr -d '\n'
+default = INBOX
+from = Ryan Schanzenbacher <ryan@rschanz.org>
+copy-to = Sent
+signature-file = ~/.config/aerc/signature_personal
+check-mail = 5m
+
+[School]
+source = imaps+oauthbearer://rjs1877%40rit.edu@imap.gmail.com:993?token_endpoint=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Ftoken&client_id=667738788924-0rdfvaq9ijfo1vk4474eb3quf8206h2t.apps.googleusercontent.com&client_secret=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
+source-cred-cmd = pass emails/rit_personal 2>/dev/null | tr -d '\n'
+outgoing = smtps+oauthbearer://rjs1877%40rit.edu@imap.gmail.com:465?token_endpoint=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Ftoken&client_id=667738788924-0rdfvaq9ijfo1vk4474eb3quf8206h2t.apps.googleusercontent.com&client_secret=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
+outgoing-cred-cmd = pass emails/rit_personal 2>/dev/null | tr -d '\n'
+from = Ryan Schanzenbacher <rjs1877@rit.edu>
+signature-file = ~/.config/aerc/signature_rit_personal
+check-mail = 5m
+default = INBOX
+copy-to = [Gmail]/Sent Mail
@@ -0,0 +1,568 @@
+#
+# aerc main configuration
+
+[general]
+#
+# Used as a default path for save operations if no other path is specified.
+# ~ is expanded to the current user home dir.
+#
+default-save-path=~/Downloads/
+
+# If set to "gpg", aerc will use system gpg binary and keystore for all crypto
+# operations. If set to "internal", the internal openpgp keyring will be used.
+# If set to "auto", the system gpg will be preferred unless the internal
+# keyring already exists, in which case the latter will be used.
+#
+# Default: auto
+pgp-provider=gpg
+
+# By default, the file permissions of accounts.conf must be restrictive and
+# only allow reading by the file owner (0600). Set this option to true to
+# ignore this permission check. Use this with care as it may expose your
+# credentials.
+#
+# Default: false
+unsafe-accounts-conf=true # I don't store my creds in this
+
+# Output log messages to specified file. A path starting with ~/ is expanded to
+# the user home dir. When redirecting aerc's output to a file using > shell
+# redirection, this setting is ignored and log messages are printed to stdout.
+#
+#log-file=~/aerc_log
+
+# Only log messages above the specified level to log-file. Supported levels
+# are: trace, debug, info, warn and error. When redirecting aerc's output to
+# a file using > shell redirection, this setting is ignored and the log level
+# is forced to trace.
+#
+# Default: info
+log-level=trace
+
+# Set the $TERM environment variable used for the embedded terminal.
+#
+# Default: xterm-256color
+#term=xterm-256color
+
+# Display OSC8 strings in the embedded terminal
+#
+# Default: false
+#enable-osc8=false
+
+[ui]
+#
+# Describes the format for each row in a mailbox view. This is a comma
+# separated list of column names with an optional align and width suffix. After
+# the column name, one of the '<' (left), ':' (center) or '>' (right) alignment
+# characters can be added (by default, left) followed by an optional width
+# specifier. The width is either an integer representing a fixed number of
+# characters, or a percentage between 1% and 99% representing a fraction of the
+# terminal width. It can also be one of the '*' (auto) or '=' (fit) special
+# width specifiers. Auto width columns will be equally attributed the remaining
+# terminal width. Fit width columns take the width of their contents. If no
+# width specifier is set, '*' is used by default.
+#
+# Default: date<20,name<17,flags>4,subject<*
+#index-columns=date<20,name<17,flags>4,subject<*
+
+spinner = '/,-,\,|'
+
+#
+# Each name in index-columns must have a corresponding column-$name setting.
+# All column-$name settings accept golang text/template syntax. See
+# aerc-templates(7) for available template attributes and functions.
+#
+# Default settings
+#column-date={{.DateAutoFormat .Date.Local}}
+#column-name={{index (.From | names) 0}}
+#column-flags={{.Flags | join ""}}
+#column-subject={{.ThreadPrefix}}{{.Subject}}
+
+#
+# String separator inserted between columns. When the column width specifier is
+# an exact number of characters, the separator is added to it (i.e. the exact
+# width will be fully available for the column contents).
+#
+# Default: " "
+#column-separator=" "
+
+#
+# See time.Time#Format at https://godoc.org/time#Time.Format
+#
+# Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time)
+#timestamp-format=2006-01-02 03:04 PM
+
+#
+# Index-only time format for messages that were received/sent today.
+# If this is not specified, timestamp-format is used instead.
+#
+#this-day-time-format=
+
+#
+# Index-only time format for messages that were received/sent within the last
+# 7 days. If this is not specified, timestamp-format is used instead.
+#
+#this-week-time-format=
+
+#
+# Index-only time format for messages that were received/sent this year.
+# If this is not specified, timestamp-format is used instead.
+#
+#this-year-time-format=
+
+#
+# Width of the sidebar, including the border.
+#
+# Default: 20
+#sidebar-width=20
+
+#
+# Message to display when viewing an empty folder.
+#
+# Default: (no messages)
+#empty-message=(no messages)
+
+# Message to display when no folders exists or are all filtered
+#
+# Default: (no folders)
+#empty-dirlist=(no folders)
+
+# Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel
+#
+# Default: false
+#mouse-enabled=false
+
+#
+# Ring the bell when new messages are received
+#
+# Default: true
+#new-message-bell=true
+
+#
+# Template to use for Account tab titles
+#
+# Default: {{.Account}}
+#tab-title-account={{.Account}}
+
+# Marker to show before a pinned tab's name.
+#
+# Default: `
+#pinned-tab-marker='`'
+
+# Template for the left side of the directory list.
+# See aerc-templates(7) for all available fields and functions.
+#
+# Default: {{.Folder}}
+#dirlist-left={{.Folder}}
+
+# Template for the right side of the directory list.
+# See aerc-templates(7) for all available fields and functions.
+#
+# Default: {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}
+#dirlist-right={{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}
+
+# Delay after which the messages are actually listed when entering a directory.
+# This avoids loading messages when skipping over folders and makes the UI more
+# responsive. If you do not want that, set it to 0s.
+#
+# Default: 200ms
+#dirlist-delay=200ms
+
+# Display the directory list as a foldable tree that allows to collapse and
+# expand the folders.
+#
+# Default: false
+#dirlist-tree=false
+
+# If dirlist-tree is enabled, set level at which folders are collapsed by
+# default. Set to 0 to disable.
+#
+# Default: 0
+#dirlist-collapse=0
+
+# List of space-separated criteria to sort the messages by, see *sort*
+# command in *aerc*(1) for reference. Prefixing a criterion with "-r "
+# reverses that criterion.
+#
+# Example: "from -r date"
+#
+#sort=
+
+# Moves to next message when the current message is deleted
+#
+# Default: true
+#next-message-on-delete=true
+
+# Automatically set the "seen" flag when a message is opened in the message
+# viewer.
+#
+# Default: true
+#auto-mark-read=true
+
+# The directories where the stylesets are stored. It takes a colon-separated
+# list of directories. If this is unset or if a styleset cannot be found, the
+# following paths will be used as a fallback in that order:
+#
+# ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets
+# ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets
+# /usr/local/share/aerc/stylesets
+# /usr/share/aerc/stylesets
+#
+#stylesets-dirs=
+
+# Uncomment to use box-drawing characters for vertical and horizontal borders.
+#
+# Default: " "
+#border-char-vertical=" "
+#border-char-horizontal=" "
+
+# Sets the styleset to use for the aerc ui elements.
+#
+# Default: default
+#styleset-name=default
+
+# Activates fuzzy search in commands and their arguments: the typed string is
+# searched in the command or option in any position, and need not be
+# consecutive characters in the command or option.
+#
+# Default: false
+#fuzzy-complete=false
+
+# How long to wait after the last input before auto-completion is triggered.
+#
+# Default: 250ms
+#completion-delay=250ms
+
+# The minimum required characters to allow auto-completion to be triggered after
+# completion-delay.
+#
+# Default: 1
+#completion-min-chars=1
+
+#
+# Global switch for completion popovers
+#
+# Default: true
+#completion-popovers=true
+
+# Uncomment to use UTF-8 symbols to indicate PGP status of messages
+#
+# Default: ASCII
+#icon-unencrypted=
+#icon-encrypted=✔
+#icon-signed=✔
+#icon-signed-encrypted=✔
+#icon-unknown=✘
+#icon-invalid=⚠
+
+# Reverses the order of the message list. By default, the message list is
+# ordered with the newest (highest UID) message on top. Reversing the order
+# will put the oldest (lowest UID) message on top. This can be useful in cases
+# where the backend does not support sorting.
+#
+# Default: false
+#reverse-msglist-order = false
+
+# Reverse display of the mesage threads. Default order is the the intial
+# message is on the top with all the replies being displayed below. The
+# reverse option will put the initial message at the bottom with the
+# replies on top.
+#
+# Default: false
+#reverse-thread-order=false
+
+# Sort the thread siblings according to the sort criteria for the messages. If
+# sort-thread-siblings is false, the thread siblings will be sorted based on
+# the message UID in ascending order. This option is only applicable for
+# client-side threading with a backend that enables sorting. Note that there's
+# a performance impact when sorting is activated.
+#
+# Default: false
+#sort-thread-siblings=false
+
+#[ui:account=Personal]
+#
+# Enable a threaded view of messages. If this is not supported by the backend
+# (IMAP server or notmuch), threads will be built by the client.
+#
+# Default: false
+threading-enabled=true
+
+# Force client-side thread building
+#
+# Default: false
+#force-client-threads=false
+
+# Debounce client-side thread building
+#
+# Default: 50ms
+#client-threads-delay=50ms
+
+[statusline]
+#
+# Describes the format for the status line. This is a comma separated list of
+# column names with an optional align and width suffix. See [ui].index-columns
+# for more details. To completely mute the status line except for push
+# notifications, explicitly set status-columns to an empty string.
+#
+# Default: left<*,center:=,right>*
+#status-columns=left<*,center:=,right>*
+
+#
+# Each name in status-columns must have a corresponding column-$name setting.
+# All column-$name settings accept golang text/template syntax. See
+# aerc-templates(7) for available template attributes and functions.
+#
+# Default settings
+#column-left=[{{.Account}}] {{.StatusInfo}}
+#column-center={{.PendingKeys}}
+#column-right={{.TrayInfo}}
+
+#
+# String separator inserted between columns.
+# See [ui].column-separator for more details.
+#
+#column-separator=" "
+
+# Specifies the separator between grouped statusline elements.
+#
+# Default: " | "
+#separator=" | "
+
+# Defines the mode for displaying the status elements.
+# Options: text, icon
+#
+# Default: text
+#display-mode=text
+
+[viewer]
+#
+# Specifies the pager to use when displaying emails. Note that some filters
+# may add ANSI codes to add color to rendered emails, so you may want to use a
+# pager which supports ANSI codes.
+#
+# Default: less -R
+#pager=less -R
+
+#
+# If an email offers several versions (multipart), you can configure which
+# mimetype to prefer. For example, this can be used to prefer plaintext over
+# html emails.
+#
+# Default: text/plain,text/html
+#alternatives=text/plain,text/html
+
+#
+# Default setting to determine whether to show full headers or only parsed
+# ones in message viewer.
+#
+# Default: false
+#show-headers=false
+
+#
+# Layout of headers when viewing a message. To display multiple headers in the
+# same row, separate them with a pipe, e.g. "From|To". Rows will be hidden if
+# none of their specified headers are present in the message.
+#
+# Default: From|To,Cc|Bcc,Date,Subject
+#header-layout=From|To,Cc|Bcc,Date,Subject
+
+# Whether to always show the mimetype of an email, even when it is just a single part
+#
+# Default: false
+#always-show-mime=false
+
+# Parses and extracts http links when viewing a message. Links can then be
+# accessed with the open-link command.
+#
+# Default: true
+#parse-http-links=true
+
+[compose]
+#
+# Specifies the command to run the editor with. It will be shown in an embedded
+# terminal, though it may also launch a graphical window if the environment
+# supports it. Defaults to $EDITOR, or vi.
+#editor=
+
+# Address book command
+address-book-cmd = sh -c 'abook --mutt-query "%s" | tail -n +2'
+
+#
+# Default header fields to display when composing a message. To display
+# multiple headers in the same row, separate them with a pipe, e.g. "To|From".
+#
+# Default: To|From,Subject
+#header-layout=To|From,Subject
+
+#
+# Specifies the command to be used to tab-complete email addresses. Any
+# occurrence of "%s" in the address-book-cmd will be replaced with what the
+# user has typed so far.
+#
+# The command must output the completions to standard output, one completion
+# per line. Each line must be tab-delimited, with an email address occurring as
+# the first field. Only the email address field is required. The second field,
+# if present, will be treated as the contact name. Additional fields are
+# ignored.
+#
+# This parameter can also be set per account in accounts.conf.
+#address-book-cmd=
+
+# Specifies the command to be used to select attachments. Any occurence of '%s'
+# in the file-picker-cmd will be replaced the argument <arg> to :attach -m
+# <arg>.
+#
+# The command must output the selected files to standard output, one file per
+# line.
+file-picker-cmd=fzf --multi --query=%s
+
+#
+# Allow to address yourself when replying
+#
+# Default: true
+#reply-to-self=true
+
+#
+# Warn before sending an email that matches the specified regexp but does not
+# have any attachments. Leave empty to disable this feature.
+#
+# Uses Go's regexp syntax, documented at https://golang.org/s/re2syntax. The
+# "(?im)" flags are set by default (case-insensitive and multi-line).
+#
+# Example:
+# no-attachment-warning=^[^>]*attach(ed|ment)
+#
+#no-attachment-warning=
+
+#
+# When set, aerc will generate "format=flowed" bodies with a content type of
+# "text/plain; format=flowed" as described in RFC3676. This format is easier to
+# handle for some mailing software, and generally just looks like ordinary
+# text. To actually make use of this format's features, you'll need support in
+# your editor.
+#
+format-flowed=true
+
+[multipart-converters]
+#
+# Converters allow to generate multipart/alternative messages by converting the
+# main text/plain part into any other MIME type. Only exact MIME types are
+# accepted. The commands are invoked with sh -c and are expected to output
+# valid UTF-8 text.
+#
+# Example (obviously, this requires that you write your main text/plain body
+# using the markdown syntax):
+text/html=pandoc --wrap=preserve -f gfm+hard_line_breaks -t html --standalone
+
+[filters]
+#
+# Filters allow you to pipe an email body through a shell command to render
+# certain emails differently, e.g. highlighting them with ANSI escape codes.
+#
+# The commands are invoked with sh -c. The following folders are appended to
+# the system $PATH to allow referencing filters from their name only:
+#
+# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters
+# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters
+# $PREFIX/share/aerc/filters
+# /usr/share/aerc/filters
+#
+# The following variables are defined in the filter command environment:
+#
+# AERC_MIME_TYPE the part MIME type/subtype
+# AERC_FORMAT the part content type format= parameter
+# AERC_FILENAME the attachment filename (if any)
+# AERC_SUBJECT the message Subject header value
+# AERC_FROM the message From header value
+#
+# The first filter which matches the email's mimetype will be used, so order
+# them from most to least specific.
+#
+# You can also match on non-mimetypes, by prefixing with the header to match
+# against (non-case-sensitive) and a comma, e.g. subject,text will match a
+# subject which contains "text". Use header,~regex to match against a regex.
+#
+#text/plain=colorize
+#text/calendar=calendar
+message/delivery-status=bat -fn
+message/rfc822=bat -fn
+text/html=pandoc -f html -t plain | bat -fn
+#text/html=html | colorize
+text/*=bat -fn --file-name="$AERC_FILENAME"
+application/x-sh=bat -fn -l sh
+#image/*=catimg -w $(tput cols) -
+#subject,~Git(hub|lab)=lolcat -f
+#from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize
+
+# This special filter is only used to post-process email headers when
+# [viewer].show-headers=true
+# By default, headers are piped directly into the pager.
+#
+#.headers=bat -fp
+
+[openers]
+#
+# Openers allow you to specify the command to use for the :open and :open-link
+# actions on a per-MIME-type basis. The :open-link URL scheme is used to
+# determine the MIME type as follows: x-scheme-handler/<scheme>.
+#
+# {} is expanded as the temporary filename to be opened. If it is not
+# encountered in the command, the temporary filename will be appened to the end
+# of the command.
+#
+# Like [filters], openers support basic shell globbing. The first opener which
+# matches the part's MIME type (or URL scheme handler MIME type) will be used,
+# so order them from most to least specific.
+#
+# Examples:
+# x-scheme-handler/irc=hexchat
+# x-scheme-handler/http*=firefox
+# text/html=surf -dfgms
+# text/plain=gvim {} +125
+# message/rfc822=thunderbird
+
+[hooks]
+#
+# Hooks are triggered whenever the associated event occurs.
+
+#
+# Executed when a new email arrives in the selected folder
+mail-received=notify-send "$AERC_FROM_NAME" "$AERC_SUBJECT"
+
+#
+# Executed when aerc starts
+#aerc-startup=aerc :terminal calcurse && aerc :next-tab
+
+#
+# Executed when aerc shuts down.
+#aerc-shutdown=
+
+[templates]
+# Templates are used to populate email bodies automatically.
+#
+
+# The directories where the templates are stored. It takes a colon-separated
+# list of directories. If this is unset or if a template cannot be found, the
+# following paths will be used as a fallback in that order:
+#
+# ${XDG_CONFIG_HOME:-~/.config}/aerc/templates
+# ${XDG_DATA_HOME:-~/.local/share}/aerc/templates
+# /usr/local/share/aerc/templates
+# /usr/share/aerc/templates
+#
+#template-dirs=
+
+# The default template to be used for new messages.
+#
+# default: new_message
+#new-message=new_message
+
+# The default template to be used for quoted replies.
+#
+# default: quoted_reply
+#quoted-reply=quoted_reply
+
+# The default template to be used for forward as body.
+#
+# default: forward_as_body
+#forwards=forward_as_body
@@ -0,0 +1,144 @@
+# Binds are of the form <key sequence> = <command to run>
+# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
+# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
+<C-p> = :prev-tab<Enter>
+<C-n> = :next-tab<Enter>
+<C-t> = :term<Enter>
+? = :help keys<Enter>
+
+[messages]
+q = :quit<Enter>
+
+j = :next<Enter>
+<Down> = :next<Enter>
+<C-d> = :next 50%<Enter>
+<C-f> = :next 100%<Enter>
+<PgDn> = :next 100%<Enter>
+
+k = :prev<Enter>
+<Up> = :prev<Enter>
+<C-u> = :prev 50%<Enter>
+<C-b> = :prev 100%<Enter>
+<PgUp> = :prev 100%<Enter>
+g = :select 0<Enter>
+G = :select -1<Enter>
+<C-r> = :read<Enter>
+<C-u> = :unread<Enter>
+
+J = :next-folder<Enter>
+K = :prev-folder<Enter>
+H = :collapse-folder<Enter>
+L = :expand-folder<Enter>
+
+v = :mark -t<Enter>
+V = :mark -v<Enter>
+
+T = :toggle-threads<Enter>
+
+<Enter> = :view<Enter>
+dd = :mv Trash<Enter>
+dg = :mv [Gmail]/Trash<Enter>
+D = :delete<Enter>
+A = :archive year<Enter>
+
+C = :compose<Enter>
+
+rr = :reply -a<Enter>
+rq = :reply -aq<Enter>
+Rr = :reply<Enter>
+Rq = :reply -q<Enter>
+f = :forward -A<Enter>
+
+c = :cf<space>
+$ = :term<space>
+! = :term<space>
+| = :pipe<space>
+
+/ = :search<space>
+\ = :filter<space>
+n = :next-result<Enter>
+N = :prev-result<Enter>
+<Esc> = :clear<Enter>
+
+[messages:folder=Drafts]
+<Enter> = :recall<Enter>
+
+[view]
+/ = :toggle-key-passthrough<Enter>/
+q = :close<Enter>
+O = :open<Enter>
+S = :save<space>
+| = :pipe<space>
+D = :delete<Enter>
+dd = :mv Trash<Enter>
+dg = :mv [Gmail]/Trash<Enter>
+A = :archive year<Enter>
+
+<C-l> = :open-link <space>
+
+f = :forward -A<Enter>
+rr = :reply -a<Enter>
+rq = :reply -aq<Enter>
+Rr = :reply<Enter>
+Rq = :reply -q<Enter>
+
+H = :toggle-headers<Enter>
+<C-k> = :prev-part<Enter>
+<C-j> = :next-part<Enter>
+J = :next<Enter>
+K = :prev<Enter>
+
+[view::passthrough]
+$noinherit = true
+$ex = <C-x>
+<Esc> = :toggle-key-passthrough<Enter>
+
+[compose]
+# Keybindings used when the embedded terminal is not selected in the compose
+# view
+$noinherit = true
+$ex = <C-x>
+<C-k> = :prev-field<Enter>
+<C-j> = :next-field<Enter>
+<A-p> = :switch-account -p<Enter>
+<A-n> = :switch-account -n<Enter>
+<tab> = :next-field<Enter>
+<backtab> = :prev-field<Enter>
+<C-p> = :prev-tab<Enter>
+<C-n> = :next-tab<Enter>
+<C-c> = :cc<Enter>
+<C-b> = :bcc<Enter>
+<C-q> = :abort<Enter>
+
+[compose::editor]
+# Keybindings used when the embedded terminal is selected in the compose view
+$noinherit = true
+$ex = <C-x>
+<C-k> = :prev-field<Enter>
+<C-j> = :next-field<Enter>
+<C-p> = :prev-tab<Enter>
+<C-n> = :next-tab<Enter>
+<C-q> = :abort<Enter>
+
+[compose::review]
+# Keybindings used when reviewing a message to be sent
+y = :send<Enter>
+n = :abort<Enter>
+v = :preview<Enter>
+p = :postpone<Enter>
+q = :choose -o d discard abort -o p postpone postpone<Enter>
+e = :edit<Enter>
+a = :attach<space>
+d = :detach<space>
+S = :sign<Enter>
+E = :encrypt<Enter>
+A = :attach-key<Enter>
+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>
@@ -0,0 +1,3 @@
+--
+Best,
+Ryan Schanzenbacher
@@ -0,0 +1,5 @@
+--
+Best,
+Ryan Schanzenbacher
+Rochester Institute of Technology
+Cybersecurity BS/MS Student
@@ -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
@@ -9,3 +9,8 @@ export PATH=$PATH:~/.nix-profile/bin
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
+
+if [ -z "$SSH_CLIENT" ] && [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
+ exec Hyprland
+fi
+
@@ -38,6 +38,11 @@ alias grep='grep --color=auto'
alias quit='exit'
export EDITOR=nvim
alias cat='bat --paging=never'
+alias ds='sudo -E guix system -L ~/.config/guix/modules reconfigure ~/.config/guix/$(hostname).scm'
+alias dh='guix home -L ~/.config/guix/modules reconfigure ~/.config/guix/home-config/home-configuration.scm && home-manager switch'
+alias gc='git -C ~/.config/guix add . && git -C ~/.config/guix commit && git -C ~/.config/guix push all'
+alias cg='git -C ~/.config/guix pull'
+alias cgh='git -C ~/.config/guix pull stationeryh main'
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/ryan/.local/share/flatpak/exports/share
# GPG SETUP FOR SSH
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
@@ -29,19 +31,31 @@
;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile.
(packages (append (specifications->packages (list "bat"
+ "xdg-utils"
+ "abook"
+ "libnotify"
+ "fzf"
+ "waypipe"
+ "gnunet"
"qrencode"
"binutils"
"gcc-toolchain"
"borg"
+ "restic"
+ "rsync"
+ "cloc"
+ "pv"
"python-msgpack"
"libreoffice"
"flatpak"
"gnupg"
"lsof"
"pavucontrol"
+ "netcat"
"bind:utils"
"font-cns11643"
"syncthing"
+ "imv"
"perl"
"tor"
"unzip"
@@ -49,7 +63,8 @@
"htop"
"curl"
"pandoc"
- "texlive-base"
+ "texlive-bin"
+ "texlive-scheme-basic"
"texlive-txfonts"
"texlive-amsfonts"
"texlive-lm"
@@ -58,15 +73,14 @@
"texlive-unicode-math"
"texlive-fontspec"
"texlive-xcolor"
- "texlive-latex-geometry"
+ "texlive-geometry"
"texlive-hyperref"
- "texlive-latex-parskip"
+ "texlive-parskip"
"texlive-etoolbox"
"zathura"
"zathura-pdf-mupdf"
"fzf"
"weechat"
- "icedove-minimal"
"gimp"
"python"
"python:tk"
@@ -76,9 +90,14 @@
"sqlite"
"mpv"
"playerctl"
+ "aerc"
+ "tcpdump"
"pamixer"
- "git"))
- (list my-neovim)))
+ "git"
+ "password-store"
+ "node"
+ "git-lfs"))
+ (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.
@@ -95,10 +114,13 @@
(service home-xdg-configuration-files-service-type
`(("nvim/init.vim" ,(local-file "nvim/config/init.vim"))
("nvim/after/ftplugin/markdown/custom.vim" ,(local-file "nvim/config/after/ftplugin/markdown/custom.vim"))
+ ("nvim/after/ftplugin/mail/custom.vim" ,(local-file "nvim/config/after/ftplugin/mail/custom.vim"))
("sway" ,(local-file "sway" #:recursive? #t))
("hypr" ,(local-file "hypr" #:recursive? #t))
("waybar" ,(local-file "waybar" #:recursive? #t))
("alacritty" ,(local-file "alacritty" #:recursive? #t))
+ ("aerc" ,(local-file "aerc" #:recursive? #t))
+ ("mpv" ,(local-file "mpv" #:recursive? #t))
("home-manager" ,(local-file "nix-home-manager" #:recursive? #t)) ))
(service home-files-service-type
`((".local/share/nvim/site/autoload/plug.vim" ,(local-file "nvim/plugin-manager/plug.vim"))
@@ -11,5 +11,3 @@ swaybg -i ~/.config/hypr/Wallpapers/mountains.jpg &
swayidle -w timeout 300 'swaylock --screenshots --clock --indicator --grace 3 --fade-in 1 --effect-blur 7x5 --effect-greyscale' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -c 000000' &
syncthing serve --no-browser &
-
-blueman-applet &
@@ -27,6 +27,7 @@ input {
kb_model =
kb_options =
kb_rules =
+ numlock_by_default = true
follow_mouse = 1
@@ -118,6 +119,7 @@ bind = $mainMod, Return, exec, alacritty
bind = $mainMod SHIFT, Q, killactive
bind = $mainMod SHIFT, E, exit
bind = $mainMod SHIFT, Space, togglefloating
+bind = $mainMod SHIFT, Return, pin, active
bind = $mainMod, D, exec, fuzzel --width=35 --font='Hack:weight=bold:size=12' --background-color='282a36fa' --selection-color='3d4460fa' --line-height=20 --border-radius=20
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
@@ -213,4 +215,11 @@ windowrulev2 = nofullscreenrequest, class:^(firefox)$, title:^(Firefox — Shari
windowrulev2 = float,class:^(ala-wttr)$
windowrulev2 = size 740 712, class:^(ala-wttr)$
+# Change color of pinned windows
+windowrulev2 = bordercolor rgba(bf0000ee) rgba(ab00adee) 45deg,pinned:1
+
exec-once = ~/.config/hypr/autostart.sh
+
+misc {
+ disable_hyprland_logo = true
+}
@@ -1,2 +1,2 @@
-monitor=eDP-1,1920x1080, 1920x0, 1
-monitor=HDMI-A-1,1920x1080, 0x0, 1
+monitor=eDP-1,1920x1080, 0x0, 1
+monitor=HDMI-A-1,1920x1080, 1920x0, 1
@@ -0,0 +1,253 @@
+local msg = require('mp.msg')
+local assdraw = require('mp.assdraw')
+
+local script_name = "easycrop"
+
+-- Number of crop points currently chosen (0 to 2)
+local points = {}
+-- True if in cropping selection mode
+local cropping = false
+-- Original value of osc property
+local osc_prop = false
+
+-- Helper that converts two points to top-left and bottom-right
+local swizzle_points = function (p1, p2)
+ if p1.x > p2.x then p1.x, p2.x = p2.x, p1.x end
+ if p1.y > p2.y then p1.y, p2.y = p2.y, p1.y end
+end
+
+local clamp = function (val, min, max)
+ assert(min <= max)
+ if val < min then return min end
+ if val > max then return max end
+ return val
+end
+
+local video_space_from_screen_space = function (ssp)
+ -- Video native dimensions and screen size
+ local vid_w = mp.get_property("width")
+ local vid_h = mp.get_property("height")
+ local osd_w = mp.get_property("osd-width")
+ local osd_h = mp.get_property("osd-height")
+
+ -- Factor by which the video is scaled to fit the screen
+ local scale = math.min(osd_w/vid_w, osd_h/vid_h)
+
+ -- Size video takes up in screen
+ local vid_sw, vid_sh = scale*vid_w, scale*vid_h
+
+ -- Video offset within screen
+ local off_x = math.floor((osd_w - vid_sw)/2)
+ local off_y = math.floor((osd_h - vid_sh)/2)
+
+ local vsp = {}
+
+ -- Move the point to within the video
+ vsp.x = clamp(ssp.x, off_x, off_x + vid_sw)
+ vsp.y = clamp(ssp.y, off_y, off_y + vid_sh)
+
+ -- Convert screen-space to video-space
+ vsp.x = math.floor((vsp.x - off_x) / scale)
+ vsp.y = math.floor((vsp.y - off_y) / scale)
+
+ return vsp
+end
+
+local screen_space_from_video_space = function (vsp)
+ -- Video native dimensions and screen size
+ local vid_w = mp.get_property("width")
+ local vid_h = mp.get_property("height")
+ local osd_w = mp.get_property("osd-width")
+ local osd_h = mp.get_property("osd-height")
+
+ -- Factor by which the video is scaled to fit the screen
+ local scale = math.min(osd_w/vid_w, osd_h/vid_h)
+
+ -- Size video takes up in screen
+ local vid_sw, vid_sh = scale*vid_w, scale*vid_h
+
+ -- Video offset within screen
+ local off_x = math.floor((osd_w - vid_sw)/2)
+ local off_y = math.floor((osd_h - vid_sh)/2)
+
+ local ssp = {}
+ ssp.x = vsp.x * scale + off_x
+ ssp.y = vsp.y * scale + off_y
+ return ssp
+end
+
+-- Wrapper that converts RRGGBB / RRGGBBAA to ASS format
+local ass_set_color = function (idx, color)
+ assert(color:len() == 8 or color:len() == 6)
+ local ass = ""
+
+ -- Set alpha value (if present)
+ if color:len() == 8 then
+ local alpha = 0xff - tonumber(color:sub(7, 8), 16)
+ ass = ass .. string.format("\\%da&H%X&", idx, alpha)
+ end
+
+ -- Swizzle RGB to BGR and build ASS string
+ color = color:sub(5, 6) .. color:sub(3, 4) .. color:sub(1, 2)
+ return "{" .. ass .. string.format("\\%dc&H%s&", idx, color) .. "}"
+end
+
+local draw_rect = function (p1, p2)
+ local osd_w, osd_h = mp.get_property("osd-width"), mp.get_property("osd-height")
+
+ ass = assdraw.ass_new()
+
+ -- Draw overlay over surrounding unselected region
+
+ ass:draw_start()
+ ass:pos(0, 0)
+
+ ass:append(ass_set_color(1, "000000aa"))
+ ass:append(ass_set_color(3, "00000000"))
+
+ local l = math.min(p1.x, p2.x)
+ local r = math.max(p1.x, p2.x)
+ local u = math.min(p1.y, p2.y)
+ local d = math.max(p1.y, p2.y)
+
+ ass:rect_cw(0, 0, l, osd_h)
+ ass:rect_cw(r, 0, osd_w, osd_h)
+ ass:rect_cw(l, 0, r, u)
+ ass:rect_cw(l, d, r, osd_h)
+
+ ass:draw_stop()
+
+ -- Draw border around selected region
+
+ ass:new_event()
+ ass:draw_start()
+ ass:pos(0, 0)
+
+ ass:append(ass_set_color(1, "00000000"))
+ ass:append(ass_set_color(3, "000000ff"))
+ ass:append("{\\bord2}")
+
+ ass:rect_cw(p1.x, p1.y, p2.x, p2.y)
+
+ ass:draw_stop()
+
+ mp.set_osd_ass(osd_w, osd_h, ass.text)
+end
+
+local draw_fill = function ()
+ local osd_w, osd_h = mp.get_property("osd-width"), mp.get_property("osd-height")
+
+ ass = assdraw.ass_new()
+ ass:draw_start()
+ ass:pos(0, 0)
+
+ ass:append(ass_set_color(1, "000000aa"))
+ ass:append(ass_set_color(3, "00000000"))
+ ass:rect_cw(0, 0, osd_w, osd_h)
+
+ ass:draw_stop()
+ mp.set_osd_ass(osd_w, osd_h, ass.text)
+end
+
+local draw_clear = function ()
+ local osd_w, osd_h = mp.get_property("osd-width"), mp.get_property("osd-height")
+ mp.set_osd_ass(osd_w, osd_h, "")
+end
+
+local draw_cropper = function ()
+ if #points == 1 then
+ local p1 = screen_space_from_video_space(points[1])
+ local p2 = {}
+ p2.x, p2.y = mp.get_mouse_pos()
+ draw_rect(p1, p2)
+ end
+end
+
+local uncrop = function ()
+ mp.command("no-osd vf del @" .. script_name .. ":crop")
+end
+
+local crop = function(p1, p2)
+ swizzle_points(p1, p2)
+
+ local w = p2.x - p1.x
+ local h = p2.y - p1.y
+ local ok, err = mp.command(string.format(
+ "no-osd vf add @%s:crop=%s:%s:%s:%s", script_name, w, h, p1.x, p1.y))
+
+ if not ok then
+ mp.osd_message("Cropping failed")
+ points = {}
+ end
+end
+
+local easycrop_stop = function ()
+ mp.set_property("osc", osc_prop)
+ cropping = false
+ mp.remove_key_binding("easycrop_mouse_btn0")
+ draw_clear()
+end
+
+local mouse_btn0_cb = function ()
+ if not cropping then
+ return
+ end
+
+ local mx, my = mp.get_mouse_pos()
+ table.insert(points, video_space_from_screen_space({ x = mx, y = my }))
+
+ if #points == 2 then
+ crop(points[1], points[2])
+ easycrop_stop()
+ end
+end
+
+local easycrop_start = function ()
+ -- Cropping requires swdec or hwdec with copy-back
+ local hwdec = mp.get_property("hwdec-current")
+ if hwdec == nil then
+ return mp.msg.error("Cannot determine current hardware decoder mode")
+ end
+ -- Check whitelist of ok values
+ local valid_hwdec = {
+ ["no"] = true, -- software decoding
+ -- Taken from mpv manual
+ ["videotoolbox-co"] = true,
+ ["vaapi-copy"] = true,
+ ["dxva2-copy"] = true,
+ ["d3d11va-copy"] = true,
+ ["mediacodec"] = true
+ }
+ if not valid_hwdec[hwdec] then
+ return mp.osd_message("Cropping requires swdec or hwdec with copy-back (see mpv manual)")
+ end
+
+ -- Just clear the current crop and return, if there is one
+ if #points ~= 0 then
+ uncrop()
+ points = {}
+ return
+ end
+
+ -- Hide OSC
+ osc_prop = mp.get_property("osc")
+ mp.set_property("osc", "no")
+
+ cropping = true
+ mp.add_forced_key_binding("mouse_btn0", "easycrop_mouse_btn0", mouse_btn0_cb)
+ draw_fill()
+end
+
+local easycrop_activate = function ()
+ if cropping then
+ easycrop_stop()
+ else
+ easycrop_start()
+ end
+end
+
+mp.add_key_binding("mouse_move", draw_cropper)
+mp.observe_property("osd-width", "native", draw_cropper)
+mp.observe_property("osd-height", "native", draw_cropper)
+
+mp.add_key_binding("c", "easy_crop", easycrop_activate)
@@ -28,7 +28,10 @@
# # "Hello, world!" when run.
# pkgs.hello
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
@@ -0,0 +1,2 @@
+setlocal tw=0
+setlocal lbr
@@ -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'
@@ -23,6 +25,9 @@ Plug 'nvim-lualine/lualine.nvim'
Plug 'nvim-tree/nvim-web-devicons'
Plug 'ms-jpq/coq_nvim', {'branch':'coq'}
Plug 'ms-jpq/coq.artifacts', {'branch':'artifacts'}
+Plug 'williamboman/mason.nvim'
+Plug 'williamboman/mason-lspconfig.nvim'
+Plug 'neovim/nvim-lspconfig'
Plug 'nvim-orgmode/orgmode'
call plug#end()
@@ -37,17 +42,32 @@ lua << END
require('lualine').setup()
require('coq')
require('orgmode').setup_ts_grammar()
+require("mason").setup()
+require("mason-lspconfig").setup {
+ ensure_installed = { "pyright" },
+}
+
+require("mason-lspconfig").setup_handlers {
+ function (server_name)
+ require("lspconfig")[server_name].setup {}
+ end,
+}
+
require('nvim-treesitter.configs').setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = {'org'},
},
- ensure_installed = {'org', 'vim'},
+ ensure_installed = {'org', 'vim', 'python'},
}
require('orgmode').setup({
org_agenda_files = {'~/Sync/org/**/*'},
org_default_notes_file = '~/Sync/org/refile.org',
+ org_blank_before_new_entry = {
+ heading = false,
+ plain_list_item = false,
+ },
})
vim.opt.conceallevel = 2
@@ -70,8 +90,8 @@ let g:table_mode_header_fillchar='='
"pandoc render and open preview
command Pv AsyncRun zathura '%:r.pdf'
-command Rd silent exec "!pandoc -t pdf -o %:r.pdf --pdf-engine=xelatex --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
-command Rr exec "!pandoc -t pdf -o %:r.pdf --pdf-engine=xelatex --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
+command Rd silent exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
+command Rr exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
"Auto-rerender markdown files to pdf
autocmd BufWritePost *.mkd :Rd
@@ -1,21 +1,23 @@
{
- "layer": "bottom",
+ "layer": "top",
"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", "pulseaudio", "network", "idle_inhibitor", "battery", "clock"],
+ "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": {
"max-length": 80,
- "tooltip": false
+ "tooltip": false,
+ "separate-outputs": true
},
"clock": {
"format": "{:%a %d %b %H:%M}",
@@ -34,14 +36,25 @@
"tooltip": false,
"bat":"BAT1"
},
+ "bluetooth": {
+ "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}",
+ "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
+ "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
+ },
"network": {
- "format-alt": "{icon}",
+ "format-alt": "{ipaddr}/{cidr} {icon} {bandwidthTotalBytes}",
"format": "{ipaddr}/{cidr} {icon}",
"format-alt-click": "click-right",
"format-icons": {
- "wifi": ["", "" ,""],
+ "wifi": ["", "" ,"", ""],
"ethernet": [""],
- "disconnected": ["睊"]
+ "disconnected": [""]
},
"on-click": "alacritty -e doas nmtui",
"tooltip": false
@@ -63,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;
@@ -46,7 +46,7 @@ window#waybar.solo {
color: rgba(238, 46, 36, 1);
}
-#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail {
+#mode, #battery, #cpu, #memory, #network, #bluetooth, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail {
margin: 0px 6px 0px 10px;
min-width: 25px;
}
@@ -3,6 +3,7 @@
#:use-module (nongnu packages linux)
#:use-module (gnu system setuid)
#:use-module (gnu packages admin)
+ #:use-module (gnu packages avahi)
#:use-module (guix packages)
#:use-module (gnu packages shells)
#:use-module (guix build-system trivial)
@@ -11,6 +12,7 @@
#:use-module (srfi srfi-1)
#:use-module (ryan-packages freedesktop)
#:use-module (ryan-packages wm)
+ #:use-module (ryan-packages virtualization)
#:use-module (rosenthal packages wm)
#:use-module (gnu packages security-token)
#:use-module (gnu services security-token)
@@ -22,6 +24,7 @@
#:use-module (gnu services nix)
#:use-module (gnu services sound)
#:use-module (gnu services docker)
+ #:use-module (gnu services avahi)
#:use-module (gnu services virtualization))
; Define package that installs my root ca public keys
@@ -119,6 +122,7 @@
;"waybar"
"gnupg"
"light"
+ "avahi"
"mako"
"grim"
"grimblast"
@@ -136,12 +140,13 @@
"v4l2loopback-linux-module"
"pipewire"
"docker"
- "libvirt"
- "virt-manager"
+ ;"libvirt" ;New version inherited from service
+ ;"virt-manager"
+ "dconf"
"wireplumber"
"wireshark"
"zsh"))
- (list my-ca-certs swaylock-effects-new waybar-new xdg-desktop-portal-hyprland)
+ (list my-ca-certs swaylock-effects-new waybar-new xdg-desktop-portal-hyprland virt-manager-ovmf)
%my-base-packages ))
;; Below is the list of system services. To search for available
@@ -153,13 +158,25 @@
;; record as a second argument to 'service' below.
(service openssh-service-type)
(service pcscd-service-type)
+ (service cups-service-type
+ (cups-configuration
+ (web-interface? #t)))
+ ;; Avahi is only present for CUPS to support "automagic" printing
+ (service avahi-service-type
+ (avahi-configuration
+ (publish? #f) ;; do not advertise this machine
+ (publish-workstation? #f))) ;; do not advertise, I want this to be as silent as possible
(service docker-service-type)
(service nix-service-type)
(service libvirt-service-type
(libvirt-configuration
+ (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
@@ -169,7 +186,7 @@
(guix-configuration
(inherit config)
(substitute-urls
- (append (list "https://substitutes.nonguix.org")
+ (append (list "https://substitutes.nonguix.org" "http://129.21.94.53:8080")
%default-substitute-urls))
(authorized-keys
(cons* (plain-file "non-guix.pub"
@@ -178,7 +195,12 @@
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
)
- )" ) %default-authorized-guix-keys))))
+ )" )
+ (plain-file "ryan-key.pub"
+ "(public-key
+ (ecc
+ (curve Ed25519)
+ (q #24ED64A7C001DAC05D47F586623EAC4C1F4BD2D267686D5781A9098808160ADC#)))" ) %default-authorized-guix-keys))))
(udev-service-type config =>
(udev-configuration
(inherit config)
@@ -186,8 +208,10 @@
(udev-configuration-rules config)))))
(delete pulseaudio-service-type)
(delete gdm-service-type)
+ (delete avahi-service-type)
;(delete xorg-server-service-type)
(delete alsa-service-type) )))
+ (name-service-switch %mdns-host-lookup-nss) ;; Enable .local lookup
(setuid-programs
(append (list (file-like->setuid-program
(file-append
@@ -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
@@ -0,0 +1,81 @@
+(define-module (ryan-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))
+ (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. This cannot be updated to the latest version (7.0.8) because
+ the packaged version of @code{gtk} is too old.")
+ (home-page "https://github.com/wwmm/easyeffects")
+ (license license:gpl3+)))
+
+easyeffects
@@ -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,8 @@
#:use-module (gnu packages cmake)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages man)
#:use-module (rosenthal packages wm)
#:use-module (gnu packages wm))
@@ -97,4 +102,34 @@
(description "test")
(license license:bsd-3)))
-xdg-desktop-portal-hyprland
+(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)))
+
+wl-mirror
@@ -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))))))
@@ -0,0 +1,45 @@
+;;; Stolen from https://g.tylerm.dev/tylerm/dotfiles/raw/branch/main/modules/home-packages/virtualization.scm
+
+(define-module (ryan-packages virtualization)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages package-management)
+ #:use-module (gnu packages build-tools)
+ #:use-module (gnu packages virtualization)
+ #:use-module (gnu packages firmware)
+ #:use-module (guix gexp))
+
+(define-public libvirt-ovmf
+ (package
+ (inherit libvirt)
+ (name "libvirt-ovmf")
+ (inputs
+ (modify-inputs (package-inputs libvirt)
+ (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")
+ (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))))))))))
@@ -0,0 +1,63 @@
+(define-module (ryan-packages web-server)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (guix gexp)
+ #:use-module (gnu packages)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system go)
+ #:use-module (guix git-download)
+ #:use-module (gnu packages golang)
+ #:use-module (guix utils))
+
+(define-public go-github-com-caddy-certmagic
+ (package
+ (name "certmagic")
+ (version "0.19.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/caddyserver/certmagic")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0jgbkj0azkbs828vsd3gycpab8pycgf55vrxkvnfmwfjpdiq1551"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:tests? #f
+ #:go go-1.20
+ #:import-path "github.com/caddyserver/certmagic"))
+ (home-page "https://github.com/caddyserver/certmagic")
+ (synopsis "Certbot ACME")
+ (description "Automagic certificate management in Caddy")
+ (license license:expat)))
+
+(define-public caddy
+ (package
+ (name "Caddy")
+ (version "2.7.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/caddyserver/caddy")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0jgbkj0azkbs828vsd3gycpab8pycgf55vrxkvnfmwfjpdiq1551"))))
+ (build-system go-build-system)
+ (native-inputs (list go-github-com-google-uuid
+ go-go-uber-org-zap
+ go-github-com-caddy-certmagic
+ go-github-com-prometheus-client-golang
+ go-golang-org-x-term
+ go-golang-org-x-sys))
+ (arguments
+ (list #:tests? #f
+ #:go go-1.20
+ ;#:unpack-path "github.com/caddyserver/caddy"
+ #:import-path "github.com/caddyserver/caddy"))
+ (home-page "https://github.com/caddyserver/caddy")
+ (synopsis "Web server")
+ (description "This package serves the web")
+ (license license:expat)))
+
+caddy