From 8aafcf397c87f5576c9e339946330261c4b00356 Mon Sep 17 00:00:00 2001 From: "Skylar \"The Cobra\" Widulski" Date: Tue, 12 Dec 2023 22:47:45 -0500 Subject: [PATCH] Uptradtdate Signed-off-by: Skylar "The Cobra" Widulski --- .bashrc | 29 ----------------------------- .config/guix/cobra/home.scm | 30 ------------------------------ .config/guix/cobra/home/bin.scm | 13 ++----------- .config/guix/home-config.scm | 1 - .local/bin/lock | 2 +- .local/bin/suspend | 2 +- etc/guix-config/cobra/os.scm | 5 +++-- etc/guix-config/cobra/packages.scm | 24 +++++++++++++++++++++++- 8 files changed, 30 insertions(+), 76 deletions(-) diff --git a/.bashrc b/.bashrc index 6f5e1af..ecfa800 100644 --- a/.bashrc +++ b/.bashrc @@ -89,10 +89,6 @@ strlen() { printf '%u\n' "$N" } -uppweb() { - ssh vern.cc 'cd ~/public_html; git pull' -} - caption() { [ -z "$3" ] && { echo "Usage: caption [input] [output] [text...]" @@ -158,31 +154,6 @@ topbottomvid() { rm /tmp/caption.*.png } -subcipher() { - local COLOR PERM L1 line grep word - if [ $# -lt 3 ]; then - if [ $# -lt 2 ] || [[ "$1" != "0" && "$1" != "1" ]]; then - printf "Usage: [0|1] subcipher file [string...]\n" - return 1 - fi - fi - COLOR="$1" - shift - PERM="$1" - shift - [ -z "$*" ] && set -- "$(" #$output "\n" "\ #!/usr/bin/env bash -sudo ~/.local/bin/__suspend +loginctl suspend while grep -v '\\[' /sys/power/state; do swaylock break done" "\nEOF")) (chmod #$output #o755)))) -(define %bin:suspend - (computed-file "bin-suspend" - #~(begin - (system (string-append #$coreutils "/bin/cat << \"EOF\" >" #$output "\n" "\ -#!/usr/bin/env bash -echo mem > /sys/power/state" "\nEOF")) - (chmod #$output #o755)))) - (define %bin:start-pipewire (computed-file "bin-start-pipewire" #~(begin @@ -150,7 +141,7 @@ esac" "\nEOF")) #!/usr/bin/env bash if ! ps aux | grep -v grep | grep swaylock; then # if [[ $(playerctl status) != \"Playing\" ]]; then -# swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' & +# swayidle -w timeout 600 'loginctl suspend' & # SUSPEND=$! # fi swayidle -w timeout 15 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"' & diff --git a/.config/guix/home-config.scm b/.config/guix/home-config.scm index 127a2a2..5ed771e 100644 --- a/.config/guix/home-config.scm +++ b/.config/guix/home-config.scm @@ -183,7 +183,6 @@ `(".local/bin/rotate" ,%bin:rotate) `(".local/bin/screenshot" ,%bin:screenshot) `(".local/bin/start-pipewire" ,%bin:start-pipewire) - `(".local/bin/__suspend" ,%bin:suspend) `(".local/bin/suspend" ,%bin:suspend-wrap) `(".local/bin/torbrowser" ,%bin:torbrowser) diff --git a/.local/bin/lock b/.local/bin/lock index 8725203..7f1a80b 100755 --- a/.local/bin/lock +++ b/.local/bin/lock @@ -1,7 +1,7 @@ #!/usr/bin/env bash if ! ps aux | grep -v grep | grep swaylock; then # if [[ $(playerctl status) != "Playing" ]]; then -# swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' & +# swayidle -w timeout 600 'loginctl suspend' & # SUSPEND=$! # fi swayidle -w timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' & diff --git a/.local/bin/suspend b/.local/bin/suspend index c7e7a64..b984e35 100755 --- a/.local/bin/suspend +++ b/.local/bin/suspend @@ -1,5 +1,5 @@ #!/usr/bin/env bash -sudo ~/.local/bin/__suspend +loginctl suspend while grep -v '\[' /sys/power/state; do swaylock break diff --git a/etc/guix-config/cobra/os.scm b/etc/guix-config/cobra/os.scm index bb5e209..34bec56 100644 --- a/etc/guix-config/cobra/os.scm +++ b/etc/guix-config/cobra/os.scm @@ -13,7 +13,7 @@ (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 +Cmnd_Alias WITHOUTPW = /home/cobra/.local/bin/beep, /run/current-system/profile/sbin/halt, /run/current-system/profile/sbin/reboot Defaults!WITHOUTPW !authenticate ")) @@ -23,7 +23,8 @@ Defaults!WITHOUTPW !authenticate (kernel-loadable-modules (list v4l2loopback-linux-module)) (kernel-arguments '("intel_iommu=on" "kvm.ignore_msrs=1" - "log_buf_len=1M")) + "log_buf_len=1M" + "iomem=relaxed")) (keyboard-layout (keyboard-layout "us" "altgr-intl")) (bootloader (bootloader-configuration diff --git a/etc/guix-config/cobra/packages.scm b/etc/guix-config/cobra/packages.scm index dc16a86..a7f4eee 100644 --- a/etc/guix-config/cobra/packages.scm +++ b/etc/guix-config/cobra/packages.scm @@ -1,10 +1,31 @@ (define-module (cobra packages) #:use-module (guix) #:use-module (guix build-system font) + #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix packages) #:use-module (guix gexp) #:use-module ((guix licenses) #:prefix license:) - #:use-module (gnu packages gl)) + #:use-module (gnu packages base) + #:use-module (gnu packages bioinformatics) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages docker) + #:use-module (gnu packages engineering) + #:use-module (gnu packages gl) + #:use-module (gnu packages libffi) + #:use-module (gnu packages libusb) + #:use-module (gnu packages linux) + #:use-module (gnu packages protobuf) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages security-token) + #:use-module (gnu packages serialization) + #:use-module (gnu packages time) + ) (define-public mesa-i915 (package (inherit mesa) @@ -25,6 +46,7 @@ "-Dbuild-tests=true" "-Dllvm=enabled"))))) + ;; Taken and modified from issue #44575 (define-public font-nerd-fonts-fira-code