Browse Source

init move to flakes

canon
Hazel Levine 2 years ago
parent
commit
60fdb73172
Signed by: hazel
GPG Key ID: 1884029A28789A62
  1. 23
      bin/backlight
  2. 23
      bin/berun
  3. 17
      bin/bonsai-tree
  4. 5
      bin/drracket
  5. 3
      bin/itchio
  6. 64
      bin/keyboard
  7. 68
      bin/notify-action-alt
  8. 312
      bin/notify-alt
  9. 4
      bin/racket
  10. 4
      bin/raco
  11. 47
      bin/sway-screenshare
  12. 2
      bin/ybk-ssh
  13. 14
      cachix.nix
  14. 12
      cachix/nix-community.nix
  15. 2
      config/zsh/zshrc
  16. 19
      configuration.nix
  17. 87
      flake.lock
  18. 99
      flake.nix
  19. 98
      machines/hyacinth/default.nix
  20. 5
      machines/hyacinth/hardware.nix
  21. 4
      machines/kerria/default.nix
  22. 5
      machines/kerria/hardware.nix
  23. 35
      modules/custom/hikari.nix
  24. 123
      modules/custom/i3status-rust.nix
  25. 2
      modules/default.nix
  26. 1
      modules/desktop/apps/default.nix
  27. 24
      modules/desktop/apps/qutebrowser.nix
  28. 10
      modules/desktop/core/default.nix
  29. 73
      modules/desktop/core/i3status-rust.nix
  30. 46
      modules/desktop/core/mako.nix
  31. 27
      modules/desktop/core/rofi.nix
  32. 23
      modules/desktop/core/waybar.nix
  33. 66
      modules/desktop/core/wofi.nix
  34. 48
      modules/desktop/default.nix
  35. 245
      modules/desktop/hikari.nix
  36. 2
      modules/desktop/settings/fonts.nix
  37. 305
      modules/desktop/sway.nix
  38. 43
      modules/lang/lisp.nix
  39. 22
      modules/lang/python.nix
  40. 4
      modules/lang/rust.nix
  41. 2
      modules/services/default.nix
  42. 10
      modules/services/mail.nix
  43. 8
      modules/services/mpd.nix
  44. 2
      modules/services/nextcloud.nix
  45. 22
      modules/shell/git.nix
  46. 21
      modules/shell/zsh.nix
  47. 2
      modules/system/automount.nix
  48. 2
      modules/system/default.nix
  49. 71
      modules/system/desktop.nix
  50. 21
      modules/tools/emacs.nix
  51. 6
      modules/tools/mail.nix
  52. 190
      nix/sources.json
  53. 148
      nix/sources.nix
  54. 59
      packages/default.nix
  55. 7
      secrets/password.age
  56. 6
      secrets/secrets.nix

23
bin/backlight

@ -1,23 +0,0 @@
#!/bin/sh
send_notification() {
backlight=$(brightnessctl -m | cut -d, -f4 | sed 's/%//' | awk '{print int($1 / 3.25)}')
# Make the bar with the special character ─ (it's not dash -)
# https://en.wikipedia.org/wiki/Box-drawing_character
bar=$(seq -s "─" "$backlight" | sed 's/[0-9]//g')
# Send the notification
makoctl dismiss
notify-send -t 1000 "mon: $bar"
}
case $1 in
up)
brightnessctl -q set +10%
send_notification
;;
down)
brightnessctl -q set 10%-
send_notification
;;
*) echo "usage: backlight [up|down]" ;;
esac

23
bin/berun

@ -1,23 +0,0 @@
#!/bin/sh
## TODO: figure out whatever the fuck is happening here
#MONITORS="$(swaymsg -t get_outputs | jq -r 'length')"
#FOCUSED="$(swaymsg -t get_workspaces | jq -r '.. | select(.focused?) | .output')"
#case $FOCUSED in
# eDP1)
#esac
BG="$(xrq background)"
FG="$(xrq foreground)"
BLK="$(xrq color0)"
HL="$(xrq color1)"
FONT="Source Code Pro 9"
PROMPT=">"
LINES=10
LH=20
bemenu -m -1 -n -p "$PROMPT" -l "$LINES" --fn "$FONT" -H "$LH" --scrollbar always \
--tb "$HL" --tf "$BLK" --nb "$BG" --nf "$FG" \
--hb "$BG" --hf "$HL" --fb "$BLK" --ff "$FG" \
--scb "$BLK" --scf "$HL"

17
bin/bonsai-tree

@ -1,17 +0,0 @@
#!/usr/bin/env bash
# prints a color text image of a tree
echo -e " &&"
echo -e " &&&&&"
echo -e " &&&\/& &&&"
echo -e " &&|,/ |/& &&"
echo -e " &&/ / /_& &&"
echo -e " \ { |_____/_&"
echo -e " { / / &&&"
echo -e " .\`. \\{___\________\/_\}"
echo -e " \} \}\{ \\"
echo -e " }\{\{ \\____&"
echo -e " \{\}\{ \`&\&&"
echo -e " {{} &&"
echo -e " , -=-~{ .-^- _"
echo -e " \`."

5
bin/drracket

@ -1,5 +0,0 @@
#!/bin/sh
export LD_LIBRARY_PATH="/nix/store/rijqazlvihgh7zvi4yam1j9jjmahjm85-cairo-1.16.0/lib:/nix/store/fylgr4s2iid2q9c0xbqr6bq07w1isi1h-fontconfig-2.13.92-lib/lib:/nix/store/ai5054xzilz0q285c0ldabmkvhyyl6yq-glib-2.64.6/lib:/nix/store/1lj2b24v408awrfxw6xxv9spm9023lva-gmp-6.2.0/lib:/nix/store/gfip3n33lnd4k9kkp5zdv44njyxrmdpp-gtk+3-3.24.21/lib:/nix/store/20lw4zx8h7yakz8l55v6dwng7cp91v0w-gsettings-desktop-schemas-3.36.1/lib:/nix/store/vxh6zqkyv44gc7561aq9niqysp2k0n7w-libedit-20191231-3.1/lib:/nix/store/1mp991q6kxpc297hfchixhbzmfnya9dr-libGL-1.3.2/lib:/nix/store/fcr65nkrmq9hv7h1acxsdsald32acvjd-glu-9.0.1/lib:/nix/store/jw87zdhwkzcbam094f1hh4cjrx7gsyj9-libjpeg-turbo-2.0.4/lib:/nix/store/yljv27xqgkcwllczzr18sc483mzpxvc4-libpng-apng-1.6.37/lib:/nix/store/9x8s0431bb3r1jvqzcmdjmwc7nagcwwg-mpfr-4.1.0/lib:/nix/store/abxvl3x7hrlmimw3ck5nx04izhb0phhg-openssl-1.1.1k/lib:/nix/store/1waaha9ax2nr660y9iz5zpdg67r2sfzj-pango-1.45.5/lib:/nix/store/cy31ln6nx94mw8nm0sr1p857bcs51gj5-poppler-glib-20.08.0/lib:/nix/store/cs7gmwifrz0dqnjl3zlnlpkzyan1bhn2-readline-6.3p08/lib:/nix/store/y66v2n3chpg0qfn402ldihi38qdxllab-sqlite-3.33.0/lib"
/home/hazel/src/racket/racket/bin/drracket "$@"

3
bin/itchio

@ -1,3 +0,0 @@
#!/usr/bin/env cached-nix-shell
#!nix-shell -i bash -p appimage-run
exec appimage-run /home/hazel/.itch/itch "$@"

64
bin/keyboard

@ -1,64 +0,0 @@
#!/usr/bin/env bash
#
# Control keyboard layout and backlight (Lenovo ThinkPad tested only)
#
# Author: Dave Eddy <dave@daveeddy.com>
# Date: June 25, 2018
# License: MIT
TMPFILE=/tmp/keyboard-status
# taken from https://wiki.archlinux.org/index.php/Keyboard_backlight
setKeyboardLight() {
echo "$1" > "$TMPFILE"
dbus-send --system --type=method_call \
--dest='org.freedesktop.UPower' \
'/org/freedesktop/UPower/KbdBacklight' \
'org.freedesktop.UPower.KbdBacklight.SetBrightness' \
"int32:$1"
}
# cycle the current state of the keyboard backlight
cycleKeyboardLight() {
local cur
cur="$(cat $TMPFILE)"
case "$cur" in
0) setKeyboardLight 1;;
1) setKeyboardLight 2;;
2) setKeyboardLight 0;;
*) exit 1;;
esac
}
usage() {
local prog=${0##*/}
cat <<-EOF
Usage: $prog <command>
Examples
# control backlight
$prog [off | dim | bright/on]
# print help
$prog help
EOF
}
if [[ ! -f "$TMPFILE" ]]; then
echo '0' > "$TMPFILE"
fi
case "$1" in
# lights
off) setKeyboardLight 0;;
dim) setKeyboardLight 1;;
on|bright) setKeyboardLight 2;;
cycle) cycleKeyboardLight;;
help|-h) usage; exit 0;;
*) usage >&2; exit 1;;
esac

68
bin/notify-action-alt

@ -1,68 +0,0 @@
#!/usr/bin/env bash
GDBUS_MONITOR_PID=/tmp/notify-action-dbus-monitor.$$.pid
GDBUS_MONITOR=(gdbus monitor --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications)
NOTIFICATION_ID="$1"
if [[ -z "$NOTIFICATION_ID" ]]; then
echo "no notification id passed: $@"
exit 1;
fi
shift
ACTION_COMMANDS=("$@")
if [[ -z "$ACTION_COMMANDS" ]]; then
echo "no action commands passed: $@"
exit 1;
fi
cleanup() {
rm -f "$GDBUS_MONITOR_PID"
}
create_pid_file(){
rm -f "$GDBUS_MONITOR_PID"
umask 077
touch "$GDBUS_MONITOR_PID"
}
invoke_action() {
invoked_action_id="$1"
local action="" cmd=""
for index in "${!ACTION_COMMANDS[@]}"; do
if [[ $((index % 2)) == 0 ]]; then
action="${ACTION_COMMANDS[$index]}"
else
cmd="${ACTION_COMMANDS[$index]}"
if [[ "$action" == "$invoked_action_id" ]]; then
bash -c "${cmd}" &
fi
fi
done
}
monitor() {
create_pid_file
( "${GDBUS_MONITOR[@]}" & echo $! >&3 ) 3>"$GDBUS_MONITOR_PID" | while read -r line
do
local closed_notification_id="$(sed '/^\/org\/freedesktop\/Notifications: org.freedesktop.Notifications.NotificationClosed (uint32 \([0-9]\+\), uint32 [0-9]\+)$/!d;s//\1/' <<< "$line")"
if [[ -n "$closed_notification_id" ]]; then
if [[ "$closed_notification_id" == "$NOTIFICATION_ID" ]]; then
invoke_action close
break
fi
else
local action_invoked="$(sed '/\/org\/freedesktop\/Notifications: org.freedesktop.Notifications.ActionInvoked (uint32 \([0-9]\+\), '\''\(.*\)'\'')$/!d;s//\1:\2/' <<< "$line")"
IFS=: read invoked_id action_id <<< "$action_invoked"
if [[ "$invoked_id" == "$NOTIFICATION_ID" ]]; then
invoke_action "$action_id"
break
fi
fi
done
kill $(<"$GDBUS_MONITOR_PID")
cleanup
}
monitor

312
bin/notify-alt

@ -1,312 +0,0 @@
#!/usr/bin/env bash
# notify-send.sh - drop-in replacement for notify-send with more features
# Copyright (C) 2015-2019 notify-send.sh authors (see AUTHORS file)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Desktop Notifications Specification
# https://developer.gnome.org/notification-spec/
VERSION=1.0
NOTIFY_ARGS=(--session
--dest org.freedesktop.Notifications
--object-path /org/freedesktop/Notifications)
EXPIRE_TIME=-1
APP_NAME="${0##*/}"
REPLACE_ID=0
URGENCY=1
HINTS=()
SUMMARY_SET=n
help() {
cat <<EOF
Usage:
notify-send.sh [OPTION...] <SUMMARY> [BODY] - create a notification
Help Options:
-?|--help Show help options
Application Options:
-u, --urgency=LEVEL Specifies the urgency level (low, normal, critical).
-t, --expire-time=TIME Specifies the timeout in milliseconds at which to expire the notification.
-f, --force-expire Forcefully closes the notification when the notification has expired.
-a, --app-name=APP_NAME Specifies the app name for the icon.
-i, --icon=ICON[,ICON...] Specifies an icon filename or stock icon to display.
-c, --category=TYPE[,TYPE...] Specifies the notification category.
-h, --hint=TYPE:NAME:VALUE Specifies basic extra data to pass. Valid types are int, double, string and byte.
-o, --action=LABEL:COMMAND Specifies an action. Can be passed multiple times. LABEL is usually a button's label. COMMAND is a shell command executed when action is invoked.
-d, --default-action=COMMAND Specifies the default action which is usually invoked by clicking the notification.
-l, --close-action=COMMAND Specifies the action invoked when notification is closed.
-p, --print-id Print the notification ID to the standard output.
-r, --replace=ID Replace existing notification.
-R, --replace-file=FILE Store and load notification replace ID to/from this file.
-s, --close=ID Close notification.
-v, --version Version of the package.
EOF
}
convert_type() {
case "$1" in
int) echo int32 ;;
double|string|byte) echo "$1" ;;
*) echo error; return 1 ;;
esac
}
make_action_key() {
echo "$(tr -dc _A-Z-a-z-0-9 <<< \"$1\")${RANDOM}"
}
make_action() {
local action_key="$1"
printf -v text "%q" "$2"
echo "\"$action_key\", \"$text\""
}
make_hint() {
type=$(convert_type "$1")
[[ ! $? = 0 ]] && return 1
name="$2"
[[ "$type" = string ]] && command="\"$3\"" || command="$3"
echo "\"$name\": <$type $command>"
}
concat_actions() {
local result="$1"
shift
for s in "$@"; do
result="$result, $s"
done
echo "[$result]"
}
concat_hints() {
local result="$1"
shift
for s in "$@"; do
result="$result, $s"
done
echo "{$result}"
}
parse_notification_id(){
sed 's/(uint32 \([0-9]\+\),)/\1/g'
}
notify() {
local actions="$(concat_actions "${ACTIONS[@]}")"
local hints="$(concat_hints "${HINTS[@]}")"
NOTIFICATION_ID=$(gdbus call "${NOTIFY_ARGS[@]}" \
--method org.freedesktop.Notifications.Notify \
"$APP_NAME" "$REPLACE_ID" "$ICON" "$SUMMARY" "$BODY" \
"${actions}" "${hints}" "int32 $EXPIRE_TIME" \
| parse_notification_id)
if [[ -n "$STORE_ID" ]] ; then
echo "$NOTIFICATION_ID" > $STORE_ID
fi
if [[ -n "$PRINT_ID" ]] ; then
echo "$NOTIFICATION_ID"
fi
if [[ -n "$FORCE_EXPIRE" ]] ; then
type bc &> /dev/null || { echo "bc command not found. Please install bc package."; exit 1; }
SLEEP_TIME="$(bc <<< "scale=3; $EXPIRE_TIME / 1000")"
( sleep "$SLEEP_TIME" ; notify_close "$NOTIFICATION_ID" ) &
fi
maybe_run_action_handler
}
notify_close () {
gdbus call "${NOTIFY_ARGS[@]}" --method org.freedesktop.Notifications.CloseNotification "$1" >/dev/null
}
process_urgency() {
case "$1" in
low) URGENCY=0 ;;
normal) URGENCY=1 ;;
critical) URGENCY=2 ;;
*) echo "Unknown urgency $URGENCY specified. Known urgency levels: low, normal, critical."
exit 1
;;
esac
}
process_category() {
IFS=, read -a categories <<< "$1"
for category in "${categories[@]}"; do
hint="$(make_hint string category "$category")"
HINTS=("${HINTS[@]}" "$hint")
done
}
process_hint() {
IFS=: read type name command <<< "$1"
if [[ -z "$name" ]] || [[ -z "$command" ]] ; then
echo "Invalid hint syntax specified. Use TYPE:NAME:VALUE."
exit 1
fi
hint="$(make_hint "$type" "$name" "$command")"
if [[ ! $? = 0 ]] ; then
echo "Invalid hint type \"$type\". Valid types are int, double, string and byte."
exit 1
fi
HINTS=("${HINTS[@]}" "$hint")
}
maybe_run_action_handler() {
if [[ -n "$NOTIFICATION_ID" ]] && [[ -n "$ACTION_COMMANDS" ]]; then
local notify_action="$(dirname ${BASH_SOURCE[0]})/notify-action.sh"
if [[ -x "$notify_action" ]] ; then
"$notify_action" "$NOTIFICATION_ID" "${ACTION_COMMANDS[@]}" &
exit 0
else
echo "executable file not found: $notify_action"
exit 1
fi
fi
}
process_action() {
IFS=: read name command <<<"$1"
if [[ -z "$name" ]] || [[ -z "$command" ]]; then
echo "Invalid action syntax specified. Use NAME:COMMAND."
exit 1
fi
local action_key="$(make_action_key "$name")"
ACTION_COMMANDS=("${ACTION_COMMANDS[@]}" "$action_key" "$command")
local action="$(make_action "$action_key" "$name")"
ACTIONS=("${ACTIONS[@]}" "$action")
}
process_special_action() {
action_key="$1"
command="$2"
if [[ -z "$action_key" ]] || [[ -z "$command" ]]; then
echo "Command must not be empty"
exit 1
fi
ACTION_COMMANDS=("${ACTION_COMMANDS[@]}" "$action_key" "$command")
if [[ "$action_key" != close ]]; then
local action="$(make_action "$action_key" "$name")"
ACTIONS=("${ACTIONS[@]}" "$action")
fi
}
process_posargs() {
if [[ "$1" = -* ]] && ! [[ "$positional" = yes ]] ; then
echo "Unknown option $1"
exit 1
else
if [[ "$SUMMARY_SET" = n ]]; then
SUMMARY="$1"
SUMMARY_SET=y
else
BODY="$1"
fi
fi
}
while (( $# > 0 )) ; do
case "$1" in
-\?|--help)
help
exit 0
;;
-v|--version)
echo "${0##*/} $VERSION"
exit 0
;;
-u|--urgency|--urgency=*)
[[ "$1" = --urgency=* ]] && urgency="${1#*=}" || { shift; urgency="$1"; }
process_urgency "$urgency"
;;
-t|--expire-time|--expire-time=*)
[[ "$1" = --expire-time=* ]] && EXPIRE_TIME="${1#*=}" || { shift; EXPIRE_TIME="$1"; }
;;
-f|--force-expire)
FORCE_EXPIRE=yes
;;
-a|--app-name|--app-name=*)
[[ "$1" = --app-name=* ]] && APP_NAME="${1#*=}" || { shift; APP_NAME="$1"; }
;;
-i|--icon|--icon=*)
[[ "$1" = --icon=* ]] && ICON="${1#*=}" || { shift; ICON="$1"; }
;;
-c|--category|--category=*)
[[ "$1" = --category=* ]] && category="${1#*=}" || { shift; category="$1"; }
process_category "$category"
;;
-h|--hint|--hint=*)
[[ "$1" = --hint=* ]] && hint="${1#*=}" || { shift; hint="$1"; }
process_hint "$hint"
;;
-o | --action | --action=*)
[[ "$1" == --action=* ]] && action="${1#*=}" || { shift; action="$1"; }
process_action "$action"
;;
-d | --default-action | --default-action=*)
[[ "$1" == --default-action=* ]] && default_action="${1#*=}" || { shift; default_action="$1"; }
process_special_action default "$default_action"
;;
-l | --close-action | --close-action=*)
[[ "$1" == --close-action=* ]] && close_action="${1#*=}" || { shift; close_action="$1"; }
process_special_action close "$close_action"
;;
-p|--print-id)
PRINT_ID=yes
;;
-r|--replace|--replace=*)
[[ "$1" = --replace=* ]] && REPLACE_ID="${1#*=}" || { shift; REPLACE_ID="$1"; }
;;
-R|--replace-file|--replace-file=*)
[[ "$1" = --replace-file=* ]] && filename="${1#*=}" || { shift; filename="$1"; }
if [[ -s "$filename" ]]; then
REPLACE_ID="$(< $filename)"
fi
STORE_ID="$filename"
;;
-s|--close|--close=*)
[[ "$1" = --close=* ]] && close_id="${1#*=}" || { shift; close_id="$1"; }
notify_close "$close_id"
exit $?
;;
--)
positional=yes
;;
*)
process_posargs "$1"
;;
esac
shift
done
# urgency is always set
HINTS=("$(make_hint byte urgency "$URGENCY")" "${HINTS[@]}")
if [[ "$SUMMARY_SET" = n ]] ; then
help
exit 1
else
notify
fi

4
bin/racket

@ -1,4 +0,0 @@
#!/bin/sh
export LD_LIBRARY_PATH="/nix/store/rijqazlvihgh7zvi4yam1j9jjmahjm85-cairo-1.16.0/lib:/nix/store/fylgr4s2iid2q9c0xbqr6bq07w1isi1h-fontconfig-2.13.92-lib/lib:/nix/store/ai5054xzilz0q285c0ldabmkvhyyl6yq-glib-2.64.6/lib:/nix/store/1lj2b24v408awrfxw6xxv9spm9023lva-gmp-6.2.0/lib:/nix/store/gfip3n33lnd4k9kkp5zdv44njyxrmdpp-gtk+3-3.24.21/lib:/nix/store/20lw4zx8h7yakz8l55v6dwng7cp91v0w-gsettings-desktop-schemas-3.36.1/lib:/nix/store/vxh6zqkyv44gc7561aq9niqysp2k0n7w-libedit-20191231-3.1/lib:/nix/store/1mp991q6kxpc297hfchixhbzmfnya9dr-libGL-1.3.2/lib:/nix/store/fcr65nkrmq9hv7h1acxsdsald32acvjd-glu-9.0.1/lib:/nix/store/jw87zdhwkzcbam094f1hh4cjrx7gsyj9-libjpeg-turbo-2.0.4/lib:/nix/store/yljv27xqgkcwllczzr18sc483mzpxvc4-libpng-apng-1.6.37/lib:/nix/store/9x8s0431bb3r1jvqzcmdjmwc7nagcwwg-mpfr-4.1.0/lib:/nix/store/abxvl3x7hrlmimw3ck5nx04izhb0phhg-openssl-1.1.1k/lib:/nix/store/1waaha9ax2nr660y9iz5zpdg67r2sfzj-pango-1.45.5/lib:/nix/store/cy31ln6nx94mw8nm0sr1p857bcs51gj5-poppler-glib-20.08.0/lib:/nix/store/cs7gmwifrz0dqnjl3zlnlpkzyan1bhn2-readline-6.3p08/lib:/nix/store/y66v2n3chpg0qfn402ldihi38qdxllab-sqlite-3.33.0/lib"
/home/hazel/src/racket/racket/bin/racket "$@"

4
bin/raco

@ -1,4 +0,0 @@
#!/bin/sh
export LD_LIBRARY_PATH="/nix/store/rijqazlvihgh7zvi4yam1j9jjmahjm85-cairo-1.16.0/lib:/nix/store/fylgr4s2iid2q9c0xbqr6bq07w1isi1h-fontconfig-2.13.92-lib/lib:/nix/store/ai5054xzilz0q285c0ldabmkvhyyl6yq-glib-2.64.6/lib:/nix/store/1lj2b24v408awrfxw6xxv9spm9023lva-gmp-6.2.0/lib:/nix/store/gfip3n33lnd4k9kkp5zdv44njyxrmdpp-gtk+3-3.24.21/lib:/nix/store/20lw4zx8h7yakz8l55v6dwng7cp91v0w-gsettings-desktop-schemas-3.36.1/lib:/nix/store/vxh6zqkyv44gc7561aq9niqysp2k0n7w-libedit-20191231-3.1/lib:/nix/store/1mp991q6kxpc297hfchixhbzmfnya9dr-libGL-1.3.2/lib:/nix/store/fcr65nkrmq9hv7h1acxsdsald32acvjd-glu-9.0.1/lib:/nix/store/jw87zdhwkzcbam094f1hh4cjrx7gsyj9-libjpeg-turbo-2.0.4/lib:/nix/store/yljv27xqgkcwllczzr18sc483mzpxvc4-libpng-apng-1.6.37/lib:/nix/store/9x8s0431bb3r1jvqzcmdjmwc7nagcwwg-mpfr-4.1.0/lib:/nix/store/abxvl3x7hrlmimw3ck5nx04izhb0phhg-openssl-1.1.1k/lib:/nix/store/1waaha9ax2nr660y9iz5zpdg67r2sfzj-pango-1.45.5/lib:/nix/store/cy31ln6nx94mw8nm0sr1p857bcs51gj5-poppler-glib-20.08.0/lib:/nix/store/cs7gmwifrz0dqnjl3zlnlpkzyan1bhn2-readline-6.3p08/lib:/nix/store/y66v2n3chpg0qfn402ldihi38qdxllab-sqlite-3.33.0/lib"
/home/hazel/src/racket/racket/bin/raco "$@"

47
bin/sway-screenshare

@ -1,47 +0,0 @@
#!/usr/bin/env cached-nix-shell
#!nix-shell -i bash -p wf-recorder ffmpeg-full
set -x
if ! lsmod | grep v4l2loopback > /dev/null; then
echo "Adding v42loopback module to kernel"
sudo modprobe v4l2loopback
fi
geometry() {
window_geometries=$(
# `height - 1` is there because of: https://github.com/ammen99/wf-recorder/pull/56 (I could remove it if it's merged, maybe)
swaymsg -t get_workspaces -r | jq -r '.[] | select(.focused) | .rect | "\(.x),\(.y) \(.width)x\(.height - 1)"'; \
swaymsg -t get_outputs -r | jq -r '.[] | select(.active) | .rect | "\(.x),\(.y) \(.width)x\(.height)"'
)
geometry=$(slurp -b "#45858820" -c "#45858880" -w 3 -d <<< "$window_geometries") || exit $?
echo $geometry
}
{
if pgrep wf-recorder > /dev/null && pgrep ffplay > /dev/null
then
if pgrep ffplay > /dev/null; then
pkill ffplay > /dev/null
fi
if pgrep wf-recorder > /dev/null; then
pkill wf-recorder > /dev/null
fi
notify-send -t 2000 "Wayland recording has been stopped"
else
if ! pgrep wf-recorder > /dev/null; then
geometry=$(geometry) || exit $?
wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video0 --geometry="$geometry" &
fi
if ! pgrep ffplay; then
swaymsg assign [class=ffplay] workspace 11
unset SDL_VIDEODRIVER
ffplay /dev/video0 -fflags nobuffer &
sleep 0.5
# a hack so FPS is not dropping
swaymsg [class=ffplay] floating enable
# swaymsg [class=ffplay] move position 1900 1000
# swaymsg focus tiling
fi
notify-send -t 2000 "Wayland recording has been started"
fi
} > ~/.cache/wayland-share-screen.log 2>&1

2
bin/ybk-ssh

@ -1,2 +0,0 @@
#!/bin/sh
gpg-connect-agent /bye

14
cachix.nix

@ -1,14 +0,0 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.binaryCaches = ["https://cache.nixos.org/"];
}

12
cachix/nix-community.nix

@ -1,12 +0,0 @@
{
nix = {
binaryCaches = [
"https://nix-community.cachix.org"
];
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}

2
config/zsh/zshrc

@ -11,7 +11,7 @@ path=(
~/bin
~/.local/bin
~/.emacs.d/bin
~/src/racket/racket/bin
# ~/src/racket/racket/bin
$path
)

19
configuration.nix

@ -2,10 +2,7 @@
{ options, config, lib, pkgs, ... }:
{
imports = [
<home-manager/nixos>
./modules
./machines/current
];
nix = {
@ -32,9 +29,6 @@
time.timeZone = "America/Indiana/Indianapolis";
nixpkgs.overlays = import /etc/nixos/packages;
nixpkgs.config.allowUnfree = true; # sorry, Stallman
# the bare minimum
environment.systemPackages = with pkgs; [
coreutils
@ -48,13 +42,22 @@
cached-nix-shell
];
# unfortunately for everyone, it's me
users.mutableUsers = false;
# agenix
# run SSHd, but don't actually allow anything but local
# services.openssh = {
# enable = true;
# openFirewall = false;
# passwordAuthentication = false;
# };
# age.secrets.password.file = ./secrets/password.age;
users.mutableUsers = true;
users.users.hazel = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" "audio" "video" "networkmanager" ];
shell = pkgs.zsh;
# passwordFile = config.age.secrets.password.path;
};
# enable home-manager for my user

87
flake.lock

@ -11,7 +11,6 @@
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "emacs-overlay",
"type": "github"
}
@ -38,11 +37,11 @@
]
},
"locked": {
"lastModified": 1617824794,
"narHash": "sha256-UGkvzx0nIXHhNq/KwJLjXvKAQRE2V33MuX+UirvqrkQ=",
"lastModified": 1622312678,
"narHash": "sha256-LsVDvO6TBnSQNNoV+Dt10+jx91eS74k8hf4zIOMAyR0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2aa20ae969f2597c4df10a094440a66e9d7f8c86",
"rev": "49706878e1580d796cc99b63574310405935113f",
"type": "github"
},
"original": {
@ -54,11 +53,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1622204124,
"narHash": "sha256-FbVvBn613LKYOxZzxfEsWwgBNr/JmID9i4VzTygLOVI=",
"lastModified": 1622405422,
"narHash": "sha256-V+nSLJ2CubAhmd8XgRG8GB7MvkGMFl8gUPlIkUk+ueg=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "30f1a9952d1fb6ee760fdae1a8553fb87211cb62",
"rev": "3fc630f84c9c4b542844169d3ec17c369b6d242b",
"type": "github"
},
"original": {
@ -69,11 +68,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1622197592,
"narHash": "sha256-MS2v6/oDzW5uej8fnjg0v//WWVvEdNooP4plG2AdMGQ=",
"lastModified": 1622364474,
"narHash": "sha256-bRupByHizbCba3/AgaETL+YySowmfssqWl7+p0jwcPU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "85960bea533dc2d89dff8836d8a0a1239ddd5c9c",
"rev": "eae0cabc124702e04bb2098070ca46d661543d29",
"type": "github"
},
"original": {
@ -99,6 +98,21 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1607522989,
"narHash": "sha256-o/jWhOSAlaK7y2M57OIriRt6whuVVocS/T0mG7fd1TI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e9158eca70ae59e73fae23be5d13d3fa0cfc78b4",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"emacs-overlay": "emacs-overlay",
@ -106,10 +120,47 @@
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"utils": "utils_2",
"zsh-syntax-highlighting": "zsh-syntax-highlighting"
}
},
"simple-nixos-mailserver": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1622405273,
"narHash": "sha256-51FSeNllpx/Dd6s1Q/GZzvLPGTovphsNpiAAZEM6BGQ=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "7109545c582a5e2ee5d23d19428a6a1ac69caa3e",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"ref": "nixos-21.05",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"utils": {
"locked": {
"lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_2": {
"inputs": {
"flake-utils": "flake-utils"
},
@ -126,6 +177,22 @@
"repo": "flake-utils-plus",
"type": "github"
}
},
"zsh-syntax-highlighting": {
"flake": false,
"locked": {
"lastModified": 1622348698,
"narHash": "sha256-YvYcA+stJ1R5CMAk2RLzvyz781yPgw8OgUOlSbGvzCY=",
"owner": "zsh-users",
"repo": "zsh-syntax-highlighting",
"rev": "0e1bb14452e3fc66dcc81531212e1061e02c1a61",
"type": "github"
},
"original": {
"owner": "zsh-users",
"repo": "zsh-syntax-highlighting",
"type": "github"
}
}
},
"root": "root",

99
flake.nix

@ -1,50 +1,97 @@
# flake.nix -- the glue 2: even gluier
# flake.nix: the glue, but even gluier
{
description = "maybe you wouldn't have so many problems if you weren't on a zoomer distro";
# -- paraphrased from sam-tobin hochstadt, 2021
description = "maybe you'd have less problems if you weren't on a zoomer distro";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-20.09";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# nixpkgs-master.url = "github:nixos/nixpkgs";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
home-manager = {
url = "github:nix-community/home-manager/release-20.09";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay.url = "github:nix-community/emacs-overlay/master";
emacs-overlay.url = "github:nix-community/emacs-overlay";
nixos-hardware.url = "github:nixos/nixos-hardware";
# temporary
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-21.05";
zsh-syntax-highlighting = {
url = "github:zsh-users/zsh-syntax-highlighting";
flake = false;
};
};
outputs = inputs@{ self,
utils,
nixpkgs,
nixpkgs-unstable,
emacs-overlay,
home-manager,
nixos-hardware,
utils }:
utils.lib.systemFlake {
inherit self inputs;
home-manager,
simple-nixos-mailserver, ... }:
utils.lib.systemFlake {
inherit self inputs;
supportedSystems = [ "x86_64-linux" ]; # I tried running this on aarch64, it didn't end well
supportedSystems = [ "x86_64-linux" ];
modules = utils.lib.modulesFromList [ ./configuration.nix ]; # fuck it
channels.unstable.input = nixpkgs-unstable;
channels.nixpkgs = {
input = nixpkgs;
channels.nixpkgs = {
input = nixpkgs;
overlays = import ./packages;
};
# overrides
overlaysBuilder = channels: [
(final: prev: {
inherit (channels.unstable)
element-desktop sage rust-analyzer julia-mono;
})
];
};
channelsConfig = { allowUnfree = true; };
# hosts = {
# hyacinth.modules = [ ./machines/hyacinth ];
# kerria.modules = [ ./machines/kerria ];
# lucy.modules = [ ./machines/lucy ];
# };
hosts = {
hyacinth.modules = [
./configuration.nix
./machines/hyacinth
nixos-hardware.nixosModules.lenovo-thinkpad-t495
];
kerria.modules = [
./configuration.nix
./machines/kerria
nixos-hardware.nixosModules.pcengines-apu
sharedModules = with self.modules; [
home-manager.nixosModules.home-manager
utils.nixosModules.saneFlakeDefaults
];
};
simple-nixos-mailserver.nixosModule
{
mailserver = {
enable = true;
fqdn = "mail.knightsofthelambdacalcul.us";
domains = [ "knightsofthelambdacalcul.us" ];
loginAccounts = {
"hazel@knightsofthelambdacalcul.us" = {
hashedPasswordFile = /etc/snm-hashed-passwd;
aliases = [ "postmaster@knightsofthelambdacalcul.us" ];
};
};
certificateScheme = 3; # use letsencrypt
enableImap = true;
enableImapSsl = true;
enablePop3 = false;
enablePop3Ssl = false;
enableManageSieve = true;
};
}
];
};
sharedModules = [
nixpkgs.nixosModules.notDetected # enable nonfree firmwares
home-manager.nixosModules.home-manager
];
# sharedOverlays = import ./packages;
};
}

98
machines/hyacinth/default.nix

@ -60,25 +60,7 @@
};
# the pointing with the mouse and stuff
hazel.graphicalSession = {
enable = true;
desktop = "gnome";
};
# hazel.desktop.sway = {
# outputs = {
# eDP-1 = {
# bg = "~/usr/img/papes/desktop/clouds.jpg fill";
# res = "1920x1080";
# pos = "1920 0";
# };
# HDMI-A-1 = {
# bg = "~/usr/img/papes/desktop/roses.jpg tile";
# res = "1920x1080";
# pos = "0 0";
# };
# };
# lockBg = "~/usr/img/papes/desktop/clouds.jpg";
# };
hazel.graphicalSession.enable = true;
# various tools
hazel.emacs = {
@ -124,86 +106,8 @@
'';
};
# via
services.udev.extraRules = ''
# Atmel DFU
### ATmega16U2
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess"
### ATmega32U2
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess"
### ATmega16U4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess"
### ATmega32U4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess"
### AT90USB64
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess"
### AT90USB162
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess"
### AT90USB128
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess"
# Input Club
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess"
# STM32duino
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess"
# STM32 DFU
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
# BootloadHID
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess"
# USBAspLoader
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess"
# ModemManager should ignore the following devices
# Atmel SAM-BA (Massdrop)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
# Caterina (Pro Micro)
## Spark Fun Electronics
### Pro Micro 3V3/8MHz
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### Pro Micro 5V/16MHz
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### LilyPad 3V3/8MHz (and some Pro Micro clones)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
## Pololu Electronics
### A-Star 32U4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
## Arduino SA
### Leonardo
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### Micro
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
## Adafruit Industries LLC
### Feather 32U4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### ItsyBitsy 32U4 3V3/8MHz
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### ItsyBitsy 32U4 5V/16MHz
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
## dog hunter AG
### Leonardo
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### Micro
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
'';
# sigh
virtualisation.docker.enable = true;
programs.adb.enable = true;
users.users.hazel.extraGroups = [ "docker" "adbusers" "dialout" ];
hazel.home.home.packages = with pkgs; [
steam-run
appimage-run
xboxdrv
minecraft
mcrcon
unstable.pcsx2
kdenlive
citrix_workspace
];
}

5
machines/hyacinth/hardware.nix

@ -2,11 +2,6 @@
{ config, lib, pkgs, ... }:
{
imports =
[ <nixos-hardware/lenovo/thinkpad/t495>
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "cp210x" "v4l2loopback" ];

4
machines/kerria/default.nix

@ -2,7 +2,6 @@
{ config, pkgs, lib, ... }:
{
imports = [
<home-manager/nixos>
./hardware.nix
];
@ -58,13 +57,12 @@
};
lemniscation.enable = true;
mailserver.enable = true;
# mailserver.enable = true;
gitea.enable = true;
bitwarden.enable = true;
nextcloud.enable = true;
linx.enable = true; # broken
perihelion.enable = true;
};

5
machines/kerria/hardware.nix

@ -1,11 +1,6 @@
# kerria -- pcengines apu2e0
{ config, lib, pkgs, ... }:
{
imports =
[ <nixos-hardware/pcengines/apu>
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];

35
modules/custom/hikari.nix

@ -1,35 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hazel.modules.hikari;
in
with lib; {
options = {
hazel.modules.hikari = {
enable = mkEnableOption "hikari";
config = mkOption {
type = with types; attrs; # don't know if this needs to be more specific
};
# TODO: make this a list? shell codegen?
autoStart = mkOption {
type = with types; str;
default = "";
};
};
};
config = mkIf cfg.enable {
security.pam.services.hikari-unlocker.text = "auth include login";
hazel.home.xdg.configFile."hikari/hikari.conf".text = builtins.toJSON cfg.config;
hazel.home.xdg.configFile."hikari/autostart".text = cfg.autoStart;
hazel.home.xdg.configFile."hikari/autostart".executable = true;
hazel.home.home.packages = with pkgs; [
hazel.hikari
xwayland
swaybg
];
};
}

123
modules/custom/i3status-rust.nix

@ -1,123 +0,0 @@
{ config, lib, pkgs, ... }:
with lib; let
cfg = config.hazel.modules.i3status-rust;
mapAttrsToList = f: l:
attrValues (mapAttrs f l);
formatLine = n: v:
let
formatValue = v:
if isList v then
"[${concatStringsSep ", " (map (x: ''"${x}"'') v)}]"
else if isBool v then
(if v then "true" else "false")
else if isString v then
''"${v}"''
else
toString v; in
"${n} = ${formatValue v}";
formatAttrs = vs:
concatStringsSep "\n" (mapAttrsToList formatLine vs);
formatBlock = vs:
''
[[block]]
block = "${vs.name}"
${formatAttrs vs.settings}
'';
formatSetting = b: s: vs:
''
[${b}]
name = "${s}"
[${b}.overrides]
${formatAttrs vs}
'';
in {
options = {
hazel.modules.i3status-rust = {
enable = mkEnableOption "i3status-rust";
blocks = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {
type = with types; str;
description = ''
The name of the block.
'';
};
settings = mkOption {
default = {};
type = with types; attrsOf (oneOf [ bool int str (listOf str) ]);
description = ''
The settings for this block.
'';
};
};
});
};
icons = mkOption {
type = types.submodule {
options = {
name = mkOption {
default = "awesome";
type = with types; str;
description = ''
The icon pack to use for the bar.
'';
};
overrides = mkOption {
default = {};
type = with types; attrsOf str;
description = ''
Overridden icons for use in the given block.
'';
};
};
};
};
theme = mkOption {
type = types.submodule {
options = {
name = mkOption {
default = "solarized-dark";
type = with types; str;
description = ''
The theme to use in the bar.
'';
};
overrides = mkOption {
default = {};
type = with types; attrsOf str;
description = ''
Overridden colors for use in the given theme.
'';
};
};
};
};
};
};
config = mkIf cfg.enable {
hazel.home = {
home.packages = [ pkgs.i3status-rust ];
xdg.configFile."i3status-rust/status.toml" = {
text = concatStringsSep "\n"
([ (formatSetting "icons" cfg.icons.name cfg.icons.overrides)
(formatSetting "theme" cfg.theme.name cfg.theme.overrides) ]
++ map formatBlock cfg.blocks);
onChange = "swaymsg reload";
};
};
};
}

2
modules/default.nix

@ -35,7 +35,7 @@
nix-index
];
home.stateVersion = "20.03";
home.stateVersion = "20.09";
};
};
}

1
modules/desktop/apps/default.nix

@ -3,7 +3,6 @@ with lib; {
imports = [
./alacritty.nix
./firefox.nix
./qutebrowser.nix
./zathura.nix
];
}

24
modules/desktop/apps/qutebrowser.nix

@ -1,24 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hazel.desktop.qutebrowser;
in
with lib; {
options.hazel.desktop.qutebrowser.enable = mkEnableOption "qutebrowser";
config = mkIf cfg.enable {
hazel.home = {
home.packages = with pkgs; [
unstable.qutebrowser
# bitwarden userscript
keyutils
python37Packages.tldextract
python37Packages.pyperclip
];
home.sessionVariables = { "BROWSER" = "qutebrowser"; };
xdg.configFile."qutebrowser/config.py".source =
/etc/nixos/config/qutebrowser/config.py;
};
};
}

10
modules/desktop/core/default.nix

@ -1,10 +0,0 @@
{ config, lib, pkgs, ... }:
with lib; {
imports = [
./i3status-rust.nix
./mako.nix
./rofi.nix
./waybar.nix
./wofi.nix
];
}

73
modules/desktop/core/i3status-rust.nix

@ -1,73 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hazel.desktop.i3status-rust;
in
with lib; {
imports = [
/etc/nixos/modules/custom/i3status-rust.nix
];
options = {
hazel.desktop.i3status-rust = {
enable = mkEnableOption "i3status-rust";
batteries = mkOption {
default = [ "BAT0" ];
type = with types; (listOf str);
};
};
};
config = mkIf cfg.enable {
hazel.modules.i3status-rust = {
enable = true;
icons.name = "awesome";
theme = {
name = "solarized-dark";