Compare commits

...

10 Commits

Author SHA1 Message Date
Skylar "The Cobra" Widulski 27b7055d21
epci
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-19 16:55:23 -05:00
Skylar "The Cobra" Widulski 6817ebf658
Add T60 config
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-13 19:07:41 -05:00
Skylar "The Cobra" Widulski ff47c55a78
Laggery
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-13 17:57:48 -05:00
Skylar "The Cobra" Widulski 69c3cc5e91
WORKS!!!!!
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-13 16:00:10 -05:00
Skylar "The Cobra" Widulski b329666c57
whooooops
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-13 09:21:33 -05:00
Skylar "The Cobra" Widulski af94d0e178
whoops
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-13 09:19:45 -05:00
Skylar "The Cobra" Widulski 083f9afaba
Update
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-13 09:13:00 -05:00
Skylar "The Cobra" Widulski 1b17e6ff6c
Epic change
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-12 15:22:25 -05:00
Skylar "The Cobra" Widulski aca3e0c03a
Moved all my guix config to system
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-10 02:27:46 -05:00
Skylar "The Cobra" Widulski bd32e25f96
Epic suspend
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-01-03 10:01:12 -05:00
11 changed files with 316 additions and 129 deletions

View File

@ -17,6 +17,7 @@ PERL_LOCAL_LIB_ROOT="/home/cobra/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_R
PERL_MB_OPT="--install_base \"/home/cobra/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/cobra/perl5"; export PERL_MM_OPT;
. ~/.devspec
if [[ $(tty) == /dev/tty2 ]]; then
exec sway
exec $WM
fi

13
.bashrc
View File

@ -45,7 +45,7 @@ cpusage() {
}
# Update and upgrade system
update() { sh -c "$UPDATE"; }
update() { $PRIV sh -c "$UPDATE"; }
# Im too lazy to type
copy() {
@ -162,6 +162,11 @@ baseto() {
rebash() { . ~/.bashrc; }
bashrc() { "$EDITOR" ~/.bashrc && rebash; }
uplot() {
ssh vern "${1:-/opt/gnuplot/users/gnuplot.sh}; cat /opt/gnuplot/users/${1:-$(date -u -I)}.svg" > ${1:-$(date -u -I)}.svg
}
mnplot() {
ssh mythos "${1:-/opt/gnuplot/gnuplot.sh}; cat /opt/gnuplot/${1:-$(date -u -I)}.svg" > ${1:-$(date -u -I)}.svg
}
@ -186,10 +191,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

@ -0,0 +1,9 @@
(cons* (channel
(name 'guixrus)
(url "https://git.sr.ht/~whereiseveryone/guixrus")
(introduction
(make-channel-introduction
"7c67c3a9f299517bfc4ce8235628657898dd26b2"
(openpgp-fingerprint
"CD2D 5EAA A98C CB37 DA91 D6B0 5F58 1664 7F8B E551"))))
%default-channels)

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 {
@ -161,10 +162,10 @@ bindsym Pause exec ~/.local/bin/logout-wofi
# Rules
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
bindswitch --reload --locked lid:on exec sudo ~/.local/bin/__suspend
exec ~/.local/bin/beep-wrapper
bindswitch --reload --locked lid:on exec ~/.local/bin/suspend
bar {
swaybar_command waybar

View File

@ -6,16 +6,19 @@ if [[ $HOSTNAME == pp ]]; then
COPY_COMMAND="wl-copy"
PASTE_COMMAND="wl-paste"
WIFI=wlan0
elif [[ $HOSTNAME == Xenon ]]; then
WM="bash"
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
WM='sway'
else
PRIV=sudo
UPDATE="$PRIV sh -c 'apt update && apt upgrade && apt autoremove'"
COPY_COMMAND="xclip -i -selection clipboard"
PASTE_COMMAND="xclip -o -selection clipboard"
WIFI=wlp2s0
WM="bash"
fi

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

@ -1,9 +1,11 @@
#!/usr/bin/env bash
if [[ $(playerctl status) != "Playing" ]]; then
swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' &
SUSPEND=$!
if ! ps aux | grep -v grep | grep swaylock; then
if [[ $(playerctl status) != "Playing" ]]; then
swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' &
SUSPEND=$!
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"
kill $SUSPEND $SCREENOFF
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"
kill $SUSPEND $SCREENOFF

169
etc/neon.scm Normal file
View File

@ -0,0 +1,169 @@
(use-modules
(gnu)
(gnu system nss)
(guixrus packages wayland-xyz))
(use-package-modules
certs
linux
wm)
(use-service-modules
desktop
networking
xorg
cups
ssh
dbus
authentication)
(operating-system
(kernel linux-libre)
(keyboard-layout (keyboard-layout "us" "altgr-intl"))
(bootloader
(bootloader-configuration
(bootloader (bootloader
(inherit grub-bootloader)
(installer #~(const #t))))
(keyboard-layout keyboard-layout)))
(host-name "Neon")
(mapped-devices (list
(mapped-device
(source (uuid "72cd3842-a6e5-4fb5-b994-1ce11d2d0a16"))
(target "fde")
(type luks-device-mapping))
(mapped-device
(source "matrix")
(targets (list "matrix-rootvol"))
(type lvm-device-mapping))))
(file-systems (append (list
(file-system
(type "btrfs")
(mount-point "/")
(device (file-system-label "root"))
(flags '(no-atime))
(options "space_cache=v2")
(needed-for-boot? #t)
(dependencies mapped-devices)))
%base-file-systems))
(users (append (list
(user-account
(name "cobra")
(comment "Skylar \"The Cobra\" Widulski")
(group "users")
(supplementary-groups '("audio" "cdrom" "kvm" "lp" "netdev" "tape" "video" "wheel" "input"))))
%base-user-accounts))
(packages (append
(map specification->package
(list "nss-certs"
"tor"
"vim"
"screen"
"lynx"
"curl"
"wget"
"net-tools"
"sway-latest"
"waybar"
"swaylock"
"swayidle"
"openssh"
"dbus"
"cryptsetup"
"librsvg"
"json-c"
"libnotify"
"mako"
"mesa"
"intel-vaapi-driver"
"xf86-video-intel"
"fprintd"
"lvm2"
"git"
"libqalculate"
"bc"
"icecat"
"cryptsetup"
"gnupg"
"profanity"
"go"
"mpv"
"imagemagick"
"rsync"
"neofetch"
"lm-sensors"
"acpi"
"password-store"
"xclip"
"font-fira-mono"
"font-fira-code"
"yt-dlp"
"icedove"
"irssi"
"monero-gui"
"pamixer"
"slurp"
"grim"
"foot"
"wofi"
"swayhide"
"wl-clipboard"
"xorg-server-xwayland"
"wob"
"htop"
"pinentry"
"ungoogled-chromium-wayland"
"make"
"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"
"perl"
"bind"
"netcat"
"tmate"
"torsocks"
"alsa-utils"
"proxychains-ng"
"whois"))
%base-packages))
(timezone "America/New_York")
(locale "en_US.utf8")
(name-service-switch %mdns-host-lookup-nss)
(services
(cons*
(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)
(service ntp-service-type)
(service cups-service-type)
(service elogind-service-type)
(service dbus-root-service-type)
(service fprintd-service-type)
(screen-locker-service swaylock)
(service tor-service-type
(tor-configuration
(config-file (plain-file "tor-config"
"HTTPTunnelPort 127.0.0.1:9250"))))
(modify-services %base-services
(guix-service-type
config => (guix-configuration
(inherit config)
(http-proxy "http://localhost:9250"))))))
(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
")))

View File

@ -31,8 +31,7 @@
(type luks-device-mapping))
(mapped-device
(source "matrix")
(targets (list "matrix-rootvol"
"matrix-swapvol"))
(targets (list "matrix-rootvol"))
(type lvm-device-mapping))))
(file-systems (append (list
(file-system
@ -44,15 +43,12 @@
(needed-for-boot? #t)
(dependencies mapped-devices)))
%base-file-systems))
(swap-devices (list
(swap-space
(target (file-system-label "swap")))))
(users (append (list
(user-account
(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 +73,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 +164,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 +182,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 +190,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
")))