Compare commits

...

10 commits

78 changed files with 862 additions and 286 deletions

View file

@ -3,7 +3,7 @@
(url "https://git.savannah.gnu.org/git/guix.git") (url "https://git.savannah.gnu.org/git/guix.git")
(branch "master") (branch "master")
(commit (commit
"50dd91bc30634c75c0001cfd38bbcc2fbbeb894e" ) "c8e599b9391f789a8a3e2183fc8f0c2a5061ceb0")
(introduction (introduction
(make-channel-introduction (make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad" "9edb3f66fd807b096b48283debdcddccfea34bad"
@ -14,7 +14,7 @@
(url "https://gitlab.com/nonguix/nonguix") (url "https://gitlab.com/nonguix/nonguix")
(branch "master") (branch "master")
(commit (commit
"7a9b3ca63bdea219d3977ed5fdab2ed98eaa36a0") "713f233be79fed1efad0c58d51b1829644323810")
(introduction (introduction
(make-channel-introduction (make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc" "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
@ -22,6 +22,6 @@
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
;(channel ;(channel
; (name 'ryan-home-services) ; (name 'ryan-home-services)
; (url "https://git.ryanserver.home.arpa") ; (url "https://git.ryanserver.home.arpa/ryan77627/ryan-home-services")
; (branch "main")) ; (branch "main"))
) )

View file

@ -0,0 +1,13 @@
font:
size: 15
normal:
family: "Monofur for Powerline"
style: Regular
bold:
family: "Monofur for Powerline"
style: Bold
italic:
family: "Monofur for Powerline"
style: Italic

View file

@ -41,6 +41,6 @@ alias cat='bat --paging=never'
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/ryan/.local/share/flatpak/exports/share export XDG_DATA_DIRS=$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/ryan/.local/share/flatpak/exports/share
# GPG SETUP FOR SSH # GPG SETUP FOR SSH
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) #export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent #gpgconf --launch gpg-agent
export GPG_TTY=$(tty) export GPG_TTY=$(tty)

View file

@ -0,0 +1,93 @@
Copyright (c) 2019, The Lilex Project Authors (https://github.com/mishamyrt/lilex)
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.

View file

@ -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/

View file

@ -0,0 +1,3 @@
enable-ssh-support
pinentry-program /run/current-system/profile/bin/pinentry

View file

@ -0,0 +1,10 @@
# List of allowed ssh keys. Only keys present in this file are used
# in the SSH protocol. The ssh-add tool may add new entries to this
# file to enable them; you may also add them manually. Comment
# lines, like this one, as well as empty lines are ignored. Lines do
# have a certain length limit but this is not serious limitation as
# the format of the entries is fixed and checked by gpg-agent. A
# non-comment line starts with optional white spaces, followed by the
# keygrip of the key given as 40 hex digits, optionally followed by a
# caching TTL in seconds, and another optional field for arbitrary
# flags. Prepend the keygrip with an '!' mark to disable it.

View file

@ -8,11 +8,15 @@
(gnu packages) (gnu packages)
(gnu packages vim) (gnu packages vim)
(gnu packages gcc) (gnu packages gcc)
(gnu packages gnupg)
(gnu services) (gnu services)
(guix packages) (guix packages)
(guix gexp) (guix gexp)
(gnu home services shells) (gnu home services shells)
(gnu home services)) (gnu home services desktop)
(gnu home services gnupg)
(gnu home services)
(ryan-services pipewire))
(define my-neovim (define my-neovim
(package (package
@ -52,7 +56,7 @@
"texlive-amsfonts" "texlive-amsfonts"
"texlive-lm" "texlive-lm"
"texlive-lm-math" "texlive-lm-math"
"texlive-generic-iftex" "texlive-iftex"
"texlive-unicode-math" "texlive-unicode-math"
"texlive-fontspec" "texlive-fontspec"
"texlive-xcolor" "texlive-xcolor"
@ -90,6 +94,20 @@
"bash_profile"))))) "bash_profile")))))
(service home-xdg-configuration-files-service-type (service home-xdg-configuration-files-service-type
`(("nvim/init.vim" ,(local-file "nvim/config/init.vim")) `(("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/markdown/custom.vim" ,(local-file "nvim/config/after/ftplugin/markdown/custom.vim"))
("sway" ,(local-file "sway" #:recursive? #t))
("waybar" ,(local-file "waybar" #:recursive? #t))
("alacritty" ,(local-file "alacritty" #:recursive? #t)) ))
(service home-files-service-type (service home-files-service-type
`((".local/share/nvim/site/autoload/plug.vim" ,(local-file "nvim/plugin-manager/plug.vim")) ))))) `((".local/share/nvim/site/autoload/plug.vim" ,(local-file "nvim/plugin-manager/plug.vim"))
(".ssh/config" ,(local-file "ssh/config"))
;(".gnupg/sshcontrol" ,(local-file "gnupg/sshcontrol"))
;(".gnupg/gpg-agent.conf" ,(local-file "gnupg/gpg-agent.conf"))
(".fonts" ,(local-file "fonts" #:recursive? #t))))
(service home-pipewire-service-type)
(service home-dbus-service-type)
(service home-gpg-agent-service-type
(home-gpg-agent-configuration
(pinentry-program
(file-append pinentry "/bin/pinentry"))
(ssh-support? #t))) )))

12
home-config/ssh/config Normal file
View file

@ -0,0 +1,12 @@
Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"
Host rocApex
HostName 129.158.232.104
User root
Host linode
HostName 97.107.142.58
User root
Host *
KexAlgorithms -sntrup761x25519-sha512@openssh.com

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

325
home-config/sway/config Normal file
View file

@ -0,0 +1,325 @@
# Ryan's config for sway
#
# Dependencies:
# waybar
# fuzzel
# light (with proper udev setting for backlight control)
# alacritty
# swaylock-effects
# swayidle
# dejavu-fonts-ttf
# nerd-fonts-otf
# noto-fonts-cjk
# mako / libnotify
# grim / slurp / wl-clipboard
# swaybg
# pipewire / pipewire-pulse / pipewire-jack / wireplumber
# blueman
# spotifyd
# syslog-ng
# OPTIONAL: wdisplays (monitor layout)
# ...
### Variables
exec sh ~/.profile
# Load up the user session dbus
#exec dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term alacritty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
#set $menu bemenu-run --no-exec | xargs swaymsg exec --
set $menu fuzzel --width=35 --font='Hack:weight=bold:size=12' --background-color='282a36fa' --selection-color='3d4460fa' --line-height=20 --border-radius=20
# Set lock screen settings
set $lock 'swaylock --screenshots --clock --indicator --grace 3 --fade-in 1 --effect-blur 7x5 --effect-greyscale'
# Same as above but no grace period
set $lock_now 'swaylock --screenshots --clock --indicator --fade-in 1 --effect-blur 7x5 --effect-greyscale'
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg ~/.config/sway/Wallpapers/mountains.jpg fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs (moved to ~/.config/sway/monitors)
include ~/.config/sway/monitors
#output eDP-1 mode 1920x1080@60.008Hz pos 1920 590
#output HDMI-A-1 mode 1920x1080@74.972Hz pos 0 0
### Idle configuration
#
# Example configuration:
#
exec swayidle -w \
timeout 300 $lock \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
# Winkey+L lock key combo
bindsym $mod+l exec $lock_now
#
#Winkey+Shift+L to lock then go to sleep. zzz must run with no passwd
bindsym $mod+Shift+l exec 'swaylock --screenshots --clock --indicator --effect-blur 7x5 --effect-greyscale & sleep 0.5; doas zzz'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
gaps inner 10
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
#Restart your session
bindsym $mod+Shift+r restart
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
#bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
#bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Since I run more than one monitor most of the time, these let me move
# workspaces between physical screens
bindsym $mod+Control+Shift+Right move workspace to output right
bindsym $mod+Control+Shift+Left move workspace to output left
# Now I could do the same with up and down but I don't have any of those
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
bindsym $mod+Ctrl+Right focus sibling next
#
# Misc. button bindings
#
# Some custom keybinds for various keys on my laptop
bindsym XF86MonBrightnessUp exec light -A 10
bindsym XF86MonBrightnessDown exec light -U 10
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
#bar {
# position top
#
# # When the status_command prints a new line to stdout, swaybar updates.
# # The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
#
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
bar {
swaybar_command waybar
}
exec hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
# Numlock on startup
input * xkb_numlock enabled
# Bluetooth
exec blueman-applet
# Audio Server
#exec pipewire
#exec wireplumber
#exec pipewire-pulse
# Spotifyd
#exec spotifyd
# Notification controls
exec mako
bindsym $mod+n exec makoctl dismiss
bindsym $mod+Shift+n exec makoctl dismiss -a
# Flameshot position fix and autostart
#exec QT_QPA_PLATFORM=wayland flameshot
#for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0
# Screenshots to clipboard
bindsym $mod+Shift+S exec grim -g "$(slurp)" - | wl-copy -t image/png
bindsym $mod+Print exec grim - | wl-copy -t image/png
#bindsym $mod+Ctrl+Shift+S exec grim -g "$(slurp)" $(echo "$HOME/Pictures/Screenshot_$(date +'%Y%m%d')_$(date +'%H%M%S').png")
bindsym $mod+Ctrl+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy -t image/png
# Zathura notes window resize
for_window [app_id="org.pwmt.zathura" title="^.*notes.pdf$"] resize set width 775
# Syncthing start
exec syncthing serve --no-browser
# Force various windows to be floating
# Firefox PIP YT Player
for_window [app_id="firefox-default" title="^Picture-in-Picture$"] floating enable, resize set 578 326, border none, sticky enable
# Duo 2FA
for_window [app_id="firefox-default" title="^Activate Security Key — Mozilla Firefox$"] floating enable
for_window [app_id="firefox-default" title="^Nightly — Sharing Indicator$"] floating enable, resize set 18 52, border none, move position center, move y 0px
# Qjackctl
for_window [app_id="qjackctl"] floating enable
# Weather Window
for_window [app_id="ala-wttr"] border none, floating enable, resize set 740 712
include /etc/sway/config.d/*

116
home-config/waybar/config Normal file
View file

@ -0,0 +1,116 @@
{
"layer": "bottom",
"position": "top",
"height": 30,
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["tray", "custom/spotify", "custom/weather", "custom/mail", "custom/storage", "backlight", "pulseaudio", "network", "idle_inhibitor", "battery", "clock"],
"sway/mode": {
"format": " {}"
},
"sway/workspaces": {
"format": "{name}",
"disable-scroll": true
},
"sway/window": {
"max-length": 80,
"tooltip": false
},
"clock": {
"format": "{:%a %d %b %H:%M}",
"tooltip": false
},
"battery": {
"format": "{capacity}% {icon}",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""],
"format-charging": "{capacity}% ",
"interval": 30,
"states": {
"warning": 25,
"critical": 10
},
"tooltip": false,
"bat":"BAT1"
},
"network": {
"format-alt": "{icon}",
"format": "{ipaddr}/{cidr} {icon}",
"format-alt-click": "click-right",
"format-icons": {
"wifi": ["", "" ,""],
"ethernet": [""],
"disconnected": ["睊"]
},
"on-click": "alacritty -e iwctl",
"tooltip": false
},
"pulseaudio": {
"format-alt": "{icon}",
"format": "{volume} {icon}",
"format-alt-click": "click-right",
"format-muted": "",
"format-icons": {
"phone": [" ", " ", " ", " "],
"default": ["", "", "", ""]
},
"scroll-step": 1,
"on-click": "pavucontrol",
"tooltip": false
},
"custom/spotify": {
"interval": 2,
"return-type": "json",
"exec": "~/.config/waybar/modules/spotify.sh",
"exec-if": "pgrep spotifyd",
"escape": true,
"on-click": "~/.config/waybar/modules/spotify-play-pause.sh play-pause"
},
"custom/storage": {
"format-alt": "{} ",
"format": "{percentage}% ",
"format-alt-click": "click-right",
"return-type": "json",
"interval": 60,
"exec": "~/.config/waybar/modules/storage.sh"
},
"backlight": {
"format-alt": "{icon}",
"format": "{percent}% {icon}",
"format-alt-click": "click-right",
"format-icons": ["", ""],
"on-scroll-down": "light -A 1",
"on-scroll-up": "light -U 1"
},
"custom/weather": {
"format-alt": "{}",
"format": "{alt}: {}",
"format-alt-click": "click-right",
"interval": 1800,
"return-type": "json",
"on-click": "alacritty --class ala-wttr --hold -e curl https://v2.wttr.in",
"exec": "~/.config/waybar/modules/weather.sh",
"exec-if": "ping wttr.in -c1"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip": false
},
"custom/mail": {
"format": "",
"format-alt": "{alt} ",
"format-alt-click": "click-right",
"interval": 60,
"return-type": "json",
"exec": "~/.config/waybar/modules/mail.py",
"tooltip": false
},
"tray": {
"icon-size": 18
}
}

View file

@ -0,0 +1,19 @@
#!/bin/sh
class=$(playerctl metadata --player=spotifyd --format '{{lc(status)}}')
icon=""
if [[ $class == "playing" ]]; then
info=$(playerctl metadata --player=spotifyd --format '{{artist}} - {{title}}')
if [[ ${#info} > 40 ]]; then
info=$(echo $info | cut -c1-40)"..."
fi
text=$info" "$icon
elif [[ $class == "paused" ]]; then
text=$icon
elif [[ $class == "stopped" ]]; then
text=""
fi
echo -e "{\"text\":\""$text"\", \"class\":\""$class"\"}"

View file

@ -0,0 +1,25 @@
#!/bin/sh
mount="/"
warning=20
critical=10
df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical '
/\/.*/ {
text=$4
tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6
use=$5
exit 0
}
END {
class=""
gsub(/%$/,"",use)
if ((100 - use) < critical) {
class="critical"
} else if ((100 - use) < warning) {
class="warning"
}
print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}"
}
'

View file

@ -0,0 +1,77 @@
cachedir=~/.cache/rbn
cachefile=${0##*/}-$1
if [ ! -d $cachedir ]; then
mkdir -p $cachedir
fi
if [ ! -f $cachedir/$cachefile ]; then
touch $cachedir/$cachefile
fi
# Save current IFS
SAVEIFS=$IFS
# Change IFS to new line.
IFS=$'\n'
cacheage=$(($(date +%s) - $(stat -c '%Y' "$cachedir/$cachefile")))
if [ $cacheage -gt 1740 ] || [ ! -s $cachedir/$cachefile ]; then
data=($(curl -s https://en.wttr.in/$1\?0qnT 2>&1))
echo ${data[0]} | cut -f1 -d, > $cachedir/$cachefile
echo ${data[1]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile
echo ${data[2]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile
fi
weather=($(cat $cachedir/$cachefile))
# Restore IFSClear
IFS=$SAVEIFS
temperature=$(echo ${weather[2]} | sed -E 's/([[:digit:]]+)\.\./\1 to /g')
#echo ${weather[1]##*,}
# https://fontawesome.com/icons?s=solid&c=weather
case $(echo ${weather[1]##*,} | tr '[:upper:]' '[:lower:]') in
"clear" | "sunny")
condition=""
;;
"partly cloudy")
condition=""
;;
"cloudy")
condition=""
;;
"overcast")
condition=""
;;
"mist" | "fog" | "freezing fog")
condition="敖"
;;
"patchy rain possible" | "patchy light drizzle" | "light drizzle" | "patchy light rain" | "light rain" | "light rain shower" | "rain")
condition="殺"
;;
"moderate rain at times" | "moderate rain" | "heavy rain at times" | "heavy rain" | "moderate or heavy rain shower" | "torrential rain shower" | "rain shower")
condition=""
;;
"patchy snow possible" | "patchy sleet possible" | "patchy freezing drizzle possible" | "freezing drizzle" | "heavy freezing drizzle" | "light freezing rain" | "moderate or heavy freezing rain" | "light sleet" | "ice pellets" | "light sleet showers" | "moderate or heavy sleet showers")
condition="流"
;;
"blowing snow" | "moderate or heavy sleet" | "patchy light snow" | "light snow" | "light snow showers")
condition="ﰕ"
;;
"blizzard" | "patchy moderate snow" | "moderate snow" | "patchy heavy snow" | "heavy snow" | "moderate or heavy snow with thunder" | "moderate or heavy snow showers")
condition=""
;;
"thundery outbreaks possible" | "patchy light rain with thunder" | "moderate or heavy rain with thunder" | "patchy light snow with thunder")
condition=""
;;
*)
condition=""
echo -e "{\"text\":\""$condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}"
;;
esac
#echo $temp $condition
echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}"

View file

@ -0,0 +1,77 @@
* {
border: none;
border-radius: 0;
font-family: Sans;
font-size: 15px;
box-shadow: none;
text-shadow: none;
transition-duration: 0s;
color: white;
}
#waybar {
background-color:rgba(0,0,0,0.25);
color: white;
}
window {
color: rgba(217, 216, 216, 1);
background: rgba(35, 31, 32, 0.00);
}
window#waybar.solo {
color: rgba(217, 216, 216, 1);
background: rgba(35, 31, 32, 0.85);
}
#workspaces {
margin: 0 5px;
}
#workspaces button {
padding: 0 5px;
color: rgba(217, 216, 216, 0.4);
}
#workspaces button.visible {
color: rgba(217, 216, 216, 1);
}
#workspaces button.focused {
border-top: 3px solid rgba(217, 216, 216, 1);
border-bottom: 3px solid rgba(217, 216, 216, 0);
}
#workspaces button.urgent {
color: rgba(238, 46, 36, 1);
}
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail {
margin: 0px 6px 0px 10px;
min-width: 25px;
}
#clock {
margin: 0px 16px 0px 10px;
min-width: 140px;
}
#battery.warning {
color: rgba(255, 210, 4, 1);
}
#battery.critical {
color: rgba(238, 46, 36, 1);
}
#battery.charging {
color: rgba(217, 216, 216, 1);
}
#custom-storage.warning {
color: rgba(255, 210, 4, 1);
}
#custom-storage.critical {
color: rgba(238, 46, 36, 1);
}

View file

@ -1,4 +1,4 @@
(define-module (home-configuration pipewire) (define-module (ryan-services pipewire)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu services) #:use-module (gnu services)
@ -37,7 +37,7 @@
(start #~(make-forkexec-constructor (start #~(make-forkexec-constructor
(list #$(file-append pipewire "/bin/pipewire-pulse")) (list #$(file-append pipewire "/bin/pipewire-pulse"))
#:log-file (string-append #:log-file (string-append
(or (getend "XDG_LOG_HOME") (or (getenv "XDG_LOG_HOME")
(format #f "~a/.local/var/log" (format #f "~a/.local/var/log"
(getenv "HOME"))) (getenv "HOME")))
"/pipewire-pulse.log") "/pipewire-pulse.log")
@ -71,7 +71,7 @@
">\n<" ">\n<"
#$(file-append #$(file-append
pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf") pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf")
">/n" ">\n"
" "
pcm_type.pipewire { pcm_type.pipewire {
lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_pcm_pipewire.so") lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_pcm_pipewire.so")

212
sys
View file

@ -1,212 +0,0 @@
;; This is an operating system configuration generated
;; by the graphical installer.
;;
;; Once installation is complete, you can learn and modify
;; this file to tweak the system configuration, and pass it
;; to the 'guix system reconfigure' command to effect your
;; changes.
;; Indicate which modules to import to access the variables
;; used in this configuration.
(use-modules (gnu) (nongnu packages linux))
(use-modules (gnu system setuid))
(use-modules (gnu packages admin))
(use-modules (guix packages))
(use-modules (gnu services authentication))
(use-modules (gnu packages shells))
(use-modules (guix build-system trivial))
(use-modules (guix licenses))
(use-modules (srfi srfi-1))
(use-package-modules security-token)
(use-service-modules cups desktop networking ssh xorg sound security-token docker)
; Define package that installs my root ca public keys
(define my-ca-certs
(package
(name "my-ca-certs")
(version "1")
(source (local-file "./CACerts"
#:recursive? #t))
(build-system trivial-build-system)
(license mpl2.0)
(home-page "https://rschanz.org")
(arguments
`(#:modules
((guix build utils))
#:builder
(begin
(use-modules (guix build utils)
(srfi srfi-1)
(srfi srfi-26)
(ice-9 ftw))
(let* ((ca-certificates (assoc-ref %build-inputs "source"))
(crt-suffix ".crt")
(is-certificate? (cut string-suffix? crt-suffix <>))
(certificates (filter is-certificate?
(scandir ca-certificates)))
(out (assoc-ref %outputs "out"
"/etc/ssl/certs"))
(openssl (assoc-ref %build-inputs
"openssl")))
(mkdir-p certificate-directory)
(for-each
(lambda (certificate)
(invoke
openssl "x509"
"-in" (string-append ca-certificates "/" certificate)
"-outform" "PEM"
"-out" (string-append
certificate-directory "/"
(basename certificate crt-suffix) ".pem")))
certificates)
#t))))
(native-inputs
(list openssl))
(synopsis "My CA Certs")
(description synopsis)))
; Re-define the base packages to remove sudo
(define %my-base-packages
(remove (lambda (package)
(member (package-name package)
(list "sudo" "nano")))
%base-packages ))
(define %backlight-udev-rule
(udev-rule
"90-backlight.rules"
(string-append "ACTION==\"add\", SUBSYSTEM==\"backlight\", "
"RUN+=\"/run/current-system/profile/bin/chgrp video /sys/class/backlight/%k/brightness\""
"\n"
"ACTION==\"add\", SUBSYSTEM==\"backlight\", "
"RUN+=\"/run/current-system/profile/bin/chmod g+w /sys/class/backlight/%k/brightness\"")))
(operating-system
(kernel linux)
(firmware (list linux-firmware))
(locale "en_US.utf8")
(timezone "America/New_York")
(keyboard-layout (keyboard-layout "us"))
(host-name "RyanThinkpad")
;; The list of user accounts ('root' is implicit).
(users (cons* (user-account
(name "ryan")
(comment "Ryan")
(group "users")
;(shell (file-append zsh "/bin/zsh"))
(home-directory "/home/ryan")
(supplementary-groups '("wheel" "netdev" "audio" "video" "lp" "plugdev" "docker")))
%base-user-accounts))
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (map specification->package (list "sway"
"swaybg"
"swayidle"
"swaylock-effects"
"fuzzel"
"alacritty"
"pinentry-qt"
"adwaita-icon-theme"
"hicolor-icon-theme"
"git"
"nss-certs"
"waybar"
"gnupg"
"light"
"mako"
"grim"
"slurp"
"wl-clipboard"
"bluez"
"blueman"
"opendoas"
"xdg-desktop-portal-wlr"
"xdg-desktop-portal"
"pipewire"
"fprintd"
"docker"
"wireplumber"
"zsh"))
(list my-ca-certs)
%my-base-packages ))
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list
;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below.
(service openssh-service-type)
(service pcscd-service-type)
(service fprintd-service-type)
(service docker-service-type)
(service bluetooth-service-type)
(udev-rules-service 'fido2 libfido2 #:groups '("plugdev"))
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout))))
;; This is the default list of services we
;; are appending to.
(modify-services %desktop-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(substitute-urls
(append (list "https://substitutes.nonguix.org")
%default-substitute-urls))
(authorized-keys
(cons* (plain-file "non-guix.pub"
"(public-key
(ecc
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
)
)" ) %default-authorized-guix-keys))))
(udev-service-type config =>
(udev-configuration
(inherit config)
(rules (cons %backlight-udev-rule
(udev-configuration-rules config)))))
(delete pulseaudio-service-type)
(delete gdm-service-type) )))
(setuid-programs
(append (list (file-like->setuid-program
(file-append
(specification->package "swaylock-effects")
"/bin/swaylock"))
(file-like->setuid-program
(file-append
(specification->package "opendoas")
"/bin/doas")))
(delete sudo %setuid-programs)))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
(mapped-devices (list (mapped-device
(source (uuid
"adcaf322-7ee5-48ec-abf6-4a9b10643878"))
(target "sysroot")
(type luks-device-mapping))))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/")
(device "/dev/mapper/sysroot")
(type "ext4")
(dependencies mapped-devices))
(file-system
(mount-point "/boot/efi")
(device (uuid "DFE8-32EF"
'fat32))
(type "vfat")) %base-file-systems))
(swap-devices
(list
(swap-space (target (uuid "7e1bb7c5-da2a-4509-8263-f707fc752993"))) )))

View file

@ -13,25 +13,24 @@
(use-modules (gnu system setuid)) (use-modules (gnu system setuid))
(use-modules (gnu packages admin)) (use-modules (gnu packages admin))
(use-modules (guix packages)) (use-modules (guix packages))
(use-modules (gnu services authentication))
(use-modules (gnu packages shells)) (use-modules (gnu packages shells))
(use-modules (gnu packages perl))
(use-modules (guix build-system trivial)) (use-modules (guix build-system trivial))
(use-modules (guix licenses)) (use-modules (guix licenses))
(use-modules (gnu packages tls))
(use-modules (srfi srfi-1)) (use-modules (srfi srfi-1))
(use-package-modules security-token) (use-package-modules security-token)
(use-service-modules cups desktop networking ssh xorg sound security-token docker) (use-service-modules cups desktop networking xorg ssh sound security-token docker virtualization)
; Define package that installs my root ca public keys ; Define package that installs my root ca public keys
(define my-ca-certs (define my-ca-certs
(package (package
(name "my-ca-certs") (name "my-ca-certs")
(version "1") (version "1")
(source (local-file "./CACerts/" (source (local-file "./CACerts"
#:recursive? #t)) #:recursive? #t))
(home-page "https://rschanz.org")
(license agpl3+)
(build-system trivial-build-system) (build-system trivial-build-system)
(license mpl2.0)
(home-page "https://rschanz.org")
(arguments (arguments
`(#:modules `(#:modules
((guix build utils)) ((guix build utils))
@ -47,34 +46,21 @@
(certificates (filter is-certificate? (certificates (filter is-certificate?
(scandir ca-certificates))) (scandir ca-certificates)))
(out (assoc-ref %outputs "out")) (out (assoc-ref %outputs "out"))
(certificate-directory (string-append out (certificate-directory (string-append out "/etc/ssl/certs"))
"/etc/ssl/certs")) (openssl (string-append (assoc-ref %build-inputs "openssl") "/bin/openssl")))
(openssl (string-append (assoc-ref %build-inputs
"openssl")
"/bin/openssl")))
(mkdir-p certificate-directory) (mkdir-p certificate-directory)
;; When this package is installed into a profile, any files in the
;; package output's etc/ssl/certs directory ending in ".pem" will
;; also be put into a ca-certificates.crt bundle. In the case of a
;; system profile, this bundle will be made available to the system
;; at activation time. See the profile hooks defined in (guix
;; profiles) and the etc-service-type define in (gnu services) for
;; details.
(for-each (for-each
;; Ensure the certificate is in an appropriate format. (lambda (cert)
(lambda (certificate)
(invoke (invoke
openssl "x509" openssl "x509"
"-in" (string-append ca-certificates "/" certificate) "-in" (string-append ca-certificates "/" cert)
"-outform" "PEM" "-outform" "PEM"
"-out" (string-append "-out" (string-append certificate-directory "/" cert ".pem")))
certificate-directory "/"
(basename certificate crt-suffix) ".pem")))
certificates) certificates)
#t)))) #t))))
(inputs (native-inputs
(list openssl)) (list openssl))
(synopsis "My certificate authority certificates") (synopsis "My CA Certs")
(description synopsis))) (description synopsis)))
; Re-define the base packages to remove sudo ; Re-define the base packages to remove sudo
@ -108,7 +94,7 @@
(group "users") (group "users")
;(shell (file-append zsh "/bin/zsh")) ;(shell (file-append zsh "/bin/zsh"))
(home-directory "/home/ryan") (home-directory "/home/ryan")
(supplementary-groups '("wheel" "netdev" "audio" "video" "lp" "plugdev" "docker"))) (supplementary-groups '("wheel" "netdev" "audio" "video" "lp" "plugdev" "docker" "libvirt" "kvm")))
%base-user-accounts)) %base-user-accounts))
;; Packages installed system-wide. Users can also install packages ;; Packages installed system-wide. Users can also install packages
@ -134,12 +120,16 @@
"wl-clipboard" "wl-clipboard"
"bluez" "bluez"
"blueman" "blueman"
"ldacbt"
"libfreeaptx"
"libfdk"
"opendoas" "opendoas"
"xdg-desktop-portal-wlr" "xdg-desktop-portal-wlr"
"xdg-desktop-portal" "xdg-desktop-portal"
"pipewire" "pipewire"
"fprintd"
"docker" "docker"
"libvirt"
"virt-manager"
"wireplumber" "wireplumber"
"zsh")) "zsh"))
(list my-ca-certs) (list my-ca-certs)
@ -154,12 +144,12 @@
;; record as a second argument to 'service' below. ;; record as a second argument to 'service' below.
(service openssh-service-type) (service openssh-service-type)
(service pcscd-service-type) (service pcscd-service-type)
(service fprintd-service-type)
(service docker-service-type) (service docker-service-type)
(service libvirt-service-type
(libvirt-configuration
(unix-sock-group "libvirt")))
(service bluetooth-service-type) (service bluetooth-service-type)
(udev-rules-service 'fido2 libfido2 #:groups '("plugdev")) (udev-rules-service 'fido2 libfido2 #:groups '("plugdev")))
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout))))
;; This is the default list of services we ;; This is the default list of services we
;; are appending to. ;; are appending to.
@ -184,7 +174,9 @@
(rules (cons %backlight-udev-rule (rules (cons %backlight-udev-rule
(udev-configuration-rules config))))) (udev-configuration-rules config)))))
(delete pulseaudio-service-type) (delete pulseaudio-service-type)
(delete gdm-service-type) ))) (delete gdm-service-type)
(delete xorg-server-service-type)
(delete alsa-service-type) )))
(setuid-programs (setuid-programs
(append (list (file-like->setuid-program (append (list (file-like->setuid-program
(file-append (file-append