Moved all my guix config to system

Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2023-01-10 02:27:46 -05:00
parent bd32e25f96
commit aca3e0c03a
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
9 changed files with 121 additions and 115 deletions

View File

@ -186,10 +186,6 @@ cpplot() {
ssh crescent "${1:-/opt/gnuplot/power/gnuplot.sh}; cat /opt/gnuplot/power/${1:-$(date -u -I)}.svg" > ${1:-$(date -u -I)}.svg
}
reconf-sys () {
reconf () {
$PRIV su - -c "guix system reconfigure /etc/${HOSTNAME,,}.scm"
}
reconf-home () {
guix home reconfigure ~/.config/guix/home.scm
}

View File

@ -1,82 +0,0 @@
(use-modules
(gnu home)
(gnu packages)
(gnu services)
(guix gexp)
(gnu home services))
(home-environment
(packages
(map (compose list specification->package+output)
(list
"git"
"libqalculate"
"bc"
"icecat"
"cryptsetup"
"gnupg"
"profanity"
"go"
"adanaxisgpl"
"supertuxkart"
"minetest"
"xonotic"
"mpv"
"imagemagick"
"rsync"
"neofetch"
"gnunet"
"lm-sensors"
"acpi"
"gnupg"
"password-store"
"xclip"
"font-fira-mono"
"font-fira-code"
"newsboat"
"kodi"
"yt-dlp"
"icedove"
"irssi"
"monero-gui"
"pamixer"
"slurp"
"grim"
"foot"
"wofi"
"swayidle"
"swayhide"
"wl-clipboard"
"xorg-server-xwayland"
"wob"
"light"
"htop"
"pinentry"
"ungoogled-chromium-wayland"
"make"
"gimp"
"cmus"
"python"
"openssl"
"font-google-noto"
"font-google-noto-serif-cjk"
"font-google-noto-sans-cjk"
"font-awesome"
"socat"
"emacs"
"mpv-mpris"
"playerctl"
"vlc"
"reptyr"
"unzip"
"ffmpeg"
"handbrake"
"ripit"
"perl"
"bind:utils"
"netcat"
"tmate"
"torsocks"
"alsa-utils"
"proxychains-ng"
"whois"))))

View File

@ -31,6 +31,7 @@ output * {
output LVDS-1 pos 640 1080
output DP-1 pos 1280 0
output VGA-1 pos 0 56
# Input configuration
input type:touchpad {
@ -164,6 +165,7 @@ for_window [app_id="float"] floating enable;
exec autotiling
exec swayidle -w timeout 240 '~/.local/bin/lock'
exec rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob
exec ~/.local/bin/beep-wrapper
bindswitch --reload --locked lid:on exec ~/.local/bin/suspend
bar {

View File

@ -6,9 +6,9 @@ if [[ $HOSTNAME == pp ]]; then
COPY_COMMAND="wl-copy"
PASTE_COMMAND="wl-paste"
WIFI=wlan0
elif [[ $HOSTNAME == Xenon ]]; then
elif [[ $HOSTNAME == Xenon || $HOSTNAME == Neon ]]; then
PRIV=sudo
UPDATE="$PRIV su - -c 'guix pull --branch=master && guix system reconfigure /etc/xenon.scm && guix package -u' && guix pull --branch=master && guix home reconfigure ~/.config/guix/home.scm && guix package -u"
UPDATE="guix pull --branch=master && guix system reconfigure /etc/${HOSTNAME,,}.scm && guix package -u"
COPY_COMMAND="wl-copy"
PASTE_COMMAND="wl-paste"
WIFI=wlp2s0

2
.local/bin/beep Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
echo $1 > /proc/acpi/ibm/beep

14
.local/bin/beep-wrapper Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
while sleep 1; do
## Battery beep
if ls /sys/class/power_supply/BAT* &>/dev/null; then
BAT0=$(</sys/class/power_supply/BAT0/capacity)
if [[ $BAT0 -le 5 && -z "$BEEPED" && $(</sys/class/power_supply/BAT0/status) == Discharging ]]; then
sudo ~/.local/bin/beep 9
BEEPED=1
elif [[ $BAT0 -le 2 && $(</sys/class/power_supply/BAT0/status) == Discharging ]]; then
sudo ~/.local/bin/beep 9
BEEPED=0
fi
fi
done

View File

@ -5,5 +5,5 @@ if [[ $(playerctl status) != "Playing" ]]; then
fi
swayidle -w timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
SCREENOFF=$!
swaylock -eFkl -i ~/.config/sway/background.png --font "Fira Code"
swaylock -eFKL -i ~/.config/sway/background.png --font "Fira Code"
kill $SUSPEND $SCREENOFF

View File

@ -1,3 +1,6 @@
#!/usr/bin/env bash
sudo ~/.local/bin/__suspend
swaylock -eFfkl -i ~/.config/sway/background.png --font "Fira Code"
while grep -v '\[' /sys/power/state; do
swaylock -eFfkl -i ~/.config/sway/background.png --font "Fira Code"
break
done

View File

@ -52,7 +52,7 @@
(name "cobra")
(comment "Skylar \"The Cobra\" Widulski")
(group "users")
(supplementary-groups '("audio" "cdrom" "kvm" "libvirt" "lp" "netdev" "tape" "video" "wheel" "input"))))
(supplementary-groups '("audio" "cdrom" "kvm" "lp" "netdev" "tape" "video" "wheel" "input"))))
%base-user-accounts))
(packages (append
(map specification->package
@ -77,23 +77,90 @@
"gcc"
"librsvg"
"json-c"
"libnotify"
"kicad"
"kicad-templates"
"kicad-symbols"
"kicad-packages3d"
"kicad-footprints"
"kicad-doc"
"freecad"
"mako"
"mesa"
"intel-vaapi-driver"
"qemu"
"libvirt"
"virt-manager"
"linux-libre-headers"
"fprintd"
"lvm2"))
"libnotify"
"kicad"
"kicad-templates"
"kicad-symbols"
"kicad-packages3d"
"kicad-footprints"
"kicad-doc"
"freecad"
"mako"
"mesa"
"intel-vaapi-driver"
"qemu"
"fprintd"
"lvm2"
"git"
"libqalculate"
"bc"
"icecat"
"cryptsetup"
"gnupg"
"profanity"
"go"
"adanaxisgpl"
"supertuxkart"
"minetest"
"xonotic"
"mpv"
"imagemagick"
"rsync"
"neofetch"
"gnunet"
"lm-sensors"
"acpi"
"gnupg"
"password-store"
"xclip"
"font-fira-mono"
"font-fira-code"
"newsboat"
"kodi"
"yt-dlp"
"icedove"
"irssi"
"monero-gui"
"pamixer"
"slurp"
"grim"
"foot"
"wofi"
"swayidle"
"swayhide"
"wl-clipboard"
"xorg-server-xwayland"
"wob"
"light"
"htop"
"pinentry"
"ungoogled-chromium-wayland"
"make"
"gimp"
"cmus"
"python"
"openssl"
"font-google-noto"
"font-google-noto-serif-cjk"
"font-google-noto-sans-cjk"
"font-awesome"
"socat"
"emacs"
"mpv-mpris"
"playerctl"
"reptyr"
"unzip"
"ffmpeg"
"handbrake"
"ripit"
"perl"
"bind"
"netcat"
"tmate"
"torsocks"
"alsa-utils"
"proxychains-ng"
"whois"))
(cons*
%base-packages)))
(timezone "America/New_York")
@ -101,7 +168,10 @@
(name-service-switch %mdns-host-lookup-nss)
(services
(cons*
(service openssh-service-type)
(service openssh-service-type
(openssh-configuration
(permit-root-login 'prohibit-password)
(password-authentication? #f)))
(service network-manager-service-type)
(service wpa-supplicant-service-type)
(service gpm-service-type)
@ -116,10 +186,6 @@
(config-file (plain-file "tor-config"
"HTTPTunnelPort 127.0.0.1:9250"))))
; %base-services))
(service libvirt-service-type
(libvirt-configuration
(unix-sock-group "libvirt")
(tls-port "16555")))
(modify-services %base-services
(guix-service-type
config => (guix-configuration
@ -128,4 +194,9 @@
; (substitute-urls
; "https://4zwzi66wwdaalbhgnix55ea3ab4pvvw66ll2ow53kjub6se4q2bclcyd.onion")
(http-proxy "http://localhost:9250"))))))
(sudoers-file (local-file "sudoers")))
(sudoers-file (plain-file "sudoers" "\
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
Cmnd_Alias WITHOUTPW = /home/cobra/.local/bin/__suspend, /home/cobra/.local/bin/beep, /run/current-system/profile/sbin/halt, /run/current-system/profile/sbin/reboot
Defaults!WITHOUTPW !authenticate
")))