Compare commits
9 commits
544759cf4f
...
5b589f7df8
Author | SHA1 | Date | |
---|---|---|---|
5b589f7df8 | |||
1be9f5ff9e | |||
d0f036c466 | |||
f28a0a822e | |||
19bb4db3b3 | |||
5e82b2563c | |||
7fbbe71a39 | |||
a5cc882078 | |||
086802ded0 |
|
@ -312,11 +312,11 @@
|
||||||
"vimwiki-cli": "vimwiki-cli"
|
"vimwiki-cli": "vimwiki-cli"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1670394895,
|
"lastModified": 1670936403,
|
||||||
"narHash": "sha256-MlkPVWWHcUPzNYRiJ+32vQL7iVS+aswGECxL8bUE5xM=",
|
"narHash": "sha256-alrM0QG1eXYJTjgQ/4Ahmw95FZ435cIHXwDNdq/mLUM=",
|
||||||
"ref": "main",
|
"ref": "main",
|
||||||
"rev": "9730a8abbde76aa409f39a1f5128744d4e191cad",
|
"rev": "3c9d0c5471affee1b426a0159b13201df41cad6c",
|
||||||
"revCount": 447,
|
"revCount": 455,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
||||||
},
|
},
|
||||||
|
|
|
@ -83,6 +83,10 @@
|
||||||
"SunVox"
|
"SunVox"
|
||||||
"renoise"
|
"renoise"
|
||||||
];
|
];
|
||||||
|
# config.permittedInsecurePackages = [
|
||||||
|
# "python3.10-django-3.1.14" # Needed for archivebox deployments on curve
|
||||||
|
# # Check when archive box updates it's dependeny
|
||||||
|
# ];
|
||||||
overlays = [
|
overlays = [
|
||||||
rust-overlay.overlays.default
|
rust-overlay.overlays.default
|
||||||
tidalcycles.overlays.default
|
tidalcycles.overlays.default
|
||||||
|
|
317
home/profiles/desktop/bin/bluetoothmenu
Executable file
317
home/profiles/desktop/bin/bluetoothmenu
Executable file
|
@ -0,0 +1,317 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# __ _ _ _ _ _ _
|
||||||
|
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
|
||||||
|
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
|
||||||
|
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
|
||||||
|
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
|
||||||
|
#
|
||||||
|
# Author: Nick Clyde (clydedroid)
|
||||||
|
#
|
||||||
|
# A script that generates a rofi menu that uses bluetoothctl to
|
||||||
|
# connect to bluetooth devices and display status info.
|
||||||
|
#
|
||||||
|
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
|
||||||
|
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
|
||||||
|
#
|
||||||
|
# Depends on:
|
||||||
|
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
|
||||||
|
|
||||||
|
# Constants
|
||||||
|
divider="---------"
|
||||||
|
goback="Back"
|
||||||
|
|
||||||
|
# Checks if bluetooth controller is powered on
|
||||||
|
power_on() {
|
||||||
|
if bluetoothctl show | grep -q "Powered: yes"; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggles power state
|
||||||
|
toggle_power() {
|
||||||
|
if power_on; then
|
||||||
|
bluetoothctl power off
|
||||||
|
show_menu
|
||||||
|
else
|
||||||
|
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||||
|
rfkill unblock bluetooth && sleep 3
|
||||||
|
fi
|
||||||
|
bluetoothctl power on
|
||||||
|
show_menu
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if controller is scanning for new devices
|
||||||
|
scan_on() {
|
||||||
|
if bluetoothctl show | grep -q "Discovering: yes"; then
|
||||||
|
echo "Scan: on"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Scan: off"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggles scanning state
|
||||||
|
toggle_scan() {
|
||||||
|
if scan_on; then
|
||||||
|
kill $(pgrep -f "bluetoothctl scan on")
|
||||||
|
bluetoothctl scan off
|
||||||
|
show_menu
|
||||||
|
else
|
||||||
|
bluetoothctl scan on &
|
||||||
|
echo "Scanning..."
|
||||||
|
sleep 5
|
||||||
|
show_menu
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if controller is able to pair to devices
|
||||||
|
pairable_on() {
|
||||||
|
if bluetoothctl show | grep -q "Pairable: yes"; then
|
||||||
|
echo "Pairable: on"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Pairable: off"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggles pairable state
|
||||||
|
toggle_pairable() {
|
||||||
|
if pairable_on; then
|
||||||
|
bluetoothctl pairable off
|
||||||
|
show_menu
|
||||||
|
else
|
||||||
|
bluetoothctl pairable on
|
||||||
|
show_menu
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if controller is discoverable by other devices
|
||||||
|
discoverable_on() {
|
||||||
|
if bluetoothctl show | grep -q "Discoverable: yes"; then
|
||||||
|
echo "Discoverable: on"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Discoverable: off"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggles discoverable state
|
||||||
|
toggle_discoverable() {
|
||||||
|
if discoverable_on; then
|
||||||
|
bluetoothctl discoverable off
|
||||||
|
show_menu
|
||||||
|
else
|
||||||
|
bluetoothctl discoverable on
|
||||||
|
show_menu
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if a device is connected
|
||||||
|
device_connected() {
|
||||||
|
device_info=$(bluetoothctl info "$1")
|
||||||
|
if echo "$device_info" | grep -q "Connected: yes"; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggles device connection
|
||||||
|
toggle_connection() {
|
||||||
|
if device_connected $1; then
|
||||||
|
bluetoothctl disconnect $1
|
||||||
|
device_menu "$device"
|
||||||
|
else
|
||||||
|
bluetoothctl connect $1
|
||||||
|
device_menu "$device"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if a device is paired
|
||||||
|
device_paired() {
|
||||||
|
device_info=$(bluetoothctl info "$1")
|
||||||
|
if echo "$device_info" | grep -q "Paired: yes"; then
|
||||||
|
echo "Paired: yes"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Paired: no"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggles device paired state
|
||||||
|
toggle_paired() {
|
||||||
|
if device_paired $1; then
|
||||||
|
bluetoothctl remove $1
|
||||||
|
device_menu "$device"
|
||||||
|
else
|
||||||
|
bluetoothctl pair $1
|
||||||
|
device_menu "$device"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if a device is trusted
|
||||||
|
device_trusted() {
|
||||||
|
device_info=$(bluetoothctl info "$1")
|
||||||
|
if echo "$device_info" | grep -q "Trusted: yes"; then
|
||||||
|
echo "Trusted: yes"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Trusted: no"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggles device connection
|
||||||
|
toggle_trust() {
|
||||||
|
if device_trusted $1; then
|
||||||
|
bluetoothctl untrust $1
|
||||||
|
device_menu "$device"
|
||||||
|
else
|
||||||
|
bluetoothctl trust $1
|
||||||
|
device_menu "$device"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prints a short string with the current bluetooth status
|
||||||
|
# Useful for status bars like polybar, etc.
|
||||||
|
print_status() {
|
||||||
|
if power_on; then
|
||||||
|
printf ''
|
||||||
|
|
||||||
|
paired_devices_cmd="devices Paired"
|
||||||
|
# Check if an outdated version of bluetoothctl is used to preserve backwards compatibility
|
||||||
|
if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then
|
||||||
|
paired_devices_cmd="paired-devices"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2)
|
||||||
|
counter=0
|
||||||
|
|
||||||
|
for device in "${paired_devices[@]}"; do
|
||||||
|
if device_connected $device; then
|
||||||
|
device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-)
|
||||||
|
|
||||||
|
if [ $counter -gt 0 ]; then
|
||||||
|
printf ", %s" "$device_alias"
|
||||||
|
else
|
||||||
|
printf " %s" "$device_alias"
|
||||||
|
fi
|
||||||
|
|
||||||
|
((counter++))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
printf "\n"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# A submenu for a specific device that allows connecting, pairing, and trusting
|
||||||
|
device_menu() {
|
||||||
|
device=$1
|
||||||
|
|
||||||
|
# Get device name and mac address
|
||||||
|
device_name=$(echo $device | cut -d ' ' -f 3-)
|
||||||
|
mac=$(echo $device | cut -d ' ' -f 2)
|
||||||
|
|
||||||
|
# Build options
|
||||||
|
if device_connected $mac; then
|
||||||
|
connected="Connected: yes"
|
||||||
|
else
|
||||||
|
connected="Connected: no"
|
||||||
|
fi
|
||||||
|
paired=$(device_paired $mac)
|
||||||
|
trusted=$(device_trusted $mac)
|
||||||
|
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||||
|
|
||||||
|
# Open rofi menu, read chosen option
|
||||||
|
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
|
||||||
|
|
||||||
|
# Match chosen option to command
|
||||||
|
case $chosen in
|
||||||
|
"" | $divider)
|
||||||
|
echo "No option chosen."
|
||||||
|
;;
|
||||||
|
$connected)
|
||||||
|
toggle_connection $mac
|
||||||
|
;;
|
||||||
|
$paired)
|
||||||
|
toggle_paired $mac
|
||||||
|
;;
|
||||||
|
$trusted)
|
||||||
|
toggle_trust $mac
|
||||||
|
;;
|
||||||
|
$goback)
|
||||||
|
show_menu
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Opens a rofi menu with current bluetooth status and options to connect
|
||||||
|
show_menu() {
|
||||||
|
# Get menu options
|
||||||
|
if power_on; then
|
||||||
|
power="Power: on"
|
||||||
|
|
||||||
|
# Human-readable names of devices, one per line
|
||||||
|
# If scan is off, will only list paired devices
|
||||||
|
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
|
||||||
|
|
||||||
|
# Get controller flags
|
||||||
|
scan=$(scan_on)
|
||||||
|
pairable=$(pairable_on)
|
||||||
|
discoverable=$(discoverable_on)
|
||||||
|
|
||||||
|
# Options passed to rofi
|
||||||
|
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||||
|
else
|
||||||
|
power="Power: off"
|
||||||
|
options="$power\nExit"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Open rofi menu, read chosen option
|
||||||
|
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
|
||||||
|
|
||||||
|
# Match chosen option to command
|
||||||
|
case $chosen in
|
||||||
|
"" | $divider)
|
||||||
|
echo "No option chosen."
|
||||||
|
;;
|
||||||
|
$power)
|
||||||
|
toggle_power
|
||||||
|
;;
|
||||||
|
$scan)
|
||||||
|
toggle_scan
|
||||||
|
;;
|
||||||
|
$discoverable)
|
||||||
|
toggle_discoverable
|
||||||
|
;;
|
||||||
|
$pairable)
|
||||||
|
toggle_pairable
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
device=$(bluetoothctl devices | grep "$chosen")
|
||||||
|
# Open a submenu if a device is selected
|
||||||
|
if [[ $device ]]; then device_menu "$device"; fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Rofi command to pipe into, can add any options here
|
||||||
|
rofi_command="rofi -theme theme/passmenu.rasi -dmenu -no-fixed-num-lines -yoffset -100 -i -p"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--status)
|
||||||
|
print_status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
show_menu
|
||||||
|
;;
|
||||||
|
esac
|
115
home/profiles/desktop/bin/wifimenu
Executable file
115
home/profiles/desktop/bin/wifimenu
Executable file
|
@ -0,0 +1,115 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# rofi config without entry so to make select from available options only
|
||||||
|
rofiprompt=theme/passmenu.rasi
|
||||||
|
# normal rofi menu
|
||||||
|
rofidmenu=theme/passmenu.rasi
|
||||||
|
# rofi config for password
|
||||||
|
rofipass=theme/passmenu.rasi
|
||||||
|
|
||||||
|
# Power Status
|
||||||
|
flag=$(cat /sys/class/net/wl*/flags)
|
||||||
|
|
||||||
|
if [ "$flag" = "0x1003" ]; then
|
||||||
|
power="On"
|
||||||
|
else
|
||||||
|
power="Off"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Connection Status
|
||||||
|
state=$(cat /sys/class/net/wl*/operstate)
|
||||||
|
|
||||||
|
if [ "$state" = "up" ]; then
|
||||||
|
status=$(nmcli | grep "^wlp" | sed 's/\ connected\ to/Connected to/' | cut -d ':' -f2)
|
||||||
|
else
|
||||||
|
status="Disconnected"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ┌─┐┌─┐┬ ┬┌─┐┬─┐
|
||||||
|
# ├─┘│ ││││├┤ ├┬┘
|
||||||
|
# ┴ └─┘└┴┘└─┘┴└─
|
||||||
|
|
||||||
|
powertoggle=$( [ "$flag" = "0x1003" ] && echo "Power Off" || echo "Power On" )
|
||||||
|
|
||||||
|
powerswitch() {
|
||||||
|
if [ "$powertoggle" = "Power Off" ]; then
|
||||||
|
nmcli radio wifi off
|
||||||
|
elif [ "$powertoggle" = "Power On" ]; then
|
||||||
|
nmcli radio wifi on
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ┌─┐┌─┐┌┐┌┌┐┌┌─┐┌─┐┌┬┐
|
||||||
|
# │ │ │││││││├┤ │ │
|
||||||
|
# └─┘└─┘┘└┘┘└┘└─┘└─┘ ┴
|
||||||
|
|
||||||
|
connections() {
|
||||||
|
list=$(nmcli --fields "SECURITY,SSID" device wifi list | tail -n +2 | sed "s/ */ /g" | sed -E "s/WPA*.?//g" | sed "s/^--//g" | sed "s/ //g")
|
||||||
|
networks=$(printf "$list" | rofi -theme $rofiprompt -dmenu -i -hover-select -p "Select Wifi Network
|
||||||
|
$status")
|
||||||
|
wifi=$( echo "$networks" | sed "s/ //g" | sed "s/ //g" | xargs)
|
||||||
|
[ -z "$networks" ] && exit
|
||||||
|
nopass="No Password"
|
||||||
|
pass=$(printf "$nopass\nCancel" | rofi -theme $rofipass -dmenu -i -hover-select -password -p "Wifi Password")
|
||||||
|
|
||||||
|
if [ "$pass" = "" ]; then
|
||||||
|
exit
|
||||||
|
elif [ "$pass" = "$nopass" ]; then
|
||||||
|
nmcli dev wifi con "$wifi" && printf "exit" | rofi -theme $rofiprompt -dmenu -only-match -i -p "Successfully Connected to $wifi" && exit
|
||||||
|
elif [ "$pass" = "Cancel" ]; then
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
nmcli dev wifi con "$wifi" password "$pass" && printf "exit" | rofi -theme $rofiprompt -dmenu -i -only-match -p "Successfully Connected to $wifi" && exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "exit" | rofi -theme $rofiprompt -dmenu -i -p -only-match "Failed to Connect $wifi" && exit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# ┌┬┐┌─┐┌┐┌┬ ┬┌─┐┬
|
||||||
|
# │││├─┤││││ │├─┤│
|
||||||
|
# ┴ ┴┴ ┴┘└┘└─┘┴ ┴┴─┘
|
||||||
|
|
||||||
|
manual() {
|
||||||
|
|
||||||
|
wifi=$(rofi -theme $rofidmenu -dmenu -i -p "Enter Wifi Name")
|
||||||
|
|
||||||
|
[ -z "$wifi" ] && exit
|
||||||
|
nopass="Run Without Password"
|
||||||
|
pass=$(printf "$nopass\nCancel" | rofi -theme $rofipass -dmenu -i -password -p "Wifi Password")
|
||||||
|
|
||||||
|
if [ "$pass" = "" ]; then
|
||||||
|
exit
|
||||||
|
elif [ "$pass" = "$nopass" ]; then
|
||||||
|
nmcli dev wifi con "$wifi" && printf "exit" | rofi -theme $rofiprompt -dmenu -i -only-match -p "Successfully Connected to $wifi" && exit
|
||||||
|
elif [ "$pass" = "Cancel" ]; then
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
nmcli dev wifi con "$wifi" password "$pass" && printf "exit" | rofi -theme $rofiprompt -dmenu -i -only-match -p "Successfully Connected to $wifi" && exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "exit" | rofi -theme $rofiprompt -dmenu -only-match -i -p "Failed to Connect $wifi" && exit
|
||||||
|
}
|
||||||
|
|
||||||
|
# ┌─┐┌─┐┌┬┐┬┌─┐┌┐┌┌─┐
|
||||||
|
# │ │├─┘ │ ││ ││││└─┐
|
||||||
|
# └─┘┴ ┴ ┴└─┘┘└┘└─┘
|
||||||
|
|
||||||
|
options="$powertoggle\nConnections\nConnect Manually"
|
||||||
|
|
||||||
|
rofiwifi=$(printf "$options" | rofi -theme $rofiprompt -dmenu -i -hover-select -p "Wifi
|
||||||
|
Powered: $power
|
||||||
|
Status: $status")
|
||||||
|
|
||||||
|
case $rofiwifi in
|
||||||
|
$powertoggle)
|
||||||
|
powerswitch
|
||||||
|
;;
|
||||||
|
Connections)
|
||||||
|
notify-send "Scanning"
|
||||||
|
connections
|
||||||
|
;;
|
||||||
|
"Connect Manually")
|
||||||
|
manual
|
||||||
|
esac 2>/dev/null
|
||||||
|
|
|
@ -108,6 +108,8 @@ in
|
||||||
'';
|
'';
|
||||||
# TODO hardcoded
|
# TODO hardcoded
|
||||||
".local/bin/passmenu".source = ./bin/passmenu;
|
".local/bin/passmenu".source = ./bin/passmenu;
|
||||||
|
".local/bin/bluetoothmenu".source = ./bin/bluetoothmenu;
|
||||||
|
".local/bin/wifimenu".source = ./bin/wifimenu;
|
||||||
".local/bin/powermenu".source = ./bin/powermenu;
|
".local/bin/powermenu".source = ./bin/powermenu;
|
||||||
".local/bin/screenshot".source = ./bin/screenshot;
|
".local/bin/screenshot".source = ./bin/screenshot;
|
||||||
".local/bin/mpv-ify".source = ./bin/mpv-ify;
|
".local/bin/mpv-ify".source = ./bin/mpv-ify;
|
||||||
|
|
|
@ -1,49 +1,443 @@
|
||||||
|
# vim: ft=cfg
|
||||||
|
|
||||||
|
# See dunst(5) for all configuration options
|
||||||
|
|
||||||
[global]
|
[global]
|
||||||
alignment = left
|
### Display ###
|
||||||
bounce_freq = 0
|
|
||||||
browser = firefox -new-tab
|
# Which monitor should the notifications be displayed on.
|
||||||
corner_radius = 2
|
monitor = 0
|
||||||
dmenu = rofi -dmenu -p dunst:
|
|
||||||
follow = none
|
# Display notification on focused monitor. Possible modes are:
|
||||||
font = Fira Sans 11
|
# mouse: follow mouse pointer
|
||||||
format = "<b>%s</b>\n%b"
|
# keyboard: follow window with keyboard focus
|
||||||
frame_color = "#1a1c25"
|
# none: don't follow anything
|
||||||
frame_width = 1
|
#
|
||||||
# geometry [{width}]x{height}][+/-{x}+/-{y}]
|
# "keyboard" needs a window manager that exports the
|
||||||
geometry = "440x15-26+26"
|
# _NET_ACTIVE_WINDOW property.
|
||||||
history_length = 20
|
# This should be the case for almost all modern window managers.
|
||||||
horizontal_padding = 16
|
#
|
||||||
icon_position = right
|
# If this option is set to mouse or keyboard, the monitor option
|
||||||
idle_threshold = 120
|
# will be ignored.
|
||||||
ignore_newline = no
|
follow = none
|
||||||
indicate_hidden = yes
|
|
||||||
line_height = 0
|
### Geometry ###
|
||||||
markup = full
|
|
||||||
max_icon_size = 64
|
# dynamic width from 0 to 300
|
||||||
monitor = 0
|
# width = (0, 300)
|
||||||
padding = 20
|
# constant width of 300
|
||||||
separator_color = auto
|
width = (160, 320)
|
||||||
separator_height = 4
|
|
||||||
show_age_threshold = 60
|
# The maximum height of a single notification, excluding the frame.
|
||||||
show_indicators = yes
|
height = 400
|
||||||
shrink = no
|
|
||||||
sort = yes
|
# Position the notification in the top right corner
|
||||||
startup_notification = false
|
origin = top-right
|
||||||
sticky_history = yes
|
|
||||||
transparency = 5
|
# Offset from the origin
|
||||||
word_wrap = yes
|
offset = 8x28
|
||||||
|
|
||||||
|
# Scale factor. It is auto-detected if value is 0.
|
||||||
|
scale = 0
|
||||||
|
|
||||||
|
# Maximum number of notification (0 means no limit)
|
||||||
|
notification_limit = 5
|
||||||
|
|
||||||
|
### Progress bar ###
|
||||||
|
|
||||||
|
# Turn on the progess bar. It appears when a progress hint is passed with
|
||||||
|
# for example dunstify -h int:value:12
|
||||||
|
progress_bar = true
|
||||||
|
|
||||||
|
# Set the progress bar height. This includes the frame, so make sure
|
||||||
|
# it's at least twice as big as the frame width.
|
||||||
|
progress_bar_height = 2
|
||||||
|
|
||||||
|
# Set the frame width of the progress bar
|
||||||
|
progress_bar_frame_width = 0
|
||||||
|
|
||||||
|
# Set the minimum width for the progress bar
|
||||||
|
progress_bar_min_width = 160
|
||||||
|
|
||||||
|
# Set the maximum width for the progress bar
|
||||||
|
progress_bar_max_width = 320
|
||||||
|
|
||||||
|
|
||||||
|
# Show how many messages are currently hidden (because of
|
||||||
|
# notification_limit).
|
||||||
|
indicate_hidden = yes
|
||||||
|
|
||||||
|
# The transparency of the window. Range: [0; 100].
|
||||||
|
# This option will only work if a compositing window manager is
|
||||||
|
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
|
||||||
|
transparency = 0
|
||||||
|
|
||||||
|
# Draw a line of "separator_height" pixel height between two
|
||||||
|
# notifications.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
separator_height = 1
|
||||||
|
|
||||||
|
# Padding between text and separator.
|
||||||
|
padding = 8
|
||||||
|
|
||||||
|
# Horizontal padding.
|
||||||
|
horizontal_padding = 8
|
||||||
|
|
||||||
|
# Padding between text and icon.
|
||||||
|
text_icon_padding = 8
|
||||||
|
|
||||||
|
# Defines width in pixels of frame around the notification window.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
frame_width = 1
|
||||||
|
|
||||||
|
# Defines color of the frame around the notification window.
|
||||||
|
frame_color = "#414868"
|
||||||
|
|
||||||
|
# Define a color for the separator.
|
||||||
|
# possible values are:
|
||||||
|
# * auto: dunst tries to find a color fitting to the background;
|
||||||
|
# * foreground: use the same color as the foreground;
|
||||||
|
# * frame: use the same color as the frame;
|
||||||
|
# * anything else will be interpreted as a X color.
|
||||||
|
separator_color = frame
|
||||||
|
|
||||||
|
# Sort messages by urgency.
|
||||||
|
sort = yes
|
||||||
|
|
||||||
|
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||||
|
# for longer than idle_threshold seconds.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
# A client can set the 'transient' hint to bypass this. See the rules
|
||||||
|
# section for how to disable this if necessary
|
||||||
|
# idle_threshold = 120
|
||||||
|
|
||||||
|
### Text ###
|
||||||
|
|
||||||
|
font = Iosevka Nerd Font 10
|
||||||
|
|
||||||
|
# The spacing between lines. If the height is smaller than the
|
||||||
|
# font height, it will get raised to the font height.
|
||||||
|
line_height = 0
|
||||||
|
|
||||||
|
# Possible values are:
|
||||||
|
# full: Allow a small subset of html markup in notifications:
|
||||||
|
# <b>bold</b>
|
||||||
|
# <i>italic</i>
|
||||||
|
# <s>strikethrough</s>
|
||||||
|
# <u>underline</u>
|
||||||
|
#
|
||||||
|
# For a complete reference see
|
||||||
|
# <https://docs.gtk.org/Pango/pango_markup.html>.
|
||||||
|
#
|
||||||
|
# strip: This setting is provided for compatibility with some broken
|
||||||
|
# clients that send markup even though it's not enabled on the
|
||||||
|
# server. Dunst will try to strip the markup but the parsing is
|
||||||
|
# simplistic so using this option outside of matching rules for
|
||||||
|
# specific applications *IS GREATLY DISCOURAGED*.
|
||||||
|
#
|
||||||
|
# no: Disable markup parsing, incoming notifications will be treated as
|
||||||
|
# plain text. Dunst will not advertise that it has the body-markup
|
||||||
|
# capability if this is set as a global setting.
|
||||||
|
#
|
||||||
|
# It's important to note that markup inside the format option will be parsed
|
||||||
|
# regardless of what this is set to.
|
||||||
|
markup = full
|
||||||
|
|
||||||
|
# The format of the message. Possible variables are:
|
||||||
|
# %a appname
|
||||||
|
# %s summary
|
||||||
|
# %b body
|
||||||
|
# %i iconname (including its path)
|
||||||
|
# %I iconname (without its path)
|
||||||
|
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||||
|
# %n progress value if set without any extra characters
|
||||||
|
# %% Literal %
|
||||||
|
# Markup is allowed
|
||||||
|
format = "<b>%s</b>\n%b"
|
||||||
|
|
||||||
|
# Alignment of message text.
|
||||||
|
# Possible values are "left", "center" and "right".
|
||||||
|
alignment = left
|
||||||
|
|
||||||
|
# Vertical alignment of message text and icon.
|
||||||
|
# Possible values are "top", "center" and "bottom".
|
||||||
|
vertical_alignment = top
|
||||||
|
|
||||||
|
# Show age of message if message is older than show_age_threshold
|
||||||
|
# seconds.
|
||||||
|
# Set to -1 to disable.
|
||||||
|
show_age_threshold = -1
|
||||||
|
|
||||||
|
# Specify where to make an ellipsis in long lines.
|
||||||
|
# Possible values are "start", "middle" and "end".
|
||||||
|
ellipsize = end
|
||||||
|
|
||||||
|
# Ignore newlines '\n' in notifications.
|
||||||
|
ignore_newline = no
|
||||||
|
|
||||||
|
# Stack together notifications with the same content
|
||||||
|
stack_duplicates = true
|
||||||
|
|
||||||
|
# Hide the count of stacked notifications with the same content
|
||||||
|
hide_duplicate_count = true
|
||||||
|
|
||||||
|
# Display indicators for URLs (U) and actions (A).
|
||||||
|
show_indicators = no
|
||||||
|
|
||||||
|
### Icons ###
|
||||||
|
|
||||||
|
# Align icons left/right/off
|
||||||
|
icon_position = left
|
||||||
|
|
||||||
|
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||||
|
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||||
|
# max_icon_size takes precedence over this.
|
||||||
|
min_icon_size = 0
|
||||||
|
|
||||||
|
# Scale larger icons down to this size, set to 0 to disable
|
||||||
|
max_icon_size = 160
|
||||||
|
|
||||||
|
# Paths to default icons.
|
||||||
|
icon_path = /usr/share/icons/kora/status/symbolic/:/usr/share/icons/kora/status/scalable/:/usr/share/icons/kora/apps/scalable/:/usr/share/icons/kora/mimes/scalable/:/usr/share/icons/kora/devices/scalable:/usr/share/icons/kora/places/scalable
|
||||||
|
|
||||||
|
### History ###
|
||||||
|
|
||||||
|
# Should a notification popped up from history be sticky or timeout
|
||||||
|
# as if it would normally do.
|
||||||
|
sticky_history = no
|
||||||
|
|
||||||
|
# Maximum amount of notifications kept in history
|
||||||
|
history_length = 8
|
||||||
|
|
||||||
|
### Misc/Advanced ###
|
||||||
|
|
||||||
|
# dmenu path.
|
||||||
|
dmenu = /usr/bin/dmenu -p dunst
|
||||||
|
|
||||||
|
# Browser for opening urls in context menu.
|
||||||
|
browser = /usr/bin/xdg-open
|
||||||
|
|
||||||
|
# Always run rule-defined scripts, even if the notification is suppressed
|
||||||
|
always_run_script = true
|
||||||
|
|
||||||
|
# Define the title of the windows spawned by dunst
|
||||||
|
title = dunst
|
||||||
|
|
||||||
|
# Define the class of the windows spawned by dunst
|
||||||
|
class = dunst
|
||||||
|
|
||||||
|
# Define the corner radius of the notification window
|
||||||
|
# in pixel size. If the radius is 0, you have no rounded
|
||||||
|
# corners.
|
||||||
|
# The radius will be automatically lowered if it exceeds half of the
|
||||||
|
# notification height to avoid clipping text and/or icons.
|
||||||
|
corner_radius = 0
|
||||||
|
|
||||||
|
# Ignore the dbus closeNotification message.
|
||||||
|
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||||
|
# parameter, an application may close the notification sent before the
|
||||||
|
# user defined timeout.
|
||||||
|
ignore_dbusclose = false
|
||||||
|
|
||||||
|
### Wayland ###
|
||||||
|
# These settings are Wayland-specific. They have no effect when using X11
|
||||||
|
|
||||||
|
# Uncomment this if you want to let notications appear under fullscreen
|
||||||
|
# applications (default: overlay)
|
||||||
|
# layer = top
|
||||||
|
|
||||||
|
# Set this to true to use X11 output on Wayland.
|
||||||
|
force_xwayland = false
|
||||||
|
|
||||||
|
### Legacy
|
||||||
|
|
||||||
|
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||||
|
# This setting is provided for compatibility with older nVidia drivers that
|
||||||
|
# do not support RandR and using it on systems that support RandR is highly
|
||||||
|
# discouraged.
|
||||||
|
#
|
||||||
|
# By enabling this setting dunst will not be able to detect when a monitor
|
||||||
|
# is connected or disconnected which might break follow mode if the screen
|
||||||
|
# layout changes.
|
||||||
|
force_xinerama = false
|
||||||
|
|
||||||
|
### mouse
|
||||||
|
|
||||||
|
# Defines list of actions for each mouse event
|
||||||
|
# Possible values are:
|
||||||
|
# * none: Don't do anything.
|
||||||
|
# * do_action: Invoke the action determined by the action_name rule. If there is no
|
||||||
|
# such action, open the context menu.
|
||||||
|
# * open_url: If the notification has exactly one url, open it. If there are multiple
|
||||||
|
# ones, open the context menu.
|
||||||
|
# * close_current: Close current notification.
|
||||||
|
# * close_all: Close all notifications.
|
||||||
|
# * context: Open context menu for the notification.
|
||||||
|
# * context_all: Open context menu for all notifications.
|
||||||
|
# These values can be strung together for each mouse event, and
|
||||||
|
# will be executed in sequence.
|
||||||
|
mouse_left_click = do_action
|
||||||
|
mouse_middle_click = close_current
|
||||||
|
mouse_right_click = context
|
||||||
|
|
||||||
|
# Experimental features that may or may not work correctly. Do not expect them
|
||||||
|
# to have a consistent behaviour across releases.
|
||||||
|
[experimental]
|
||||||
|
# Calculate the dpi to use on a per-monitor basis.
|
||||||
|
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||||
|
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||||
|
# using the resolution and physical size. This might be useful in setups
|
||||||
|
# where there are multiple screens with very different dpi values.
|
||||||
|
per_monitor_dpi = false
|
||||||
|
|
||||||
|
|
||||||
[urgency_low]
|
[urgency_low]
|
||||||
background = "#1E2029"
|
# IMPORTANT: colors have to be defined in quotation marks.
|
||||||
foreground = "#bbc2cf"
|
# Otherwise the "#" and following would be interpreted as a comment.
|
||||||
timeout = 8
|
background = "#24283b"
|
||||||
|
foreground = "#c0caf5"
|
||||||
|
highlight = "#bb9af7"
|
||||||
|
timeout = 3
|
||||||
|
# Icon for notifications with low urgency, uncomment to enable
|
||||||
|
icon = /dev/null
|
||||||
|
|
||||||
[urgency_normal]
|
[urgency_normal]
|
||||||
background = "#2a2d39"
|
background = "#24283b"
|
||||||
foreground = "#bbc2cf"
|
foreground = "#a9b1d6"
|
||||||
timeout = 14
|
highlight = "#bb9af7"
|
||||||
|
timeout = 5
|
||||||
|
# Icon for notifications with normal urgency, uncomment to enable
|
||||||
|
icon = /dev/null
|
||||||
|
|
||||||
[urgency_critical]
|
[urgency_critical]
|
||||||
background = "#cc6666"
|
background = "#24283b"
|
||||||
foreground = "#1E2029"
|
foreground = "#c0caf5"
|
||||||
timeout = 0
|
frame_color = "#e9af68"
|
||||||
|
highlight = "#bb9af7"
|
||||||
|
timeout = 5
|
||||||
|
# Icon for notifications with critical urgency, uncomment to enable
|
||||||
|
#icon = /path/to/icon
|
||||||
|
|
||||||
|
# Every section that isn't one of the above is interpreted as a rules to
|
||||||
|
# override settings for certain messages.
|
||||||
|
#
|
||||||
|
# Messages can be matched by
|
||||||
|
# appname (discouraged, see desktop_entry)
|
||||||
|
# body
|
||||||
|
# category
|
||||||
|
# desktop_entry
|
||||||
|
# icon
|
||||||
|
# match_transient
|
||||||
|
# msg_urgency
|
||||||
|
# stack_tag
|
||||||
|
# summary
|
||||||
|
#
|
||||||
|
# and you can override the
|
||||||
|
# background
|
||||||
|
# foreground
|
||||||
|
# format
|
||||||
|
# frame_color
|
||||||
|
# fullscreen
|
||||||
|
# new_icon
|
||||||
|
# set_stack_tag
|
||||||
|
# set_transient
|
||||||
|
# set_category
|
||||||
|
# timeout
|
||||||
|
# urgency
|
||||||
|
# skip_display
|
||||||
|
# history_ignore
|
||||||
|
# action_name
|
||||||
|
# word_wrap
|
||||||
|
# ellipsize
|
||||||
|
# alignment
|
||||||
|
#
|
||||||
|
# Shell-like globbing will get expanded.
|
||||||
|
#
|
||||||
|
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||||
|
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||||
|
# the desktop-entry won't get localized.
|
||||||
|
#
|
||||||
|
# SCRIPTING
|
||||||
|
# You can specify a script that gets run when the rule matches by
|
||||||
|
# setting the "script" option.
|
||||||
|
# The script will be called as follows:
|
||||||
|
# script appname summary body icon urgency
|
||||||
|
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||||
|
#
|
||||||
|
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||||
|
# to find fitting options for rules.
|
||||||
|
|
||||||
|
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||||
|
# client
|
||||||
|
#[transient_disable]
|
||||||
|
# match_transient = yes
|
||||||
|
# set_transient = no
|
||||||
|
#
|
||||||
|
# Make the handling of transient notifications more strict by making them not
|
||||||
|
# be placed in history.
|
||||||
|
#[transient_history_ignore]
|
||||||
|
# match_transient = yes
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
# fullscreen values
|
||||||
|
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||||
|
# delay: displays the new notification, if there is no fullscreen window active
|
||||||
|
# If the notification is already drawn, it won't get undrawn.
|
||||||
|
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||||
|
# withdrawn from screen again and will get delayed like a new notification
|
||||||
|
#[fullscreen_delay_everything]
|
||||||
|
# fullscreen = delay
|
||||||
|
#[fullscreen_show_critical]
|
||||||
|
# msg_urgency = critical
|
||||||
|
# fullscreen = show
|
||||||
|
|
||||||
|
#[espeak]
|
||||||
|
# summary = "*"
|
||||||
|
# script = dunst_espeak.sh
|
||||||
|
|
||||||
|
#[script-test]
|
||||||
|
# summary = "*script*"
|
||||||
|
# script = dunst_test.sh
|
||||||
|
|
||||||
|
#[ignore]
|
||||||
|
# # This notification will not be displayed
|
||||||
|
# summary = "foobar"
|
||||||
|
# skip_display = true
|
||||||
|
|
||||||
|
#[history-ignore]
|
||||||
|
# # This notification will not be saved in history
|
||||||
|
# summary = "foobar"
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
#[skip-display]
|
||||||
|
# # This notification will not be displayed, but will be included in the history
|
||||||
|
# summary = "foobar"
|
||||||
|
# skip_display = yes
|
||||||
|
|
||||||
|
#[signed_on]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = "*signed on*"
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[signed_off]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *signed off*
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[says]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *says*
|
||||||
|
# urgency = critical
|
||||||
|
#
|
||||||
|
#[twitter]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *twitter.com*
|
||||||
|
# urgency = normal
|
||||||
|
#
|
||||||
|
#[stack-volumes]
|
||||||
|
# appname = "some_volume_notifiers"
|
||||||
|
# set_stack_tag = "volume"
|
||||||
|
#
|
||||||
|
#[play_sound]
|
||||||
|
# summary = "*"
|
||||||
|
# script = ~/.local/share/sounds/notify_sound
|
||||||
|
|
|
@ -36,6 +36,12 @@ super + s
|
||||||
super + o
|
super + o
|
||||||
screenshot
|
screenshot
|
||||||
|
|
||||||
|
super + w
|
||||||
|
wifimenu
|
||||||
|
|
||||||
|
super + b
|
||||||
|
bluetoothmenu
|
||||||
|
|
||||||
# super + Escape
|
# super + Escape
|
||||||
# pkill -USR1 -x sxhkd
|
# pkill -USR1 -x sxhkd
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
../profiles/calibre
|
../profiles/calibre
|
||||||
../profiles/wallabag
|
../profiles/wallabag
|
||||||
../profiles/finance
|
../profiles/finance
|
||||||
|
# ../profiles/archivebox
|
||||||
];
|
];
|
||||||
|
|
||||||
# For some reason this doesn't work in the profile, but does over here??
|
# For some reason this doesn't work in the profile, but does over here??
|
||||||
|
|
|
@ -30,13 +30,6 @@
|
||||||
|
|
||||||
time.timeZone = "Australia/Brisbane";
|
time.timeZone = "Australia/Brisbane";
|
||||||
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.interfaces.enp0s31f6.useDHCP = true;
|
|
||||||
networking.interfaces.wlp3s0.useDHCP = true;
|
|
||||||
networking.wireless.enable = true;
|
|
||||||
networking.wireless.interfaces = [ "wlp3s0" ];
|
|
||||||
networking.wireless.userControlled.enable = true;
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
# console = {
|
# console = {
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
mossnet.backup = {
|
mossnet.backup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
name = "curve";
|
name = "curve";
|
||||||
paths = [ "/home/anish" ];
|
paths = [ "/home/anish/usr" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# enable adb
|
# enable adb
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
# networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
|
75
hosts/profiles/archivebox/default.nix
Normal file
75
hosts/profiles/archivebox/default.nix
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
# cfg = config.services.archivebox;
|
||||||
|
dataDir = "/var/lib/archivebox";
|
||||||
|
user = "archivebox";
|
||||||
|
port = "8123";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"python3.10-django-3.1.14"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."archive.mossnet.lan" = {
|
||||||
|
enableACME = false;
|
||||||
|
forceSSL = false;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_pass http://localhost:${port}/;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.archivebox-install = {
|
||||||
|
description = "archivebox install service";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
path = with pkgs; [ coreutils archivebox ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
User = user;
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
PermissionsStartOnly = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p "${dataDir}"
|
||||||
|
chown ${user} "${dataDir}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
echo "Setting up archivebox files in ${dataDir} ..."
|
||||||
|
cd "${dataDir}"
|
||||||
|
|
||||||
|
archivebox init
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.archivebox-server = {
|
||||||
|
description = "archivebox server service";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
path = with pkgs; [ coreutils archivebox ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
User = user;
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
PermissionsStartOnly = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p "${dataDir}"
|
||||||
|
chown ${user} "${dataDir}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
echo "Setting up wallabag files in ${dataDir} ..."
|
||||||
|
cd "${dataDir}"
|
||||||
|
|
||||||
|
archivebox server 0.0.0.0:${port}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -20,6 +20,7 @@ in
|
||||||
allowed-users = [ "@wheel" ];
|
allowed-users = [ "@wheel" ];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
"fin.mossnet.lan"
|
"fin.mossnet.lan"
|
||||||
"paper.mossnet.lan"
|
"paper.mossnet.lan"
|
||||||
"cal.mossnet.lan"
|
"cal.mossnet.lan"
|
||||||
|
"archive.mossnet.lan"
|
||||||
];
|
];
|
||||||
"192.168.1.226" = [
|
"192.168.1.226" = [
|
||||||
"df-web.lan"
|
"df-web.lan"
|
||||||
|
|
|
@ -1,23 +1,18 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ self, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
age.secrets.gitea-dbpass.file = "${self}/secrets/gitea-dbpass.age";
|
||||||
|
age.secrets.gitea-dbpass.owner = "gitea";
|
||||||
|
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
appName = "Sealight Git Forge";
|
appName = "Sealight Git Forge";
|
||||||
domain = "git.sealight.xyz";
|
domain = "git.sealight.xyz";
|
||||||
rootUrl = "https://git.sealight.xyz";
|
rootUrl = "https://git.sealight.xyz";
|
||||||
httpPort = 3001;
|
httpPort = 3001;
|
||||||
extraConfig = ''
|
|
||||||
[markup.restructuredtext]
|
|
||||||
ENABLED = true
|
|
||||||
FILE_EXTENSIONS = .rst
|
|
||||||
RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f rst"
|
|
||||||
IS_INPUT_FILE = false
|
|
||||||
'';
|
|
||||||
database = {
|
database = {
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
# passwordFile = "/run/secrets/gitea-dbpass"; # TODO supplied by agenix
|
passwordFile = "/run/agenix/gitea-dbpass";
|
||||||
password = "somethingunknowablesorry";
|
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
metrics = {
|
metrics = {
|
||||||
|
@ -26,11 +21,24 @@
|
||||||
repository = {
|
repository = {
|
||||||
DEFAULT_BRANCH = "main";
|
DEFAULT_BRANCH = "main";
|
||||||
};
|
};
|
||||||
|
# TODO
|
||||||
|
"markup.restructuredtext" = {
|
||||||
|
ENABLED = true;
|
||||||
|
FILE_EXTENSIONS = ".rst";
|
||||||
|
RENDER_COMMAND = "pandoc +RTS -M512M -RTS -f rst";
|
||||||
|
IS_INPUT_FILE = false;
|
||||||
|
};
|
||||||
|
# TODO
|
||||||
|
mailer = {
|
||||||
|
ENABLED = false;
|
||||||
|
MAILER_TYPE = "smtp";
|
||||||
|
FROM = "ops@sealight.xyz";
|
||||||
|
SENDMAIL_PATH = "${pkgs.system-sendmail}/bin/sendmail";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.pandoc ];
|
environment.systemPackages = [ pkgs.pandoc ];
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true; # Ensure postgresql is enabled
|
enable = true; # Ensure postgresql is enabled
|
||||||
authentication = ''
|
authentication = ''
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# ./mautrix-discord.nix
|
# ./mautrix-discord.nix
|
||||||
# ./mautrix-whatsapp.nix
|
# ./mautrix-whatsapp.nix
|
||||||
# ./mautrix-slack.nix
|
# ./mautrix-slack.nix
|
||||||
# ./mautrix-signall.nix
|
# ./mautrix-signal.nix
|
||||||
./mjolnir.nix
|
./mjolnir.nix
|
||||||
./heisenbridge.nix
|
./heisenbridge.nix
|
||||||
./compress-state-service.nix
|
./compress-state-service.nix
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
192.168.1.240 fin.mossnet.lan
|
192.168.1.240 fin.mossnet.lan
|
||||||
192.168.1.240 paper.mossnet.lan
|
192.168.1.240 paper.mossnet.lan
|
||||||
192.168.1.240 books.mossnet.lan
|
192.168.1.240 books.mossnet.lan
|
||||||
|
192.168.1.240 archive.mossnet.lan
|
||||||
'';
|
'';
|
||||||
# 10.0.69.4 mossnet.lan
|
# 10.0.69.4 mossnet.lan
|
||||||
# 10.0.69.4 links.mossnet.lan
|
# 10.0.69.4 links.mossnet.lan
|
||||||
|
|
|
@ -22,21 +22,12 @@
|
||||||
conf = ''
|
conf = ''
|
||||||
# This file is a "template" of what your parameters.yml file should look like
|
# This file is a "template" of what your parameters.yml file should look like
|
||||||
parameters:
|
parameters:
|
||||||
# Uncomment these settings or manually update your parameters.yml
|
|
||||||
# to use docker-compose
|
|
||||||
#
|
|
||||||
# database_driver: %env.database_driver%
|
|
||||||
# database_host: %env.database_host%
|
|
||||||
# database_port: %env.database_port%
|
|
||||||
# database_name: %env.database_name%
|
|
||||||
# database_user: %env.database_user%
|
|
||||||
# database_password: %env.database_password%
|
|
||||||
|
|
||||||
database_driver: pdo_pgsql
|
database_driver: pdo_pgsql
|
||||||
database_host: localhost
|
database_host: localhost
|
||||||
database_port: ~
|
database_port: ~
|
||||||
database_name: wallabag
|
database_name: wallabag
|
||||||
database_user: wallabag
|
database_user: wallabag
|
||||||
|
# TODO agenix
|
||||||
database_password: wallabag
|
database_password: wallabag
|
||||||
# For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite"
|
# For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite"
|
||||||
database_path: ~
|
database_path: ~
|
||||||
|
@ -59,6 +50,7 @@
|
||||||
locale: en
|
locale: en
|
||||||
|
|
||||||
# A secret key that's used to generate certain security-related tokens
|
# A secret key that's used to generate certain security-related tokens
|
||||||
|
# TODO agenix
|
||||||
secret: SAFGOECRIlfal89oe6u0(*^dsaaih961
|
secret: SAFGOECRIlfal89oe6u0(*^dsaaih961
|
||||||
|
|
||||||
# two factor stuff
|
# two factor stuff
|
||||||
|
@ -74,7 +66,7 @@
|
||||||
# how long the refresh token should life in seconds for the API
|
# how long the refresh token should life in seconds for the API
|
||||||
fos_oauth_server_refresh_token_lifetime: 1209600
|
fos_oauth_server_refresh_token_lifetime: 1209600
|
||||||
|
|
||||||
from_email: no-reply@wallabag.org
|
from_email: ops@sealight.xyz
|
||||||
|
|
||||||
rss_limit: 50
|
rss_limit: 50
|
||||||
|
|
||||||
|
|
|
@ -3,40 +3,49 @@
|
||||||
{
|
{
|
||||||
networking.dhcpcd.wait = "background";
|
networking.dhcpcd.wait = "background";
|
||||||
networking.dhcpcd.extraConfig = "noarp";
|
networking.dhcpcd.extraConfig = "noarp";
|
||||||
networking.wireless.userControlled.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.wireless.networks = {
|
|
||||||
"Chester 11403" = {
|
# networking.useDHCP = false;
|
||||||
pskRaw = "43fcb0bea43633899a9885865c53ea79d268b9bdfb8c3f4013718e43e6672e5e";
|
# networking.interfaces.enp0s31f6.useDHCP = true;
|
||||||
};
|
# networking.interfaces.wlp3s0.useDHCP = true;
|
||||||
"HSBNEWiFi" = {
|
# networking.wireless.enable = true;
|
||||||
pskRaw = "0820d84980eeb47630f13f04804fc9add684a8feebb64ba914cafc48f569d801";
|
# networking.wireless.interfaces = [ "wlp3s0" ];
|
||||||
};
|
# networking.wireless.userControlled.enable = true;
|
||||||
"TP-LINK_1D79" = {
|
|
||||||
pskRaw = "6d960910c33a59e94b151281cc3982863b4b112d8a4efd1b165e4f8e52e7dae8";
|
# networking.wireless.userControlled.enable = true;
|
||||||
};
|
# networking.wireless.networks = {
|
||||||
"nadir" = {
|
# "Chester 11403" = {
|
||||||
pskRaw = "92e0c1f0b3a1bada333964f0ee4ac04e0d9ba941aa3f29216cc3782595a41e5f";
|
# pskRaw = "43fcb0bea43633899a9885865c53ea79d268b9bdfb8c3f4013718e43e6672e5e";
|
||||||
};
|
# };
|
||||||
"WiFi-399631" = {
|
# "HSBNEWiFi" = {
|
||||||
pskRaw = "2e312c9721e470847f751d8b844d264dc5e2612361a579fc0bdebd2135b5a8ea";
|
# pskRaw = "0820d84980eeb47630f13f04804fc9add684a8feebb64ba914cafc48f569d801";
|
||||||
};
|
# };
|
||||||
"line" = {
|
# "TP-LINK_1D79" = {
|
||||||
pskRaw = "ec36a5a116224c12e305c90b7f3c5a0b7417abfaacf15828748f6a1e1e316c03";
|
# pskRaw = "6d960910c33a59e94b151281cc3982863b4b112d8a4efd1b165e4f8e52e7dae8";
|
||||||
};
|
# };
|
||||||
"MEHRA" = {
|
# "nadir" = {
|
||||||
pskRaw = "e1573bc9e30fd68ac8a805b7c5f9871322ffcdac909746831555905c2e156abb";
|
# pskRaw = "92e0c1f0b3a1bada333964f0ee4ac04e0d9ba941aa3f29216cc3782595a41e5f";
|
||||||
};
|
# };
|
||||||
"Sandeep1" = {
|
# "WiFi-399631" = {
|
||||||
pskRaw = "035972401640bf4dc2d8651c0b9df515a69f6bc2bffa07cc936183128a6ccf0a";
|
# pskRaw = "2e312c9721e470847f751d8b844d264dc5e2612361a579fc0bdebd2135b5a8ea";
|
||||||
};
|
# };
|
||||||
"chadpad" = {
|
# "line" = {
|
||||||
pskRaw = "2594b3880a60817950bd60b2770c9793fd4cb784ed183f685a52502a9df2c7b1";
|
# pskRaw = "ec36a5a116224c12e305c90b7f3c5a0b7417abfaacf15828748f6a1e1e316c03";
|
||||||
};
|
# };
|
||||||
# "updog" = {
|
# "MEHRA" = {
|
||||||
# pskRaw = "be28d9e50e4d9a065f1afccad52675d0d4fabe85526c0245648671721db606b1";
|
# pskRaw = "e1573bc9e30fd68ac8a805b7c5f9871322ffcdac909746831555905c2e156abb";
|
||||||
# };
|
# };
|
||||||
"Vodafone-07F38" = {
|
# "Sandeep1" = {
|
||||||
pskRaw = "4ffd87de73ed31ef1aee1d0d178857490afbda3f0bb8453a0baaee7b2576f302";
|
# pskRaw = "035972401640bf4dc2d8651c0b9df515a69f6bc2bffa07cc936183128a6ccf0a";
|
||||||
};
|
# };
|
||||||
};
|
# "chadpad" = {
|
||||||
|
# pskRaw = "2594b3880a60817950bd60b2770c9793fd4cb784ed183f685a52502a9df2c7b1";
|
||||||
|
# };
|
||||||
|
# # "updog" = {
|
||||||
|
# # pskRaw = "be28d9e50e4d9a065f1afccad52675d0d4fabe85526c0245648671721db606b1";
|
||||||
|
# # };
|
||||||
|
# "Vodafone-07F38" = {
|
||||||
|
# pskRaw = "4ffd87de73ed31ef1aee1d0d178857490afbda3f0bb8453a0baaee7b2576f302";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
hashedPassword = "$y$j9T$y3DPt/dWaPE.gRazQqw1w0$1RMH5sl/Nu8kW3ZMywYCPRniHD/jF5qRh0VKrdJ.bV2";
|
hashedPassword = "$y$j9T$y3DPt/dWaPE.gRazQqw1w0$1RMH5sl/Nu8kW3ZMywYCPRniHD/jF5qRh0VKrdJ.bV2";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "audio" ];
|
extraGroups = [ "wheel" "audio" "networkmanager" ];
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
# Curve
|
# Curve
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve"
|
||||||
|
|
8
secrets/gitea-dbpass.age
Normal file
8
secrets/gitea-dbpass.age
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 kgCrKA /u5qYf6vYBVeJryLq2xvZHXk9LY2A8+ks/XV4C/fixw
|
||||||
|
HNLXInIHa2d/CZR8/OwwhfLurpEbxiXca8Ip3kp/EWg
|
||||||
|
-> s9b#/i%D-grease
|
||||||
|
DtUrN1QNHQyj0mSiV9nAOBpjf1/3yxxV4E4Xxr0oR2kJa/VWvpIYzyReZdRpS5Xs
|
||||||
|
Qf0Rw1HB9OAMAQ04DuR6FVfGYaGm
|
||||||
|
--- WszM9cCBr4HW0I+HltsdXj/BCxUDMld4yAVzXVo1HLg
|
||||||
|
4µEíàݾöGT/ÅCÁ°¸ƒªBñ’šrò©ø¢£XYëµW<C2B5>ÀfröÅý|e5÷÷}PÄ)
|
|
@ -21,9 +21,9 @@ in
|
||||||
"sealight-mod-password.age".publicKeys = [ lituus ];
|
"sealight-mod-password.age".publicKeys = [ lituus ];
|
||||||
"telegram-matrix-env.age".publicKeys = [ lituus ];
|
"telegram-matrix-env.age".publicKeys = [ lituus ];
|
||||||
|
|
||||||
# "wallabag.age".publicKeys = [ mossnet ];
|
"wallabag.age".publicKeys = [ mossnet ];
|
||||||
"woodpecker-agent-secret".publicKeys = [ lituus helix ];
|
"woodpecker-agent-secret.age".publicKeys = [ lituus helix ];
|
||||||
"woodpecker-client-id".publicKeys = [ helix ];
|
"woodpecker-client-id.age".publicKeys = [ helix ];
|
||||||
"woodpecker-client-secret".publicKeys = [ helix ];
|
"woodpecker-client-secret.age".publicKeys = [ helix ];
|
||||||
"gitea-dbpass".publicKeys = [ helix ];
|
"gitea-dbpass.age".publicKeys = [ helix ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue