restructure some utils, and move khal, vdirsyncer, isync, todoman into config

This commit is contained in:
randomuser 2024-02-09 23:41:19 -06:00
parent a261bccd0a
commit ad423e9e57
17 changed files with 211 additions and 18 deletions

View File

@ -18,15 +18,22 @@
qemu
virt-manager
deepin.deepin-album
libreoffice
nomacs
vscodium
thunderbird
kitty
];
services.hardware.bolt.enable = true;
services.hardware.bolt.enable = true; # thunderbolt support
hardware.bluetooth = {
enable = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
ControllerMode = "bredr";
};
};
};
services.openssh.enable = true;
services.ssh-phone-home = {
@ -54,9 +61,13 @@
services.avahi.nssmdns = true; # enables the mDNS NSS plug-in
services.avahi.openFirewall = true; # opens the firewall for UDP port 5353
powerManagement.cpuFreqGovernor = "performance";
nixpkgs.config.allowUnfree = true;
networking = {
hostName = "mlg";
firewall.enable = true;
};
system.stateVersion = "23.11"; # don't change this, lol
}

View File

@ -17,12 +17,6 @@
xscreensaver
thunderbird
hue-cli
bluetuith
brave
vdirsyncer
isync
khal
todoman
];
hardware.bluetooth = {

View File

@ -6,6 +6,7 @@
# shell scripts stuff
, makeWrapper
, sshuttle
, scrcpy
, sxhkd
, bash
, feh
@ -25,7 +26,7 @@ stdenv.mkDerivation rec {
src = ./utils;
nativeBuildInputs = [ makeWrapper pkg-config libxcb ];
buildInputs = [ libxcb bash feh xrandr jq curl fzy ytfzf ffmpeg sshuttle ];
buildInputs = [ libxcb bash feh xrandr jq curl fzy ytfzf ffmpeg sshuttle scrcpy ];
buildPhase = ''
ls
@ -38,7 +39,7 @@ stdenv.mkDerivation rec {
for i in $(ls $src/sh); do
cp $src/sh/$i $out/bin
ln -sf $out/bin/tmenu_run $out/bin/regenerate
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy ytfzf ffmpeg sshuttle ]}
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy ytfzf ffmpeg sshuttle scrcpy ]}
done
cp c/status/main $out/bin/statusbar

View File

@ -9,7 +9,7 @@ set_walls() {
screensaver () {
pkill xscreensaver
HOME=".config/xscreensaver" xscreensaver --no-splash &
HOME=".config/xscreensaver" xscreensaver --no-splash & 2>&1 > /dev/null
}
keyboard () {
@ -53,11 +53,31 @@ case "$(hostname)" in
bspc monitor HDMI-1 -d 2 4 6 8 0
;;
"mlg")
if exists DP-1-2; then
xrandr --output HDMI-0 --primary --mode 1920x1080 --rate 120 --pos 0x0 --rotate normal \
--output DP-1-2 --mode 1920x1080 --rate 120 --pos 1920x0 --rotate normal \
--output DP-0 --off \
--output DP-1-1 --off
xinput set-prop 'INSTANT USB GAMING MOUSE ' 338 -1
bspc monitor DP-1-2 -d 2 4 6 8
elif exists DP-1-1; then
xrandr --output HDMI-0 --primary --mode 1920x1080 --rate 120 --pos 0x0 --rotate normal \
--output DP-1-1 --mode 1920x1080 --rate 120 --pos 1920x0 --rotate normal \
--output DP-0 --off \
--output DP-1-2 --off
bspc monitor DP-1-1 -d 2 4 6 8
fi
xinput set-prop 'INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' -1
bspc monitor HDMI-0 -d 1 3 5 7 9
# setup synchronization
pkill sshfs
rm $HOME/doc # this is safe, as doc is a dir if it mattered,
# but it's just a link, so it's a regular file.
# in conclusion, good either way
mkdir -p $HOME/.cache/mount_point
sshfs usr@mainsail:./doc $HOME/.cache/mount_point
ln -sf $HOME/.cache/mount_point $HOME/doc
;;
"x230t")
echo "x230t"

19
home/isync/config Normal file
View File

@ -0,0 +1,19 @@
IMAPStore main-remote
Host mail.beepboop.systems
Port 993
User ryan@beepboop.systems
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore main-local
Path ~/Mail/main/
Inbox ~/Mail/main/INBOX
Subfolders Verbatim
Channel main
Far :main-remote:
Near :main-local:
Create Both
Expunge Both
Patterns *
SyncState *

9
home/isync/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, config, pkgs, home, ... }:
{
home.file = {
".config/isync/config" = {
source = ./config;
};
};
}

7
home/khal/config Normal file
View File

@ -0,0 +1,7 @@
[calendars]
[[home]]
path = "~/vdir/calendar/personal/edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0"
color = dark green
[[band]]
path = "~/vdir/calendar/band"
color = dark green

9
home/khal/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, config, pkgs, home, ... }:
{
home.file = {
".config/khal/config" = {
source = ./config;
};
};
}

9
home/neomutt/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, config, pkgs, home, ... }:
{
home.file = {
".config/neomutt/neomuttrc" = {
source = ./neomuttrc;
};
};
}

26
home/neomutt/neomuttrc Normal file
View File

@ -0,0 +1,26 @@
set editor = "nvim"
set my_name = "Ryan Marina"
set fast_reply
set mbox_type = Maildir
set folder = "~/Mail/main"
set sidebar_visible
set sidebar_format = "%B%<F? [%F}>%* %<N?%N/>%S"
set mail_check_stats
set from = "ryan@beepboop.systems"
set spoolfile = +INBOX
set record = "+Sent"
set trash = "+Trash"
set postponed = "+Drafts"
mailboxes +SMS +INBOX "+College Messages"
unset wait_key
macro index S "<shell-escape>mbsync --config=/home/usr/.config/isync/config main; vdirsyncer sync<enter>"
set use_threads = yes
set sort_aux = reverse-last-date-received
set imap_keepalive = 300

4
home/todoman/config.py Normal file
View File

@ -0,0 +1,4 @@
path = "~/vdir/calendar/personal/*"
date_format = "%m-%d-%Y"
time_format = "%H:%M"
default_list = "edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0"

9
home/todoman/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, config, pkgs, home, ... }:
{
home.file = {
".config/todoman/config.py" = {
source = ./config.py;
};
};
}

51
home/vdirsyncer/config Normal file
View File

@ -0,0 +1,51 @@
[general]
status_path = "~/vdir/status"
[pair contacts]
a = "contacts_local"
b = "contacts_remote"
collections = ["from a", "from b"]
[pair calendar]
a = "calendar_local"
b = "calendar_remote"
collections = ["from a", "from b"]
[pair band_calendar]
a = "band_calendar_local"
b = "band_calendar_remote"
collections = null
[storage contacts_local]
type = "filesystem"
path = "~/vdir/people/main"
fileext = ".vcf"
[storage calendar_local]
type = "filesystem"
path = "~/vdir/calendar/personal"
fileext = ".ics"
[storage band_calendar_local]
type = "filesystem"
path = "~/vdir/calendar/band"
fileext = ".ics"
[storage contacts_remote]
type = "carddav"
url = "https://radicale.beepboop.systems/ryan/20cda0dd-5922-4905-8956-859c989a6519/"
username = "ryan"
password.fetch = ["prompt", "password for radicale"]
[storage band_calendar_remote]
type = "http"
url = "https://calendar.google.com/calendar/ical/i6bong6iferbcuf1u25jg47t7k%40group.calendar.google.com/public/basic.ics"
[storage calendar_remote]
type = "caldav"
url = "https://radicale.beepboop.systems/ryan/edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0/"
username = "ryan"
password.fetch = ["prompt", "password for radicale"]

View File

@ -0,0 +1,9 @@
{ lib, config, pkgs, home, ... }:
{
home.file = {
".config/vdirsyncer/config" = {
source = ./config;
};
};
}

View File

@ -11,6 +11,11 @@
./wallpapers
./firefox
./emacs
./vdirsyncer
./khal
./isync
./todoman
./neomutt
./x11-progs.nix
./tty.nix

View File

@ -7,7 +7,7 @@
};
environment.systemPackages = with pkgs; [
prismlauncher
(prismlauncher.override { jdks = [ zulu8 zulu17 ]; })
xonotic
minetest
];

View File

@ -12,6 +12,16 @@
bspwm
sxhkd
xscreensaver
# non-x11 things, but common to the desktops
bluetuith
brave
vdirsyncer
isync
khal
todoman
sshfs
rsync
];
services.xserver = {