From 0a608bd781dcda40144097b007fac0a0c60a8ee1 Mon Sep 17 00:00:00 2001 From: Soispha Date: Tue, 1 Aug 2023 15:31:42 +0200 Subject: Refactor(treewide): Move module configuration in separate files --- flake.nix | 4 +- flake/default.nix | 102 +- flake/nixosConfigurations/default.nix | 24 +- home-manager/config/alacritty/alacritty.yml | 1003 -------------------- home-manager/config/alacritty/default.nix | 6 - home-manager/config/btop/default.nix | 5 - home-manager/config/dconf/default.nix | 9 - home-manager/config/default.nix | 36 - home-manager/config/direnv/default.nix | 6 - .../config/firefox/config/bookmarks/default.nix | 26 - .../config/firefox/config/chrome/userChrome.css | 41 - .../firefox/config/extensions/extensions.json | 51 - .../config/firefox/config/prefs/default.nix | 23 - .../config/firefox/config/prefs/override.js | 191 ---- .../firefox/config/search/engines/default.nix | 59 -- home-manager/config/firefox/default.nix | 65 -- .../config/firefox/functions/bookmarks/default.nix | 49 - .../firefox/functions/extensions/default.nix | 25 - .../firefox/functions/extensions/video-pauser.nix | 30 - .../config/firefox/scripts/unzip_mozlz4.py | 43 - .../config/firefox/scripts/update_extensions | 22 - home-manager/config/gammastep/default.nix | 29 - home-manager/config/git/default.nix | 76 -- home-manager/config/git/git_ignore.git | 4 - home-manager/config/git/git_template.git | 66 -- home-manager/config/gpg/agent-program | 2 - home-manager/config/gpg/default.nix | 65 -- home-manager/config/gpg/keys/key_1 | Bin 754 -> 0 bytes home-manager/config/gpg/keys/key_2 | Bin 717 -> 0 bytes home-manager/config/gpg/keys/key_3 | Bin 51304 -> 0 bytes home-manager/config/grades/config.yaml | 68 -- home-manager/config/grades/default.nix | 3 - home-manager/config/gtk/default.nix | 58 -- home-manager/config/himalaya/default.nix | 8 - home-manager/config/keepassxc/default.nix | 7 - home-manager/config/keepassxc/keepassxc.ini | 58 -- home-manager/config/latexindent/default.nix | 8 - home-manager/config/latexindent/indentconfig.yaml | 2 - home-manager/config/latexindent/mysettings.yaml | 672 ------------- home-manager/config/less/default.nix | 15 - home-manager/config/lf/colors | 190 ---- home-manager/config/lf/commands/default.nix | 222 ----- home-manager/config/lf/commands/scripts/archive | 54 -- home-manager/config/lf/commands/scripts/broot_jump | 16 - home-manager/config/lf/commands/scripts/chmod | 13 - .../config/lf/commands/scripts/clear_trash | 8 - home-manager/config/lf/commands/scripts/dl_file | 33 - home-manager/config/lf/commands/scripts/dragon | 11 - .../config/lf/commands/scripts/dragon_individual | 11 - .../config/lf/commands/scripts/dragon_stay | 11 - home-manager/config/lf/commands/scripts/fzf_jump | 15 - home-manager/config/lf/commands/scripts/mk_dir | 24 - home-manager/config/lf/commands/scripts/mk_file | 25 - home-manager/config/lf/commands/scripts/mk_ln | 36 - .../config/lf/commands/scripts/mk_scr_default | 31 - .../config/lf/commands/scripts/mk_scr_temp | 31 - home-manager/config/lf/commands/scripts/open | 11 - .../config/lf/commands/scripts/open_config | 7 - .../config/lf/commands/scripts/restore_trash | 7 - .../config/lf/commands/scripts/set_wall_paper | 10 - home-manager/config/lf/commands/scripts/stripspace | 31 - home-manager/config/lf/commands/scripts/trash | 26 - home-manager/config/lf/commands/scripts/unarchive | 22 - home-manager/config/lf/default.nix | 52 - home-manager/config/lf/icons | 357 ------- home-manager/config/lf/keybindings/default.nix | 125 --- home-manager/config/mail/default.nix | 64 -- home-manager/config/mail/non_public_accounts.nix | Bin 963 -> 0 bytes home-manager/config/mako/default.nix | 44 - home-manager/config/mbsync/default.nix | 17 - home-manager/config/mpd/default.nix | 39 - home-manager/config/mpd/mpdconf.example | 418 -------- home-manager/config/mpv/default.nix | 10 - home-manager/config/mumble/Mumble.conf | 67 -- home-manager/config/mumble/default.nix | 3 - home-manager/config/neomutt/default.nix | 168 ---- home-manager/config/neovim/default.nix | 8 - home-manager/config/nheko/default.nix | 13 - home-manager/config/npm/.npmrc | 6 - home-manager/config/npm/default.nix | 7 - home-manager/config/python/default.nix | 7 - home-manager/config/python/pythonrc | 11 - home-manager/config/rclone/default.nix | 7 - home-manager/config/rclone/rclone.conf | 10 - home-manager/config/ssh/default.nix | 15 - home-manager/config/swayidle/config | 5 - home-manager/config/swayidle/default.nix | 29 - home-manager/config/swaylock/commands.jpg | Bin 629695 -> 0 bytes home-manager/config/swaylock/default.nix | 10 - home-manager/config/swaylock/gnu.png | Bin 327518 -> 0 bytes home-manager/config/yambar/config/config.yml | 234 ----- home-manager/config/yambar/config/laptop.yml | 234 ----- home-manager/config/yambar/default.nix | 53 -- home-manager/config/yambar/scripts/disk | 22 - home-manager/config/yambar/scripts/grades-average | 15 - home-manager/config/yambar/scripts/network | 47 - .../config/yambar/scripts/old/amixer-monitor | 24 - home-manager/config/yambar/scripts/old/cpu | 126 --- home-manager/config/yambar/scripts/old/dfspace | 23 - .../config/yambar/scripts/old/grades-average | 12 - home-manager/config/yambar/scripts/old/meminfo | 37 - home-manager/config/yambar/scripts/old/nmclitest | 23 - home-manager/config/yambar/scripts/old/pingtest | 28 - home-manager/config/yambar/scripts/old/yambar-tray | 27 - .../config/yambar/scripts/old/yambar-tray-width | 28 - home-manager/config/yambar/scripts/sound-volume | 20 - home-manager/config/zsh/config/custom_cursor.sh | 40 - home-manager/config/zsh/config/zsh-init.sh | 39 - home-manager/config/zsh/config/zsh-prompt.sh | 63 -- home-manager/config/zsh/default.nix | 139 --- home-manager/default.nix | 87 +- home-manager/files/default.nix | 5 - home-manager/files/wallpaper/abstract-nord.png | Bin 140219 -> 0 bytes home-manager/files/wallpaper/default.nix | 8 - home-manager/impermanence/default.nix | 30 - home-manager/packages/default.nix | 160 ---- home-manager/packages/scripts.nix | 97 -- home-manager/packages/scripts/apps/aumo | 54 -- home-manager/packages/scripts/apps/con2pdf | 152 --- .../packages/scripts/small_functions/dldragon | 28 - .../packages/scripts/small_functions/gtk-themes | 21 - home-manager/packages/scripts/small_functions/mocs | 15 - .../packages/scripts/small_functions/screen_shot | 10 - .../packages/scripts/small_functions/update-sys | 78 -- home-manager/packages/scripts/wrappers/backsnap | 3 - home-manager/packages/scripts/wrappers/ll | 14 - home-manager/packages/scripts/wrappers/llp | 19 - home-manager/packages/scripts/wrappers/spodi | 45 - home-manager/packages/scripts/wrappers/virsh-del | 10 - home-manager/packages/scripts/wrappers/yti | 36 - .../soispha/config/alacritty/alacritty.yml | 1003 ++++++++++++++++++++ home-manager/soispha/config/alacritty/default.nix | 6 + home-manager/soispha/config/btop/default.nix | 5 + home-manager/soispha/config/dconf/default.nix | 9 + home-manager/soispha/config/default.nix | 36 + home-manager/soispha/config/direnv/default.nix | 6 + .../config/firefox/config/bookmarks/default.nix | 26 + .../config/firefox/config/chrome/userChrome.css | 41 + .../firefox/config/extensions/extensions.json | 51 + .../config/firefox/config/prefs/default.nix | 23 + .../config/firefox/config/prefs/override.js | 191 ++++ .../firefox/config/search/engines/default.nix | 59 ++ home-manager/soispha/config/firefox/default.nix | 65 ++ .../config/firefox/functions/bookmarks/default.nix | 49 + .../firefox/functions/extensions/default.nix | 25 + .../firefox/functions/extensions/video-pauser.nix | 30 + .../soispha/config/firefox/scripts/unzip_mozlz4.py | 43 + .../config/firefox/scripts/update_extensions | 22 + home-manager/soispha/config/gammastep/default.nix | 29 + home-manager/soispha/config/git/default.nix | 76 ++ home-manager/soispha/config/git/git_ignore.git | 4 + home-manager/soispha/config/git/git_template.git | 66 ++ home-manager/soispha/config/gpg/agent-program | 2 + home-manager/soispha/config/gpg/default.nix | 65 ++ home-manager/soispha/config/gpg/keys/key_1 | Bin 0 -> 754 bytes home-manager/soispha/config/gpg/keys/key_2 | Bin 0 -> 717 bytes home-manager/soispha/config/gpg/keys/key_3 | Bin 0 -> 51304 bytes home-manager/soispha/config/grades/config.yaml | 68 ++ home-manager/soispha/config/grades/default.nix | 3 + home-manager/soispha/config/gtk/default.nix | 58 ++ home-manager/soispha/config/himalaya/default.nix | 8 + home-manager/soispha/config/keepassxc/default.nix | 7 + .../soispha/config/keepassxc/keepassxc.ini | 58 ++ .../soispha/config/latexindent/default.nix | 8 + .../soispha/config/latexindent/indentconfig.yaml | 2 + .../soispha/config/latexindent/mysettings.yaml | 672 +++++++++++++ home-manager/soispha/config/less/default.nix | 15 + home-manager/soispha/config/lf/colors | 190 ++++ .../soispha/config/lf/commands/default.nix | 222 +++++ .../soispha/config/lf/commands/scripts/archive | 54 ++ .../soispha/config/lf/commands/scripts/broot_jump | 16 + .../soispha/config/lf/commands/scripts/chmod | 13 + .../soispha/config/lf/commands/scripts/clear_trash | 8 + .../soispha/config/lf/commands/scripts/dl_file | 33 + .../soispha/config/lf/commands/scripts/dragon | 11 + .../config/lf/commands/scripts/dragon_individual | 11 + .../soispha/config/lf/commands/scripts/dragon_stay | 11 + .../soispha/config/lf/commands/scripts/fzf_jump | 15 + .../soispha/config/lf/commands/scripts/mk_dir | 24 + .../soispha/config/lf/commands/scripts/mk_file | 25 + .../soispha/config/lf/commands/scripts/mk_ln | 36 + .../config/lf/commands/scripts/mk_scr_default | 31 + .../soispha/config/lf/commands/scripts/mk_scr_temp | 31 + .../soispha/config/lf/commands/scripts/open | 11 + .../soispha/config/lf/commands/scripts/open_config | 7 + .../config/lf/commands/scripts/restore_trash | 7 + .../config/lf/commands/scripts/set_wall_paper | 10 + .../soispha/config/lf/commands/scripts/stripspace | 31 + .../soispha/config/lf/commands/scripts/trash | 26 + .../soispha/config/lf/commands/scripts/unarchive | 22 + home-manager/soispha/config/lf/default.nix | 52 + home-manager/soispha/config/lf/icons | 357 +++++++ .../soispha/config/lf/keybindings/default.nix | 125 +++ home-manager/soispha/config/mail/default.nix | 64 ++ .../soispha/config/mail/non_public_accounts.nix | Bin 0 -> 963 bytes home-manager/soispha/config/mako/default.nix | 44 + home-manager/soispha/config/mbsync/default.nix | 17 + home-manager/soispha/config/mpd/default.nix | 39 + home-manager/soispha/config/mpd/mpdconf.example | 418 ++++++++ home-manager/soispha/config/mpv/default.nix | 10 + home-manager/soispha/config/mumble/Mumble.conf | 67 ++ home-manager/soispha/config/mumble/default.nix | 3 + home-manager/soispha/config/neomutt/default.nix | 168 ++++ home-manager/soispha/config/neovim/default.nix | 8 + home-manager/soispha/config/nheko/default.nix | 13 + home-manager/soispha/config/npm/.npmrc | 6 + home-manager/soispha/config/npm/default.nix | 7 + home-manager/soispha/config/python/default.nix | 7 + home-manager/soispha/config/python/pythonrc | 11 + home-manager/soispha/config/rclone/default.nix | 7 + home-manager/soispha/config/rclone/rclone.conf | 10 + home-manager/soispha/config/ssh/default.nix | 15 + home-manager/soispha/config/swayidle/config | 5 + home-manager/soispha/config/swayidle/default.nix | 29 + home-manager/soispha/config/swaylock/commands.jpg | Bin 0 -> 629695 bytes home-manager/soispha/config/swaylock/default.nix | 10 + home-manager/soispha/config/swaylock/gnu.png | Bin 0 -> 327518 bytes .../soispha/config/yambar/config/config.yml | 234 +++++ .../soispha/config/yambar/config/laptop.yml | 234 +++++ home-manager/soispha/config/yambar/default.nix | 53 ++ home-manager/soispha/config/yambar/scripts/disk | 22 + .../soispha/config/yambar/scripts/grades-average | 15 + home-manager/soispha/config/yambar/scripts/network | 47 + .../config/yambar/scripts/old/amixer-monitor | 24 + home-manager/soispha/config/yambar/scripts/old/cpu | 126 +++ .../soispha/config/yambar/scripts/old/dfspace | 23 + .../config/yambar/scripts/old/grades-average | 12 + .../soispha/config/yambar/scripts/old/meminfo | 37 + .../soispha/config/yambar/scripts/old/nmclitest | 23 + .../soispha/config/yambar/scripts/old/pingtest | 28 + .../soispha/config/yambar/scripts/old/yambar-tray | 27 + .../config/yambar/scripts/old/yambar-tray-width | 28 + .../soispha/config/yambar/scripts/sound-volume | 20 + .../soispha/config/zsh/config/custom_cursor.sh | 40 + home-manager/soispha/config/zsh/config/zsh-init.sh | 39 + .../soispha/config/zsh/config/zsh-prompt.sh | 63 ++ home-manager/soispha/config/zsh/default.nix | 139 +++ home-manager/soispha/default.nix | 35 + home-manager/soispha/files/default.nix | 5 + .../soispha/files/wallpaper/abstract-nord.png | Bin 0 -> 140219 bytes home-manager/soispha/files/wallpaper/default.nix | 8 + home-manager/soispha/impermanence/default.nix | 30 + home-manager/soispha/packages/default.nix | 160 ++++ home-manager/soispha/packages/scripts.nix | 97 ++ home-manager/soispha/packages/scripts/apps/aumo | 54 ++ home-manager/soispha/packages/scripts/apps/con2pdf | 152 +++ .../packages/scripts/small_functions/dldragon | 28 + .../packages/scripts/small_functions/gtk-themes | 21 + .../soispha/packages/scripts/small_functions/mocs | 15 + .../packages/scripts/small_functions/screen_shot | 10 + .../packages/scripts/small_functions/update-sys | 78 ++ .../soispha/packages/scripts/wrappers/backsnap | 3 + home-manager/soispha/packages/scripts/wrappers/ll | 14 + home-manager/soispha/packages/scripts/wrappers/llp | 19 + .../soispha/packages/scripts/wrappers/spodi | 45 + .../soispha/packages/scripts/wrappers/virsh-del | 10 + home-manager/soispha/packages/scripts/wrappers/yti | 36 + home-manager/soispha/wms/default.nix | 7 + home-manager/soispha/wms/plasma/default.nix | 5 + home-manager/soispha/wms/river/default.nix | 68 ++ home-manager/soispha/wms/river/init | 80 ++ home-manager/soispha/wms/river/res/keys.ron | 57 ++ home-manager/soispha/wms/river/res/moonlander.ron | 64 ++ home-manager/soispha/wms/river/res/safe_init | 160 ++++ home-manager/soispha/wms/sway/default.nix | 16 + home-manager/wms/default.nix | 7 - home-manager/wms/plasma/default.nix | 5 - home-manager/wms/river/default.nix | 68 -- home-manager/wms/river/init | 80 -- home-manager/wms/river/res/keys.ron | 57 -- home-manager/wms/river/res/moonlander.ron | 64 -- home-manager/wms/river/res/safe_init | 160 ---- home-manager/wms/sway/default.nix | 16 - secrets/default.nix | 32 - secrets/nheko/conf.apzu | 46 - secrets/nheko/conf.isimud | 47 - secrets/nheko/conf.tiamat | 45 - secrets/secrets.nix | 15 - secrets/serverphone/ca.key | 19 - secrets/serverphone/server.key | 19 - system/default.nix | 3 +- system/font/default.nix | 5 +- system/secrets/default.nix | 32 + system/secrets/nheko/conf.apzu | 46 + system/secrets/nheko/conf.isimud | 47 + system/secrets/nheko/conf.tiamat | 45 + system/secrets/secrets.nix | 15 + system/secrets/serverphone/ca.key | 19 + system/secrets/serverphone/server.key | 19 + system/services/nix/default.nix | 6 +- system/services/serverphone/keys/key_1 | 2 +- system/services/serverphone/keys/key_2 | 2 +- update.sh | 2 +- 293 files changed, 8001 insertions(+), 8005 deletions(-) delete mode 100644 home-manager/config/alacritty/alacritty.yml delete mode 100644 home-manager/config/alacritty/default.nix delete mode 100644 home-manager/config/btop/default.nix delete mode 100644 home-manager/config/dconf/default.nix delete mode 100644 home-manager/config/default.nix delete mode 100644 home-manager/config/direnv/default.nix delete mode 100644 home-manager/config/firefox/config/bookmarks/default.nix delete mode 100644 home-manager/config/firefox/config/chrome/userChrome.css delete mode 100644 home-manager/config/firefox/config/extensions/extensions.json delete mode 100644 home-manager/config/firefox/config/prefs/default.nix delete mode 100644 home-manager/config/firefox/config/prefs/override.js delete mode 100644 home-manager/config/firefox/config/search/engines/default.nix delete mode 100644 home-manager/config/firefox/default.nix delete mode 100644 home-manager/config/firefox/functions/bookmarks/default.nix delete mode 100644 home-manager/config/firefox/functions/extensions/default.nix delete mode 100644 home-manager/config/firefox/functions/extensions/video-pauser.nix delete mode 100755 home-manager/config/firefox/scripts/unzip_mozlz4.py delete mode 100755 home-manager/config/firefox/scripts/update_extensions delete mode 100644 home-manager/config/gammastep/default.nix delete mode 100644 home-manager/config/git/default.nix delete mode 100644 home-manager/config/git/git_ignore.git delete mode 100644 home-manager/config/git/git_template.git delete mode 100755 home-manager/config/gpg/agent-program delete mode 100644 home-manager/config/gpg/default.nix delete mode 100644 home-manager/config/gpg/keys/key_1 delete mode 100644 home-manager/config/gpg/keys/key_2 delete mode 100644 home-manager/config/gpg/keys/key_3 delete mode 100644 home-manager/config/grades/config.yaml delete mode 100644 home-manager/config/grades/default.nix delete mode 100644 home-manager/config/gtk/default.nix delete mode 100644 home-manager/config/himalaya/default.nix delete mode 100644 home-manager/config/keepassxc/default.nix delete mode 100644 home-manager/config/keepassxc/keepassxc.ini delete mode 100644 home-manager/config/latexindent/default.nix delete mode 100644 home-manager/config/latexindent/indentconfig.yaml delete mode 100644 home-manager/config/latexindent/mysettings.yaml delete mode 100644 home-manager/config/less/default.nix delete mode 100644 home-manager/config/lf/colors delete mode 100644 home-manager/config/lf/commands/default.nix delete mode 100755 home-manager/config/lf/commands/scripts/archive delete mode 100755 home-manager/config/lf/commands/scripts/broot_jump delete mode 100755 home-manager/config/lf/commands/scripts/chmod delete mode 100755 home-manager/config/lf/commands/scripts/clear_trash delete mode 100755 home-manager/config/lf/commands/scripts/dl_file delete mode 100755 home-manager/config/lf/commands/scripts/dragon delete mode 100755 home-manager/config/lf/commands/scripts/dragon_individual delete mode 100755 home-manager/config/lf/commands/scripts/dragon_stay delete mode 100755 home-manager/config/lf/commands/scripts/fzf_jump delete mode 100755 home-manager/config/lf/commands/scripts/mk_dir delete mode 100755 home-manager/config/lf/commands/scripts/mk_file delete mode 100755 home-manager/config/lf/commands/scripts/mk_ln delete mode 100755 home-manager/config/lf/commands/scripts/mk_scr_default delete mode 100755 home-manager/config/lf/commands/scripts/mk_scr_temp delete mode 100755 home-manager/config/lf/commands/scripts/open delete mode 100755 home-manager/config/lf/commands/scripts/open_config delete mode 100755 home-manager/config/lf/commands/scripts/restore_trash delete mode 100755 home-manager/config/lf/commands/scripts/set_wall_paper delete mode 100755 home-manager/config/lf/commands/scripts/stripspace delete mode 100755 home-manager/config/lf/commands/scripts/trash delete mode 100755 home-manager/config/lf/commands/scripts/unarchive delete mode 100644 home-manager/config/lf/default.nix delete mode 100644 home-manager/config/lf/icons delete mode 100644 home-manager/config/lf/keybindings/default.nix delete mode 100644 home-manager/config/mail/default.nix delete mode 100644 home-manager/config/mail/non_public_accounts.nix delete mode 100644 home-manager/config/mako/default.nix delete mode 100644 home-manager/config/mbsync/default.nix delete mode 100644 home-manager/config/mpd/default.nix delete mode 100644 home-manager/config/mpd/mpdconf.example delete mode 100644 home-manager/config/mpv/default.nix delete mode 100644 home-manager/config/mumble/Mumble.conf delete mode 100644 home-manager/config/mumble/default.nix delete mode 100644 home-manager/config/neomutt/default.nix delete mode 100644 home-manager/config/neovim/default.nix delete mode 100644 home-manager/config/nheko/default.nix delete mode 100644 home-manager/config/npm/.npmrc delete mode 100644 home-manager/config/npm/default.nix delete mode 100644 home-manager/config/python/default.nix delete mode 100644 home-manager/config/python/pythonrc delete mode 100644 home-manager/config/rclone/default.nix delete mode 100644 home-manager/config/rclone/rclone.conf delete mode 100644 home-manager/config/ssh/default.nix delete mode 100644 home-manager/config/swayidle/config delete mode 100644 home-manager/config/swayidle/default.nix delete mode 100644 home-manager/config/swaylock/commands.jpg delete mode 100644 home-manager/config/swaylock/default.nix delete mode 100644 home-manager/config/swaylock/gnu.png delete mode 100644 home-manager/config/yambar/config/config.yml delete mode 100644 home-manager/config/yambar/config/laptop.yml delete mode 100644 home-manager/config/yambar/default.nix delete mode 100755 home-manager/config/yambar/scripts/disk delete mode 100755 home-manager/config/yambar/scripts/grades-average delete mode 100755 home-manager/config/yambar/scripts/network delete mode 100755 home-manager/config/yambar/scripts/old/amixer-monitor delete mode 100755 home-manager/config/yambar/scripts/old/cpu delete mode 100755 home-manager/config/yambar/scripts/old/dfspace delete mode 100755 home-manager/config/yambar/scripts/old/grades-average delete mode 100755 home-manager/config/yambar/scripts/old/meminfo delete mode 100755 home-manager/config/yambar/scripts/old/nmclitest delete mode 100755 home-manager/config/yambar/scripts/old/pingtest delete mode 100755 home-manager/config/yambar/scripts/old/yambar-tray delete mode 100755 home-manager/config/yambar/scripts/old/yambar-tray-width delete mode 100755 home-manager/config/yambar/scripts/sound-volume delete mode 100644 home-manager/config/zsh/config/custom_cursor.sh delete mode 100644 home-manager/config/zsh/config/zsh-init.sh delete mode 100644 home-manager/config/zsh/config/zsh-prompt.sh delete mode 100644 home-manager/config/zsh/default.nix delete mode 100644 home-manager/files/default.nix delete mode 100644 home-manager/files/wallpaper/abstract-nord.png delete mode 100644 home-manager/files/wallpaper/default.nix delete mode 100644 home-manager/impermanence/default.nix delete mode 100644 home-manager/packages/default.nix delete mode 100644 home-manager/packages/scripts.nix delete mode 100755 home-manager/packages/scripts/apps/aumo delete mode 100755 home-manager/packages/scripts/apps/con2pdf delete mode 100755 home-manager/packages/scripts/small_functions/dldragon delete mode 100755 home-manager/packages/scripts/small_functions/gtk-themes delete mode 100755 home-manager/packages/scripts/small_functions/mocs delete mode 100755 home-manager/packages/scripts/small_functions/screen_shot delete mode 100755 home-manager/packages/scripts/small_functions/update-sys delete mode 100755 home-manager/packages/scripts/wrappers/backsnap delete mode 100755 home-manager/packages/scripts/wrappers/ll delete mode 100755 home-manager/packages/scripts/wrappers/llp delete mode 100755 home-manager/packages/scripts/wrappers/spodi delete mode 100755 home-manager/packages/scripts/wrappers/virsh-del delete mode 100755 home-manager/packages/scripts/wrappers/yti create mode 100644 home-manager/soispha/config/alacritty/alacritty.yml create mode 100644 home-manager/soispha/config/alacritty/default.nix create mode 100644 home-manager/soispha/config/btop/default.nix create mode 100644 home-manager/soispha/config/dconf/default.nix create mode 100644 home-manager/soispha/config/default.nix create mode 100644 home-manager/soispha/config/direnv/default.nix create mode 100644 home-manager/soispha/config/firefox/config/bookmarks/default.nix create mode 100644 home-manager/soispha/config/firefox/config/chrome/userChrome.css create mode 100644 home-manager/soispha/config/firefox/config/extensions/extensions.json create mode 100644 home-manager/soispha/config/firefox/config/prefs/default.nix create mode 100644 home-manager/soispha/config/firefox/config/prefs/override.js create mode 100644 home-manager/soispha/config/firefox/config/search/engines/default.nix create mode 100644 home-manager/soispha/config/firefox/default.nix create mode 100644 home-manager/soispha/config/firefox/functions/bookmarks/default.nix create mode 100644 home-manager/soispha/config/firefox/functions/extensions/default.nix create mode 100644 home-manager/soispha/config/firefox/functions/extensions/video-pauser.nix create mode 100755 home-manager/soispha/config/firefox/scripts/unzip_mozlz4.py create mode 100755 home-manager/soispha/config/firefox/scripts/update_extensions create mode 100644 home-manager/soispha/config/gammastep/default.nix create mode 100644 home-manager/soispha/config/git/default.nix create mode 100644 home-manager/soispha/config/git/git_ignore.git create mode 100644 home-manager/soispha/config/git/git_template.git create mode 100755 home-manager/soispha/config/gpg/agent-program create mode 100644 home-manager/soispha/config/gpg/default.nix create mode 100644 home-manager/soispha/config/gpg/keys/key_1 create mode 100644 home-manager/soispha/config/gpg/keys/key_2 create mode 100644 home-manager/soispha/config/gpg/keys/key_3 create mode 100644 home-manager/soispha/config/grades/config.yaml create mode 100644 home-manager/soispha/config/grades/default.nix create mode 100644 home-manager/soispha/config/gtk/default.nix create mode 100644 home-manager/soispha/config/himalaya/default.nix create mode 100644 home-manager/soispha/config/keepassxc/default.nix create mode 100644 home-manager/soispha/config/keepassxc/keepassxc.ini create mode 100644 home-manager/soispha/config/latexindent/default.nix create mode 100644 home-manager/soispha/config/latexindent/indentconfig.yaml create mode 100644 home-manager/soispha/config/latexindent/mysettings.yaml create mode 100644 home-manager/soispha/config/less/default.nix create mode 100644 home-manager/soispha/config/lf/colors create mode 100644 home-manager/soispha/config/lf/commands/default.nix create mode 100755 home-manager/soispha/config/lf/commands/scripts/archive create mode 100755 home-manager/soispha/config/lf/commands/scripts/broot_jump create mode 100755 home-manager/soispha/config/lf/commands/scripts/chmod create mode 100755 home-manager/soispha/config/lf/commands/scripts/clear_trash create mode 100755 home-manager/soispha/config/lf/commands/scripts/dl_file create mode 100755 home-manager/soispha/config/lf/commands/scripts/dragon create mode 100755 home-manager/soispha/config/lf/commands/scripts/dragon_individual create mode 100755 home-manager/soispha/config/lf/commands/scripts/dragon_stay create mode 100755 home-manager/soispha/config/lf/commands/scripts/fzf_jump create mode 100755 home-manager/soispha/config/lf/commands/scripts/mk_dir create mode 100755 home-manager/soispha/config/lf/commands/scripts/mk_file create mode 100755 home-manager/soispha/config/lf/commands/scripts/mk_ln create mode 100755 home-manager/soispha/config/lf/commands/scripts/mk_scr_default create mode 100755 home-manager/soispha/config/lf/commands/scripts/mk_scr_temp create mode 100755 home-manager/soispha/config/lf/commands/scripts/open create mode 100755 home-manager/soispha/config/lf/commands/scripts/open_config create mode 100755 home-manager/soispha/config/lf/commands/scripts/restore_trash create mode 100755 home-manager/soispha/config/lf/commands/scripts/set_wall_paper create mode 100755 home-manager/soispha/config/lf/commands/scripts/stripspace create mode 100755 home-manager/soispha/config/lf/commands/scripts/trash create mode 100755 home-manager/soispha/config/lf/commands/scripts/unarchive create mode 100644 home-manager/soispha/config/lf/default.nix create mode 100644 home-manager/soispha/config/lf/icons create mode 100644 home-manager/soispha/config/lf/keybindings/default.nix create mode 100644 home-manager/soispha/config/mail/default.nix create mode 100644 home-manager/soispha/config/mail/non_public_accounts.nix create mode 100644 home-manager/soispha/config/mako/default.nix create mode 100644 home-manager/soispha/config/mbsync/default.nix create mode 100644 home-manager/soispha/config/mpd/default.nix create mode 100644 home-manager/soispha/config/mpd/mpdconf.example create mode 100644 home-manager/soispha/config/mpv/default.nix create mode 100644 home-manager/soispha/config/mumble/Mumble.conf create mode 100644 home-manager/soispha/config/mumble/default.nix create mode 100644 home-manager/soispha/config/neomutt/default.nix create mode 100644 home-manager/soispha/config/neovim/default.nix create mode 100644 home-manager/soispha/config/nheko/default.nix create mode 100644 home-manager/soispha/config/npm/.npmrc create mode 100644 home-manager/soispha/config/npm/default.nix create mode 100644 home-manager/soispha/config/python/default.nix create mode 100644 home-manager/soispha/config/python/pythonrc create mode 100644 home-manager/soispha/config/rclone/default.nix create mode 100644 home-manager/soispha/config/rclone/rclone.conf create mode 100644 home-manager/soispha/config/ssh/default.nix create mode 100644 home-manager/soispha/config/swayidle/config create mode 100644 home-manager/soispha/config/swayidle/default.nix create mode 100644 home-manager/soispha/config/swaylock/commands.jpg create mode 100644 home-manager/soispha/config/swaylock/default.nix create mode 100644 home-manager/soispha/config/swaylock/gnu.png create mode 100644 home-manager/soispha/config/yambar/config/config.yml create mode 100644 home-manager/soispha/config/yambar/config/laptop.yml create mode 100644 home-manager/soispha/config/yambar/default.nix create mode 100755 home-manager/soispha/config/yambar/scripts/disk create mode 100755 home-manager/soispha/config/yambar/scripts/grades-average create mode 100755 home-manager/soispha/config/yambar/scripts/network create mode 100755 home-manager/soispha/config/yambar/scripts/old/amixer-monitor create mode 100755 home-manager/soispha/config/yambar/scripts/old/cpu create mode 100755 home-manager/soispha/config/yambar/scripts/old/dfspace create mode 100755 home-manager/soispha/config/yambar/scripts/old/grades-average create mode 100755 home-manager/soispha/config/yambar/scripts/old/meminfo create mode 100755 home-manager/soispha/config/yambar/scripts/old/nmclitest create mode 100755 home-manager/soispha/config/yambar/scripts/old/pingtest create mode 100755 home-manager/soispha/config/yambar/scripts/old/yambar-tray create mode 100755 home-manager/soispha/config/yambar/scripts/old/yambar-tray-width create mode 100755 home-manager/soispha/config/yambar/scripts/sound-volume create mode 100644 home-manager/soispha/config/zsh/config/custom_cursor.sh create mode 100644 home-manager/soispha/config/zsh/config/zsh-init.sh create mode 100644 home-manager/soispha/config/zsh/config/zsh-prompt.sh create mode 100644 home-manager/soispha/config/zsh/default.nix create mode 100644 home-manager/soispha/default.nix create mode 100644 home-manager/soispha/files/default.nix create mode 100644 home-manager/soispha/files/wallpaper/abstract-nord.png create mode 100644 home-manager/soispha/files/wallpaper/default.nix create mode 100644 home-manager/soispha/impermanence/default.nix create mode 100644 home-manager/soispha/packages/default.nix create mode 100644 home-manager/soispha/packages/scripts.nix create mode 100755 home-manager/soispha/packages/scripts/apps/aumo create mode 100755 home-manager/soispha/packages/scripts/apps/con2pdf create mode 100755 home-manager/soispha/packages/scripts/small_functions/dldragon create mode 100755 home-manager/soispha/packages/scripts/small_functions/gtk-themes create mode 100755 home-manager/soispha/packages/scripts/small_functions/mocs create mode 100755 home-manager/soispha/packages/scripts/small_functions/screen_shot create mode 100755 home-manager/soispha/packages/scripts/small_functions/update-sys create mode 100755 home-manager/soispha/packages/scripts/wrappers/backsnap create mode 100755 home-manager/soispha/packages/scripts/wrappers/ll create mode 100755 home-manager/soispha/packages/scripts/wrappers/llp create mode 100755 home-manager/soispha/packages/scripts/wrappers/spodi create mode 100755 home-manager/soispha/packages/scripts/wrappers/virsh-del create mode 100755 home-manager/soispha/packages/scripts/wrappers/yti create mode 100644 home-manager/soispha/wms/default.nix create mode 100644 home-manager/soispha/wms/plasma/default.nix create mode 100644 home-manager/soispha/wms/river/default.nix create mode 100755 home-manager/soispha/wms/river/init create mode 100644 home-manager/soispha/wms/river/res/keys.ron create mode 100644 home-manager/soispha/wms/river/res/moonlander.ron create mode 100755 home-manager/soispha/wms/river/res/safe_init create mode 100644 home-manager/soispha/wms/sway/default.nix delete mode 100644 home-manager/wms/default.nix delete mode 100644 home-manager/wms/plasma/default.nix delete mode 100644 home-manager/wms/river/default.nix delete mode 100755 home-manager/wms/river/init delete mode 100644 home-manager/wms/river/res/keys.ron delete mode 100644 home-manager/wms/river/res/moonlander.ron delete mode 100755 home-manager/wms/river/res/safe_init delete mode 100644 home-manager/wms/sway/default.nix delete mode 100644 secrets/default.nix delete mode 100644 secrets/nheko/conf.apzu delete mode 100644 secrets/nheko/conf.isimud delete mode 100644 secrets/nheko/conf.tiamat delete mode 100644 secrets/secrets.nix delete mode 100644 secrets/serverphone/ca.key delete mode 100644 secrets/serverphone/server.key create mode 100644 system/secrets/default.nix create mode 100644 system/secrets/nheko/conf.apzu create mode 100644 system/secrets/nheko/conf.isimud create mode 100644 system/secrets/nheko/conf.tiamat create mode 100644 system/secrets/secrets.nix create mode 100644 system/secrets/serverphone/ca.key create mode 100644 system/secrets/serverphone/server.key diff --git a/flake.nix b/flake.nix index 836c6d8e..27c61d4c 100644 --- a/flake.nix +++ b/flake.nix @@ -248,6 +248,8 @@ inherit (nixpkgs) lib; inherit system; }); + # FIXME this `nixpkgs` misses the configs applied to the other one + nixpkgs_as_input = nixpkgs; outputs = import ./flake { inherit # core @@ -255,7 +257,7 @@ pkgs system sysLib - nixpkgs + nixpkgs_as_input # modules home-manager diff --git a/flake/default.nix b/flake/default.nix index 9c6e2033..aed36d6a 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -4,7 +4,7 @@ pkgs, system, sysLib, - nixpkgs, + nixpkgs_as_input, # modules home-manager, nixos-generators, @@ -30,73 +30,13 @@ grades, flake_update, }: let - homeManagerConfig = { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.soispha = import ../home-manager; - extraSpecialArgs = { - inherit - pkgs - sysLib - # extra information - - system - # bins - - video_pause - yambar_cpu - yambar_memory - strip_js_comments - river_init_lesser - grades - shell_library - flake_update - # external deps - - user_js - neovim_config - snap-sync - # modules - - impermanence - ; - }; - }; - }; - ageConfig = import ../secrets; - impermanenceConfig = import ../system/impermanence; - defaultModules = [ - agenix.nixosModules.default - ageConfig - - serverphone.nixosModules.default - - disko.nixosModules.default - - lanzaboote.nixosModules.lanzaboote - - home-manager.nixosModules.home-manager - homeManagerConfig - - impermanence.nixosModules.impermanence - impermanenceConfig - ]; - defaultSpecialArgs = { - nixpkgs-as-input = nixpkgs; - inherit templates sysLib serverphone system; - }; -in { - nixosConfigurations = import ./nixosConfigurations { + home_manager_config = import ../home-manager { inherit - system pkgs - nixpkgs sysLib - # configs + # extra information - defaultModules - defaultSpecialArgs + system # bins video_pause @@ -112,14 +52,38 @@ in { user_js neovim_config snap-sync - templates # modules impermanence - home-manager - agenix - serverphone - disko + ; + }; + defaultModules = [ + agenix.nixosModules.default + + disko.nixosModules.default + + home-manager.nixosModules.home-manager + home_manager_config + + impermanence.nixosModules.impermanence + + lanzaboote.nixosModules.lanzaboote + + serverphone.nixosModules.default + ]; + defaultSpecialArgs = { + inherit templates sysLib serverphone system nixpkgs_as_input; + }; +in { + nixosConfigurations = import ./nixosConfigurations { + inherit + system + pkgs + nixpkgs_as_input + # configs + + defaultModules + defaultSpecialArgs ; }; packages."${system}" = import ./packages { diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix index 198d9c73..f2110eb9 100644 --- a/flake/nixosConfigurations/default.nix +++ b/flake/nixosConfigurations/default.nix @@ -1,35 +1,15 @@ { system, pkgs, - nixpkgs, - sysLib, + nixpkgs_as_input, # configs defaultModules, defaultSpecialArgs, - # bins - video_pause, - yambar_cpu, - yambar_memory, - strip_js_comments, - river_init_lesser, - grades, - shell_library, - # external deps - user_js, - neovim_config, - snap-sync, - templates, - # modules - impermanence, - home-manager, - agenix, - serverphone, - disko, ... }: let generateHost = name: { name = "${name}"; - value = nixpkgs.lib.nixosSystem { + value = nixpkgs_as_input.lib.nixosSystem { inherit system pkgs; specialArgs = defaultSpecialArgs; modules = diff --git a/home-manager/config/alacritty/alacritty.yml b/home-manager/config/alacritty/alacritty.yml deleted file mode 100644 index ad6e417e..00000000 --- a/home-manager/config/alacritty/alacritty.yml +++ /dev/null @@ -1,1003 +0,0 @@ ---- -# Configuration for Alacritty, the GPU enhanced terminal emulator. - -# Import additional configuration files -# -# Imports are loaded in order, skipping all missing files, with the importing -# file being loaded last. If a field is already present in a previous import, it -# will be replaced. -# -# All imports must either be absolute paths starting with `/`, or paths relative -# to the user's home directory starting with `~/`. -#import: -# - /path/to/alacritty.yml - -# Any items in the `env` entry below will be added as -# environment variables. Some entries may override variables -# set by alacritty itself. -env: - # TERM variable - # - # This value is used to set the `$TERM` environment variable for - # each instance of Alacritty. If it is not present, alacritty will - # check the local terminfo database and use `alacritty` if it is - # available, otherwise `xterm-256color` is used. - TERM: alacritty - -window: - # Window dimensions (changes require restart) - # - # Number of lines/columns (not pixels) in the terminal. Both lines and columns - # must be non-zero for this to take effect. The number of columns must be at - # least `2`, while using a value of `0` for columns and lines will fall back - # to the window manager's recommended size - dimensions: - columns: 0 - lines: 0 - - # Window position (changes require restart) - # - # Specified in number of pixels. - # If the position is not set, the window manager will handle the placement. - #position: - # x: 0 - # y: 0 - - # Window padding (changes require restart) - # - # Blank space added around the window in pixels. This padding is scaled - # by DPI and the specified value is always added at both opposing sides. - padding: - x: 5 - y: 5 - - # Spread additional padding evenly around the terminal content. - #dynamic_padding: false - - # Window decorations - # - # Values for `decorations`: - # - full: Borders and title bar - # - none: Neither borders nor title bar - # - # Values for `decorations` (macOS only): - # - transparent: Title bar, transparent background and title bar buttons - # - buttonless: Title bar, transparent background and no title bar buttons - decorations: none - - # Background opacity - # - # Window opacity as a floating point number from `0.0` to `1.0`. - # The value `0.0` is completely transparent and `1.0` is opaque. - opacity: 0.9 - - # Startup Mode (changes require restart) - # - # Values for `startup_mode`: - # - Windowed - # - Maximized - # - Fullscreen - # - # Values for `startup_mode` (macOS only): - # - SimpleFullscreen - startup_mode: Windowed - - # Window title - title: Alacritty - - # Allow terminal applications to change Alacritty's window title. - dynamic_title: true - - # Window class (Linux/BSD only): - class: - # Application instance name - instance: Alacritty - # General application class - general: Alacritty - - # Decorations theme variant - # - # Override the variant of the System theme/GTK theme/Wayland client side - # decorations. Commonly supported values are `Dark`, `Light`, and `None` for - # auto pick-up. Set this to `None` to use the default theme variant. - decorations_theme_variant: None - - # Resize increments - # - # Prefer resizing window by discrete steps equal to cell dimensions. - #resize_increments: false - - # Make `Option` key behave as `Alt` (macOS only): - # - OnlyLeft - # - OnlyRight - # - Both - # - None (default) - #option_as_alt: None - -scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - history: 10000 - - # Scrolling distance multiplier. - multiplier: 3 - -# Font configuration -font: - # Normal (roman) font face - normal: - # Font family - # - # Default: - # - (macOS) Menlo - # - (Linux/BSD) monospace - # - (Windows) Consolas - # family: Source Code Pro - #family: SauceCodePro Nerd Font # This is needed because of reserved font names - family: SauceCodePro Nerd Font Mono - - # The `style` can be specified to pick a specific face. - style: Regular - - # Bold font face - #bold: - # Font family - # - # If the bold family is not specified, it will fall back to the - # value specified for the normal font. - #family: Source Code Pro - - # The `style` can be specified to pick a specific face. - #style: Bold - - # Italic font face - #italic: - # Font family - # - # If the italic family is not specified, it will fall back to the - # value specified for the normal font. - #family: Source Code Pro - - # The `style` can be specified to pick a specific face. - #style: Italic - - # Bold italic font face - #bold_italic: - # Font family - # - # If the bold italic family is not specified, it will fall back to the - # value specified for the normal font. - #family: Source Code Pro - - # The `style` can be specified to pick a specific face. - #style: Bold Italic - - # Point size - size: 12.0 - - # Offset is the extra space around each character. `offset.y` can be thought - # of as modifying the line spacing, and `offset.x` as modifying the letter - # spacing. - offset: - x: -1 - y: -1 - - # Glyph offset determines the locations of the glyphs within their cells with - # the default being at the bottom. Increasing `x` moves the glyph to the - # right, increasing `y` moves the glyph upward. - glyph_offset: - x: -1 - y: -1 - - # Use built-in font for box drawing characters. - # - # If `true`, Alacritty will use a custom built-in font for box drawing - # characters (Unicode points 2500 - 259f). - # - builtin_box_drawing: true # TODO - -# If `true`, bold text is drawn using the bright color variants. -#draw_bold_text_with_bright_colors: true # TODO - -# Colors (Tomorrow Night) -colors: - # Default colors - primary: - background: '#191919' - foreground: '#d8dee9' - - # Bright and dim foreground colors - # - # The dimmed foreground color is calculated automatically if it is not - # present. If the bright foreground color is not set, or - # `draw_bold_text_with_bright_colors` is `false`, the normal foreground - # color will be used. - #dim_foreground: '#828482' - #bright_foreground: '#eaeaea' - - # Cursor colors - # - # Colors which should be used to draw the terminal cursor. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - cursor: - text: '#191919' - cursor: '#d8dee9' - - # Vi mode cursor colors - # - # Colors for the cursor when the vi mode is active. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - vi_mode_cursor: - text: CellBackground - cursor: CellForeground - - # Search colors - # - # Colors used for the search bar and match highlighting. - search: - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - matches: - foreground: '#000000' - background: '#ffffff' - focused_match: - foreground: '#ffffff' - background: '#000000' - - # Keyboard hints - hints: - # First character in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - start: - foreground: '#1d1f21' - background: '#e9ff5e' - - # All characters after the first one in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - end: - foreground: '#e9ff5e' - background: '#1d1f21' - - # Line indicator - # - # Color used for the indicator displaying the position in history during - # search and vi mode. - # - # By default, these will use the opposing primary color. - #line_indicator: - # foreground: None - # background: None - - # Footer bar - # - # Color used for the footer bar on the bottom, used by search regex input, - # hyperlink URI preview, etc. - # - footer_bar: - background: '#c5c8c6' - foreground: '#1d1f21' - - # Selection colors - # - # Colors which should be used to draw the selection area. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - selection: - text: '#191919' - background: '#d8dee9' - - # Normal colors - normal: - black: '#191919' - red: '#b02626' - green: '#40a62f' - yellow: '#f2e635' - blue: '#314ad0' - magenta: '#b30ad0' - cyan: '#32d0fc' - white: '#acadb1' - - # Bright colors - bright: - black: '#36393d' - red: '#ce2727' - green: '#47c930' - yellow: '#fff138' - blue: '#2e4bea' - magenta: '#cc15ed' - cyan: '#54d9ff' - white: '#dbdbdb' - - # Dim colors - # - # If the dim colors are not set, they will be calculated automatically based - # on the `normal` colors. - dim: - black: '#676f78' - red: '#b55454' - green: '#78a670' - yellow: '#faf380' - blue: '#707fd0' - magenta: '#c583d0' - cyan: '#8adaf1' - white: '#e0e3e7' - # Indexed Colors - # - # The indexed colors include all colors from 16 to 256. - # When these are not set, they're filled with sensible defaults. - # - # Example: - # `- { index: 16, color: '#ff00ff' }` - # - #indexed_colors: [] - - # Transparent cell backgrounds - # - # Whether or not `window.opacity` applies to all cell backgrounds or only to - # the default background. When set to `true` all cells will be transparent - # regardless of their background color. - #transparent_background_colors: false # TODO - -# Bell -# -# The bell is rung every time the BEL control character is received. -#bell: - # Visual Bell Animation - # - # Animation effect for flashing the screen when the visual bell is rung. - # - # Values for `animation`: - # - Ease - # - EaseOut - # - EaseOutSine - # - EaseOutQuad - # - EaseOutCubic - # - EaseOutQuart - # - EaseOutQuint - # - EaseOutExpo - # - EaseOutCirc - # - Linear - #animation: EaseOutExpo - - # Duration of the visual bell flash in milliseconds. A `duration` of `0` will - # disable the visual bell animation. - duration: 0 - - # Visual bell animation color. - #color: '#ffffff' - - # Bell Command - # - # This program is executed whenever the bell is rung. - # - # When set to `command: None`, no command will be executed. - # - # Example: - # command: - # program: notify-send - # args: ["Hello, World!"] - # - #command: None - -selection: - # This string contains all characters that are used as separators for - # "semantic words" in Alacritty. - semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" - - # When set to `true`, selected text will be copied to the primary clipboard. - save_to_clipboard: false - -cursor: - # Cursor style - style: - # Cursor shape - # - # Values for `shape`: - # - ▇ Block - # - _ Underline - # - | Beam - shape: Beam - - # Cursor blinking state - # - # Values for `blinking`: - # - Never: Prevent the cursor from ever blinking - # - Off: Disable blinking by default - # - On: Enable blinking by default - # - Always: Force the cursor to always blink - blinking: On - - # Vi mode cursor style - # - # If the vi mode cursor style is `None` or not specified, it will fall back to - # the style of the active value of the normal cursor. - # - # See `cursor.style` for available options. - vi_mode_style: None - - # Cursor blinking interval in milliseconds. - blink_interval: 750 - - # Time after which cursor stops blinking, in seconds. - # - # Specifying '0' will disable timeout for blinking. - blink_timeout: 5 - - # If this is `true`, the cursor will be rendered as a hollow box when the - # window is not focused. - unfocused_hollow: true - - # Thickness of the cursor relative to the cell width as floating point number - # from `0.0` to `1.0`. - thickness: 0.15 - -# Live config reload (changes require restart) -live_config_reload: true - -# Shell -# -# You can set `shell.program` to the path of your favorite shell, e.g. -# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the -# shell. -# -# Default: -# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset -# - (Windows) powershell -#shell: -# program: /bin/bash -# args: -# - --login - -# Startup directory -# -# Directory the shell is started in. If this is unset, or `None`, the working -# directory of the parent process will be used. -#working_directory: None - -# Offer IPC using `alacritty msg` (unix only) -ipc_socket: true - -mouse: - # Click settings - # - # The `double_click` and `triple_click` settings control the time - # alacritty should wait for accepting multiple clicks as one double - # or triple click. - double_click: { threshold: 300 } - triple_click: { threshold: 300 } - - # If this is `true`, the cursor is temporarily hidden when typing. - hide_when_typing: false - -# Hints -# -# Terminal hints can be used to find text or hyperlink in the visible part of -# the terminal and pipe it to other applications. -hints: - # Keys used for the hint labels. - alphabet: "jfkdls;ahgurieowpq" - - # List with all available hints - # - # Each hint must have any of `regex` or `hyperlinks` field and either an - # `action` or a `command` field. The fields `mouse`, `binding` and - # `post_processing` are optional. - # - # The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be - # highlighted. - # - # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and - # `mouse.mods` accept the same values as they do in the `key_bindings` section. - # - # The `mouse.enabled` field controls if the hint should be underlined while - # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. - # - # If the `post_processing` field is set to `true`, heuristics will be used to - # shorten the match if there are characters likely not to be part of the hint - # (e.g. a trailing `.`). This is most useful for URIs and applies only to - # `regex` matches. - # - # Values for `action`: - # - Copy - # Copy the hint's text to the clipboard. - # - Paste - # Paste the hint's text to the terminal or search. - # - Select - # Select the hint's text. - # - MoveViModeCursor - # Move the vi mode cursor to the beginning of the hint. - enabled: - - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ - [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" - hyperlinks: true - command: xdg-open - post_processing: true - mouse: - enabled: true - mods: None - binding: - key: U - mods: Control|Shift - - - regex: "([^ '\"`=:\\[\\(]*/)([^/: '\"`\\)\\]]*)" - action: Paste - post_procesing: false - binding: - key: T - mods: Control|Shift - - - regex: "([a-z0-9]{7})\\s" - action: Paste - post_procesing: false - binding: - key: H - mods: Control|Shift - - # multi regex for different purposes: - # 2. UUIDs - # 3. hex (for example signatures) - # 4. IP addresses -# - regex: "([[:alnum:]_$%&+=/@-]+)\ -#|([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\ -#|([0-9a-f]{12,128})\ -#|([[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3})" -# action: Copy -# post_processing: false -# binding: -# key: U -# mods: Control|Shift - -# Mouse bindings -# -# Mouse bindings are specified as a list of objects, much like the key -# bindings further below. -# -# To trigger mouse bindings when an application running within Alacritty -# captures the mouse, the `Shift` modifier is automatically added as a -# requirement. -# -# Each mouse binding will specify a: -# -# - `mouse`: -# -# - Middle -# - Left -# - Right -# - Numeric identifier such as `5` -# -# - `action` (see key bindings for actions not exclusive to mouse mode) -# -# - Mouse exclusive actions: -# -# - ExpandSelection -# Expand the selection to the current mouse cursor location. -# -# And optionally: -# -# - `mods` (see key bindings) -mouse_bindings: -# - { mouse: Right, action: ExpandSelection } -# - { mouse: Right, mods: Control, action: ExpandSelection } - - { mouse: Middle, action: Copy } - -# Key bindings -# -# Key bindings are specified as a list of objects. For example, this is the -# default paste binding: -# -# `- { key: V, mods: Control|Shift, action: Paste }` -# -# Each key binding will specify a: -# -# - `key`: Identifier of the key pressed -# -# - A-Z -# - F1-F24 -# - Key0-Key9 -# -# A full list with available key codes can be found here: -# https://docs.rs/winit/*/winit/event/enum.VirtualKeyCode.html#variants -# -# Instead of using the name of the keys, the `key` field also supports using -# the scancode of the desired key. Scancodes have to be specified as a -# decimal number. This command will allow you to display the hex scancodes -# for certain keys: -# -# `showkey --scancodes`. -# -# Then exactly one of: -# -# - `chars`: Send a byte sequence to the running application -# -# The `chars` field writes the specified string to the terminal. This makes -# it possible to pass escape sequences. To find escape codes for bindings -# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside -# of tmux. Note that applications use terminfo to map escape sequences back -# to keys. It is therefore required to update the terminfo when changing an -# escape sequence. -# -# - `action`: Execute a predefined action -# -# - ToggleViMode -# - SearchForward -# Start searching toward the right of the search origin. -# - SearchBackward -# Start searching toward the left of the search origin. -# - Copy -# - Paste -# - IncreaseFontSize -# - DecreaseFontSize -# - ResetFontSize -# - ScrollPageUp -# - ScrollPageDown -# - ScrollHalfPageUp -# - ScrollHalfPageDown -# - ScrollLineUp -# - ScrollLineDown -# - ScrollToTop -# - ScrollToBottom -# - ClearHistory -# Remove the terminal's scrollback history. -# - Hide -# Hide the Alacritty window. -# - Minimize -# Minimize the Alacritty window. -# - Quit -# Quit Alacritty. -# - ToggleFullscreen -# - ToggleMaximized -# - SpawnNewInstance -# Spawn a new instance of Alacritty. -# - CreateNewWindow -# Create a new Alacritty window from the current process. -# - ClearLogNotice -# Clear Alacritty's UI warning and error notice. -# - ClearSelection -# Remove the active selection. -# - ReceiveChar -# - None -# -# - Vi mode exclusive actions: -# -# - Open -# Perform the action of the first matching hint under the vi mode cursor -# with `mouse.enabled` set to `true`. -# - ToggleNormalSelection -# - ToggleLineSelection -# - ToggleBlockSelection -# - ToggleSemanticSelection -# Toggle semantic selection based on `selection.semantic_escape_chars`. -# - CenterAroundViCursor -# Center view around vi mode cursor -# -# - Vi mode exclusive cursor motion actions: -# -# - Up -# One line up. -# - Down -# One line down. -# - Left -# One character left. -# - Right -# One character right. -# - First -# First column, or beginning of the line when already at the first column. -# - Last -# Last column, or beginning of the line when already at the last column. -# - FirstOccupied -# First non-empty cell in this terminal row, or first non-empty cell of -# the line when already at the first cell of the row. -# - High -# Top of the screen. -# - Middle -# Center of the screen. -# - Low -# Bottom of the screen. -# - SemanticLeft -# Start of the previous semantically separated word. -# - SemanticRight -# Start of the next semantically separated word. -# - SemanticLeftEnd -# End of the previous semantically separated word. -# - SemanticRightEnd -# End of the next semantically separated word. -# - WordLeft -# Start of the previous whitespace separated word. -# - WordRight -# Start of the next whitespace separated word. -# - WordLeftEnd -# End of the previous whitespace separated word. -# - WordRightEnd -# End of the next whitespace separated word. -# - Bracket -# Character matching the bracket at the cursor's location. -# - SearchNext -# Beginning of the next match. -# - SearchPrevious -# Beginning of the previous match. -# - SearchStart -# Start of the match to the left of the vi mode cursor. -# - SearchEnd -# End of the match to the right of the vi mode cursor. -# -# - Search mode exclusive actions: -# - SearchFocusNext -# Move the focus to the next search match. -# - SearchFocusPrevious -# Move the focus to the previous search match. -# - SearchConfirm -# - SearchCancel -# - SearchClear -# Reset the search regex. -# - SearchDeleteWord -# Delete the last word in the search regex. -# - SearchHistoryPrevious -# Go to the previous regex in the search history. -# - SearchHistoryNext -# Go to the next regex in the search history. -# -# - macOS exclusive actions: -# - ToggleSimpleFullscreen -# Enter fullscreen without occupying another space. -# -# - Linux/BSD exclusive actions: -# -# - CopySelection -# Copy from the selection buffer. -# - PasteSelection -# Paste from the selection buffer. -# -# - `command`: Fork and execute a specified command plus arguments -# -# The `command` field must be a map containing a `program` string and an -# `args` array of command line parameter strings. For example: -# `{ program: "alacritty", args: ["-e", "vttest"] }` -# -# And optionally: -# -# - `mods`: Key modifiers to filter binding actions -# -# - Command -# - Control -# - Option -# - Super -# - Shift -# - Alt -# -# Multiple `mods` can be combined using `|` like this: -# `mods: Control|Shift`. -# Whitespace and capitalization are relevant and must match the example. -# -# - `mode`: Indicate a binding for only specific terminal reported modes -# -# This is mainly used to send applications the correct escape sequences -# when in different modes. -# -# - AppCursor -# - AppKeypad -# - Search -# - Alt -# - Vi -# -# A `~` operator can be used before a mode to apply the binding whenever -# the mode is *not* active, e.g. `~Alt`. -# -# Bindings are always filled by default, but will be replaced when a new -# binding with the same triggers is defined. To unset a default binding, it can -# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for -# a no-op if you do not wish to receive input characters for that binding. -# -# If the same trigger is assigned to multiple actions, all of them are executed -# in the order they were defined in. -key_bindings: -# -# - - { key: P, mods: Control, action: Paste } - - { key: Insert, mods: Shift, action: Paste } - - { key: Slash, mods: Control, chars: "gc" } - - { key: Y, mods: Control, action: Copy } - - { key: Key0, mods: Control, action: ResetFontSize } - - { key: Equals, mods: Control, action: IncreaseFontSize } - - { key: Plus, mods: Control, action: IncreaseFontSize } - - { key: Minus, mods: Control, action: DecreaseFontSize } - - # Vi Mode - - { key: Space, mods: Control, action: ToggleViMode } - - { key: Space, mods: Control, mode: Vi, action: ScrollToBottom } - - { key: I, mode: Vi, action: ScrollToBottom } - - { key: I, mode: Vi, action: ToggleViMode } - - { key: C, mods: Control, mode: Vi, action: ScrollToBottom } - - { key: C, mods: Control, mode: Vi, action: ToggleViMode } - - { key: Escape, mode: Vi, action: ClearSelection } - - { key: Y, mods: Control, mode: Vi, action: ScrollLineUp } - - { key: E, mods: Control, mode: Vi, action: ScrollLineDown } - - { key: G, mode: Vi, action: ScrollToTop } - - { key: G, mods: Shift, mode: Vi, action: ScrollToBottom } - - { key: B, mods: Control, mode: Vi, action: ScrollPageUp } - - { key: F, mods: Control, mode: Vi, action: ScrollPageDown } - - { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp } - - { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown } - - { key: Y, mode: Vi, action: Copy } - - { key: Y, mode: Vi, action: ClearSelection } - - { key: V, mode: Vi, action: ToggleNormalSelection } - - { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection } - - { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection } - - { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection } - - { key: Return, mode: Vi, action: Open } - - { key: K, mode: Vi, action: Up } - - { key: J, mode: Vi, action: Down } - - { key: H, mode: Vi, action: Left } - - { key: L, mode: Vi, action: Right } - - { key: Up, mode: Vi, action: Up } - - { key: Down, mode: Vi, action: Down } - - { key: Left, mode: Vi, action: Left } - - { key: Right, mode: Vi, action: Right } - - { key: Key0, mode: Vi, action: First } - - { key: Key4, mode: Vi, action: Last } - - { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied } - - { key: H, mods: Shift, mode: Vi, action: High } - - { key: M, mods: Shift, mode: Vi, action: Middle } - - { key: L, mods: Shift, mode: Vi, action: Low } - - { key: B, mode: Vi, action: SemanticLeft } - - { key: W, mode: Vi, action: SemanticRight } - - { key: E, mode: Vi, action: SemanticRightEnd } - - { key: B, mods: Shift, mode: Vi, action: WordLeft } - - { key: W, mods: Shift, mode: Vi, action: WordRight } - - { key: E, mods: Shift, mode: Vi, action: WordRightEnd } - - { key: Key5, mods: Shift, mode: Vi, action: Bracket } - - { key: Slash, mode: Vi, action: SearchForward } - - { key: Slash, mods: Shift, mode: Vi, action: SearchBackward } - - { key: N, mode: Vi, action: SearchNext } - - { key: N, mods: Shift, mode: Vi, action: SearchPrevious } -# -# -# - #- { key: Paste, action: Paste } - #- { key: Copy, action: Copy } - #- { key: L, mods: Control, action: ClearLogNotice } - #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } - #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp } - #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } - #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop } - #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } - - # Vi Mode - #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } - #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } - #- { key: Escape, mode: Vi|~Search, action: ClearSelection } - #- { key: I, mode: Vi|~Search, action: ToggleViMode } - #- { key: I, mode: Vi|~Search, action: ScrollToBottom } - #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } - #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } - #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } - #- { key: G, mode: Vi|~Search, action: ScrollToTop } - #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } - #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } - #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } - #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } - #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } - #- { key: Y, mode: Vi|~Search, action: Copy } - #- { key: Y, mode: Vi|~Search, action: ClearSelection } - #- { key: Copy, mode: Vi|~Search, action: ClearSelection } - #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } - #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } - #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } - #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } - #- { key: Return, mode: Vi|~Search, action: Open } - #- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor } - #- { key: K, mode: Vi|~Search, action: Up } - #- { key: J, mode: Vi|~Search, action: Down } - #- { key: H, mode: Vi|~Search, action: Left } - #- { key: L, mode: Vi|~Search, action: Right } - #- { key: Up, mode: Vi|~Search, action: Up } - #- { key: Down, mode: Vi|~Search, action: Down } - #- { key: Left, mode: Vi|~Search, action: Left } - #- { key: Right, mode: Vi|~Search, action: Right } - #- { key: Key0, mode: Vi|~Search, action: First } - #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } - #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } - #- { key: H, mods: Shift, mode: Vi|~Search, action: High } - #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } - #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } - #- { key: B, mode: Vi|~Search, action: SemanticLeft } - #- { key: W, mode: Vi|~Search, action: SemanticRight } - #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } - #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } - #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } - #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } - #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } - #- { key: Slash, mode: Vi|~Search, action: SearchForward } - #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } - #- { key: N, mode: Vi|~Search, action: SearchNext } - #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } - - # Search Mode - #- { key: Return, mode: Search|Vi, action: SearchConfirm } - #- { key: Escape, mode: Search, action: SearchCancel } - #- { key: C, mods: Control, mode: Search, action: SearchCancel } - #- { key: U, mods: Control, mode: Search, action: SearchClear } - #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } - #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } - #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } - #- { key: Up, mode: Search, action: SearchHistoryPrevious } - #- { key: Down, mode: Search, action: SearchHistoryNext } - #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } - #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } - - # (Windows, Linux, and BSD only) - #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } - #- { key: C, mods: Control|Shift, action: Copy } - #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } - #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } - #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } - #- { key: Insert, mods: Shift, action: PasteSelection } - #- { key: Key0, mods: Control, action: ResetFontSize } - #- { key: Equals, mods: Control, action: IncreaseFontSize } - #- { key: Plus, mods: Control, action: IncreaseFontSize } - #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } - #- { key: Minus, mods: Control, action: DecreaseFontSize } - #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } - - # (Windows only) - #- { key: Return, mods: Alt, action: ToggleFullscreen } - - # (macOS only) - #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } - #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } - #- { key: Key0, mods: Command, action: ResetFontSize } - #- { key: Equals, mods: Command, action: IncreaseFontSize } - #- { key: Plus, mods: Command, action: IncreaseFontSize } - #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } - #- { key: Minus, mods: Command, action: DecreaseFontSize } - #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } - #- { key: V, mods: Command, action: Paste } - #- { key: C, mods: Command, action: Copy } - #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } - #- { key: H, mods: Command, action: Hide } - #- { key: H, mods: Command|Alt, action: HideOtherApplications } - #- { key: M, mods: Command, action: Minimize } - #- { key: Q, mods: Command, action: Quit } - #- { key: W, mods: Command, action: Quit } - #- { key: N, mods: Command, action: CreateNewWindow } - #- { key: F, mods: Command|Control, action: ToggleFullscreen } - #- { key: F, mods: Command, mode: ~Search, action: SearchForward } - #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } - -#debug: - # Display the time it takes to redraw each frame. - #render_timer: false - - # Keep the log file after quitting Alacritty. - #persistent_logging: false - - # Log level - # - # Values for `log_level`: - # - Off - # - Error - # - Warn - # - Info - # - Debug - # - Trace - #log_level: Warn - - # Renderer override. - # - glsl3 - # - gles2 - # - gles2_pure - #renderer: None - - # Print all received window events. - #print_events: false - - # Highlight window damage information. - #highlight_damage: false diff --git a/home-manager/config/alacritty/default.nix b/home-manager/config/alacritty/default.nix deleted file mode 100644 index 4e98f502..00000000 --- a/home-manager/config/alacritty/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{config, ...}: { - programs.alacritty = { - enable = true; - }; - xdg.configFile."alacritty/alacritty.yml".source = ./alacritty.yml; -} diff --git a/home-manager/config/btop/default.nix b/home-manager/config/btop/default.nix deleted file mode 100644 index 06b56ea7..00000000 --- a/home-manager/config/btop/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{config, ...}: { - programs.btop = { - enable = true; - }; -} diff --git a/home-manager/config/dconf/default.nix b/home-manager/config/dconf/default.nix deleted file mode 100644 index dc439e1e..00000000 --- a/home-manager/config/dconf/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{...}: { - # Also see: https://github.com/gvolpe/dconf2nix - dconf.settings = { - "org/gnome/desktop/wm/preferences" = { - # hide gtk buttons in titelbar - button-layout = ""; - }; - }; -} diff --git a/home-manager/config/default.nix b/home-manager/config/default.nix deleted file mode 100644 index 4dfb0f9b..00000000 --- a/home-manager/config/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{...}: { - imports = [ - ./alacritty - ./btop - ./dconf - ./direnv - ./firefox - ./gammastep - ./git - ./gpg - ./grades - ./gtk - ./himalaya - ./keepassxc - ./latexindent - ./less - ./lf - ./mail - ./mako - ./mbsync - ./mpd - ./mpv - ./mumble - ./neomutt - ./neovim - ./nheko - ./npm - ./python - ./rclone - ./ssh - ./swayidle - ./swaylock - ./yambar - ./zsh - ]; -} diff --git a/home-manager/config/direnv/default.nix b/home-manager/config/direnv/default.nix deleted file mode 100644 index 3a7b8add..00000000 --- a/home-manager/config/direnv/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; -} diff --git a/home-manager/config/firefox/config/bookmarks/default.nix b/home-manager/config/firefox/config/bookmarks/default.nix deleted file mode 100644 index 4de83ac9..00000000 --- a/home-manager/config/firefox/config/bookmarks/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - name = "Feed - Piped"; - url = "https://piped.video/feed"; - } - - { - name = "DeepL Translate"; - url = "https://www.deepl.com/translator"; - } - - { - name = "HM Options"; - url = "https://mipmip.github.io/home-manager-option-search/"; - } - - { - name = "Nix lib"; - url = "https://teu5us.github.io/nix-lib.html"; - } - - { - name = "Nixpkgs manual"; - url = "https://ryantm.github.io/nixpkgs/"; - } -] diff --git a/home-manager/config/firefox/config/chrome/userChrome.css b/home-manager/config/firefox/config/chrome/userChrome.css deleted file mode 100644 index 0b3aff77..00000000 --- a/home-manager/config/firefox/config/chrome/userChrome.css +++ /dev/null @@ -1,41 +0,0 @@ -/* thickness of tab when you have too many open tabs */ -.tabbrowser-tab:not([pinned="true"]) { - min-width: 10px !important; - min-height: 10px !important; -} - -/* tab height -#TabsToolbar .tabbrowser-tabs { -min-height: 10px !important; -} -*/ - -/* -.tabbrowser-tab {min-width: 016px !important;} -.tabbrowser-tab {clip-width: 016px !important;} -*/ - -/* the + button that opens new tabs */ -#TabsToolbar .tabs-newtab-button { - margin-left: 10px !important; - height: Auto !important; -} - -#main-window[privatebrowsingmode="temporary"] #navigator-toolbox { - background-color: #c40944 !important; -} - -/* close button inside a tab */ -.tab-close-button * { - width: 10px !important; - height: 10px !important; -} - -/* bookmark toolbar */ -#personal-bookmarks .bookmark-item > .toolbarbutton-text { - font-size: 10pt !important; -} -#personal-bookmarks .bookmark-item > .toolbarbutton-icon { - height: 12px !important; - width: 12px !important; -} diff --git a/home-manager/config/firefox/config/extensions/extensions.json b/home-manager/config/firefox/config/extensions/extensions.json deleted file mode 100644 index 735ef932..00000000 --- a/home-manager/config/firefox/config/extensions/extensions.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "darkreader": { - "addonId": "addon@darkreader.org", - "pname": "darkreader", - "sha256": "sha256:c09ed43a96dccab1de3445aac263de0569e3333da330d645094e3f938f13b30e", - "url": "https://addons.mozilla.org/firefox/downloads/file/4128489/darkreader-4.9.64.xpi", - "version": "4.9.64" - }, - "keepassxc-browser": { - "addonId": "keepassxc-browser@keepassxc.org", - "pname": "keepassxc-browser", - "sha256": "sha256:deb1c3c29fabe90dd811536d434d64c200caab9a9f7febc3428aa170eefec5f2", - "url": "https://addons.mozilla.org/firefox/downloads/file/4134768/keepassxc_browser-1.8.7.xpi", - "version": "1.8.7" - }, - "libredirect": { - "addonId": "7esoorv3@alefvanoon.anonaddy.me", - "pname": "libredirect", - "sha256": "sha256:564e56e1ccccf2f445b6cb9485c602609589a23052d2a53ab491cbce51c6b42f", - "url": "https://addons.mozilla.org/firefox/downloads/file/4144580/libredirect-2.7.1.xpi", - "version": "2.7.1" - }, - "simple-tab-groups": { - "addonId": "simple-tab-groups@drive4ik", - "pname": "simple-tab-groups", - "sha256": "sha256:b56f30cea753a9c4d1c0e078c0e5e635f1885ea7e40305cee59b9e145fad0a6c", - "url": "https://addons.mozilla.org/firefox/downloads/file/4103800/simple_tab_groups-5.2.xpi", - "version": "5.2" - }, - "tridactyl-vim": { - "addonId": "tridactyl.vim@cmcaine.co.uk", - "pname": "tridactyl-vim", - "sha256": "sha256:08b7af97bef05300ab3ac3ad721322ff00505631233482568fc4489c16d51b71", - "url": "https://addons.mozilla.org/firefox/downloads/file/4036604/tridactyl_vim-1.23.0.xpi", - "version": "1.23.0" - }, - "ublock-origin": { - "addonId": "uBlock0@raymondhill.net", - "pname": "ublock-origin", - "sha256": "sha256:8b73468bc233a11dd2895219466381783d19123857dd0b6fd16a01820fca4834", - "url": "https://addons.mozilla.org/firefox/downloads/file/4141256/ublock_origin-1.51.0.xpi", - "version": "1.51.0" - }, - "video-pauser": { - "addonId": "video-pauser@addons.vhack.eu", - "pname": "video-pauser", - "sha256": "sha256:da02e29f1d50d3a6db8a28bb7972afaeaa788bb8d38a2e9ebbfcd73d65d84841", - "url": "https://addons.mozilla.org/firefox/downloads/file/4098103/video_pauser-0.1.0.xpi", - "version": "0.1.0" - } -} diff --git a/home-manager/config/firefox/config/prefs/default.nix b/home-manager/config/firefox/config/prefs/default.nix deleted file mode 100644 index e0e72cf9..00000000 --- a/home-manager/config/firefox/config/prefs/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - pkgs, - config, - user_js, - lib, - ... -}: let - bookmarks = import ../bookmarks; - firefoxBookmarksFile = (import ../../functions/bookmarks) {inherit lib pkgs;}; - user_js_override = pkgs.writeText "user.override.js" (builtins.readFile ./override.js); -in - pkgs.runCommand "user.js" {} '' - mkdir $out; - cat "${user_js}/user.js" > $out/user.js; - cat "${user_js_override}" >> $out/user.js; - - cat << EOF >> $out/user.js; - // My bookmarks - user_pref("browser.bookmarks.file", "${toString (firefoxBookmarksFile bookmarks)}"); - user_pref("browser.startup.homepage", "file:///home/dt/home.html"); // 0103 // TODO add this from a flake - user_pref("browser.download.dir", "${config.home.homeDirectory}/media/downloads"); - EOF - '' diff --git a/home-manager/config/firefox/config/prefs/override.js b/home-manager/config/firefox/config/prefs/override.js deleted file mode 100644 index 7e63e532..00000000 --- a/home-manager/config/firefox/config/prefs/override.js +++ /dev/null @@ -1,191 +0,0 @@ -/* - 0100: STARTUP - 0200: GEOLOCATION / LANGUAGE / LOCALE - 0300: QUIETER FOX - 0400: SAFE BROWSING - 0600: BLOCK IMPLICIT OUTBOUND - 0700: DNS / DoH / PROXY / SOCKS / IPv6 - 0800: LOCATION BAR / SEARCH BAR / SUGGESTIONS / HISTORY / FORMS - 0900: PASSWORDS - 1000: DISK AVOIDANCE - 1200: HTTPS (SSL/TLS / OCSP / CERTS / HPKP) - 1400: FONTS - 1600: HEADERS / REFERERS - 1700: CONTAINERS - 2000: PLUGINS / MEDIA / WEBRTC - 2400: DOM (DOCUMENT OBJECT MODEL) - 2600: MISCELLANEOUS - 2700: ETP (ENHANCED TRACKING PROTECTION) - 2800: SHUTDOWN & SANITIZING - 4500: RFP (RESIST FINGERPRINTING) - 5000: OPTIONAL OPSEC - 5500: OPTIONAL HARDENING - 6000: DON'T TOUCH - 7000: DON'T BOTHER - 8000: DON'T BOTHER: FINGERPRINTING - 9000: NON-PROJECT RELATED - 9999: DEPRECATED / REMOVED / LEGACY / RENAMED -*/ - - -// restore session -user_pref("browser.startup.page", 3); // 0102 - -user_pref("browser.newtabpage.enabled", true); // 0104 - -// disable the geoservice, TODO don't know if I want this -//user_pref("geo.provider.use_geoclue", false); // 0202 - -// TODO is this something useful? -user_pref("datareporting.policy.dataSubmissionEnabled", true); // 0330 - -// enable health reports -user_pref("datareporting.healthreport.uploadEnabled", true); // 0331 - -// Do I want to opt-out? -user_pref("toolkit.telemetry.coverage.opt-out", false); // 0333 - -// enables studies -user_pref("app.shield.optoutstudies.enabled", true); // 0340 - -// I guess that browsing protection is useful -user_pref("browser.safebrowsing.downloads.remote.enabled", true); // 0403 - -// TODO does this (-> set to false) make things slower? -user_pref("network.prefetch-next", true); // 0601 - -// enable ipv6 because the rest of the system uses it -user_pref("network.dns.disableIPv6", false); // 0701 - -// TRR only -user_pref("network.trr.mode", 3); // 0710 - -// I trust my search engine -user_pref("keyword.enabled", true); // 801 -user_pref("browser.search.suggest.enabled", true); // 0804 -user_pref("browser.urlbar.suggest.searches", true); // 0804 -// TODO no idea what this does, enabling it -user_pref("browser.urlbar.showSearchTerms.enabled", true); // 9004 - -// prefetch urls, if the get auto completed -user_pref("browser.urlbar.speculativeConnect.enabled", true); // 0805 - -// Disable autoScrolling (clicking with the mouse wheel) -user_pref("general.autoScroll", false); - -// add new tabs after the current one -user_pref("browser.tabs.insertAfterCurrent", true); - -// TODO I might want to enable this -//user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); // 0807 - -// TODO enable form and search history? -//user_pref("browser.formfill.enable", false); // 0810 - -// disk cache should help performance -user_pref("browser.cache.disk.enable", true); // 1001 - -// store extra session data (form content, cookies and POST data) 0: everywhere -user_pref("browser.sessionstore.privacy_level", 0); // 1003 - -// Disable unsafe passive content (images) on https sites -user_pref("security.mixed_content.block_display_content", true); // 1241 - -// Disable the eme banner -user_pref("browser.eme.ui.enabled", false); // 2022 - -// Don't delete my precious temp files -user_pref("browser.helperApps.deleteTempFileOnExit", false); // 2603 - -// Download to the download dir -user_pref("browser.download.useDownloadDir", true); // 2651 - -// Open the download panel -user_pref("browser.download.alwaysOpenPanel", true); // 2652 - -// Block after custom ruleset -user_pref("browser.contentblocking.category", "custom"); // 2701 - -// set the custom settings // 7016 -user_pref("network.cookie.cookieBehavior", 1); -user_pref("network.http.referer.disallowCrossSiteRelaxingDefault", true); -user_pref("network.http.referer.disallowCrossSiteRelaxingDefault.top_navigation", true); -user_pref("privacy.partition.network_state.ocsp_cache", true); -user_pref("privacy.query_stripping.enabled", true); -user_pref("privacy.trackingprotection.enabled", true); -user_pref("privacy.trackingprotection.socialtracking.enabled", true); -user_pref("privacy.trackingprotection.cryptomining.enabled", true); -user_pref("privacy.trackingprotection.fingerprinting.enabled", true); - - -// I might want to change that, when it hinders session restore -//user_pref("privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage", false); // 2720 - -// I like my history very much! -user_pref("privacy.sanitize.sanitizeOnShutdown", false); // 2810 - -// The downsides (light theme + potential breakages): -//user_pref("privacy.resistFingerprinting", true); // 4501 -user_pref("privacy.resistFingerprinting.letterboxing", false); // 4504 - -// I would like to keep my gl, even in the web -user_pref("webgl.disabled", false); // 4520 - -// I like my service workers and am using a service using them. -user_pref("dom.serviceWorkers.enabled", true); // 7017 - -// I've got a password manager already -user_pref("signon.rememberSignons", false); // 5003 - -// Do not track header -user_pref("privacy.donottrackheader.enabled", true); // 7015 - -// Allow my custom css -user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); - -// might improve performance TODO -user_pref("gfx.webrender.all", true); - -// disable updates (pretty pointless with nix) -user_pref("extensions.update.autoUpdateDefault", false); -user_pref("extensions.update.enabled", false); -user_pref("app.update.channel", "default"); - -user_pref("browser.ctrlTab.recentlyUsedOrder", false); - -user_pref("browser.download.useDownloadDir", true); -user_pref("browser.download.folderList", 2); # TODO -user_pref("browser.download.viewableInternally.typeWasRegistered.svg", true); -user_pref("browser.download.viewableInternally.typeWasRegistered.webp", true); -user_pref("browser.download.viewableInternally.typeWasRegistered.xml", true); - -// TODO what does this do? -user_pref("browser.search.widget.inNavBar", true); - -user_pref("browser.shell.checkDefaultBrowser", false); -user_pref("browser.tabs.loadInBackground", true); -user_pref("browser.urlbar.placeholderName", "Brave"); - -// Set the tabs and bookmarks -user_pref("browser.tabs.inTitlebar", 1); -user_pref("browser.toolbars.bookmarks.visibility", "always"); -user_pref("browser.places.importBookmarksHTML", true); - -// Theme -user_pref("extensions.activeThemeID", "firefox-alpenglow@mozilla.org"); -user_pref("extensions.extensions.activeThemeID", "firefox-alpenglow@mozilla.org"); - -// highlight all entries when searching -user_pref("findbar.highlightAll", true); - -// TODO -//user_pref("extensions.webcompat.enable_picture_in_picture_overrides", true); -//user_pref("extensions.webcompat.enable_shims", true); -//user_pref("extensions.webcompat.perform_injections", true); -//user_pref("extensions.webcompat.perform_ua_overrides", true); - -// onlykey / copied from a yubikey config -//user_pref("security.webauth.u2f", true); -//user_pref("security.webauth.webauthn", true); -//user_pref("security.webauth.webauthn_enable_softtoken", true); -//user_pref("security.webauth.webauthn_enable_usbtoken", true); diff --git a/home-manager/config/firefox/config/search/engines/default.nix b/home-manager/config/firefox/config/search/engines/default.nix deleted file mode 100644 index 286d7247..00000000 --- a/home-manager/config/firefox/config/search/engines/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{pkgs, ...}: { - "Brave Search" = { - urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; - IconUpdateURL = "https://raw.githubusercontent.com/brave/brave-core/master/components/brave_welcome_ui/components/images/lion_logo.svg"; - updateInterval = 24; # every day - definedAliases = ["@bs"]; - }; - - # NIX - "Nix Packages" = { - urls = [{template = "https://search.nixos.org/packages?type=packages&query={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@np"]; - }; - "Nix Options" = { - urls = [{template = "https://search.nixos.org/options?type=options&query={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@no"]; - }; - "NixOS Wiki" = { - urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@nw"]; - }; - - "Arch Wiki" = { - urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}]; - iconUpdateURL = "https://upload.wikimedia.org/wikipedia/commons/a/a5/Archlinux-icon-crystal-64.svg"; - updateInterval = 24; - definedAliases = ["@aw"]; - }; - - # RUST - "Rust std" = { - urls = [{template = "https://doc.rust-lang.org/std/?search={searchTerms}";}]; - iconUpdateURL = "https://rustacean.net/assets/rustacean-orig-noshadow.svg"; - updateInterval = 24; - definedAliases = ["@rs"]; - }; - - "Google Scholar" = { - urls = [{template = "https://scholar.google.com/scholar?hl=en&q={searchTerms}";}]; - iconUpdateURL = "https://scholar.google.com/favicon.ico"; - updateInterval = 24; - definedAliases = ["@gs"]; - }; - "Wikipedia" = { - urls = [{template = "https://en.wikipedia.org/wiki/{searchTerms}";}]; - iconUpdateURL = "https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg"; - updateInterval = 24; - definedAliases = ["@wp"]; - }; - - "Wikipedia (en)".metaData.hidden = true; - "DuckDuckGo".metaData.hidden = true; - "Bing".metaData.hidden = true; - "Google".metaData.hidden = true; - "Amazon.de".metaData.hidden = true; -} diff --git a/home-manager/config/firefox/default.nix b/home-manager/config/firefox/default.nix deleted file mode 100644 index 3c792045..00000000 --- a/home-manager/config/firefox/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - config, - pkgs, - lib, - user_js, - video_pause, - ... -}: let - userChrome = builtins.readFile ./config/chrome/userChrome.css; - - user_js_nix = (import ./config/prefs) {inherit pkgs lib config user_js;}; - - extensions = builtins.map buildFirefoxXpiAddon ( - lib.attrValues ( - lib.importJSON ./config/extensions/extensions.json - ) - ); - engines = (import ./config/search/engines) {inherit pkgs;}; - - # source: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/default.nix - buildFirefoxXpiAddon = (import ./functions/extensions) {inherit pkgs;}; - - video-pauser = (import ./functions/extensions/video-pauser.nix) {inherit pkgs video_pause;}; -in { - home.sessionVariables = { - # improve touch input & make scrolling smother - MOZ_USE_XINPUT2 = "1"; - # improve wayland support - MOZ_ENABLE_WAYLAND = 1; - }; - xdg.mimeApps = { - enable = true; - defaultApplications = { - "text/html" = ["firefox.desktop"]; - "x-scheme-handler/http" = ["firefox.desktop"]; - "x-scheme-handler/https" = ["firefox.desktop"]; - "x-scheme-handler/about" = ["firefox.desktop"]; - "x-scheme-handler/unknown" = ["firefox.desktop"]; - }; - }; - programs.firefox = { - enable = true; - package = pkgs.firefox-wayland.override { - extraNativeMessagingHosts = [video-pauser]; - }; - profiles."default" = { - inherit extensions; - isDefault = true; - id = 0; - name = "default"; - - inherit userChrome; - - search = { - default = "Brave Search"; - force = true; - - inherit engines; - }; - - bookmarks = []; - extraConfig = builtins.readFile "${user_js_nix}/user.js"; - }; - }; -} diff --git a/home-manager/config/firefox/functions/bookmarks/default.nix b/home-manager/config/firefox/functions/bookmarks/default.nix deleted file mode 100644 index d1d89dd2..00000000 --- a/home-manager/config/firefox/functions/bookmarks/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - pkgs, -}: bookmarks: let - indent = level: - lib.concatStringsSep "" (map (lib.const " ") (lib.range 1 level)); - - bookmarkToHTML = indentLevel: bookmark: '' - ${indent indentLevel}
${lib.escapeXML bookmark.name}''; - - directoryToHTML = indentLevel: directory: '' - ${indent indentLevel}
${ - if directory.toolbar - then ''

Bookmarks Toolbar'' - else "

${lib.escapeXML directory.name}" - }

- ${indent indentLevel}

- ${allItemsToHTML (indentLevel + 1) directory.bookmarks} - ${indent indentLevel}

''; - - itemToHTMLOrRecurse = indentLevel: item: - if item ? "url" - then bookmarkToHTML indentLevel item - else directoryToHTML indentLevel item; - - allItemsToHTML = indentLevel: bookmarks: - lib.concatStringsSep "\n" - (map (itemToHTMLOrRecurse indentLevel) bookmarks); - - bookmarkEntries = allItemsToHTML 1 bookmarks; -in - pkgs.writeText "firefox-bookmarks.html" '' - - - - Bookmarks -

Bookmarks Menu

- -

-

Bookmarks Toolbar

-

- ${bookmarkEntries} -

-

- '' diff --git a/home-manager/config/firefox/functions/extensions/default.nix b/home-manager/config/firefox/functions/extensions/default.nix deleted file mode 100644 index b84461c7..00000000 --- a/home-manager/config/firefox/functions/extensions/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{pkgs, ...}: { - pname, - version, - addonId, - url, - sha256, - #meta, - ... -}: -pkgs.stdenv.mkDerivation { - name = "${pname}-${version}"; - - #inherit meta; - - src = builtins.fetchurl {inherit url sha256;}; - - preferLocalBuild = true; - allowSubstitutes = true; - - buildCommand = '' - dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" - mkdir -p "$dst" - install -v -m644 "$src" "$dst/${addonId}.xpi" - ''; -} diff --git a/home-manager/config/firefox/functions/extensions/video-pauser.nix b/home-manager/config/firefox/functions/extensions/video-pauser.nix deleted file mode 100644 index c4c5238f..00000000 --- a/home-manager/config/firefox/functions/extensions/video-pauser.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - pkgs, - video_pause, - ... -}: -pkgs.runCommand "video_pause_native_messaging" {} '' - install -d $out/share/ - cat << EOF > $out/share/video_pauser.json - { - "name": "video_pauser", - "description": "Pause your Videos with a single key stroke!", - "path": "${video_pause}/bin/video_pause", - "type": "stdio", - "allowed_extensions": ["video-pauser@addons.vhack.eu"] - } - EOF - - nativeMessagingPaths=( - /lib/mozilla/native-messaging-hosts - /etc/opt/chrome/native-messaging-hosts - /etc/chromium/native-messaging-hosts - /etc/vivaldi/native-messaging-hosts - /lib/librewolf/native-messaging-hosts - ) - - for manifestDir in "''${nativeMessagingPaths[@]}"; do - install -d $out$manifestDir - ln -s $out/share/video_pauser.json $out$manifestDir/ - done -'' diff --git a/home-manager/config/firefox/scripts/unzip_mozlz4.py b/home-manager/config/firefox/scripts/unzip_mozlz4.py deleted file mode 100755 index 311fd214..00000000 --- a/home-manager/config/firefox/scripts/unzip_mozlz4.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python -# source: https://unix.stackexchange.com/a/497861 -# Command-line tool to decompress mozLz4 files used for example by Firefox to store various kinds of session backup information. -# Works in both Python 2.7.15 and 3.6.7, as of version 2.1.6 of the LZ4 Python bindings at pypi.org/project/lz4. -# To use in another script, simply cut and paste the import statement and the mozlz4_to_text() function (lines 8 to 17). - -import lz4.block # pip install lz4 --user - - -def mozlz4_to_text(filepath): - # Given the path to a "mozlz4", "jsonlz4", "baklz4" etc. file, - # return the uncompressed text. - bytestream = open(filepath, "rb") - bytestream.read(8) # skip past the b"mozLz40\0" header - valid_bytes = bytestream.read() - text = lz4.block.decompress(valid_bytes) - return text - - -def main(args): - # Given command-line arguments of an input filepath for a ".mozlz4" file - # and optionally an output filepath, write the decompressed text to the - # output filepath. - # Default output filepath is the input filepath minus the last three characters - # (e.g. "foo.jsonlz4" becomes "foo.json") - filepath_in = args[0] - if len(args) < 2: - filepath_out = filepath_in[:-3] - else: - filepath_out = args[1] - text = mozlz4_to_text(filepath_in) - with open(filepath_out, "wb") as outfile: - outfile.write(text) - print("Wrote decompressed text to {}".format(filepath_out)) - - -if __name__ == "__main__": - import sys - args = sys.argv[1:] - if args and not args[0] in ("--help", "-h"): - main(args) - else: - print("Usage: mozlz4.py ") diff --git a/home-manager/config/firefox/scripts/update_extensions b/home-manager/config/firefox/scripts/update_extensions deleted file mode 100755 index 05f47aad..00000000 --- a/home-manager/config/firefox/scripts/update_extensions +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -#. ~/.local/lib/shell/lib - -tmp=$(mktemp) -cat << EOF > $tmp - darkreader - keepassxc-browser - simple-tab-groups - ublock-origin - tridactyl-vim - video-pauser - libredirect -EOF - -# The bin is provided in the devshell. The cat execution should be unquoted -generate_extensions $(cat "$tmp") > "$(dirname $0)"/../config/extensions/extensions.json - - - -rm "$tmp"; diff --git a/home-manager/config/gammastep/default.nix b/home-manager/config/gammastep/default.nix deleted file mode 100644 index 6090921b..00000000 --- a/home-manager/config/gammastep/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - lib, - nixosConfig, - ... -}: let - temp = - if nixosConfig.soispha.laptop.enable - then 2000 - else 1300; -in { - services.gammastep = { - enable = true; - settings = { - general = { - temp-day = lib.mkForce temp; - temp-night = lib.mkForce temp; - gamma = "0.8:0.8:0.8"; - fade = 0; - adjustment-method = "wayland"; - location-provider = "manual"; - }; - - manual = { - lat = 48.1; - lon = 11.6; - }; - }; - }; -} diff --git a/home-manager/config/git/default.nix b/home-manager/config/git/default.nix deleted file mode 100644 index 9e15da1d..00000000 --- a/home-manager/config/git/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{...}: let - gitIgnoreFile = ./git_ignore.git; - gitTemplateFile = ./git_template.git; -in { - programs.git = { - enable = true; - #package = pkgs.gitAndTools.gitFull; # TODO for git send-email support - aliases = { - st = "status"; - ds = "diff --staged"; - di = "diff"; - rs = "restore --staged"; - - ## Logging: - ls = "log --max-count=10 --color --format=format:'%C(bold red)%h%C(reset) %C(dim bold blue)%s%C(reset) %C(dim white)[%aN] %C(bold red)<%G?>%C(reset)%C(auto)%d%C(reset)'"; - - # https://stackoverflow.com/a/61487052 - lg = "lg1"; - lg1 = "lg1-specific --all"; - lg2 = "lg2-specific --all"; - lg3 = "lg3-specific --all"; - - lg1-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold cyan) [%G?]%C(reset)%C(auto)%d%C(reset)'"; - - lg2-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'"; - - lg3-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset)\ - - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)\ - %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)\ - %C(bold red)(signature: %G? by %GS, trust: %GT)%C(reset)%n\ - '' %C(white)%s%C(reset)%n''\ - %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)\ - %C(bold white)- trailers: %(trailers) %C(reset)'"; - }; - extraConfig = { - core = { - excludesFile = "${gitIgnoreFile}"; - }; - init = { - defaultBranch = "prime"; - }; - user = { - email = "soispha@vhack.eu"; - name = "Soispha"; - }; - help = { - autocorrect = 5; - }; - push = { - gpgSign = "if-asked"; - }; - commit = { - template = "${gitTemplateFile}"; - }; - }; - delta = { - enable = true; - options = { - decorations = { - commit-decoration-style = "bold yellow box ul"; - file-decoration-style = "none"; - file-style = "bold yellow ul"; - }; - features = "decorations"; - whitespace-error-style = "22 reverse"; - }; - }; - signing = { - key = "9606FC749FCE16360723D4ADA5E94010C3A642AD!"; - signByDefault = true; - }; - }; -} diff --git a/home-manager/config/git/git_ignore.git b/home-manager/config/git/git_ignore.git deleted file mode 100644 index 8f29815e..00000000 --- a/home-manager/config/git/git_ignore.git +++ /dev/null @@ -1,4 +0,0 @@ -# default nvim Session file name -Session.vim - -# vim: ft=gitignore diff --git a/home-manager/config/git/git_template.git b/home-manager/config/git/git_template.git deleted file mode 100644 index 9621698d..00000000 --- a/home-manager/config/git/git_template.git +++ /dev/null @@ -1,66 +0,0 @@ - -# Title: Summary, imperative, start upper case, don't end with a period -# If applied, this commit will - -# Body: Explain *what* and *why* (not *how*). - - -# BREAKING CHANGE: -# Fixes: # -# Refs: # -# Co-authored-by: - - - -# Convention Commits (https://www.conventionalcommits.org/en/v1.0.0/ or https://github.com/angular/angular/blob/85b4941be137a2fcdc664dc870e408dd72ad7de7/CONTRIBUTING.md#commit): -# Feat: [Features] -> MINOR version bump -# A new feature -# -# Fix: [Bug Fixes] -> PATCH version bump -# A bug fix -# -# append '!' after the type/scope: [Breaking Change] -> MAJOR version bump -# A breaking API change -# -# Docs: [Documentation] -# Documentation only changes -# -# Style: [Styles] -# Changes that do not affect the meaning of the code -# (white-space, formatting, missing semi-colons, etc) -# -# Refactor: [Code Refactoring] -# A code change that neither fixes a bug nor adds a feature -# -# Perf: [Performance Improvements] -> PATCH version bump -# A code change that improves performance -# -# Test: [Tests] -# Adding missing tests or correcting existing tests -# -# Build: [Builds] -> PATCH version bump -# Changes that affect the build system or external dependencies -# (example scopes: gulp, broccoli, npm) -# -# Ci: [Continuous Integrations] -# Changes to our CI configuration files and scripts -# (example scopes: Travis, Circle, BrowserStack, SauceLabs) -# -# Chore: [Chores] -# Other changes that don't modify src or test files -# -# Reverts: [Reverts] -# Reverts a previous commit - -# How to Write a Git Commit Message: -# [https://chris.beams.io/posts/git-commit/] -> https://cbea.ms/git-commit/ -# -# 1. Separate subject from body with a blank line -# 2. Limit the subject line to 50 characters -# 3. Capitalize the subject line -# 4. Do not end the subject line with a period -# 5. Use the imperative mood in the subject line -# 6. Wrap the body at 72 characters -# 7. Use the body to explain *what* and *why* vs. *how* -# -# vim: ft=gitcommit diff --git a/home-manager/config/gpg/agent-program b/home-manager/config/gpg/agent-program deleted file mode 100755 index e6917db0..00000000 --- a/home-manager/config/gpg/agent-program +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -onlykey-gpg-agent -v --skey-slot=ECC32 --dkey-slot=ECC32 "$@" diff --git a/home-manager/config/gpg/default.nix b/home-manager/config/gpg/default.nix deleted file mode 100644 index 52069c94..00000000 --- a/home-manager/config/gpg/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - config, - nixosConfig, - sysLib, - pkgs, - ... -}: let - agent-program = sysLib.writeShellScriptWithLibrary { - name = "onlykey-gpg-agent"; - src = ./agent-program; - dependencies = with pkgs; [ - python3 - onlykey-agent - ]; - }; - settings = - if nixosConfig.networking.hostName == "isimud" - then {} - else { - # Hardware-based GPG configuration - agent-program = "${agent-program}/bin/onlykey-gpg-agent"; - - default-key = "Soispha "; - # TODO add more - }; - gpg-agent = - if nixosConfig.networking.hostName == "isimud" - then { - enable = true; - enableZshIntegration = true; - enableScDaemon = true; # smartcards and such things - pinentryFlavor = "tty"; - } - else { - enable = false; - enableZshIntegration = true; - enableScDaemon = true; # smartcards and such things - pinentryFlavor = "tty"; - }; -in { - programs.gpg = { - enable = true; - homedir = "${config.xdg.dataHome}/gnupg/onlykey"; - mutableKeys = false; - mutableTrust = false; - inherit settings; - publicKeys = [ - { - source = ./keys/key_1; - trust = "ultimate"; - } - { - source = ./keys/key_2; - trust = "ultimate"; - } - { - source = ./keys/key_3; - trust = "full"; - } - ]; - }; - services = { - inherit gpg-agent; - }; -} diff --git a/home-manager/config/gpg/keys/key_1 b/home-manager/config/gpg/keys/key_1 deleted file mode 100644 index b10b8b6c..00000000 Binary files a/home-manager/config/gpg/keys/key_1 and /dev/null differ diff --git a/home-manager/config/gpg/keys/key_2 b/home-manager/config/gpg/keys/key_2 deleted file mode 100644 index 0b06cf3b..00000000 Binary files a/home-manager/config/gpg/keys/key_2 and /dev/null differ diff --git a/home-manager/config/gpg/keys/key_3 b/home-manager/config/gpg/keys/key_3 deleted file mode 100644 index 22ffb931..00000000 Binary files a/home-manager/config/gpg/keys/key_3 and /dev/null differ diff --git a/home-manager/config/grades/config.yaml b/home-manager/config/grades/config.yaml deleted file mode 100644 index 36712971..00000000 --- a/home-manager/config/grades/config.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# für oberstufe ---- -unit: Punkte -grade_groups: - - name: Zeugnis - weight: '100' - double_weight_on_class_type: false - - name: Sonstige - weight: '1' - double_weight_on_class_type: true - - name: Klausur - weight: '1' - double_weight_on_class_type: false - -grade_types: - - name: Zeugnis - group: Zeugnis - - name: Klausur - group: Klausur - - name: Epo - group: Sonstige - - name: Test - group: Sonstige - -class_types: - - name: NebenFach - double_weight_on_marked_grade_groups: true - - name: LeistungsKurs - double_weight_on_marked_grade_groups: false - -classes: - - name: M - long_name: Mathe - class_type: LeistungsKurs - - name: E - long_name: Englisch - class_type: LeistungsKurs - - name: CH - long_name: Chemie - class_type: LeistungsKurs - - - name: d - long_name: Deutsch - class_type: NebenFach - - name: g - long_name: Geschichte - class_type: NebenFach - - name: se - long_name: Sozialkunde/Erdkunde - class_type: NebenFach - - name: et - long_name: Ethik - class_type: NebenFach - - name: spj - long_name: Sport - class_type: NebenFach - - name: inf - long_name: Informatik - class_type: NebenFach - - name: ph - long_name: Phyisk - class_type: NebenFach - - name: phi - long_name: Philosophie - class_type: NebenFach - - name: bi - long_name: Biologie - class_type: NebenFach diff --git a/home-manager/config/grades/default.nix b/home-manager/config/grades/default.nix deleted file mode 100644 index d2678174..00000000 --- a/home-manager/config/grades/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - xdg.configFile."grades/config.yaml".source = ./config.yaml; -} diff --git a/home-manager/config/gtk/default.nix b/home-manager/config/gtk/default.nix deleted file mode 100644 index f5411369..00000000 --- a/home-manager/config/gtk/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - config, - lib, - pkgs, - stdenv, - ... -}: { - gtk = { - enable = true; - theme = { - package = pkgs.nordic; - name = "Nordic"; - }; - cursorTheme = { - package = pkgs.nordzy-cursor-theme; - name = "Nordzy-cursors"; - }; - iconTheme = { - package = pkgs.nordzy-icon-theme; - name = "Nordzy-icon"; - }; - font = { - name = "Noto Sans"; - size = 10; - }; - gtk2 = { - configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - # extraConfig = '' - # gtk-enable-animations=1 - # gtk-primary-button-warps-slider=0 - # gtk-toolbar-style=3 - # gtk-menu-images=1 - # gtk-button-images=1 - # - # ''; - }; - gtk3 = { - # extraConfig = '' - # gtk-button-images=true - # gtk-decoration-layout=icon:minimize,maximize,close - # gtk-enable-animations=true - # gtk-menu-images=true - # gtk-primary-button-warps-slider=false - # gtk-toolbar-style=3 - # #gtk-modules=window-decorations-gtk-module:colorreload-gtk-module - # ''; - extraCss = ""; - }; - gtk4 = { - # extraConfig = '' - # gtk-application-prefer-dark-theme=true - # gtk-decoration-layout=icon:minimize,maximize,close - # gtk-enable-animations=true - # gtk-primary-button-warps-slider=false - # ''; - }; - }; -} diff --git a/home-manager/config/himalaya/default.nix b/home-manager/config/himalaya/default.nix deleted file mode 100644 index 99329a34..00000000 --- a/home-manager/config/himalaya/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{...}: { - programs.himalaya = { - enable = true; - settings = { - # TODO - }; - }; -} diff --git a/home-manager/config/keepassxc/default.nix b/home-manager/config/keepassxc/default.nix deleted file mode 100644 index 3ac82812..00000000 --- a/home-manager/config/keepassxc/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."keepassxc/keepassxc.ini".source = ./keepassxc.ini; -} diff --git a/home-manager/config/keepassxc/keepassxc.ini b/home-manager/config/keepassxc/keepassxc.ini deleted file mode 100644 index 288a194b..00000000 --- a/home-manager/config/keepassxc/keepassxc.ini +++ /dev/null @@ -1,58 +0,0 @@ -[General] -AutoSaveAfterEveryChange=true -BackupBeforeSave=true -BackupFilePathPattern=/home/soispha/.local/share/keepassxc/{DB_FILENAME}.old.kdbx -ConfigVersion=2 -HideWindowOnCopy=false - -[Browser] -CustomProxyLocation= -Enabled=true - -[FdoSecrets] -Enabled=true - -[GUI] -AdvancedSettings=true -ApplicationTheme=dark -CompactMode=false -HidePasswords=true -ShowExpiredEntriesOnDatabaseUnlockOffsetDays=1 -TrayIconAppearance=monochrome-light - -[KeeShare] -Active="" -Own="" -QuietSuccess=true - -[PasswordGenerator] -AdditionalChars= -AdvancedMode=true -Braces=true -Dashes=true -EASCII=true -ExcludedChars= -Length=128 -Logograms=true -LowerCase=true -Math=true -Numbers=true -Punctuation=true -Quotes=true -SpecialChars=true -Type=0 -UpperCase=true -WordCount=4 -WordSeparator="," - -[SSHAgent] -Enabled=true - -[Security] -HidePasswordPreviewPanel=true -IconDownloadFallback=true -LockDatabaseIdle=false -LockDatabaseIdleSeconds=960 -PasswordEmptyPlaceholder=true -PasswordsHidden=true -PasswordsRepeatVisible=true diff --git a/home-manager/config/latexindent/default.nix b/home-manager/config/latexindent/default.nix deleted file mode 100644 index 0d776e14..00000000 --- a/home-manager/config/latexindent/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."latexindent/indentconfig.yaml".source = ./indentconfig.yaml; - xdg.configFile."latexindent/mysettings.yaml".source = ./mysettings.yaml; -} diff --git a/home-manager/config/latexindent/indentconfig.yaml b/home-manager/config/latexindent/indentconfig.yaml deleted file mode 100644 index d67351f3..00000000 --- a/home-manager/config/latexindent/indentconfig.yaml +++ /dev/null @@ -1,2 +0,0 @@ -paths: -- /home/dt/.config/latexindent/mysettings.yaml diff --git a/home-manager/config/latexindent/mysettings.yaml b/home-manager/config/latexindent/mysettings.yaml deleted file mode 100644 index 9a0f8b2f..00000000 --- a/home-manager/config/latexindent/mysettings.yaml +++ /dev/null @@ -1,672 +0,0 @@ -# defaultSettings.yaml for latexindent.pl, version 3.19.1, 2022-12-04 -# a script that aims to -# beautify .tex, .sty, .cls files -# -# (or latexindent.exe if you're on Windows) -# -#--------------------------------------------------------------------------------------- -# 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. -# -# See http://www.gnu.org/licenses/. -# -# Chris Hughes, 2017 -# -# For all communication, please visit: https://github.com/cmhughes/latexindent.pl -# -#--------------------------------------------------------------------------------------- -# You should feel encouraged to change anything you like in these settings, but -# it would probably be better to have your own user settings -# files somewhere else - remember that this file may be overwritten -# when you update your tex distribution. Please see the manual linked from: -# -# https://github.com/cmhughes/latexindent.pl -# -# for details of how to create and configure your own settings files. -# -# Please read the manual (linked from above) first to understand what each switch does. -# -#--------------------------------------------------------------------------------------- - -# latexindent can be called to act on a file without using the file's extension, -# e.g, simply -# latexindent myfile -# in which case the choice of file extension is chosen -# according to the choices made in fileExtensionPreference -# Other file extensions can be added. -fileExtensionPreference: - .tex: 1 - .sty: 2 - .cls: 3 - .bib: 4 - -# default file extension of backup file (if -w switch is active) -# for example, if your .tex file is called -# myfile.tex -# and you specify the backupExtension as BACKUP.bak then your -# backup file will be -# myfileBACKUP.bak -backupExtension: .bak - -# only one backup per file: -# - if onlyOneBackUp is 0 then, as a safety measure, -# the number on the extension increments by 1 each time: -# -# myfile.bak0, myfile.bak1, myfile.bak2 -# - if you set onlyOnebackUp to 1, then the backup file will -# be overwritten each time (not recommended until you trust the script) -onlyOneBackUp: 0 - -# some users may want a finite number of backup files, -# say at most 3; in which case, they can change this maxNumberOfBackUps. -# -# If maxNumberOfBackUps is set to 0 (or less) then infinitely -# many backups are possible, unless onlyOneBackUp is switched on -maxNumberOfBackUps: 0 - -# some users may wish to cycle through back up files. -# -# for example, with maxNumberOfBackUps: 4, they may -# wish to delete the oldest back up file, and keep only the most recent. -# -# copy myfile.bak1 to myfile.bak0 -# copy myfile.bak2 to myfile.bak1 -# copy myfile.bak3 to myfile.bak2 -# copy myfile.bak4 to myfile.bak3 -# -# the back up will be written to myfile.bak4 -cycleThroughBackUps: 0 - -# preferences for information displayed in the log file -logFilePreferences: - showEveryYamlRead: 1 - showAmalgamatedSettings: 0 - showDecorationStartCodeBlockTrace: 0 - showDecorationFinishCodeBlockTrace: 0 - endLogFileWith: '--------------' - showGitHubInfoFooter: 1 - Dumper: - Terse: 1 - Indent: 1 - Useqq: 1 - Deparse: 1 - Quotekeys: 0 - Sortkeys: 1 - Pair: " => " - -# verbatim environments specified -# in this field will not be changed at all! -verbatimEnvironments: - verbatim: 1 - lstlisting: 1 - minted: 1 - -# verbatim commands such as \verb! body !, \lstinline$something else$ -verbatimCommands: - verb: 1 - lstinline: 1 - -# no indent blocks (not necessarily verbatim -# environments) which are marked as %\begin{noindent} -# or anything else that you detail in the following -noIndentBlock: - noindent: 1 - cmhtest: 1 - -# \begin{document} and \end{document} are treated differently -# by latexindent within filecontents environments -fileContentsEnvironments: - filecontents: 1 - filecontents*: 1 - -# indent preamble -indentPreamble: 1 - -# assume no preamble in cls, sty, by default -lookForPreamble: - .tex: 1 - .sty: 0 - .cls: 0 - .bib: 0 - -# some preambles can contain \begin and \end statements -# that are not in their 'standard environment block', for example, -# consider the following key = values: -# preheadhook={\begin{mdframed}[style=myframedstyle]}, -# postfoothook=\end{mdframed}, -preambleCommandsBeforeEnvironments: 0 - -# default value of indentation -defaultIndent: " " - -# remove trailing whitespace from all lines -removeTrailingWhitespace: - beforeProcessing: 0 - afterProcessing: 1 - -# name of code blocks that should have their body aligned at ampersand delimiters -lookForAlignDelims: - tabular: - delims: 1 - alignDoubleBackSlash: 1 - spacesBeforeDoubleBackSlash: 1 - multiColumnGrouping: 0 - alignRowsWithoutMaxDelims: 1 - spacesBeforeAmpersand: 1 - spacesAfterAmpersand: 1 - justification: left - alignFinalDoubleBackSlash: 0 - dontMeasure: 0 - delimiterRegEx: '(?]*?>)' - keyEqualsValuesBracesBrackets: - name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?' - follow: '(?:(?<]+?' - follow: '\h|\R|\{|\[|\$|\)|\(' - UnNamedGroupingBracesBrackets: - follow: '\{|\[|,|&|\)|\(|\$' - arguments: - before: '(?:#\d\h*;?,?\/?)+|\<.*?\>' - between: '_|\^|\*' - trailingComments: - notPreceededBy: '(? "$script" -chmod +x "$script" -"$VISUAL" "$script" - - -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/mk_scr_temp b/home-manager/config/lf/commands/scripts/mk_scr_temp deleted file mode 100755 index a520469c..00000000 --- a/home-manager/config/lf/commands/scripts/mk_scr_temp +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - - -prompt "Script name: " -name="" -while [ -z "$name" ] || [ -e "$name" ] -do - read -r name - if [ -e "$name" ]; then - prompt "Script already exists, overwrite [y|N]: " - read -r ans - - if [ "$ans" = "y" ]; then - break - else - prompt "Script Name: " - fi - fi -done - -script="$(pwd)"/"$name" - -sed 's|%TO_BE_SHELL_LIBRARY_PATH|%SHELL_LIBRARY_PATH|' "%SHELL_LIBRARY_TEMPLATE" > "$script" -chmod +x "$script" -"$VISUAL" "$script" - - -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/open b/home-manager/config/lf/commands/scripts/open deleted file mode 100755 index c507482b..00000000 --- a/home-manager/config/lf/commands/scripts/open +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -case $(file --mime-type "$f" -bL) in - text/*|application/json|application/vnd.hp-HPGL) "$EDITOR" "$f";; - image/*) "$IVIEWER" "$f";; - *) xdg-open "$f";; -esac -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/open_config b/home-manager/config/lf/commands/scripts/open_config deleted file mode 100755 index c99422f1..00000000 --- a/home-manager/config/lf/commands/scripts/open_config +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -"$EDITOR" "$(bookmenu -b ~/.config/bookmenu/configs -f fzf -o)" # TODO implement this -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/restore_trash b/home-manager/config/lf/commands/scripts/restore_trash deleted file mode 100755 index a7bf0094..00000000 --- a/home-manager/config/lf/commands/scripts/restore_trash +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -trash list | fzf --multi | awk '{print $NF}' | xargs trash restore --match=exact -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/set_wall_paper b/home-manager/config/lf/commands/scripts/set_wall_paper deleted file mode 100755 index 45049283..00000000 --- a/home-manager/config/lf/commands/scripts/set_wall_paper +++ /dev/null @@ -1,10 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -die "No yet implemented" # TODO do what the 'die' says -#sed -i "s,export AWMWALLPAPER='.*',export AWMWALLPAPER='${f}'," ${ZDOTDIR}/.zshenv -#nohub swaybg -i "$f" -#feh --bg-max --no-fehbg "$f" -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/stripspace b/home-manager/config/lf/commands/scripts/stripspace deleted file mode 100755 index 91714712..00000000 --- a/home-manager/config/lf/commands/scripts/stripspace +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -files=$(mktmp); -echo "$fx" > "$files"; - -awk_source=$(mktmp); -cat << OFT > "$awk_source" -BEGIN {FS=" "} -{for (i=1; i != NF + 1; i++) - if (i == NF) { - parts[i]=tolower(\$i); - } else { - parts[i]=tolower(\$i"_"); - } -} -END {for (i in parts) printf parts[i]} -OFT - -while read -r file; do - dirty_name=$(mktmp) - basename "$file" > "$dirty_name"; - clean_name=$(awk -f "$awk_source" "$dirty_name"); - - [ -e "$clean_name" ] && die "file \"$clean_name\" already exists!"; - mv "$(cat "$dirty_name")" "$clean_name" || die "Move failed"; - lf -remote 'send reload' -done < "$files"; -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/trash b/home-manager/config/lf/commands/scripts/trash deleted file mode 100755 index 7f477550..00000000 --- a/home-manager/config/lf/commands/scripts/trash +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -trash_output=$(mktmp); -expected_error_output=$(mktmp); - -while read -r file; do - set -- "$@" "$file" -done < "$(tmp "echo '$fx'")" - -# TODO why are we using trashy at all, when trash-cli can do everything? -# try trashy first, trough nix because both trashy and trash-cli provide a trash command, which conflicts -nix run nixpkgs#trashy -- put "$@" 2> "$trash_output"; - -cat << EOF > "$expected_error_output"; -error: Error during a \`trash\` operation: Unknown { description: "Path: '\"/.Trash-1000\"'. Message: Permission denied (os error 13)" } -EOF - -if [ "$(cat "$expected_error_output")" = "$(cat "$trash_output")" ];then - warning "Deleting with trash-cli to the /.Trash folder"; - # this file could not be trashed because it is on the tempfs volume, trash-cli can do this this - trash-put "$@"; -fi -# vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/unarchive b/home-manager/config/lf/commands/scripts/unarchive deleted file mode 100755 index 69cc601c..00000000 --- a/home-manager/config/lf/commands/scripts/unarchive +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -# extract the current file with the right command -# (xkcd link: https://xkcd.com/1168/) -set -f -# TODO add support for multiple files at once -case "$f" in - *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf "$f";; - *.tar.gz|*.tgz) tar xzvf "$f";; - *.tar.xz|*.txz) tar xJvf "$f";; - *.zip) unzip "$f";; - *.rar) - die "rar is a unfree format!" - #unrar x $f - ;; - *.7z) 7z x "$f";; - *) die "Unsupported format" ;; -esac -# vim: ft=sh diff --git a/home-manager/config/lf/default.nix b/home-manager/config/lf/default.nix deleted file mode 100644 index 9f43a891..00000000 --- a/home-manager/config/lf/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - pkgs, - sysLib, - nixosConfig, - shell_library, - system, - ... -}: let - commands = import ./commands {inherit pkgs sysLib shell_library system;}; - keybindings = import ./keybindings {inherit nixosConfig;}; -in { - xdg.configFile."lf/icons".source = ./icons; - xdg.configFile."lf/colors".source = ./colors; - - # TODO add the systemd tempfile option here - - programs.lf = { - enable = true; - - inherit commands keybindings; - - previewer = { - keybinding = "i"; - source = "${pkgs.ctpv}/bin/ctpv"; - }; - settings = { - # TODO this needs to be added to nixos: - #autoquit = true; # quit the server, if no clients are left - #dirpreviews = true; # preview for directories - - dircounts = true; # count things in directories TODO this has performance impact - drawbox = true; - # errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m"; - errorfmt = "\\033[1;91m%s\\033[0m"; - hidden = true; # show hidden files - icons = true; - ifs = "\\n"; # internal field separator for shell commands - #info = "size"; # show the size of a directory - shell = "sh"; - shellopts = "-eu"; # e: exit on error; u: error for unset variables - }; - # TODO remove auto quit, if it has been added - extraConfig = '' - &${pkgs.ctpv}/bin/ctpv -s $id - cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id - set cleaner ${pkgs.ctpv}/bin/ctpvclear - - # close the server, after the last client exits - set autoquit true - ''; - }; -} diff --git a/home-manager/config/lf/icons b/home-manager/config/lf/icons deleted file mode 100644 index 7ef62a0b..00000000 --- a/home-manager/config/lf/icons +++ /dev/null @@ -1,357 +0,0 @@ -# vim:ft=conf - -# These examples require Nerd Fonts or a compatible font to be used. -# See https://www.nerdfonts.com for more information. - -# default values from lf (with matching order) -# ln l # LINK -# or l # ORPHAN -# tw t # STICKY_OTHER_WRITABLE -# ow d # OTHER_WRITABLE -# st t # STICKY -# di d # DIR -# pi p # FIFO -# so s # SOCK -# bd b # BLK -# cd c # CHR -# su u # SETUID -# sg g # SETGID -# ex x # EXEC -# fi - # FILE - -# file types (with matching order) -ln  # LINK -or  # ORPHAN -tw t # STICKY_OTHER_WRITABLE -ow  # OTHER_WRITABLE # nf-oct-file_directory -st t # STICKY -di  # DIR # nf-oct-file_directory -pi p # FIFO -so s # SOCK -bd b # BLK -cd c # CHR -su u # SETUID -sg g # SETGID -ex  # EXEC -fi  # FILE # nf-fa-file_text_o - -# file extensions (vim-devicons) -*.styl  -*.sass  -*.scss  -*.htm  -*.html  -*.slim  -*.haml  -*.ejs  -*.css  -*.less  -*.md  -*.mdx  -*.markdown  -*.rmd  -*.json  -*.webmanifest  -*.js  -*.mjs  -*.jsx  -*.rb  -*.gemspec  -*.rake  -*.php  -*.py  -*.pyc  -*.pyo  -*.pyd  -*.coffee  -*.mustache  -*.hbs  -*.conf  -*.ini  -*.yml  -*.yaml  -*.toml  -*.bat  -*.mk  -*.jpg  -*.jpeg  -*.bmp  -*.png  -*.webp  -*.gif  -*.ico  -*.twig  -*.cpp  -*.c++  -*.cxx  -*.cc  -*.cp  -*.c  -*.cs 󰌛 -*.h  -*.hh  -*.hpp  -*.hxx  -*.hs  -*.lhs  -*.nix  -*.lua  -*.java  -*.sh  -*.fish  -*.bash  -*.zsh  -*.ksh  -*.csh  -*.awk  -*.ps1  -*.ml λ -*.mli λ -*.diff  -*.db  -*.sql  -*.dump  -*.clj  -*.cljc  -*.cljs  -*.edn  -*.scala  -*.go  -*.dart  -*.xul  -*.sln  -*.suo  -*.pl  -*.pm  -*.t  -*.rss  -'*.f#'  -*.fsscript  -*.fsx  -*.fs  -*.fsi  -*.rs  -*.rlib  -*.d  -*.erl  -*.hrl  -*.ex  -*.exs  -*.eex  -*.leex  -*.heex  -*.vim  -*.ai  -*.psd  -*.psb  -*.ts  -*.tsx  -*.jl  -*.pp  -*.vue  -*.elm  -*.swift  -*.xcplayground  -*.tex 󰙩 -*.r 󰟔 -*.rproj 󰗆 -*.sol 󰡪 -*.pem  - -# file names (vim-devicons) (case-insensitive not supported in lf) -*gruntfile.coffee  -*gruntfile.js  -*gruntfile.ls  -*gulpfile.coffee  -*gulpfile.js  -*gulpfile.ls  -*mix.lock  -*dropbox  -*.ds_store  -*.gitconfig  -*.gitignore  -*.gitattributes  -*.gitlab-ci.yml  -*.bashrc  -*.zshrc  -*.zshenv  -*.zprofile  -*.vimrc  -*.gvimrc  -*_vimrc  -*_gvimrc  -*.bashprofile  -*favicon.ico  -*license  -*node_modules  -*react.jsx  -*procfile  -*dockerfile  -*docker-compose.yml  -*rakefile  -*config.ru  -*gemfile  -*makefile  -*cmakelists.txt  -*robots.txt 󰚩 - -# file names (case-sensitive adaptations) -*Gruntfile.coffee  -*Gruntfile.js  -*Gruntfile.ls  -*Gulpfile.coffee  -*Gulpfile.js  -*Gulpfile.ls  -*Dropbox  -*.DS_Store  -*LICENSE  -*React.jsx  -*Procfile  -*Dockerfile  -*Docker-compose.yml  -*Rakefile  -*Gemfile  -*Makefile  -*CMakeLists.txt  - -# file patterns (vim-devicons) (patterns not supported in lf) -# .*jquery.*\.js$  -# .*angular.*\.js$  -# .*backbone.*\.js$  -# .*require.*\.js$  -# .*materialize.*\.js$  -# .*materialize.*\.css$  -# .*mootools.*\.js$  -# .*vimrc.*  -# Vagrantfile$  - -# file patterns (file name adaptations) -*jquery.min.js  -*angular.min.js  -*backbone.min.js  -*require.min.js  -*materialize.min.js  -*materialize.min.css  -*mootools.min.js  -*vimrc  -Vagrantfile  - -# archives or compressed (extensions from dircolors defaults) -*.tar  -*.tgz  -*.arc  -*.arj  -*.taz  -*.lha  -*.lz4  -*.lzh  -*.lzma  -*.tlz  -*.txz  -*.tzo  -*.t7z  -*.zip  -*.z  -*.dz  -*.gz  -*.lrz  -*.lz  -*.lzo  -*.xz  -*.zst  -*.tzst  -*.bz2  -*.bz  -*.tbz  -*.tbz2  -*.tz  -*.deb  -*.rpm  -*.jar  -*.war  -*.ear  -*.sar  -*.rar  -*.alz  -*.ace  -*.zoo  -*.cpio  -*.7z  -*.rz  -*.cab  -*.wim  -*.swm  -*.dwm  -*.esd  - -# image formats (extensions from dircolors defaults) -*.jpg  -*.jpeg  -*.mjpg  -*.mjpeg  -*.gif  -*.bmp  -*.pbm  -*.pgm  -*.ppm  -*.tga  -*.xbm  -*.xpm  -*.tif  -*.tiff  -*.png  -*.svg  -*.svgz  -*.mng  -*.pcx  -*.mov  -*.mpg  -*.mpeg  -*.m2v  -*.mkv  -*.webm  -*.ogm  -*.mp4  -*.m4v  -*.mp4v  -*.vob  -*.qt  -*.nuv  -*.wmv  -*.asf  -*.rm  -*.rmvb  -*.flc  -*.avi  -*.fli  -*.flv  -*.gl  -*.dl  -*.xcf  -*.xwd  -*.yuv  -*.cgm  -*.emf  -*.ogv  -*.ogx  - -# audio formats (extensions from dircolors defaults) -*.aac  -*.au  -*.flac  -*.m4a  -*.mid  -*.midi  -*.mka  -*.mp3  -*.mpc  -*.ogg  -*.ra  -*.wav  -*.oga  -*.opus  -*.spx  -*.xspf  - -# other formats -*.pdf  diff --git a/home-manager/config/lf/keybindings/default.nix b/home-manager/config/lf/keybindings/default.nix deleted file mode 100644 index bd11f3e3..00000000 --- a/home-manager/config/lf/keybindings/default.nix +++ /dev/null @@ -1,125 +0,0 @@ -{nixosConfig, ...}: { - # Remove some defaults - m = null; - "\"'\"" = null; - "'\"'" = null; - d = null; - c = null; - e = null; - j = null; - k = null; - l = null; - ";" = null; - - # File Openers - ee = "\$\$EDITOR \"$f\""; - u = "%\$IVIEWER \"$f\""; - cc = "\$sudo -e \"$f\""; - - # Archive Mappings - au = "unarchive"; - aa = "archive"; - - # Trash Mappings - dd = "trash"; - jc = "clear_trash"; - jr = "restore_trash"; - - # Broot Mapping - f = "fzf_jump"; - - # Dragon Mapping - dr = "dragon"; - ds = "dragon-stay"; - di = "dragon-individual"; - #dm = "mvdragon"; - #dc = "cpdragon"; - dl = "dlfile"; - - cs = "stripspace"; - - # Vim keys - h = "updir"; - t = "down"; - n = "up"; - s = "open"; - - # Basic Functions - "." = "set hidden!"; - DD = "delete"; - p = "paste"; - x = "cut"; - y = "copy"; - "" = "open"; - - mk = "mk_ln"; - mf = "mk_file"; - md = "mk_dir"; - ms = "mk_scr_default"; - mt = "mk_scr_temp"; - - ch = "chmod"; - bg = "set_wall_paper"; - o = "open_config"; - r = "rename"; - H = "top"; - L = "bottom"; - R = "reload"; - C = "clear"; - U = "unselect"; - - # Movement - gjr = "cd ~/.local/share/Trash/files"; - gus = "cd /run/user/${builtins.toString nixosConfig.users.users.soispha.uid}"; - - "gr." = "cd ~/repos"; - grn = "cd ~/repos/nix"; - grcc = "cd ~/repos/c"; - grcp = "cd ~/repos/cpp"; - grl = "cd ~/repos/lua"; - grr = "cd ~/repos/rust"; - grs = "cd ~/repos/shell"; - grjs = "cd ~/repos/java_script"; - grmd = "cd ~/repos/mark_down"; - grty = "cd ~/repos/typst"; - grte = "cd ~/repos/tex"; - grj = "cd ~/repos/java"; - gra = "cd ~/repos/awk"; - grpy = "cd ~/repos/python"; - grpe = "cd ~/repos/perl"; - grahk = "cd ~/repos/auto_hot_key"; - grh = "cd ~/repos/html"; - # ------------- - "gm." = "cd ~/media"; - gmp = "cd ~/media/pictures"; - gmd = "cd ~/media/downloads"; - gmm = "cd ~/media/music"; - gmi = "cd ~/media/isos"; - # ------------- - "gs." = "cd ~/school"; - gsi = "cd ~/school/infomatik"; - gsc = "cd ~/school/chemie"; - gse = "cd ~/school/english"; - gsgo = "cd ~/school/geographie"; - gsgs = "cd ~/school/geschichte"; - gskr = "cd ~/school/katholische_religion"; - gsmu = "cd ~/school/musik"; - gsma = "cd ~/school/mathematik"; - gsl = "cd ~/school/latein"; - gsd = "cd ~/school/deutsch"; - gsb = "cd ~/school/biologie"; - gsso = "cd ~/school/sozialkunde"; - gssp = "cd ~/school/sport"; - gspy = "cd ~/school/physik"; - gspi = "cd ~/school/philosophie"; - # ------------- - - gc = "cd ~/.config"; - gl = "cd ~/.local"; - gE = "cd /etc"; - - "gU." = "cd /usr"; - gUs = " cd /usr/share"; - - gt = "cd /tmp"; -} diff --git a/home-manager/config/mail/default.nix b/home-manager/config/mail/default.nix deleted file mode 100644 index f934b68c..00000000 --- a/home-manager/config/mail/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - non_public_accounts = import ./non_public_accounts.nix {inherit pkgs;}; - accounts = lib.recursiveUpdate {inherit soispha;} non_public_accounts; - - soispha = { - address = "soispha@vhack.eu"; - userName = "soispha@vhack.eu"; - realName = "Soispha"; - primary = true; - passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup account soispha@vhack.eu"; - aliases = [ - "admin@vhack.eu" - ]; - folders = { - }; - gpg = { - encryptByDefault = true; - key = "9606FC749FCE16360723D4ADA5E94010C3A642AD"; - signByDefault = true; - }; - signature = { - # TODO - }; - neomutt = { - enable = true; - }; - mbsync = { - enable = true; - create = "both"; - }; - himalaya = { - enable = true; - backend = "imap"; - sender = "smtp"; - settings = { - # TODO - }; - }; - smtp = { - host = "server1.vhack.eu"; - port = 465; - }; - imap = { - host = "server1.vhack.eu"; - port = 993; - }; - jmap = { - # TODO - }; - maildir = { - path = "soispha"; - }; - }; -in { - accounts.email = { - maildirBasePath = "${config.xdg.dataHome}/maildir"; - inherit accounts; - }; -} diff --git a/home-manager/config/mail/non_public_accounts.nix b/home-manager/config/mail/non_public_accounts.nix deleted file mode 100644 index edd2f6ba..00000000 Binary files a/home-manager/config/mail/non_public_accounts.nix and /dev/null differ diff --git a/home-manager/config/mako/default.nix b/home-manager/config/mako/default.nix deleted file mode 100644 index e6eb5eb3..00000000 --- a/home-manager/config/mako/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services.mako = { - enable = true; - backgroundColor = "#2e3440"; - borderColor = "#88c0d0"; - borderRadius = 25; - borderSize = 2; - defaultTimeout = 5000; - font = "Source Code Pro 10"; - width = 500; - height = 500; - icons = true; - ignoreTimeout = true; - layer = "overlay"; - markup = true; # TODO - maxIconSize = 64; - sort = "-time"; - extraConfig = '' - [urgency=low] - border-color=#cccccc - - [urgency=normal] - border-color=#d08770 - - [urgency=high] - border-size=3 - border-color=#bf616a - default-timeout=0 - - [urgency=critical] - border-size=4 - border-color=#bf616a - default-timeout=0 - - [category=mpd] - default-timeout=2000 - group-by=category - ''; - }; -} diff --git a/home-manager/config/mbsync/default.nix b/home-manager/config/mbsync/default.nix deleted file mode 100644 index 6be4f57c..00000000 --- a/home-manager/config/mbsync/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - lib, - ... -}: { - # TODO I have no clue if both are needed, but it looks neat, right? - programs.mbsync = { - enable = true; - }; - services.mbsync = { - enable = true; - # TODO enable after isync 1.5 drops - #configFile = "${config.xdg.configHome}/mbsync/mbsync.conf"; - }; - # Disable the timer, and only activate it on neomutt start - systemd.user.timers.mbsync = lib.mkForce {}; -} diff --git a/home-manager/config/mpd/default.nix b/home-manager/config/mpd/default.nix deleted file mode 100644 index bbd345a7..00000000 --- a/home-manager/config/mpd/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - pkgs, - lib, - osConfig, - ... -}: let - dataDir = "${config.xdg.dataHome}/mpd"; - playlistDirectory = "${dataDir}/playlists"; - runtimeDir = "/run/user/${builtins.toString osConfig.users.users.soispha.uid}/mpd"; -in { - systemd.user.services.mpd.Service.ExecStartPre = lib.mkForce '' - ${pkgs.coreutils}/bin/mkdir -p "${dataDir}" "${playlistDirectory}" "${runtimeDir}" - ''; - services.mpd = { - enable = true; - inherit dataDir; - musicDirectory = "~/media/music"; - network = { - listenAddress = "${runtimeDir}/socket"; - }; - extraConfig = '' - metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc,comment" - auto_update "yes" - - audio_output { - type "pipewire" - name "pipewire" - } - #database { - # plugin "simple" - # path "~/.local/share/mpd/db - # cache_directory "~/.local/share/mpd/cache" - #} - - filesystem_charset "UTF-8" - ''; - }; -} diff --git a/home-manager/config/mpd/mpdconf.example b/home-manager/config/mpd/mpdconf.example deleted file mode 100644 index eaa5e641..00000000 --- a/home-manager/config/mpd/mpdconf.example +++ /dev/null @@ -1,418 +0,0 @@ -# An example configuration file for MPD. -# Read the user manual for documentation: http://www.musicpd.org/doc/user/ - - -# Files and directories ####################################################### -# -# This setting controls the top directory which MPD will search to discover the -# available audio files and add them to the daemon's online database. This -# setting defaults to the XDG directory, otherwise the music directory will be -# be disabled and audio files will only be accepted over ipc socket (using -# file:// protocol) or streaming files over an accepted protocol. -# -#music_directory "~/music" -# -# This setting sets the MPD internal playlist directory. The purpose of this -# directory is storage for playlists created by MPD. The server will use -# playlist files not created by the server but only if they are in the MPD -# format. This setting defaults to playlist saving being disabled. -# -#playlist_directory "~/.mpd/playlists" -# -# This setting sets the location of the MPD database. This file is used to -# load the database at server start up and store the database while the -# server is not up. This setting defaults to disabled which will allow -# MPD to accept files over ipc socket (using file:// protocol) or streaming -# files over an accepted protocol. -# -#db_file "~/.mpd/database" - -# These settings are the locations for the daemon log files for the daemon. -# -# The special value "syslog" makes MPD use the local syslog daemon. This -# setting defaults to logging to syslog. -# -# If you use systemd, do not configure a log_file. With systemd, MPD -# defaults to the systemd journal, which is fine. -# -#log_file "~/.mpd/log" - -# This setting sets the location of the file which stores the process ID -# for use of mpd --kill and some init scripts. This setting is disabled by -# default and the pid file will not be stored. -# -# If you use systemd, do not configure a pid_file. -# -#pid_file "~/.mpd/pid" - -# This setting sets the location of the file which contains information about -# most variables to get MPD back into the same general shape it was in before -# it was brought down. This setting is disabled by default and the server -# state will be reset on server start up. -# -#state_file "~/.mpd/state" -# -# The location of the sticker database. This is a database which -# manages dynamic information attached to songs. -# -#sticker_file "~/.mpd/sticker.sql" -# -############################################################################### - - -# General music daemon options ################################################ -# -# This setting specifies the user that MPD will run as. MPD should never run as -# root and you may use this setting to make MPD change its user ID after -# initialization. This setting is disabled by default and MPD is run as the -# current user. -# -#user "nobody" -# -# This setting specifies the group that MPD will run as. If not specified -# primary group of user specified with "user" setting will be used (if set). -# This is useful if MPD needs to be a member of group such as "audio" to -# have permission to use sound card. -# -#group "nogroup" -# -# This setting sets the address for the daemon to listen on. Careful attention -# should be paid if this is assigned to anything other than the default, any. -# This setting can deny access to control of the daemon. Not effective if -# systemd socket activation is in use. -# -# For network -#bind_to_address "any" -# -# And for Unix Socket -#bind_to_address "~/.mpd/socket" -# -# This setting is the TCP port that is desired for the daemon to get assigned -# to. -# -#port "6600" -# -# Suppress all messages below the given threshold. Use "verbose" for -# troubleshooting. Available setting arguments are "notice", "info", "verbose", -# "warning" and "error". -# -#log_level "notice" -# -# Setting "restore_paused" to "yes" puts MPD into pause mode instead -# of starting playback after startup. -# -#restore_paused "no" -# -# This setting enables MPD to create playlists in a format usable by other -# music players. -# -#save_absolute_paths_in_playlists "no" -# -# This setting defines a list of tag types that will be extracted during the -# audio file discovery process. The complete list of possible values can be -# found in the user manual. -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" -# -# This example just enables the "comment" tag without disabling all -# the other supported tags: -#metadata_to_use "+comment" -# -# This setting enables automatic update of MPD's database when files in -# music_directory are changed. -# -#auto_update "yes" -# -# Limit the depth of the directories being watched, 0 means only watch -# the music directory itself. There is no limit by default. -# -#auto_update_depth "3" -# -############################################################################### - - -# Symbolic link behavior ###################################################### -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links outside of the configured music_directory. -# -#follow_outside_symlinks "yes" -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links inside of the configured music_directory. -# -#follow_inside_symlinks "yes" -# -############################################################################### - - -# Zeroconf / Avahi Service Discovery ########################################## -# -# If this setting is set to "yes", service information will be published with -# Zeroconf / Avahi. -# -#zeroconf_enabled "yes" -# -# The argument to this setting will be the Zeroconf / Avahi unique name for -# this MPD server on the network. %h will be replaced with the hostname. -# -#zeroconf_name "Music Player @ %h" -# -############################################################################### - - -# Permissions ################################################################# -# -# If this setting is set, MPD will require password authorization. The password -# setting can be specified multiple times for different password profiles. -# -#password "password@read,add,control,admin" -# -# This setting specifies the permissions a user has who has not yet logged in. -# -#default_permissions "read,add,control,admin" -# -############################################################################### - - -# Database ####################################################################### -# -# An example of a database section instead of the old 'db_file' setting. -# It enables mounting other storages into the music directory. -# -#database { -# plugin "simple" -# path "~/.local/share/mpd/db -# cache_directory "~/.local/share/mpd/cache" -#} -# -# An example of database config for a satellite setup -# -#music_directory "nfs://fileserver.local/srv/mp3" -#database { -# plugin "proxy" -# host "other.mpd.host" -# port "6600" -#} - -# Input ####################################################################### -# -input { - plugin "curl" -# proxy "proxy.isp.com:8080" -# proxy_user "user" -# proxy_password "password" -} - -# -############################################################################### - -# Audio Output ################################################################ -# -# MPD supports various audio output types, as well as playing through multiple -# audio outputs at the same time, through multiple audio_output settings -# blocks. Setting this block is optional, though the server will only attempt -# autodetection for one sound card. -# -# An example of an ALSA output: -# -#audio_output { -# type "alsa" -# name "My ALSA Device" -## device "hw:0,0" # optional -## mixer_type "hardware" # optional -## mixer_device "default" # optional -## mixer_control "PCM" # optional -## mixer_index "0" # optional -#} -# -# An example of an OSS output: -# -#audio_output { -# type "oss" -# name "My OSS Device" -## device "/dev/dsp" # optional -## mixer_type "hardware" # optional -## mixer_device "/dev/mixer" # optional -## mixer_control "PCM" # optional -#} -# -# An example of a shout output (for streaming to Icecast): -# -#audio_output { -# type "shout" -# encoder "vorbis" # optional -# name "My Shout Stream" -# host "localhost" -# port "8000" -# mount "/mpd.ogg" -# password "hackme" -# quality "5.0" -# bitrate "128" -# format "44100:16:1" -## protocol "icecast2" # optional -## user "source" # optional -## description "My Stream Description" # optional -## url "http://example.com" # optional -## genre "jazz" # optional -## public "no" # optional -## timeout "2" # optional -## mixer_type "software" # optional -#} -# -# An example of a recorder output: -# -#audio_output { -# type "recorder" -# name "My recorder" -# encoder "vorbis" # optional, vorbis or lame -# path "/var/lib/mpd/recorder/mpd.ogg" -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -#} -# -# An example of a httpd output (built-in HTTP streaming server): -# -#audio_output { -# type "httpd" -# name "My HTTP Stream" -# encoder "vorbis" # optional, vorbis or lame -# port "8000" -# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -# max_clients "0" # optional 0=no limit -#} -# -# An example of a pulseaudio output (streaming to a remote pulseaudio server) -# -#audio_output { -# type "pulse" -# name "My Pulse Output" -## server "remote_server" # optional -## sink "remote_server_sink" # optional -## media_role "media_role" #optional -#} -# -# An example of a winmm output (Windows multimedia API). -# -#audio_output { -# type "winmm" -# name "My WinMM output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## mixer_type "hardware" # optional -#} -# -# An example of a wasapi output (Windows multimedia API). -# -#audio_output { -# type "wasapi" -# name "My WASAPI output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## Exclusive mode blocks all other audio source, and get best audio quality without resampling. -## exclusive "no" # optional -## Enumerate all devices in log. -## enumerate "no" # optional -#} -# -# An example of an openal output. -# -#audio_output { -# type "openal" -# name "My OpenAL output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -#} -# -# An example of an sndio output. -# -#audio_output { -# type "sndio" -# name "sndio output" -# mixer_type "hardware" -#} -# -# An example of an OS X output: -# -#audio_output { -# type "osx" -# name "My OS X Device" -## device "Built-in Output" # optional -## channel_map "-1,-1,0,1" # optional -#} -# -## Example "pipe" output: -# -#audio_output { -# type "pipe" -# name "my pipe" -# command "aplay -f cd 2>/dev/null" -## Or if you're want to use AudioCompress -# command "AudioCompress -m | aplay -f cd 2>/dev/null" -## Or to send raw PCM stream through PCM: -# command "nc example.org 8765" -# format "44100:16:2" -#} -# -## An example of a null output (for no audio output): -# -#audio_output { -# type "null" -# name "My Null Output" -# mixer_type "none" # optional -#} -# -############################################################################### - - -# Normalization automatic volume adjustments ################################## -# -# This setting specifies the type of ReplayGain to use. This setting can have -# the argument "off", "album", "track" or "auto". "auto" is a special mode that -# chooses between "track" and "album" depending on the current state of -# random playback. If random playback is enabled then "track" mode is used. -# See for -# more details about ReplayGain. -# This setting is off by default. -# -#replaygain "album" -# -# This setting sets the pre-amp used for files that have ReplayGain tags. By -# default this setting is disabled. -# -#replaygain_preamp "0" -# -# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. -# By default this setting is disabled. -# -#replaygain_missing_preamp "0" -# -# This setting enables or disables ReplayGain limiting. -# MPD calculates actual amplification based on the ReplayGain tags -# and replaygain_preamp / replaygain_missing_preamp setting. -# If replaygain_limit is enabled MPD will never amplify audio signal -# above its original level. If replaygain_limit is disabled such amplification -# might occur. By default this setting is enabled. -# -#replaygain_limit "yes" -# -# This setting enables on-the-fly normalization volume adjustment. This will -# result in the volume of all playing audio to be adjusted so the output has -# equal "loudness". This setting is disabled by default. -# -#volume_normalization "no" -# -############################################################################### - -# Character Encoding ########################################################## -# -# If file or directory names do not display correctly for your locale then you -# may need to modify this setting. -# -#filesystem_charset "UTF-8" -# -############################################################################### diff --git a/home-manager/config/mpv/default.nix b/home-manager/config/mpv/default.nix deleted file mode 100644 index 63e36117..00000000 --- a/home-manager/config/mpv/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.mpv = { - enable = true; - # TODO add config - }; -} diff --git a/home-manager/config/mumble/Mumble.conf b/home-manager/config/mumble/Mumble.conf deleted file mode 100644 index 2d895f41..00000000 --- a/home-manager/config/mumble/Mumble.conf +++ /dev/null @@ -1,67 +0,0 @@ -[General] -databaselocation=/home/soispha/.local/share/Mumble/Mumble/mumble.sqlite -lastupdate=3 - -[audio] -headphone=true -input=PipeWire -loudness=1549 -output=PipeWire -quality=72000 -vadmax=@Variant(\0\0\0\x87?Kw\x97) -vadmin=@Variant(\0\0\0\x87?7\x1e\xd4) - -[messages] -10\log=13 -12\log=13 -14\log=13 -15\log=13 -17\log=13 -18\log=13 -19\log=13 -2\log=13 -20\log=13 -21\log=13 -22\log=13 -23\log=13 -25\log=13 -26\log=13 -27\log=13 -28\log=13 -29\log=13 -30\log=13 -31\log=13 -5\log=13 -6\log=13 -9\log=13 -size=32 - -[messagesounds] -size=31 - -[net] -certificate="@ByteArray(0\x82\tX\x2\x1\x3\x30\x82\t\xe\x6\t*\x86H\x86\xf7\r\x1\a\x1\xa0\x82\b\xff\x4\x82\b\xfb\x30\x82\b\xf7\x30\x82\x3\xad\x6\t*\x86H\x86\xf7\r\x1\a\x1\xa0\x82\x3\x9e\x4\x82\x3\x9a\x30\x82\x3\x96\x30\x82\x3\x92\x6\v*\x86H\x86\xf7\r\x1\f\n\x1\x3\xa0\x82\x3+0\x82\x3'\x6\n*\x86H\x86\xf7\r\x1\t\x16\x1\xa0\x82\x3\x17\x4\x82\x3\x13\x30\x82\x3\xf\x30\x82\x1\xf7\xa0\x3\x2\x1\x2\x2\x1\x1\x30\r\x6\t*\x86H\x86\xf7\r\x1\x1\x5\x5\0\x30\x16\x31\x14\x30\x12\x6\x3U\x4\x3\f\vMumble User0\x1e\x17\r230710132716Z\x17\r430705132716Z0\x16\x31\x14\x30\x12\x6\x3U\x4\x3\f\vMumble User0\x82\x1\"0\r\x6\t*\x86H\x86\xf7\r\x1\x1\x1\x5\0\x3\x82\x1\xf\0\x30\x82\x1\n\x2\x82\x1\x1\0\xb3\x8c\xd2\xdbM\x90\xa6\xc7}\xf4\x6X\xf9O\x16Q\x12\xc7\x1\xca\x88\x9c\x96o\xd1\x11\xc1\xc3\xd1/\xb6\x9d\xcfn\xcd\x84\xd2\x1d\xcc\xfcO\xf9\xa4\"\xaa'2\x6\xee[\x3\xd3vx\x84`i@P|\xb8\xc5I\xa8\xa2\b\xc8\0\xbd\xf1\xcc\x63\xbe\x99Zj&\xa5t\xc5\bOr\xc1\xaen\xc7\n\xd2\xcc\xa1\x30\xb8\xe0\0\xe8\xc5\xb6\x86g\x14\x30S\x9d\x8b\xfb\xacP\x7f+\x93}3\xe3\xcbPJ\x86\xf7^Z\xda\x87Z\xfez\xec\xc0\xf7\xe9\x80\xbc\xe2\re@\xe7\x92\x84\xe5\x97\f\x8c\n\x3\x1c\xd1\xbb\x32\xce\xfe\xb6\x1d\xefUYz\xf\xd7,5\x4G\x1f\t\xf7\x43\f?wx\x1a\x12\xd4.I\xbd\xe4G\xea\x33\x9d\xb1\xb0\x62\x45\xcd\xe0\x8b\xe4\x31\x1a\x8c\xedLEyC\xf0\x9f\x32}c\xc9X\x19[\xf7\xfb\xfc\x39\xe0\xd5\x30\x87\xd0\x82:\xb5\x87j]\x9d\xf8\x1b\x4\xb2P \x5/\xb2H\xfa\x42I\x1dN\xa9\xb7\x9a\x91*\x83\xe\x45\xcf\xbe\t\xb5\x36)\xf7\x7f\x1\x43\x2\x3\x1\0\x1\xa3h0f0\f\x6\x3U\x1d\x13\x1\x1\xff\x4\x2\x30\0\x30\x13\x6\x3U\x1d%\x4\f0\n\x6\b+\x6\x1\x5\x5\a\x3\x2\x30\x1d\x6\x3U\x1d\xe\x4\x16\x4\x14\xb9\x41\x19t\x16\x18~\xe8\v\xa9\x9b\x86i\x86\xeP%\xd7\n\xc9\x30\"\x6\t`\x86H\x1\x86\xf8\x42\x1\r\x4\x15\x16\x13Generated by Mumble0\r\x6\t*\x86H\x86\xf7\r\x1\x1\x5\x5\0\x3\x82\x1\x1\0\x91+\r'hS\xc2\x12k\x13O\xb2\"\x85\xd6w\x96\x8a\x97\x46\xee\x95Q\x8b\x8b\t\x8a\xfcH\xab\x30\x1dxV\xc9\xf5\x80\x42;'o\xf1\xd1\xf2\xfb\x18\xe2+\x8d\x39 \xc3\xe\x44\xa9\t\xe2i\x8a\xa7?#\xcd]0\xf4\x1d\x4\a\xd6\x87\x62\xe2\xd8\x34\xb6\xcf\x89\xf2\v\xf1\x8b\xc6\xf8\x8f\x94H/\xfa`\x9d\xb5\xac\x66H\xef\xf4\tJ\xfeHg]!\xed\n\xaf\xa8nd@y\xe8>A\x10\xc4>\xc3\xf7\xe3\xffW\x90T\x87\x94[\x7fg0+p\xdd\x3\x8d\xdb\x80\f?\xe9\xf9l5\xac)z+4R\xbc\xf3\xe1\x82\xde\xc3u\xb2\xa1s\xe2\xbb\xdcpL#|\f\x7f\x93\x30-\x6\t*\x86H\x86\xf7\r\x1\t\x14\x31 \x1e\x1e\0M\0u\0m\0\x62\0l\0\x65\0 \0I\0\x64\0\x65\0n\0t\0i\0t\0y0\x82\x5\x42\x6\t*\x86H\x86\xf7\r\x1\a\x1\xa0\x82\x5\x33\x4\x82\x5/0\x82\x5+0\x82\x5'\x6\v*\x86H\x86\xf7\r\x1\f\n\x1\x1\xa0\x82\x4\xc0\x30\x82\x4\xbc\x2\x1\0\x30\r\x6\t*\x86H\x86\xf7\r\x1\x1\x1\x5\0\x4\x82\x4\xa6\x30\x82\x4\xa2\x2\x1\0\x2\x82\x1\x1\0\xb3\x8c\xd2\xdbM\x90\xa6\xc7}\xf4\x6X\xf9O\x16Q\x12\xc7\x1\xca\x88\x9c\x96o\xd1\x11\xc1\xc3\xd1/\xb6\x9d\xcfn\xcd\x84\xd2\x1d\xcc\xfcO\xf9\xa4\"\xaa'2\x6\xee[\x3\xd3vx\x84`i@P|\xb8\xc5I\xa8\xa2\b\xc8\0\xbd\xf1\xcc\x63\xbe\x99Zj&\xa5t\xc5\bOr\xc1\xaen\xc7\n\xd2\xcc\xa1\x30\xb8\xe0\0\xe8\xc5\xb6\x86g\x14\x30S\x9d\x8b\xfb\xacP\x7f+\x93}3\xe3\xcbPJ\x86\xf7^Z\xda\x87Z\xfez\xec\xc0\xf7\xe9\x80\xbc\xe2\re@\xe7\x92\x84\xe5\x97\f\x8c\n\x3\x1c\xd1\xbb\x32\xce\xfe\xb6\x1d\xefUYz\xf\xd7,5\x4G\x1f\t\xf7\x43\f?wx\x1a\x12\xd4.I\xbd\xe4G\xea\x33\x9d\xb1\xb0\x62\x45\xcd\xe0\x8b\xe4\x31\x1a\x8c\xedLEyC\xf0\x9f\x32}c\xc9X\x19[\xf7\xfb\xfc\x39\xe0\xd5\x30\x87\xd0\x82:\xb5\x87j]\x9d\xf8\x1b\x4\xb2P \x5/\xb2H\xfa\x42I\x1dN\xa9\xb7\x9a\x91*\x83\xe\x45\xcf\xbe\t\xb5\x36)\xf7\x7f\x1\x43\x2\x3\x1\0\x1\x2\x82\x1\0\x4\xd6\xf2\x66\v\xe0\xae\xc6(\xccw\x91Ub\xfe\xd8\x7f\x97\x92\xa2Imc\x16\xaf}y\x8a\x14,\xe3\x90\xbc\x63!\xb2\aQ\xdbQ\x1f\xbc\xbc\x62\\\xd0\xc2\xa5\xf2-\xcc\xdc\x19\xd0\xe4\xcc\x8ey\xb7\xd1\xac\xcfP\x8du\x94\xa4\x3u\x1b;\xe5\xa2\x61\x12\xd1R\xaaZ\v\xe7\x8d\xf0\xabl\xce\xba\x99\xbd\x95\xdbpkCJr\xfb\xc5P9\x1e\xf\xb1iI9&\xeb\x62\x8a#\xa7\x17\xcbw\x92\xf9\xf7JZ\xa6;F\xb3\xba\xb1H\x89]uU7\x1e\xd7\xf6U`\x8d\xa1\x1aG7\x11\x31\xbf\xf4\xdb\x32\x63\xbf\x3\xad&h\x82\x9b\xe7\x19/\xf6\r\x8c\x89\xc6\xd0\x1d\0\x87\t|\xc0\xf2\x8f\xbb\x87_8{\xf2\xc7\x8a\x34)\xe3\xf1\xcc(\xf4\xee\xeb($\x5\x84\xaf\x1\xaa\xf7\xff\x9b\x15h\x2y\xb3\x91\xba,Oq\xc9$\x81\x11Zg\xc4I3\v\xeay\f\xf0\x33\xc6p\xea\xc6\x9d\xac\xaa\xedp\xa7!\xcbHf5\xa0i\xbdo@\xb8![\x7f\xea\xad\x6\x31p\x81\x61\x2\x81\x81\0\xdc\x8d}{\xc3\x31\xb6(F\xc5\x36\x9b\xba\x66\xb1\xce\r_\x90\xc6\x1f\x87\x37\x84m\xd1\a8\xc0\v9\xe0\x8bm\xaf\x64\xbe\x81\xa8\xe7\xaf\x19\x43,vj\xaf!9rz\x87\"\xca\xbf\xcf\x16\x88\x46t\xbd\x12\xaa;\xf4x_\x1b\xb3\x90\b\xb6\xf6\xec\x1f\x95\x62\xac\xfa\x1b\xae\xa2\xa7oA\x9bhOW\xa8\x44\\\xadz T\xe3\x43\x46\x99\x98\xb4{*\"\xdb\xd9\xc8\xd2\x15\n4\"\x8d\x96$\x17\xfd^\xf7\x84\x93\x7fw{o\0\xe1\x2\x81\x81\0\xd0hNA\xc3\x9e\x93&iq\x1dQ\xb6\xc6\x1c\x32\xf3\xfc c&Y\xe7|\xbeq2P\xe1\xdb\x97\xf8\x9fI(\x98\x9d\xf1\xfe\xb6\xf\x90\xa5\xebi>\x14\x6\xd8.\xf4\xce\x86\x9d*\x87 \xf9X\x4\xdcZ\xf9g\x3\x98H{\xdf\x66\xde\xd6zr\xecG_\x14t\x1dm%P\xe5\xea\x8e\x6\xa2. \xa1\xd7\xd7W]\xdd\x15\x6\xcf+/\x11\vel\xd3\xe8\xc3/\xbc\x1f\xc3n\xd4\xb8\x62j\xf5\xc0\xc0\x89\xe3z\xb8\x36\xd5\xb2\xa3\x2\x81\x80z`W\xdc\x30\x36\x89(W\xfc]\x8c\x93% K\x80\xc8\"\0\x8c\xc5\xee\\ \xc2\xf7\n\xda$`|\xe3`}\r\x9dWV\xa8\0\xc9\xcd\xd2\xc4\f\xe4\x8d%k+\x16\xbc.\n\xf7\x44\x9d\xd6\xfc\x1a\x88\x8a\xdd\x11J\xd9\xc4%\xe6g\xd8\xbc.\xe2\x11/J\x81\x2\x81\x80\x63;W\xf\xbf:1,\x98\x6\x31\x4\xa8wz\x13\xd4\xd2\x97\x5>\xcc\x8e\tz\x90\x61y\xdb\xa0\xf8\xa2|\r\x94\x93\xde\x98\xcc\x44\x19\xf3\x30\xdd\x7fu\xfc\x89)\xc4i\xf2\x30l\x83\x44\x66\x31\xf3t\x15\f\b6\xc1\xa2o\xd8\xf3\x8d\x82\xcb\x32\xf0\xa7\x8ap>G\xef~\xf9\xc6\xa4\x42\xe3\xafJ\xe7\x95\xc8\x1a\x2\xc1\xe9\xc2\x8b\xf1{\x11?\xce\xe8\xd3\x39WI<.\xedo^Y\xd6U\x99\x1e\xfe\xb6\xf1\xb6v'\a\xb1\xac\\\xeb\x2\x81\x80@\x19\xc4\x32&\xcb\xc1\xca\x10K\xdf\x45\xf9\xf\x1d\x85\x39\x65\xdc\x33\x45\xbe\xac\x97~;\xe2m-\xd6\x9b\x82\x1\xbd\x90'W\xf5\xf5\xce\x35\xd7\xb4\xcdidTiP\\-vG+`\xb5u\xb7\x14\x44\xe1\xd9\xd3\r\x81\xb0GL\xe1U\xe3\xf0\xaa\xd1\x8f\xc6\"\xa5S\xb6\xbf\x4\x1a\xc4\xe0|\x8d\xa2+y(-\xad\ty\xd5\xe2g\xd3\x8c\xcdl\x96g3\xfe\x80\xb7|b[\xca\xb2\xbf\x61\xf7\x9c\x65\x30\x61\xa0\x35\xf6W\xb4\xcc\xdd\x34\x31T0#\x6\t*\x86H\x86\xf7\r\x1\t\x15\x31\x16\x4\x14\x9f\xdc\xf9\x38\xc2\x8a\x1c\xfe\x6}\xf6\x64\x62>L#|\f\x7f\x93\x30-\x6\t*\x86H\x86\xf7\r\x1\t\x14\x31 \x1e\x1e\0M\0u\0m\0\x62\0l\0\x65\0 \0I\0\x64\0\x65\0n\0t\0i\0t\0y0A010\r\x6\t`\x86H\x1\x65\x3\x4\x2\x1\x5\0\x4 Fm\xb6/lL\x18\x1b!\xfa+x\xb5\xd9?GrR\xb7\xd3\x90\xc1N)L\x9c\xc7')\xe^\xbe\x4\b\x8b\x2\xb2\xb2\x97\b\x8a\xf6\x2\x2\b\0)" -framesperpacket=1 - -[overlay] -blacklist=@Invalid() -blacklistexclude=@Invalid() -launchers=@Invalid() -launchersexclude=@Invalid() -paths=@Invalid() -pathsexclude=@Invalid() -version=1.4.0 -whitelist=@Invalid() -whitelistexclude=@Invalid() - -[shortcuts] -size=0 - -[ui] -HighContrast=true -connect\geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\f=\0\0\x1m\0\0\n\0\0\0\0\0\0\0\f=\0\0\x1m\0\0\0\x1\x2\0\0\0\a\x80\0\0\n\0\0\0\0\0\0\0\f=\0\0\x1m)" -connect\header=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2&\0\0\0\x3\x1\x1\0\0\0\0\0\0\x1\0\0\0\x2\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x3\0\0\x1w\0\0\0\x1\0\0\0\x1\0\0\0S\0\0\0\x1\0\0\0\x3\0\0\0\\\0\0\0\x1\0\0\0\x3\0\0\x3\xe8\0\0\0\0\x64) -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\r\xb9\0\0\x3\xfa\0\0\n\0\0\0\0\0\0\0\f\xde\0\0\x1\xb2\0\0\0\x1\x2\0\0\0\a\x80\0\0\n\0\0\0\0\0\0\0\r\xb9\0\0\x3\xfa) -header=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2\xb0\0\0\0\x1\x1\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x1\0\0\x2\xb0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64) -server=mumble.vhack.eu -state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\0\0\0\x1\0\0\0\x3\xbd\xfc\x2\0\0\0\x2\xfb\0\0\0\f\0q\0\x64\0w\0L\0o\0g\x1\0\0\0>\0\0\x3\xa0\0\0\0z\0\xff\xff\xff\xfb\0\0\0\xe\0q\0\x64\0w\0\x43\0h\0\x61\0t\x1\0\0\x3\xe2\0\0\0\x19\0\0\0\x19\0\0\0\x19\0\0\x2\xb6\0\0\x3\xbd\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x1a\0q\0t\0I\0\x63\0o\0n\0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) diff --git a/home-manager/config/mumble/default.nix b/home-manager/config/mumble/default.nix deleted file mode 100644 index 6fa524dc..00000000 --- a/home-manager/config/mumble/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - xdg.configFile."Mumble/Mumble.conf".source = ./Mumble.conf; -} diff --git a/home-manager/config/neomutt/default.nix b/home-manager/config/neomutt/default.nix deleted file mode 100644 index e4fbcb39..00000000 --- a/home-manager/config/neomutt/default.nix +++ /dev/null @@ -1,168 +0,0 @@ -{pkgs, ...}: { - programs.neomutt = { - enable = true; - package = pkgs.writeShellScriptBin "neomutt" '' - systemctl --user start mbsync.service; - ${pkgs.neomutt}/bin/neomutt; - ''; - vimKeys = false; # see the modified ones below - checkStatsInterval = 60; - binds = [ - #------------------------------------------------------------ - # Vi Key Bindings (taken from their configuration, modified for dvorak) - #------------------------------------------------------------ - - # Moving around - { - action = "noop"; - key = "g"; - map = ["attach" "browser" "index"]; - } - { - action = "first-entry"; - key = "gg"; - map = ["attach" "browser" "index"]; - } - { - action = "last-entry"; - key = "G"; - map = ["attach" "browser" "index"]; - } - { - action = "noop"; - key = "g"; - map = ["pager"]; - } - { - action = "top"; - key = "gg"; - map = ["pager"]; - } - { - action = "bottom"; - key = "G"; - map = ["pager"]; - } - { - action = "previous-line"; - key = "n"; - map = ["pager"]; - } - { - action = "next-line"; - key = "t"; - map = ["pager"]; - } - - # Scrolling - { - action = "next-page"; - key = "\\CF"; - map = ["attach" "browser" "pager" "index"]; - } - { - action = "previous-page"; - key = "\\CB"; - map = ["attach" "browser" "pager" "index"]; - } - { - action = "half-up"; - key = "\\Cu"; - map = ["attach" "browser" "pager" "index"]; - } - { - action = "half-down"; - key = "\\Cd"; - map = ["attach" "browser" "pager" "index"]; - } - { - action = "next-line"; - key = "\\Ce"; - map = ["browser" "pager"]; - } - { - action = "previous-line"; - key = "\\Cy"; - map = ["browser" "pager"]; - } - { - action = "next-line"; - key = "\\Ce"; - map = ["index"]; - } - { - action = "previous-line"; - key = "\\Cy"; - map = ["index"]; - } - - { - action = "noop"; - key = "d"; - map = ["pager" "index"]; - } - { - action = "delete-message"; - key = "dd"; - map = ["pager" "index"]; - } - - # Mail & Reply - { - # Doesn't work currently - action = "list-reply"; - key = "\\Cm"; - map = ["index"]; - } - - # Threads - { - action = "search-opposite"; - key = "N"; - map = ["browser" "pager" "index"]; - } - { - action = "delete-thread"; - key = "dT"; - map = ["pager" "index"]; - } - { - action = "delete-subthread"; - key = "dt"; - map = ["pager" "index"]; - } - { - action = "next-thread"; - key = "gt"; - map = ["pager" "index"]; - } - { - action = "previous-thread"; - key = "gT"; - map = ["pager" "index"]; - } - { - action = "collapse-thread"; - key = "za"; - map = ["index"]; - } - { - # Missing: folddisable/foldenable - action = "collapse-all"; - key = "zA"; - map = ["index"]; - } - - { - action = "search-next"; - key = "l"; - map = ["index"]; - } - { - action = "limit"; - key = "f"; - map = ["index"]; - } - ]; - }; -} diff --git a/home-manager/config/neovim/default.nix b/home-manager/config/neovim/default.nix deleted file mode 100644 index c84b6aaa..00000000 --- a/home-manager/config/neovim/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - config, - pkgs, - neovim_config, - ... -}: { - xdg.configFile."nvim".source = neovim_config; -} diff --git a/home-manager/config/nheko/default.nix b/home-manager/config/nheko/default.nix deleted file mode 100644 index fd147c0b..00000000 --- a/home-manager/config/nheko/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - nixosConfig, - lib, - ... -}: { - config = lib.mkIf nixosConfig.soispha.secrets.enable { - xdg.configFile."nheko/nheko.conf".source = config.lib.file.mkOutOfStoreSymlink nixosConfig.age.secrets.nheko.path; - programs.nheko = { - enable = true; - }; - }; -} diff --git a/home-manager/config/npm/.npmrc b/home-manager/config/npm/.npmrc deleted file mode 100644 index d0d846bd..00000000 --- a/home-manager/config/npm/.npmrc +++ /dev/null @@ -1,6 +0,0 @@ -scripts-prepend-node-path=true -node_gyp= -prefix=${XDG_DATA_HOME}/npm -cache=${XDG_CACHE_HOME}/npm -tmp=${XDG_RUNTIME_DIR}/npm -init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js diff --git a/home-manager/config/npm/default.nix b/home-manager/config/npm/default.nix deleted file mode 100644 index 7b4bb6a1..00000000 --- a/home-manager/config/npm/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."npm/.npmrc".source = ./.npmrc; -} diff --git a/home-manager/config/python/default.nix b/home-manager/config/python/default.nix deleted file mode 100644 index eeaccdcf..00000000 --- a/home-manager/config/python/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."python/pythonrc".source = ./pythonrc; -} diff --git a/home-manager/config/python/pythonrc b/home-manager/config/python/pythonrc deleted file mode 100644 index 38c48e0f..00000000 --- a/home-manager/config/python/pythonrc +++ /dev/null @@ -1,11 +0,0 @@ -import os -import atexit -import readline - -history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history') -readline.read_history_file(history) - -def write_history(): - readline.write_history_file(history) - -atexit.register(write_history) diff --git a/home-manager/config/rclone/default.nix b/home-manager/config/rclone/default.nix deleted file mode 100644 index bd0c1ac2..00000000 --- a/home-manager/config/rclone/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."rclone/rclone.conf".source = ./rclone.conf; -} diff --git a/home-manager/config/rclone/rclone.conf b/home-manager/config/rclone/rclone.conf deleted file mode 100644 index 9e1c4f08..00000000 --- a/home-manager/config/rclone/rclone.conf +++ /dev/null @@ -1,10 +0,0 @@ -[vhack1] -type = sftp -host = server1.vhack.eu -user = soispha -key_use_agent = true -known_hosts_file = ~/.local/share/ssh/known_hosts -shell_type = unix -md5sum_command = md5sum -sha1sum_command = sha1sum - diff --git a/home-manager/config/ssh/default.nix b/home-manager/config/ssh/default.nix deleted file mode 100644 index 7160adac..00000000 --- a/home-manager/config/ssh/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{config, ...}: { - programs.ssh = { - enable = true; - compression = true; - hashKnownHosts = false; - serverAliveInterval = 240; - userKnownHostsFile = "${config.xdg.dataHome}/ssh/known_hosts"; - matchBlocks = { - "codeberg.org" = { - # TODO: Remove this once they fix their ipv6 config - addressFamily = "inet"; - }; - }; - }; -} diff --git a/home-manager/config/swayidle/config b/home-manager/config/swayidle/config deleted file mode 100644 index 8ba07850..00000000 --- a/home-manager/config/swayidle/config +++ /dev/null @@ -1,5 +0,0 @@ -timeout 180 'swaylock -fFu' - -timeout 360 'systemctl suspend-then-hibernate' - -before-sleep 'swaylock -f' diff --git a/home-manager/config/swayidle/default.nix b/home-manager/config/swayidle/default.nix deleted file mode 100644 index 073498a7..00000000 --- a/home-manager/config/swayidle/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."swayidle/config".source = ./config; - - # services.swayidle = { - # enable = true; - # events = [ - # { - # event = "before-sleep"; - # command = "${pkgs.swaylock}/bin/swaylock -f "; - # } - # ]; - # timeouts = [ - # { - # timeout = 180; - # command = "${pkgs.swaylock}/bin/swaylock -fFu "; - # } - # { - # timeout = 360; - # # TODO systemctl is installed? - # command = "systemctl suspend-then-hibernate"; - # } - # ]; - # # systemdTarget = ""; # TODO this might be usefull - # }; -} diff --git a/home-manager/config/swaylock/commands.jpg b/home-manager/config/swaylock/commands.jpg deleted file mode 100644 index 54016503..00000000 Binary files a/home-manager/config/swaylock/commands.jpg and /dev/null differ diff --git a/home-manager/config/swaylock/default.nix b/home-manager/config/swaylock/default.nix deleted file mode 100644 index 7c3762cc..00000000 --- a/home-manager/config/swaylock/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{...}: { - programs.swaylock = { - enable = true; - settings = { - #image = "$WALLPAPER"; - image = "${./commands.jpg}"; - color = "000000"; - }; - }; -} diff --git a/home-manager/config/swaylock/gnu.png b/home-manager/config/swaylock/gnu.png deleted file mode 100644 index d07dee3e..00000000 Binary files a/home-manager/config/swaylock/gnu.png and /dev/null differ diff --git a/home-manager/config/yambar/config/config.yml b/home-manager/config/yambar/config/config.yml deleted file mode 100644 index bb742fd3..00000000 --- a/home-manager/config/yambar/config/config.yml +++ /dev/null @@ -1,234 +0,0 @@ ---- -# Config file for yambar -# Note that this may be version-dependent, this file is written for v1.8.0 - - -# Font anchors -font-main: &fontmain Source Code Pro:pixelsize=26 -font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=23 - -# Color anchors -fg-none: &fgnone 00000000 -fg-1: &fg1 c6ceefff -fg-blue: &fgblue 99d1dbff -fg-sapphire: &fgsapp 74c7ecdd -fg-green: &fggreen a6e3a1dd -fg-peach: &fgpeach fab387dd -fg-mauve: &fgmauve cba6f7dd -fg-teal: &fgteal 94e2d5dd -fg-lavendar: &fglav b4befedd -fg-focus: &fgfocus e78284ff -bg-1: &bg1 303446ff -bg-tag: &bgtag 585b70ff -bg-tag2: &bgtag2 45475aff -bg-urgent: &bgurgent e78284ff - -# Background blocks -background-block: &bgcblock {background: {color: *bg1 }} -background-block-urgent: &bgcurg {background: {color: *bgurgent }} - -# Underlines -underline-focused: &line {underline: { size: 3, color: *fgfocus}} -underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} -underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} -underline-resources: &linemem {underline: { size: 3, color: *fggreen}} -underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} -underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} -underline-weather: &linewea {underline: { size: 3, color: *fglav}} -underline-title: &linetitle {underline: { size: 3, color: *bgtag}} - -# Combined decorations -combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} -combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} -combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} -combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} -combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} - - -### Main - -bar: - location: top - height: 45 - layer: bottom - spacing: 0 - margin: 10 - border: {margin: 0, top-margin: 10} - foreground: *fg1 - background: *fgnone - font: *fontmain - - ### Left, river tags - left: - - river: - anchors: - - id: &name { text: "{id}" } - - string: &focus { stack: [ {background: {color: *bg1}} ] } - - string: &normal { string: { <<: *name, margin: 10 } } - - string: - &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } - - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } - - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - base: &river_base - default: *normal - conditions: - state == focused: *focused - state == unfocused: *unfocused - state == urgent: *urgent - state == invisible: - map: - conditions: - occupied: *occupied - ~occupied: *normal - content: - map: - on-click: - left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" - right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" - middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" - conditions: - id == 1: { map: { <<: *river_base } } - id == 2: { map: { <<: *river_base } } - id == 3: { map: { <<: *river_base } } - id == 4: { map: { <<: *river_base } } - id == 5: { map: { <<: *river_base } } - id == 6: { map: { <<: *river_base } } - id == 7: { map: { <<: *river_base } } - id == 8: { map: { <<: *river_base } } - id == 9: { map: { <<: *river_base } } - title: - map: - default: - { - string: - { - text: "{title}", - left-margin: 12, - right-margin: 12, - # max: 35, - deco: *linetitle - }, - } - conditions: - title == "": { string: { text: "" } } - - ### Center, clock & weather gadget - center: - - clock: - time-format: "%H:%M:%S %Z" - date-format: "%d/%m/%y (%a)" - foreground: *fgblue - content: - string: - text: " {date} {time} " - deco: *combclock - - ### Right, system tray - right: - #- network: - # name: wlp5s0 - # poll-interval: 10 - # content: - # map: - # on-click: /bin/sh -c "nmtui" - # conditions: - # ~carrier: {empty: {}} - # carrier: - # string: {text: "  {ssid} ", deco: *combutil} - #- network: - # name: enp4s0 - # content: - # map: - # on-click: /bin/sh -c "nmtui" - # conditions: - # ~carrier: - # string: {text: "  Eth failed ", deco: *combutil} - # carrier: {empty: {}} - - - script: # Sound volume - path: @volume_script@ - content: - map: - on-click: /bin/sh -c "pavucontrol" - conditions: - muted: - string: - text: " ﱝ " - deco: *bgcurg - ~muted: - string: {text: "  {volume}% ", deco: *combutil} - - - script: # Grade average - path: @grade_average_script@ - content: - string: - text: "  {grade} " - deco: *combmem - - #- backlight: - # name: intel_backlight - # content: - # - string: {text: "  {percent}% ", deco: *combutil} - - - script: # CPU - path: @cpu_script@ - content: - string: - text: "  {cpu}% " - deco: *combmem - - - script: # Memory info - path: @memory_script@ - content: - map: - conditions: - swapstate: - string: - text: "  {memperc}%({swapperc}%) " - deco: *combmem - ~swapstate: - string: - text: "  {memperc}% " - deco: *combmem - - script: # Disk space - path: @disk_script@ - content: - string: - text: "  {diskspace}({diskperc})" - deco: *combmem - #- battery: - # name: BAT0 - # poll-interval: 30 - # content: - # list: - # items: - # - ramp: - # tag: capacity - # items: - # - string: - # text: "  {capacity}%({estimate}) " - # deco: *bgcurg - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - #- script: # tray - # path: /home/dt/.config/yambar/scripts/yambar-tray - # content: - # empty: {} - #- script: - # path: /home/dt/.config/yambar/scripts/yambar-tray-width - # poll-interval: 10 - # content: - # string: - # text: "{padding}" - # deco: *combmem diff --git a/home-manager/config/yambar/config/laptop.yml b/home-manager/config/yambar/config/laptop.yml deleted file mode 100644 index 1c169820..00000000 --- a/home-manager/config/yambar/config/laptop.yml +++ /dev/null @@ -1,234 +0,0 @@ ---- -# Config file for yambar -# Note that this may be version-dependent, this file is written for v1.8.0 - - -# Font anchors -font-main: &fontmain Source Code Pro:pixelsize=22 -font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=20 - -# Color anchors -fg-none: &fgnone 00000000 -fg-1: &fg1 c6ceefff -fg-blue: &fgblue 99d1dbff -fg-sapphire: &fgsapp 74c7ecdd -fg-green: &fggreen a6e3a1dd -fg-peach: &fgpeach fab387dd -fg-mauve: &fgmauve cba6f7dd -fg-teal: &fgteal 94e2d5dd -fg-lavendar: &fglav b4befedd -fg-focus: &fgfocus e78284ff -bg-1: &bg1 303446ff -bg-tag: &bgtag 585b70ff -bg-tag2: &bgtag2 45475aff -bg-urgent: &bgurgent e78284ff - -# Background blocks -background-block: &bgcblock {background: {color: *bg1 }} -background-block-urgent: &bgcurg {background: {color: *bgurgent }} - -# Underlines -underline-focused: &line {underline: { size: 3, color: *fgfocus}} -underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} -underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} -underline-resources: &linemem {underline: { size: 3, color: *fggreen}} -underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} -underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} -underline-weather: &linewea {underline: { size: 3, color: *fglav}} -underline-title: &linetitle {underline: { size: 3, color: *bgtag}} - -# Combined decorations -combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} -combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} -combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} -combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} -combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} - - -### Main - -bar: - location: top - height: 25 - layer: bottom - spacing: 0 - margin: 10 - border: {margin: 0, top-margin: 5} - foreground: *fg1 - background: *fgnone - font: *fontmain - - ### Left, river tags - left: - - river: - anchors: - - id: &name { text: "{id}" } - - string: &focus { stack: [ {background: {color: *bg1}} ] } - - string: &normal { string: { <<: *name, margin: 10 } } - - string: - &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } - - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } - - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - base: &river_base - default: *normal - conditions: - state == focused: *focused - state == unfocused: *unfocused - state == urgent: *urgent - state == invisible: - map: - conditions: - occupied: *occupied - ~occupied: *normal - content: - map: - on-click: - left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" - right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" - middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" - conditions: - id == 1: { map: { <<: *river_base } } - id == 2: { map: { <<: *river_base } } - id == 3: { map: { <<: *river_base } } - id == 4: { map: { <<: *river_base } } - id == 5: { map: { <<: *river_base } } - id == 6: { map: { <<: *river_base } } - id == 7: { map: { <<: *river_base } } - id == 8: { map: { <<: *river_base } } - id == 9: { map: { <<: *river_base } } - title: - map: - default: - { - string: - { - text: "{title}", - left-margin: 12, - right-margin: 12, - # max: 35, - deco: *linetitle - }, - } - conditions: - title == "": { string: { text: "" } } - - ### Center, clock & weather gadget - center: - - clock: - time-format: "%H:%M:%S %Z" - date-format: "%d/%m/%y (%a)" - foreground: *fgblue - content: - string: - text: " {date} {time} " - deco: *combclock - - ### Right, system tray - right: - #- network: - # name: wlp5s0 - # poll-interval: 10 - # content: - # map: - # on-click: /bin/sh -c "nmtui" - # conditions: - # ~carrier: {empty: {}} - # carrier: - # string: {text: "  {ssid} ", deco: *combutil} - #- network: - # name: enp4s0 - # content: - # map: - # on-click: /bin/sh -c "nmtui" - # conditions: - # ~carrier: - # string: {text: "  Eth failed ", deco: *combutil} - # carrier: {empty: {}} - - - script: # Sound volume - path: @volume_script@ - content: - map: - on-click: /bin/sh -c "pavucontrol" - conditions: - muted: - string: - text: " ﱝ " - deco: *bgcurg - ~muted: - string: {text: "  {volume}% ", deco: *combutil} - - - script: # Grade average - path: @grade_average_script@ - content: - string: - text: "  {grade} " - deco: *combmem - - - backlight: - name: @backlight@ - content: - - string: {text: "  {percent}% ", deco: *combutil} - - - script: # CPU - path: @cpu_script@ - content: - string: - text: "  {cpu}% " - deco: *combmem - - - script: # Memory info - path: @memory_script@ - content: - map: - conditions: - swapstate: - string: - text: "  {memperc}%({swapperc}%) " - deco: *combmem - ~swapstate: - string: - text: "  {memperc}% " - deco: *combmem - - script: # Disk space - path: @disk_script@ - content: - string: - text: "  {diskspace}({diskperc})" - deco: *combmem - - battery: - name: BAT0 - poll-interval: 30 - content: - list: - items: - - ramp: - tag: capacity - items: - - string: - text: "  {capacity}%({estimate}) " - deco: *bgcurg - - string: - text: "  {capacity}%({estimate}) " - deco: {stack: [ <<: *bgcblock, <<: *linebat]} - - string: - text: "  {capacity}%({estimate}) " - deco: {stack: [ <<: *bgcblock, <<: *linebat]} - - string: - text: "  {capacity}%({estimate}) " - deco: {stack: [ <<: *bgcblock, <<: *linebat]} - - string: - text: "  {capacity}%({estimate}) " - deco: {stack: [ <<: *bgcblock, <<: *linebat]} - #- script: # tray - # path: /home/dt/.config/yambar/scripts/yambar-tray - # content: - # empty: {} - #- script: - # path: /home/dt/.config/yambar/scripts/yambar-tray-width - # poll-interval: 10 - # content: - # string: - # text: "{padding}" - # deco: *combmem diff --git a/home-manager/config/yambar/default.nix b/home-manager/config/yambar/default.nix deleted file mode 100644 index 0bcf8419..00000000 --- a/home-manager/config/yambar/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ - nixosConfig, - sysLib, - system, - pkgs, - grades, - yambar_cpu, - yambar_memory, - ... -}: let - makeScript = { - file, - dependencies, - ... - }: - sysLib.writeShellScriptWithLibrary { - name = "${builtins.baseNameOf file}"; - src = file; - dependencies = dependencies ++ (builtins.attrValues {inherit (pkgs) dash;}); - } - + "/bin/${builtins.baseNameOf file}"; -in { - xdg.configFile."yambar/config.yml".source = pkgs.substituteAll { - src = - if nixosConfig.soispha.laptop.enable - then ./config/laptop.yml - else ./config/config.yml; - - backlight = - if nixosConfig.soispha.laptop.enable - then nixosConfig.soispha.laptop.backlight - else ""; - volume_script = makeScript { - dependencies = builtins.attrValues {inherit (pkgs) pulseaudio gawk coreutils;}; - file = ./scripts/sound-volume; - }; - grade_average_script = makeScript { - dependencies = - [ - grades.outputs.packages.${system}.default - ] - ++ (builtins.attrValues {inherit (pkgs) coreutils gawk;}); - file = ./scripts/grades-average; - }; - cpu_script = yambar_cpu.app.${system}.default.program; - memory_script = yambar_memory.app.${system}.default.program; - - disk_script = makeScript { - dependencies = builtins.attrValues {inherit (pkgs) gawk btrfs-progs coreutils;}; - file = ./scripts/disk; - }; - }; -} diff --git a/home-manager/config/yambar/scripts/disk b/home-manager/config/yambar/scripts/disk deleted file mode 100755 index 83b23ad9..00000000 --- a/home-manager/config/yambar/scripts/disk +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -# Main loop -while true; do - # vars - used_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1) - all_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB") - - - # Check space available (4) and percentage used (5) - spaceperc=$(echo "$(echo "$used_space" | tr -d "GiB" )" "$all_space" | awk '{div=$1/$2;div *= 100; printf"%2d%%\n",div }') - - echo "diskspace|string|$used_space" - echo "diskperc|string|$spaceperc" - echo "" - sleep 1 -done - -# vim: ft=sh diff --git a/home-manager/config/yambar/scripts/grades-average b/home-manager/config/yambar/scripts/grades-average deleted file mode 100755 index 20de5684..00000000 --- a/home-manager/config/yambar/scripts/grades-average +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -while true; do - grade="$(grades list average | awk '{print $2}')"; - - echo "grade|string|$grade"; - echo ""; - - sleep 1; -done - -# vim: ft=sh diff --git a/home-manager/config/yambar/scripts/network b/home-manager/config/yambar/scripts/network deleted file mode 100755 index 8e02d6dc..00000000 --- a/home-manager/config/yambar/scripts/network +++ /dev/null @@ -1,47 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -retest=120 -retest_if_con_fails=10 -backend=nmcli - -case "$backend" in - "nmcli") # Test for connectivity with nmcli - while true; do - connection_status=$(nmcli networking connectivity) - if [ "$connection_status" = "full" ]; then - echo "internet|string|Connected" - echo "" - sleep $retest - else - echo "internet|string|Disconnected" - echo "" - sleep $retest_if_con_fails - fi - done - ;; - "ping") # Test for connectivity with ping - ip_address='8.8.8.8' - ping_number=3 - - while true; do - - ping_result=$(mktmp) - ping $ip_address -c $ping_number -q | awk 'BEGIN {FS="/"} END {print $5}' > "$ping_result" - - if [ "$(cat "$ping_result" | wc -l)" -eq 0 ]; then - echo "med|string|No connection" - echo "" - sleep $retest_if_con_fails - else - echo "med|string|$(cat "$ping_result") ms" - echo "" - sleep $retest - fi - done - ;; -esac - -# vim: ft=sh diff --git a/home-manager/config/yambar/scripts/old/amixer-monitor b/home-manager/config/yambar/scripts/old/amixer-monitor deleted file mode 100755 index 9e75acfa..00000000 --- a/home-manager/config/yambar/scripts/old/amixer-monitor +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# An improved amixer script that actually detects volume beyond 100% - - -SLEEPTIME=1 - - -while true; do - - volume=$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/"} {print $2 }' | tr -d "%" | tr -d ' ') - - if [ "$volume" -eq 0 ]; then - echo "muted|bool|true" - - else - # Read sink volume in percentages - echo "volume|string|$volume" - echo "muted|bool|false" - fi - - echo "" - sleep "$SLEEPTIME" - -done diff --git a/home-manager/config/yambar/scripts/old/cpu b/home-manager/config/yambar/scripts/old/cpu deleted file mode 100755 index bae820d0..00000000 --- a/home-manager/config/yambar/scripts/old/cpu +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash -# I didn't write this script; this is almost directly copied from the dnkl/yambar github. - - -# cpu.sh - measures CPU usage at a configurable sample interval -# -# Usage: cpu.sh INTERVAL_IN_SECONDS -# -# This script will emit the following tags on stdout (N is the number -# of logical CPUs): -# -# Name Type -# -------------------- -# cpu range 0-100 -# cpu0 range 0-100 -# cpu1 range 0-100 -# ... -# cpuN-1 range 0-100 -# -# I.e. ‘cpu’ is the average (or aggregated) CPU usage, while cpuX is a -# specific CPU’s usage. -# -# Example configuration (update every second): -# -# - script: -# path: /path/to/cpu.sh -# args: [1] -# content: {string: {text: "{cpu}%"}} -# - -interval=2 - -case ${interval} in - ''|*[!0-9]*) - echo "interval must be an integer" - exit 1 - ;; - *) - ;; -esac - -# Get number of CPUs, by reading /proc/stat -# The output looks like: -# -# cpu A B C D ... -# cpu0 A B C D ... -# cpu1 A B C D ... -# cpuN A B C D ... -# -# The first line is a summary line, accounting *all* CPUs -IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) -cpu_count=$((${#all_cpu_stats[@]} - 1)) - -# Arrays of ‘previous’ idle and total stats, needed to calculate the -# difference between each sample. -prev_idle=() -prev_total=() -for i in $(seq ${cpu_count}); do - prev_idle+=(0) - prev_total+=(0) -done - -prev_average_idle=0 -prev_average_total=0 - -while true; do - IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) - - usage=() # CPU usage in percent, 0 <= x <= 100 - - average_idle=0 # All CPUs idle time since boot - average_total=0 # All CPUs total time since boot - - for i in $(seq 0 $((cpu_count - 1))); do - # Split this CPUs stats into an array - stats=($(echo "${all_cpu_stats[$((i + 1))]}")) - - # man procfs(5) - user=${stats[1]} - nice=${stats[2]} - system=${stats[3]} - idle=${stats[4]} - iowait=${stats[5]} - irq=${stats[6]} - softirq=${stats[7]} - steal=${stats[8]} - guest=${stats[9]} - guestnice=${stats[10]} - - # Guest time already accounted for in user - user=$((user - guest)) - nice=$((nice - guestnice)) - - idle=$((idle + iowait)) - - total=$((user + nice + system + irq + softirq + idle + steal + guest + guestnice)) - - average_idle=$((average_idle + idle)) - average_total=$((average_total + total)) - - # Diff since last sample - diff_idle=$((idle - prev_idle[i])) - diff_total=$((total - prev_total[i])) - - usage[i]=$((100 * (diff_total - diff_idle) / diff_total)) - - prev_idle[i]=${idle} - prev_total[i]=${total} - done - - diff_average_idle=$((average_idle - prev_average_idle)) - diff_average_total=$((average_total - prev_average_total)) - - average_usage=$((100 * (diff_average_total - diff_average_idle) / diff_average_total)) - - prev_average_idle=${average_idle} - prev_average_total=${average_total} - - echo "cpu|range:0-100|${average_usage}" - for i in $(seq 0 $((cpu_count - 1))); do - echo "cpu${i}|range:0-100|${usage[i]}" - done - - echo "" - sleep "${interval}" -done diff --git a/home-manager/config/yambar/scripts/old/dfspace b/home-manager/config/yambar/scripts/old/dfspace deleted file mode 100755 index 0b262481..00000000 --- a/home-manager/config/yambar/scripts/old/dfspace +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# Sleep seconds -timer="60" - -# Main loop -while true; do - - # vars - used_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1) - all_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB") - - - # Check space available (4) and percentage used (5) - spaceperc=$(echo "$(echo "$used_space" | tr -d "GiB" )" "$all_space" | awk '{div=$1/$2;div *= 100; printf"%2d%%\n",div }') - - echo "diskspace|string|$used_space" - echo "diskperc|string|$spaceperc" - echo "" - sleep $timer - -done - diff --git a/home-manager/config/yambar/scripts/old/grades-average b/home-manager/config/yambar/scripts/old/grades-average deleted file mode 100755 index a04b958c..00000000 --- a/home-manager/config/yambar/scripts/old/grades-average +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -grade=$(grades list average | awk '{print $2}'); - -echo "grade|string|$grade"; -echo ""; - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/config/yambar/scripts/old/meminfo b/home-manager/config/yambar/scripts/old/meminfo deleted file mode 100755 index 0156e94c..00000000 --- a/home-manager/config/yambar/scripts/old/meminfo +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# Checks memory usage - -# Number of seconds to retest -timer=5 - -# Main loop -while true; do - - mem_total=$(LANG=C free -b|awk '/^Mem:/{print $2}') - mem_used=$(LANG=C free -b|awk '/^Mem:/{print $3}') - swap_total=$(LANG=C free -b|awk '/^Swap:/{print $2}') - swap_used=$(LANG=C free -b|awk '/^Swap:/{print $3}') - - - memperc=$(echo "$mem_used" "$mem_total" | awk '{ div = 100 * ($1 / $2)} { printf "%.0f ", div }' | tr -d ' ' ) - swapperc=$(echo "$swap_used" "$swap_total" | awk '{ - if ( $1 == 0 || $2 == 0 ) { - print "%" - } else { - div = 100 * ($1 / $2); - printf "%.0f ", div -} -}' | tr -d ' ' ) - - -echo "memperc|string|$memperc" -if [ "$swapperc" = "%" ];then - echo "swapstate|bool|false" -else - echo "swapperc|string|$swapperc" - echo "swapstate|bool|true" -fi -echo "" -sleep "$timer" - -done diff --git a/home-manager/config/yambar/scripts/old/nmclitest b/home-manager/config/yambar/scripts/old/nmclitest deleted file mode 100755 index 3e8bc73a..00000000 --- a/home-manager/config/yambar/scripts/old/nmclitest +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# Test for connectivity with nmcli - -Timer=${1:-120} # Number of seconds to retest -Timer2=${2:-10} # Number of seconds to retest if connection fails - -# Main loop -while true; do - - CONN=$(nmcli networking connectivity) - - if [[ "$CONN" == "full" ]]; then - echo "internet|string|Connected" - echo "" - sleep $Timer - else - echo "internet|string|Disconnected" - echo "" - sleep $Timer2 - fi - -done - diff --git a/home-manager/config/yambar/scripts/old/pingtest b/home-manager/config/yambar/scripts/old/pingtest deleted file mode 100755 index 2b5f9998..00000000 --- a/home-manager/config/yambar/scripts/old/pingtest +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# Test for connectivity with ping - -Timer=${1:-120} # Number of seconds to retest -Timer2=${2:-10} # Number of seconds to retest if connection fails -IP=${3:-'8.8.8.8'} # IP address to test, defaults to Google -PCount=${4:-3} # Number of pings to send - -# Main loop -while true; do - - # Pings the IP address for five times - PINGSTR=$(ping $IP -c $PCount -q) - # Use text formatting to get min/max ms delays - MED=$(echo $PINGSTR | sed 's/min\/avg\/max\/mdev = /\n/g' | tail -n 1 | sed 's/\//\t/g' | cut -f2) - - if [[ "$MED" == "" ]]; then - echo "med|string|No connection" - echo "" - sleep $Timer2 - else - echo "med|string|$MED ms" - echo "" - sleep $Timer - fi - -done - diff --git a/home-manager/config/yambar/scripts/old/yambar-tray b/home-manager/config/yambar/scripts/old/yambar-tray deleted file mode 100755 index 1704c6dd..00000000 --- a/home-manager/config/yambar/scripts/old/yambar-tray +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - - -pkill stalonetray -pkill trayer - -# launch a tray. -echo - -sleep 0.1 # make sure yambar starts first so we can draw on tpo of it - -# trayer-srg fork! -trayer \ - --edge top \ - --tint 0x24242400 \ - --align right \ - --height 20 \ - --expand false \ - --transparent true \ - --alpha 0 \ - --width 20 \ - --monitor primary \ - --widthtype request - # &>/dev/null - - - diff --git a/home-manager/config/yambar/scripts/old/yambar-tray-width b/home-manager/config/yambar/scripts/old/yambar-tray-width deleted file mode 100755 index 00544e70..00000000 --- a/home-manager/config/yambar/scripts/old/yambar-tray-width +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -CHARWIDTH=8 # i guess? - -tray_width_px() { - xwininfo -name panel | # trayer names its window "panel" - grep -i width: | - awk '{print $2}' -} - -px_to_spaces() { - spaces="$((1 + ${1:-0} / $CHARWIDTH))" - printf "% *s\n" $spaces -} - -sleep 0.2 # be sure trayer is already up - -output="$(px_to_spaces `tray_width_px`)" -echo "padding|string|$output" -echo "" - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/config/yambar/scripts/sound-volume b/home-manager/config/yambar/scripts/sound-volume deleted file mode 100755 index 8494cbd5..00000000 --- a/home-manager/config/yambar/scripts/sound-volume +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -while true; do - volume="$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/" } {gsub("%","",$2); gsub(" ","",$2)} {printf $2}')" - - if [ "$volume" -eq 0 ]; then - echo "muted|bool|true" - else - echo "volume|string|$volume" - echo "muted|bool|false" - fi - echo "" - - sleep 1; -done - -# vim: ft=sh diff --git a/home-manager/config/zsh/config/custom_cursor.sh b/home-manager/config/zsh/config/custom_cursor.sh deleted file mode 100644 index 9a6da012..00000000 --- a/home-manager/config/zsh/config/custom_cursor.sh +++ /dev/null @@ -1,40 +0,0 @@ -# Change cursor shape for different vi modes. -function zle-keymap-select { - if [[ ${KEYMAP} == vicmd ]] || - [[ $1 = 'block' ]]; then - echo -ne '\e[1 q' - elif [[ ${KEYMAP} == main ]] || - [[ ${KEYMAP} == viins ]] || - [[ ${KEYMAP} = '' ]] || - [[ $1 = 'beam' ]]; then - echo -ne '\e[5 q' - fi -} -zle -N zle-keymap-select - -# ci", ci', ci`, di", etc -autoload -U select-quoted -zle -N select-quoted -for m in visual viopp; do - for c in {a,i}{\',\",\`}; do - bindkey -M $m $c select-quoted - done -done - -# ci{, ci(, ci<, di{, etc -autoload -U select-bracketed -zle -N select-bracketed -for m in visual viopp; do - for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do - bindkey -M $m $c select-bracketed - done -done - -zle-line-init() { - zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -ne "\e[5 q" -} -zle -N zle-line-init - -echo -ne '\e[5 q' # Use beam shape cursor on startup. -precmd() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. diff --git a/home-manager/config/zsh/config/zsh-init.sh b/home-manager/config/zsh/config/zsh-init.sh deleted file mode 100644 index 4d54d058..00000000 --- a/home-manager/config/zsh/config/zsh-init.sh +++ /dev/null @@ -1,39 +0,0 @@ -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -# Flex on the ubuntu users -[ "$NVIM" ] || hyfetch -#loginctl show-session $XDG_SESSION_ID - -## Enable colors and change prompt: -#autoload -Uz colors && colors -#autoload -Uz compinit && compinit -u -## Edit line in vim buffer ctrl-v -autoload -Uz edit-command-line; zle -N edit-command-line -## Enter vim buffer from normal mode -#autoload -Uz edit-command-line && zle -N edit-command-line -bindkey "^V" edit-command-line - -## zstyles -#zstyle ':completion:*' menu select -## Auto complete with case insensitivity -#zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' - -#zmodload zsh/complist -#fpath+=/home/dt/.config/zsh/comp -#compinit -#_comp_options+=(globdots) # Include hidden files. -# -## Source configs -#source "${ZDOTDIR}/ali.sh" -#source "${ZDOTDIR}/prompt.sh" -#source "${ZDOTDIR}/hotkeys.sh" -#source "./${path_custom_cursor}" -#source ~/.local/lib/shell/lib -# -## Load zsh-syntax-highlighting -#source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -## Suggest aliases for commands -#source /usr/share/zsh/plugins/zsh-you-should-use/you-should-use.plugin.zsh -# -##eval "$(lua ~/scripts/z.lua --init zsh enhanced)" diff --git a/home-manager/config/zsh/config/zsh-prompt.sh b/home-manager/config/zsh/config/zsh-prompt.sh deleted file mode 100644 index 1af12443..00000000 --- a/home-manager/config/zsh/config/zsh-prompt.sh +++ /dev/null @@ -1,63 +0,0 @@ -#vim:ft=zsh -_command_time_preexec() { - timer=${timer:-$SECONDS} -} - -_command_time_precmd() { - PROMPT_TMP_DIR=$(mktemp) - if [ $timer ]; then - ts=$(($SECONDS - $timer)) - tts=$ts - mi=0 - ho=0 - if [ $ts -ge 3 ];then - while [ $ts -ge 60 ];do - ts=$((ts-60)) - mi=$((mi+1)) - done - - while [ $mi -ge 60 ];do - mi=$((mi-60)) - ho=$((ho+1)) - done - - if [ $tts -ge 3600 ];then - out=$(printf '%dh %dm %ds\n' $ho $mi $ts) - elif [ $tts -ge 60 ];then - out=$(printf '%dm %ds\n' $mi $ts) - elif [ $tts -lt 60 ];then - out=$(printf '%ds\n' $ts) - fi - - export psvar[1]="took $(printf '%s ' "$out")" - echo $psvar[1] > $PROMPT_TMP_DIR - fi - - unset timer - unset ts - unset tts - unset mi - unset ho -fi -} - -_command_ro_precmd() { -if ! [ -w $(pwd) ];then - echo " " -fi -} - -preexec_functions+=(_command_time_preexec) -precmd_functions+=(_command_time_precmd) - -blue="14" -red="9" -white="15" -setopt PROMPT_SUBST -export PROMPT='%(?.%F{$blue}.%F{$red})%B%3~%(!. %F{$red}as root %f. )%F{$white}$(if [ -n $PROMPT_TMP_DIR ];then cat $PROMPT_TMP_DIR 2>/dev/null; rm $PROMPT_TMP_DIR 2>/dev/null;fi)%f%(?.%F{$blue}.%F{$red})%F{$red}$(_command_ro_precmd)%F{$blue}❯ %b%f' -export RPROMPT='' - -#%(2V.%F{$red}%2v%f$(export psvar[2]="") .) - -# TODO: -# Add git support diff --git a/home-manager/config/zsh/default.nix b/home-manager/config/zsh/default.nix deleted file mode 100644 index 01a553d0..00000000 --- a/home-manager/config/zsh/default.nix +++ /dev/null @@ -1,139 +0,0 @@ -{ - config, - pkgs, - lib, - shell_library, - system, - osConfig, - ... -}: { - # TODO ADD THIS ADDON - # next one only works if your alias is only a command, e.g. if you `alias='cat some_file.txt &2> /dev/null'`, running `cat some_file.txt` won't trigger it. - # TODO find something better for this use case - # zsh-you-should-use # ZSH plugin that reminds you to use existing aliases for commands you just typed - home.sessionPath = []; - programs.zsh = { - enable = true; - enableAutosuggestions = true; - enableCompletion = true; - syntaxHighlighting.enable = true; - - autocd = true; - - dotDir = ".config/zsh"; - - history = { - extended = true; - ignoreDups = false; - expireDuplicatesFirst = false; - ignoreSpace = false; # TODO I might change that - - path = "${config.xdg.dataHome}/zsh/history"; - save = 9000000; # number of lines to save - size = 9000000; # number of lines to keep - share = false; # share between sessions - }; - historySubstringSearch = { - enable = true; - searchDownKey = "^[[B"; # DOWN Arrow key - searchUpKey = "^[[A"; # UP Arrow key - }; - - loginExtra = - '' - eval $(ssh-agent -s) > /dev/null # start ssh agent - '' - + lib.concatStringsSep "\nsetopt " [ - "setopt AUTO_CD" # This is needed as first item - "AUTO_PUSHD" - "CHASE_DOTS" - - "ALWAYS_TO_END" - - "EXTENDED_HISTORY" - "HIST_ALLOW_CLOBBER" - "HIST_VERIFY" - "HIST_FCNTL_LOCK" - "APPEND_HISTORY" - - "DVORAK" - "CORRECT" - - "PROMPT_SUBST" - "TRANSIENT_RPROMPT" # maybe? - - "COMBINING_CHARS" - "VI" - ]; - - initExtraFirst = - builtins.readFile ./config/zsh-init.sh - + builtins.readFile ./config/zsh-prompt.sh - + builtins.readFile ./config/custom_cursor.sh - + builtins.readFile "${pkgs.fzf}/share/fzf/key-bindings.zsh" - + "SHELL_LIBRARY_VERSION=\"1.1.4\" source ${shell_library.rawLib.${system}}"; - shellAliases = { - ll = ". ll"; - hisea = "history 0 | grep"; - }; - sessionVariables = { - EDITOR = "nvim"; - IVIEWER = "imv"; - READER = "zathura"; - VISUAL = "nvim"; - CODEEDITOR = "nvim"; - TERMINAL = "alacritty"; - BROWSER = "firefox"; - COLORTERM = "truecolor"; - PAGER = "less -R"; - WM = "river"; - WALLPAPER = "${config.home.homeDirectory}/media/pictures/wallpaper"; - - # FUNCNEST for more functions in functions - #FUNCNEST = "2000"; - - WALLPAPERDIR = "$HOME/media/pictures/wallpapers/"; - LESS = "R"; - MANPAGER = "less -R --use-color -Dd+r -Du+b"; - LIBVIRT_DEFAULT_URI = "qemu:///system"; - - BEMENU_SCALE = "1.5"; - BEMENU_BACKEND = "wayland"; - BEMENU_OPTS = "--fn 'Source Code Pro 10' -c -l 30 -B 1 -W 0.9 --hf #ffffff"; - - MPD_HOST = "/run/user/${builtins.toString osConfig.users.users.soispha.uid}/mpd/socket"; - - # Clean the home dir {{{ - CARGO_HOME = "${config.xdg.dataHome}/cargo"; - - #_JAVA_OPTIONS = lib.concatStringsSep " " [ - # ''-Djava.util.prefs.userRoot="${config.xdg.configHome}/java"'' - # ''-Djavafx.cachedir="${config.xdg.cacheHome}/openjfx"'' - # ]; - #GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle"; - #GOPATH = "${config.xdg.dataHome}/go"; - #GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - #LESSHISFILE = "${config.xdg.cacheHome}/less/history"; - #LESSKEYIN = "${config.xdg.configHome}/less/lesskey"; - #RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; - #NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; - #NUGET_PACKAGES = "${config.xdg.cacheHome}/NuGetPackages"; - #PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc"; - #XAUTHORITY = "${config.xdg.stateHome}/Xauthority"; - #COMPDUMPFILE = "${config.xdg.dataHome}/zsh/.zcompdump}"; - #IPYTHONDIR = "${config.xdg.configHome}/ipython"; - #PARALLEL_HOME = "${config.xdg.configHome}/parallel"; - #STACK_XDG = "1"; - #WINEPREFIX = "${config.xdg.dataHome}/wine"; - # }}} - - # Export Wayland env Vars {{{ - QT_QPA_PLATFORM = "wayland"; - QT_QPA_PLATFORMTHEME = "qt5ct"; # needs qt5ct - CLUTTER_BACKEND = "wayland"; - SDL_VIDEODRIVER = "wayland"; # might brake some things - MOZ_ENABLE_WAYLAND = "1"; - # }}} - }; - }; -} diff --git a/home-manager/default.nix b/home-manager/default.nix index 3779dbeb..0d1958f2 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -1,36 +1,55 @@ -{impermanence, ...}: let - # TODO actually use this in the user config - username = "soispha"; - homeDirectory = "/home/${username}"; - - # xdg - configHome = "${homeDirectory}/.config"; - dataHome = "${homeDirectory}/.local/share"; - stateHome = "${homeDirectory}/.local/state"; - cacheHome = "${homeDirectory}/.cache"; - binHome = "${homeDirectory}/.local/bin"; - # TODO add XDG_RUNTIME_DIR -in { - imports = [ - impermanence.nixosModules.home-manager.impermanence - #"${impermanence}/home-manager.nix" - ./impermanence - ./packages - ./config - ./wms - ./files - ]; - - # I don't know what this does, but I've seen it a lot online, so it should be good, right? - programs.home-manager.enable = true; - - home = { - inherit username homeDirectory; - stateVersion = "23.05"; - enableNixpkgsReleaseCheck = true; - }; - xdg = { - inherit configHome dataHome stateHome cacheHome; #binHome; # TODO add binHome, when the standart is extended - enable = true; +{ + pkgs, + sysLib, + # extra information + system, + # bins + video_pause, + yambar_cpu, + yambar_memory, + strip_js_comments, + river_init_lesser, + grades, + shell_library, + flake_update, + # external deps + user_js, + neovim_config, + snap-sync, + # modules + impermanence, + ... +}: { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.soispha = import ./soispha; + extraSpecialArgs = { + inherit + pkgs + sysLib + # extra information + + system + # bins + + video_pause + yambar_cpu + yambar_memory + strip_js_comments + river_init_lesser + grades + shell_library + flake_update + # external deps + + user_js + neovim_config + snap-sync + # modules + + impermanence + ; + }; }; } diff --git a/home-manager/files/default.nix b/home-manager/files/default.nix deleted file mode 100644 index 4e16077c..00000000 --- a/home-manager/files/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{config, ...}: { - imports = [ - ./wallpaper - ]; -} diff --git a/home-manager/files/wallpaper/abstract-nord.png b/home-manager/files/wallpaper/abstract-nord.png deleted file mode 100644 index 5ef498bf..00000000 Binary files a/home-manager/files/wallpaper/abstract-nord.png and /dev/null differ diff --git a/home-manager/files/wallpaper/default.nix b/home-manager/files/wallpaper/default.nix deleted file mode 100644 index 2c9b3368..00000000 --- a/home-manager/files/wallpaper/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{config, ...}: { - home.file = { - wallpaper = { - source = ./abstract-nord.png; - target = "media/pictures/wallpaper"; - }; - }; -} diff --git a/home-manager/impermanence/default.nix b/home-manager/impermanence/default.nix deleted file mode 100644 index 90b2152b..00000000 --- a/home-manager/impermanence/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - lib, - nixosConfig, - ... -}: { - config = lib.mkIf nixosConfig.soispha.impermanence.enable { - home.persistence."/srv/home/soispha" = { - allowOther = true; - directories = [ - ".local/share" - - ".local/state/nvim" - ".local/state/wireplumber" - - ".config/Signal" - ".config/Element" - - ".cache" - ".mozilla" - - "media" - "repos" - "school" - ]; - files = [ - ".local/state/lesshst" - ]; - }; - }; -} diff --git a/home-manager/packages/default.nix b/home-manager/packages/default.nix deleted file mode 100644 index 0d6528dd..00000000 --- a/home-manager/packages/default.nix +++ /dev/null @@ -1,160 +0,0 @@ -{ - pkgs, - sysLib, - grades, - snap-sync, - system, - flake_update, - ... -}: -with pkgs; let - snap-sync-pkgs = pkgs.writeShellScriptBin "snap-sync" (builtins.readFile "${snap-sync}/bin/snap-sync"); - shell-scripts = (import ./scripts.nix) {inherit pkgs sysLib;}; - - Gui = { - Terminals = [ - # foot # wayland native terminal - alacritty # default terminal - ]; - Browsers = [ - #ungoogled-chromium # web browser (only for web programming) - #brave - ]; - - ImageManipulation = [ - #krita # new, and better (KDE) - #gimp # conservative, and old (GNOME) - ]; - - Social = [ - mumble # voice chat software (client) - lutris # multiple game store clients - - nheko # best matrix client (as of today) - # element-desktop # nheko didn't work - signal-desktop # to avoid encryption problems with signal-bridge - ]; - - Misc = [ - #kalzium # Periodic Table of Elements (`element` is [sort of] better) - keepassxc # password manager - #onlykey # OnlyKey Chrome Desktop App - anki-bin # spaced repetition - ]; - }; - - TuiCli = { - EyeCandy = [ - #banner # Print large banners to ASCII terminals - cmatrix # A curses-based scrolling 'Matrix'-like screen - hyfetch # Neofetch with LGBTQ pride flags. - ]; - - Misc = [ - android-file-transfer # Android MTP client with minimalistic UI - #xdg-ninja # A shell script which checks your $HOME for unwanted files and directories. - xdg-utils # open urls and such things - yokadi # Command line oriented, sqlite powered, todo list - killall # kill a application by name - ]; - - WM = { - river = [river]; # A dynamic tiling wayland compositor - - CLITools = [ - lswt # List Wayland toplevels - wl-clipboard # Command-line copy/paste utilities - swaylock # lockscreen - ]; - - Media = [ - wf-recorder # Screen recorder - ]; - }; - - Media = { - View = [ - imv # Image viewer - ]; - - Listen = [ - pulseaudio # set the volume with pactl - ncmpc # mpd player client - mpc-cli # a cli mpd client - ]; - }; - - Hardware = { - Storage = [ - #compsize # Calculate compression ratio of a set of files on Btrfs - # TODO smartmontools # Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives - ]; - - Input = [ - #piper # GTK application to configure gaming mice - ]; - - Printer = [ - # TODO sane-airscan # SANE - SANE backend for AirScan (eSCL) and WSD document scanners - ]; - }; - - FileListers = [ - tree # A directory listing program displaying a depth indented list of files - fd # Simple, fast and user-friendly alternative to find - ripgrep # A search tool that combines the usability of ag with the raw speed of grep - fzf # used to quickly move around with its keybindings - ]; - - Editors = [ - ed # A POSIX-compliant line-oriented text editor - #sed # GNU stream editor - vim # The original ex/vi text editor (this is `vim` and not `vi`, as `vi` is unfree) - neovim # Fork of Vim aiming to improve user experience, plugins, and GUIs - ]; - - Programming = { - GeneralTools = [ - git # the fast distributed version control system - git-crypt # mostly here to avoid problems in repositories, where the flake can't be loaded - glow # Command-line markdown renderer - ]; - }; - }; - # TODO unmaintained, find sth else: - # handlr # Powerful alternative to xdg-utils written in Rust - mapFun = x: - if builtins.isAttrs x - then - if lib.isDerivation x - then [x] - else builtins.attrValues x - else [x]; -in { - home.packages = - [ - snap-sync-pkgs - flake_update.outputs.packages.${system}.default - grades.outputs.packages.${system}.default - ] - ++ shell-scripts - ++ (with builtins; - concatLists - (concatLists [ - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (attrValues Gui))))))) - - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (attrValues TuiCli))))))) - ])); -} diff --git a/home-manager/packages/scripts.nix b/home-manager/packages/scripts.nix deleted file mode 100644 index 73b52d37..00000000 --- a/home-manager/packages/scripts.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ - pkgs, - sysLib, - ... -}: let - write_script = { - name, - path, - dependencies, - }: - sysLib.writeShellScriptWithLibrary { - inherit name; - src = ./scripts/${path}/${name}; - dependencies = dependencies ++ [pkgs.dash]; - }; - aumo-scr = write_script { - name = "aumo"; - path = "apps"; - dependencies = builtins.attrValues {inherit (pkgs) udisks gawk gnused gnugrep sudo;}; - }; - con2pdf-scr = write_script { - name = "con2pdf"; - path = "apps"; - dependencies = builtins.attrValues {inherit (pkgs) sane-backends imagemagick coreutils fd;}; - }; - - dldragon-scr = write_script { - name = "dldragon"; - path = "small_functions"; - dependencies = builtins.attrValues {inherit (pkgs) curl xdragon;}; - }; - gtk-themes-scr = write_script { - name = "gtk-themes"; - path = "small_functions"; - dependencies = builtins.attrValues {inherit (pkgs) glib;}; - }; - screen_shot-scr = write_script { - name = "screen_shot"; - path = "small_functions"; - dependencies = builtins.attrValues {inherit (pkgs) grim slurp alacritty;}; # TODO add llp - }; - mocs-scr = write_script { - name = "mocs"; - path = "small_functions"; - dependencies = builtins.attrValues {inherit (pkgs) ncmpc procps;}; # TODO add mymocp - }; - update-sys-scr = write_script { - name = "update-sys"; - path = "small_functions"; - dependencies = builtins.attrValues {inherit (pkgs) git nixos-rebuild sudo openssh coreutils mktemp gnugrep gnused;}; - }; - - backsnap-scr = write_script { - name = "backsnap"; - path = "wrappers"; - dependencies = builtins.attrValues {}; # TODO add snap-sync - }; - ll-scr = sysLib.writeShellScriptWithLibraryUnwrapped { - name = "ll"; - src = ./scripts/wrappers/ll; - }; - # TODO this need to be replaced with a wayland alternative - # llp-scr = write_script { - # name = "llp"; - # path = "wrappers"; - # dependencies = builtins.attrValues {inherit (pkgs) lf ueberzug;}; - # }; - spodi-scr = write_script { - name = "spodi"; - path = "wrappers"; - dependencies = builtins.attrValues {inherit (pkgs) gawk expect spotdl fd coreutils;}; - }; - virsh-del-scr = write_script { - name = "virsh-del"; - path = "wrappers"; - dependencies = builtins.attrValues {inherit (pkgs) libvirt;}; - }; - yti-scr = write_script { - name = "yti"; - path = "wrappers"; - dependencies = builtins.attrValues {inherit (pkgs) gawk expect yt-dlp;}; - }; -in [ - aumo-scr - con2pdf-scr - dldragon-scr - gtk-themes-scr - screen_shot-scr - mocs-scr - update-sys-scr - backsnap-scr - ll-scr - # llp-scr # TODO see above - spodi-scr - virsh-del-scr - yti-scr -] diff --git a/home-manager/packages/scripts/apps/aumo b/home-manager/packages/scripts/apps/aumo deleted file mode 100755 index 014df638..00000000 --- a/home-manager/packages/scripts/apps/aumo +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -# TODO rewrite this - -if [ "$1" = "-u" ];then udisksctl unmount -b "$(cat "$HOME/.cache/aumo/mnt_disk")"; exit 0; fi -all_available_disks=$(mktemp) -awk '{print $4}' /proc/partitions | sed '1 s|.*||' > "$all_available_disks" - -mounted_disk=$(mktemp) -awk '{print $1}' /proc/mounts > "$mounted_disk" - -unmounted_disks=$(mktemp) - -for i in $(cat $all_available_disks);do - if ! grep -qw "/dev/$i" $mounted_disk && ! ls /sys/block/$i/*/partition > /dev/null 2> /dev/null;then echo $i >> $unmounted_disks;fi -done - - -u=1 -disk=-1 -while [ $disk -lt 0 ] || [ $disk -gt $(wc -l $unmounted_disks | awk '{print $1}') ];do - - [ "$1" = "-v" ] && for i in $(cat $unmounted_disks);do - sudo fdisk -l "/dev/$i" - done - - for i in $(cat $unmounted_disks);do - printf "%4s) %s\n" "$u" "$i" - u=$(( u + 1 )) - done - - printf "%4s) Exit\n" "0" - printf "Input number: " - read -r disk - - [ $disk -lt 0 ] || [ $disk -gt $(wc -l $unmounted_disks | awk '{print $1}') ] && printf "Wrong number. Please retry\n" - [ $disk -eq 0 ] && exit 0 -done - -mnt_disk="/dev/$(awk -v n=$disk 'NR==n' $unmounted_disks)" - -if ! [ "$1" = "-v" ] && [ -n "$1" ];then sudo mount "$mnt_disk" "$1" && exit 0;fi -[ -n "$2" ] && sudo mount "$mnt_disk" "$1" && exit 0 -if mount | grep -q ~/mnt ;then dien "Something is mounted at ~/mnt";else udisksctl mount -b "$mnt_disk";fi - -[ -e $HOME/.cache/aumo/mnt_disk ] || mkdir -p $HOME/.cache/aumo -echo $mnt_disk >> $HOME/.cache/aumo/mnt_disk -rm $all_available_disks -rm $mounted_disk -rm $unmounted_disks -[ -d /tmp/LIB_FILE_TEMP_DIR/ ] && rm -r /tmp/LIB_FILE_TEMP_DIR/ diff --git a/home-manager/packages/scripts/apps/con2pdf b/home-manager/packages/scripts/apps/con2pdf deleted file mode 100755 index 9cadc376..00000000 --- a/home-manager/packages/scripts/apps/con2pdf +++ /dev/null @@ -1,152 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - - -# needed for help() and version -# shellcheck disable=2034 -AUTHORS="Soispha"; -# shellcheck disable=2034 -YEARS="2023"; -# shellcheck disable=2034 -VERSION="1.0.0"; - -help() { -cat << EOF -Scan images and turn them into a pdf. - -Usage: - $NAME [--help|--version|--out-dir|--num-pages|--method] --name --device - -Options: - --out-dir | -o - Path to place the generated pdf files (default: ./pdf). - --name | -n - Name for the pdf files (e.g. "\$name"_1.pdf). - --num-pages | -p - Number of pages to merge into one pdf (default: 1). - --device | -d - Device used for scanning. - --method | -m - Method to use for scanning (default: ADF). - --help | -h - Display this help and exit. - --version | -v - Display version and copyright information and exit. -EOF -} - -scan() { - number_of_pages="$1"; - device="$2"; - output_directory="$3"; - name="$4"; - method="$5"; - - [ -z "$number_of_pages" ] && die "Parameter 'number_of_pages' is not set!" - [ -z "$device" ] && die "Parameter 'device' is not set!" - [ -z "$output_directory" ] && die "Parameter 'output_directory' is not set!" - [ -z "$name" ] && die "Parameter 'name' is not set!" - [ -z "$method" ] && die "Parameter 'method' is not set!" - - tiff_temp_path="$(mktmp -d)"; - cd "$tiff_temp_path" || die "Bug" - - msg "Started scanning..."; - if [ "$method" = "Flatbed" ]; then - do_until_success \ - "scanimage --format=tiff --progress --source='$method' --device='$device' --output-file=1.tiff" \ - "warn 'Retrying scan, as we assume a network error!'" - else - for i in $(seq "$number_of_pages");do - do_until_success \ - "scanimage --format=tiff --progress --source='$method' --device='$device' --batch=%d.tif --batch-increment='$number_of_pages' --batch-start='$i'" \ - "warn 'Retrying scan, as we assume a network error!'" - - - if [ "$number_of_pages" -ne 1 ];then - msg "Finished turn, please change side!"; - readp "Press enter to continue" noop - fi - done - fi - - msg "Creating output directory..."; - mkdir "$output_directory"; - cd "$output_directory" || die "Bug" - - counter=0; - msg "Converting images to pdfs..."; - while read -r scanned_image_a;do - if [ "$number_of_pages" -ne 1 ];then - scanned_image_b_set=false; - if [ -z "$scanned_image_b" ];then - scanned_image_b="$i" - scanned_image_b_set=true; - : $((counter += 1)) - fi - - if [ -n "$scanned_image_a" ] && [ "$scanned_image_b_set" = false ];then - convert "$scanned_image_b" "$scanned_image_a" -compress jpeg -quality 100 "$name"_"$counter".pdf - fi - else - : $((counter += 1)) - convert "$scanned_image_a" -compress jpeg -quality 100 "$name"_"$counter".pdf - fi - - done < "$(tmp "fd . '$tiff_temp_path' | sort -n")" -} - -for input in "$@"; do - case "$input" in - "--help" | "-h") - help; - exit 0; - ;; - "--version" | "-v") - version; - exit 0; - ;; - esac -done - -number_of_pages="1"; -unset device; -output_directory="$(pwd)/pdf"; -unset name; -method="ADF"; - -while [ "$#" -ne 0 ]; do - case "$1" in - "--help" | "-h") - ;; - "--version" | "-v") - ;; - "--out-dir" | "-o") - shift 1; - output_directory="$1"; - ;; - "--name" | "-n") - shift 1; - name="$1"; - ;; - "--num-pages" | "-p") - shift 1; - number_of_pages="$1"; - ;; - "--device" | "-d") - shift 1; - device="$1"; - ;; - "--method" | "-m") - shift 1; - method="$1"; - ;; - *) - die "Command line arg $1 does not exist. See --help for a list."; - ;; - esac - shift 1; -done -scan "$number_of_pages" "$device" "$output_directory" "$name" "$method"; diff --git a/home-manager/packages/scripts/small_functions/dldragon b/home-manager/packages/scripts/small_functions/dldragon deleted file mode 100755 index ea75c362..00000000 --- a/home-manager/packages/scripts/small_functions/dldragon +++ /dev/null @@ -1,28 +0,0 @@ -#! /usr/bin/env dash -# Provides the ability to download a file by dropping it into a window - -url=$(dragon -t -x) - -if [ -n "$url" ]; then - printf "File Name: " - name="" - while [ -z $name ] || [ -e $name ] - do - read -r name - if [ -e "$name" ]; then - printf "File already exists, overwrite (y|n): " - read -r ans - - if [ "$ans" = "y" ]; then - break - else - printf "File Name: " - fi - fi - done - - # Download the file with curl - [ -n "$name" ] && curl -o "$name" "$url" || exit 1 -else - exit 1 -fi diff --git a/home-manager/packages/scripts/small_functions/gtk-themes b/home-manager/packages/scripts/small_functions/gtk-themes deleted file mode 100755 index 6ebf2735..00000000 --- a/home-manager/packages/scripts/small_functions/gtk-themes +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - - -# TODO document, what this does - -# usage: import-gsettings -config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" -if [ ! -f "$config" ]; then exit 1; fi - -gnome_schema="org.gnome.desktop.interface" -gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" -icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" -cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" -font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" -gsettings set "$gnome_schema" gtk-theme "$gtk_theme" -gsettings set "$gnome_schema" icon-theme "$icon_theme" -gsettings set "$gnome_schema" cursor-theme "$cursor_theme" -gsettings set "$gnome_schema" font-name "$font_name" diff --git a/home-manager/packages/scripts/small_functions/mocs b/home-manager/packages/scripts/small_functions/mocs deleted file mode 100755 index e14a84c8..00000000 --- a/home-manager/packages/scripts/small_functions/mocs +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash -if [[ "$(pgrep mocp)" -eq 0 ]]; -then - mocp -M "${XDG_CONFIG_HOME}"/moc -S - if [[ $1 -eq 0 ]]; - then - mocp -M "${XDG_CONFIG_HOME}"/moc -v 12 - else - mocp -M "${XDG_CONFIG_HOME}"/moc -v "$1" - fi - mocp -M "${XDG_CONFIG_HOME}"/moc -p - mymocp& -else - mocp -M "${XDG_CONFIG_HOME}"/moc -G -fi diff --git a/home-manager/packages/scripts/small_functions/screen_shot b/home-manager/packages/scripts/small_functions/screen_shot deleted file mode 100755 index 73eb2ee4..00000000 --- a/home-manager/packages/scripts/small_functions/screen_shot +++ /dev/null @@ -1,10 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -date="$(date +%s)" -grim -g "$(slurp)" "$HOME/media/pictures/screenshots/$date.png" && - alacritty -e ll -command ":{{ set sortby atime; set reverse!; }}" "$HOME/media/pictures/screenshots/$date.png" - -# vim: ft=sh diff --git a/home-manager/packages/scripts/small_functions/update-sys b/home-manager/packages/scripts/small_functions/update-sys deleted file mode 100755 index 355682d1..00000000 --- a/home-manager/packages/scripts/small_functions/update-sys +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -help() { - cat << EOF -This is a NixOS System flake update manager. - -Usage: - $NAME [--branch ] [--help] - -Options: - --branch | -b BRANCHNAME - select a branch to update from. - --mode | -m MODE - select a mode to update with - --help | -h - output this help. -EOF - exit "$1"; -} -default_branch=$(mktmp); -BRANCH=""; - -while [ "$#" -gt 0 ];do - case "$1" in - "--help" | "-h") - help 0; - ;; - "--branch" | "-b") - if [ -n "$2" ];then - BRANCH="$2"; - else - error "$1 requires an argument"; - help 1; - fi - shift 2; - ;; - "--mode" | "-m") - if [ -n "$2" ];then - MODE="$2"; - else - error "$1 requires an argument"; - help 1; - fi - shift 2; - ;; - *) - error "the option $1 does not exist!"; - help 1; - ;; - esac -done - - -cd /etc/nixos || die "No /etc/nixos"; -msg "Starting system update..."; -git remote update origin --prune > /dev/null 2>&1; -if ! [ "$BRANCH" = "" ];then - git switch "$BRANCH" > /dev/null 2>&1 && msg2 "Switched to branch '$BRANCH'"; -fi -msg2 "Updating git repository..."; -git pull --rebase; - -git remote show origin | grep 'HEAD' | cut -d':' -f2 | sed -e 's/^ *//g' -e 's/ *$//g' > "$default_branch" & - -msg2 "Updating system..."; -if [ -n "$MODE" ]; then - nixos-rebuild "$MODE"; -else - nixos-rebuild switch; -fi - -git switch "$(cat "$default_branch")" > /dev/null 2>&1 && msg2 "Switched to branch '$(cat "$default_branch")'"; -msg "Finished Update!"; - -# vim: ft=sh diff --git a/home-manager/packages/scripts/wrappers/backsnap b/home-manager/packages/scripts/wrappers/backsnap deleted file mode 100755 index cd08045d..00000000 --- a/home-manager/packages/scripts/wrappers/backsnap +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/env dash -snap-sync --noconfirm -u d1c6e0f6-1837-40fd-bb29-251d5ea0ddb0 -umount /run/dt/d1c6e0f6-1837-40fd-bb29-251d5ea0ddb0 diff --git a/home-manager/packages/scripts/wrappers/ll b/home-manager/packages/scripts/wrappers/ll deleted file mode 100755 index cb1fc0ea..00000000 --- a/home-manager/packages/scripts/wrappers/ll +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -last_directory="$(mktemp)" - -command lf -last-dir-path="$last_directory" "$@" - -dir="$(cat "$last_directory")" -cd "$dir" || die "$dir does not exist!" -rm "$last_directory" - -# vim: ft=sh diff --git a/home-manager/packages/scripts/wrappers/llp b/home-manager/packages/scripts/wrappers/llp deleted file mode 100755 index 2a21450c..00000000 --- a/home-manager/packages/scripts/wrappers/llp +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash - -export LLP=1 -cleanup() { - exec 3>&- - rm "$FIFO_UEBERZUG" -} - -if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then - lf "$@" -else - [ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf" - export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" - mkfifo "$FIFO_UEBERZUG" - ueberzug layer -s <"$FIFO_UEBERZUG" -p json & - exec 3>"$FIFO_UEBERZUG" - trap cleanup EXIT - lf "$@" 3>&- -fi diff --git a/home-manager/packages/scripts/wrappers/spodi b/home-manager/packages/scripts/wrappers/spodi deleted file mode 100755 index 4ff53bff..00000000 --- a/home-manager/packages/scripts/wrappers/spodi +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -DOWN_DIR="/home/soispha/media/music/down"; - -download_url="$1"; - - - -already_downloaded_files="$(mktmp)" -fd . "$DOWN_DIR" --exclude spotdl.log > "$already_downloaded_files"; - -config="$(mktmp)" -cat << EO > "$config" ---log-level INFO ---cache-path /home/soispha/.local/share/spotdl/.spotipy ---audio youtube-music youtube ---lyrics genius musixmatch azlyrics ---ffmpeg ffmpeg ---format mp3 ---output {artists}_-_{title} ---overwrite skip ---client-id 5f573c9620494bae87890c0f08a60293 ---client-secret 212476d9b0f3472eaa762d90b19b0ba8 ---threads 16 ---print-errors ---preload -EO - -if [ -z "$NO_CHECK" ] && [ "$(wc -l < "$already_downloaded_files" )" -ne 0 ];then - die "something is already downloaded" -fi - -rm "$DOWN_DIR/spotdl.log" -cd "$DOWN_DIR" || die "BUG: no $DOWN_DIR" - - -# The sub shell needs to be unquoted, as the arguments may not be treated as one. -# shellcheck disable=2046 -unbuffer spotdl $(cat "$config") download "$download_url" | tee "$DOWN_DIR/spotdl.log" - -[ -d ~/.spotdl ] && rm -r ~/.spotdl -# vim: ft=sh diff --git a/home-manager/packages/scripts/wrappers/virsh-del b/home-manager/packages/scripts/wrappers/virsh-del deleted file mode 100755 index afcd87c1..00000000 --- a/home-manager/packages/scripts/wrappers/virsh-del +++ /dev/null @@ -1,10 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -virsh destroy "$1" -virsh undefine "$1" --nvram -virsh vol-delete --pool default "$1".qcow2 - -# vim: ft=sh diff --git a/home-manager/packages/scripts/wrappers/yti b/home-manager/packages/scripts/wrappers/yti deleted file mode 100755 index d30188a0..00000000 --- a/home-manager/packages/scripts/wrappers/yti +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -die "Use spodi instead!" # TODO fix this script -DOWN_DIR=/home/soispha/media/playlist/down/ - - -tmp=$(mktmp) -config=$(mktmp) - -for e in "$DOWN_DIR"/*.mp3;do echo "$e" >> "$tmp";done -[ "$(wc -l "$tmp" | awk '{print $1}')" -gt 2 ] && die "something is already downloaded" - -cat << EO > "$config" ---paths home:"$DOWN_DIR" -#--output %(fulltitle) ---restrict-filenames ---no-overwrites ---no-write-info-json ---clean-info-json ---prefer-free-formats -#--format mp3 ---extract-audio ---audio-quality 0 ---audio-format best -EO - - -rm ${DOWN_DIR}yt-dlp.log -cd $DOWN_DIR || die "BUG: no $DOWN_DIR" - -unbuffer yt-dlp --config-location "$config" "$1" | tee $DOWN_DIR/yt-dlp.log - -# vim: ft=sh diff --git a/home-manager/soispha/config/alacritty/alacritty.yml b/home-manager/soispha/config/alacritty/alacritty.yml new file mode 100644 index 00000000..ad6e417e --- /dev/null +++ b/home-manager/soispha/config/alacritty/alacritty.yml @@ -0,0 +1,1003 @@ +--- +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Import additional configuration files +# +# Imports are loaded in order, skipping all missing files, with the importing +# file being loaded last. If a field is already present in a previous import, it +# will be replaced. +# +# All imports must either be absolute paths starting with `/`, or paths relative +# to the user's home directory starting with `~/`. +#import: +# - /path/to/alacritty.yml + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty itself. +env: + # TERM variable + # + # This value is used to set the `$TERM` environment variable for + # each instance of Alacritty. If it is not present, alacritty will + # check the local terminfo database and use `alacritty` if it is + # available, otherwise `xterm-256color` is used. + TERM: alacritty + +window: + # Window dimensions (changes require restart) + # + # Number of lines/columns (not pixels) in the terminal. Both lines and columns + # must be non-zero for this to take effect. The number of columns must be at + # least `2`, while using a value of `0` for columns and lines will fall back + # to the window manager's recommended size + dimensions: + columns: 0 + lines: 0 + + # Window position (changes require restart) + # + # Specified in number of pixels. + # If the position is not set, the window manager will handle the placement. + #position: + # x: 0 + # y: 0 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is scaled + # by DPI and the specified value is always added at both opposing sides. + padding: + x: 5 + y: 5 + + # Spread additional padding evenly around the terminal content. + #dynamic_padding: false + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background and no title bar buttons + decorations: none + + # Background opacity + # + # Window opacity as a floating point number from `0.0` to `1.0`. + # The value `0.0` is completely transparent and `1.0` is opaque. + opacity: 0.9 + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + startup_mode: Windowed + + # Window title + title: Alacritty + + # Allow terminal applications to change Alacritty's window title. + dynamic_title: true + + # Window class (Linux/BSD only): + class: + # Application instance name + instance: Alacritty + # General application class + general: Alacritty + + # Decorations theme variant + # + # Override the variant of the System theme/GTK theme/Wayland client side + # decorations. Commonly supported values are `Dark`, `Light`, and `None` for + # auto pick-up. Set this to `None` to use the default theme variant. + decorations_theme_variant: None + + # Resize increments + # + # Prefer resizing window by discrete steps equal to cell dimensions. + #resize_increments: false + + # Make `Option` key behave as `Alt` (macOS only): + # - OnlyLeft + # - OnlyRight + # - Both + # - None (default) + #option_as_alt: None + +scrolling: + # Maximum number of lines in the scrollback buffer. + # Specifying '0' will disable scrolling. + history: 10000 + + # Scrolling distance multiplier. + multiplier: 3 + +# Font configuration +font: + # Normal (roman) font face + normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + # family: Source Code Pro + #family: SauceCodePro Nerd Font # This is needed because of reserved font names + family: SauceCodePro Nerd Font Mono + + # The `style` can be specified to pick a specific face. + style: Regular + + # Bold font face + #bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + #family: Source Code Pro + + # The `style` can be specified to pick a specific face. + #style: Bold + + # Italic font face + #italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: Source Code Pro + + # The `style` can be specified to pick a specific face. + #style: Italic + + # Bold italic font face + #bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: Source Code Pro + + # The `style` can be specified to pick a specific face. + #style: Bold Italic + + # Point size + size: 12.0 + + # Offset is the extra space around each character. `offset.y` can be thought + # of as modifying the line spacing, and `offset.x` as modifying the letter + # spacing. + offset: + x: -1 + y: -1 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increasing `x` moves the glyph to the + # right, increasing `y` moves the glyph upward. + glyph_offset: + x: -1 + y: -1 + + # Use built-in font for box drawing characters. + # + # If `true`, Alacritty will use a custom built-in font for box drawing + # characters (Unicode points 2500 - 259f). + # + builtin_box_drawing: true # TODO + +# If `true`, bold text is drawn using the bright color variants. +#draw_bold_text_with_bright_colors: true # TODO + +# Colors (Tomorrow Night) +colors: + # Default colors + primary: + background: '#191919' + foreground: '#d8dee9' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not + # present. If the bright foreground color is not set, or + # `draw_bold_text_with_bright_colors` is `false`, the normal foreground + # color will be used. + #dim_foreground: '#828482' + #bright_foreground: '#eaeaea' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + cursor: + text: '#191919' + cursor: '#d8dee9' + + # Vi mode cursor colors + # + # Colors for the cursor when the vi mode is active. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + vi_mode_cursor: + text: CellBackground + cursor: CellForeground + + # Search colors + # + # Colors used for the search bar and match highlighting. + search: + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + matches: + foreground: '#000000' + background: '#ffffff' + focused_match: + foreground: '#ffffff' + background: '#000000' + + # Keyboard hints + hints: + # First character in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + start: + foreground: '#1d1f21' + background: '#e9ff5e' + + # All characters after the first one in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + end: + foreground: '#e9ff5e' + background: '#1d1f21' + + # Line indicator + # + # Color used for the indicator displaying the position in history during + # search and vi mode. + # + # By default, these will use the opposing primary color. + #line_indicator: + # foreground: None + # background: None + + # Footer bar + # + # Color used for the footer bar on the bottom, used by search regex input, + # hyperlink URI preview, etc. + # + footer_bar: + background: '#c5c8c6' + foreground: '#1d1f21' + + # Selection colors + # + # Colors which should be used to draw the selection area. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + selection: + text: '#191919' + background: '#d8dee9' + + # Normal colors + normal: + black: '#191919' + red: '#b02626' + green: '#40a62f' + yellow: '#f2e635' + blue: '#314ad0' + magenta: '#b30ad0' + cyan: '#32d0fc' + white: '#acadb1' + + # Bright colors + bright: + black: '#36393d' + red: '#ce2727' + green: '#47c930' + yellow: '#fff138' + blue: '#2e4bea' + magenta: '#cc15ed' + cyan: '#54d9ff' + white: '#dbdbdb' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + dim: + black: '#676f78' + red: '#b55454' + green: '#78a670' + yellow: '#faf380' + blue: '#707fd0' + magenta: '#c583d0' + cyan: '#8adaf1' + white: '#e0e3e7' + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '#ff00ff' }` + # + #indexed_colors: [] + + # Transparent cell backgrounds + # + # Whether or not `window.opacity` applies to all cell backgrounds or only to + # the default background. When set to `true` all cells will be transparent + # regardless of their background color. + #transparent_background_colors: false # TODO + +# Bell +# +# The bell is rung every time the BEL control character is received. +#bell: + # Visual Bell Animation + # + # Animation effect for flashing the screen when the visual bell is rung. + # + # Values for `animation`: + # - Ease + # - EaseOut + # - EaseOutSine + # - EaseOutQuad + # - EaseOutCubic + # - EaseOutQuart + # - EaseOutQuint + # - EaseOutExpo + # - EaseOutCirc + # - Linear + #animation: EaseOutExpo + + # Duration of the visual bell flash in milliseconds. A `duration` of `0` will + # disable the visual bell animation. + duration: 0 + + # Visual bell animation color. + #color: '#ffffff' + + # Bell Command + # + # This program is executed whenever the bell is rung. + # + # When set to `command: None`, no command will be executed. + # + # Example: + # command: + # program: notify-send + # args: ["Hello, World!"] + # + #command: None + +selection: + # This string contains all characters that are used as separators for + # "semantic words" in Alacritty. + semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + save_to_clipboard: false + +cursor: + # Cursor style + style: + # Cursor shape + # + # Values for `shape`: + # - ▇ Block + # - _ Underline + # - | Beam + shape: Beam + + # Cursor blinking state + # + # Values for `blinking`: + # - Never: Prevent the cursor from ever blinking + # - Off: Disable blinking by default + # - On: Enable blinking by default + # - Always: Force the cursor to always blink + blinking: On + + # Vi mode cursor style + # + # If the vi mode cursor style is `None` or not specified, it will fall back to + # the style of the active value of the normal cursor. + # + # See `cursor.style` for available options. + vi_mode_style: None + + # Cursor blinking interval in milliseconds. + blink_interval: 750 + + # Time after which cursor stops blinking, in seconds. + # + # Specifying '0' will disable timeout for blinking. + blink_timeout: 5 + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + unfocused_hollow: true + + # Thickness of the cursor relative to the cell width as floating point number + # from `0.0` to `1.0`. + thickness: 0.15 + +# Live config reload (changes require restart) +live_config_reload: true + +# Shell +# +# You can set `shell.program` to the path of your favorite shell, e.g. +# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the +# shell. +# +# Default: +# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset +# - (Windows) powershell +#shell: +# program: /bin/bash +# args: +# - --login + +# Startup directory +# +# Directory the shell is started in. If this is unset, or `None`, the working +# directory of the parent process will be used. +#working_directory: None + +# Offer IPC using `alacritty msg` (unix only) +ipc_socket: true + +mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + double_click: { threshold: 300 } + triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + hide_when_typing: false + +# Hints +# +# Terminal hints can be used to find text or hyperlink in the visible part of +# the terminal and pipe it to other applications. +hints: + # Keys used for the hint labels. + alphabet: "jfkdls;ahgurieowpq" + + # List with all available hints + # + # Each hint must have any of `regex` or `hyperlinks` field and either an + # `action` or a `command` field. The fields `mouse`, `binding` and + # `post_processing` are optional. + # + # The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be + # highlighted. + # + # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and + # `mouse.mods` accept the same values as they do in the `key_bindings` section. + # + # The `mouse.enabled` field controls if the hint should be underlined while + # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. + # + # If the `post_processing` field is set to `true`, heuristics will be used to + # shorten the match if there are characters likely not to be part of the hint + # (e.g. a trailing `.`). This is most useful for URIs and applies only to + # `regex` matches. + # + # Values for `action`: + # - Copy + # Copy the hint's text to the clipboard. + # - Paste + # Paste the hint's text to the terminal or search. + # - Select + # Select the hint's text. + # - MoveViModeCursor + # Move the vi mode cursor to the beginning of the hint. + enabled: + - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + hyperlinks: true + command: xdg-open + post_processing: true + mouse: + enabled: true + mods: None + binding: + key: U + mods: Control|Shift + + - regex: "([^ '\"`=:\\[\\(]*/)([^/: '\"`\\)\\]]*)" + action: Paste + post_procesing: false + binding: + key: T + mods: Control|Shift + + - regex: "([a-z0-9]{7})\\s" + action: Paste + post_procesing: false + binding: + key: H + mods: Control|Shift + + # multi regex for different purposes: + # 2. UUIDs + # 3. hex (for example signatures) + # 4. IP addresses +# - regex: "([[:alnum:]_$%&+=/@-]+)\ +#|([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\ +#|([0-9a-f]{12,128})\ +#|([[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3})" +# action: Copy +# post_processing: false +# binding: +# key: U +# mods: Control|Shift + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# To trigger mouse bindings when an application running within Alacritty +# captures the mouse, the `Shift` modifier is automatically added as a +# requirement. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings for actions not exclusive to mouse mode) +# +# - Mouse exclusive actions: +# +# - ExpandSelection +# Expand the selection to the current mouse cursor location. +# +# And optionally: +# +# - `mods` (see key bindings) +mouse_bindings: +# - { mouse: Right, action: ExpandSelection } +# - { mouse: Right, mods: Control, action: ExpandSelection } + - { mouse: Middle, action: Copy } + +# Key bindings +# +# Key bindings are specified as a list of objects. For example, this is the +# default paste binding: +# +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Each key binding will specify a: +# +# - `key`: Identifier of the key pressed +# +# - A-Z +# - F1-F24 +# - Key0-Key9 +# +# A full list with available key codes can be found here: +# https://docs.rs/winit/*/winit/event/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. This command will allow you to display the hex scancodes +# for certain keys: +# +# `showkey --scancodes`. +# +# Then exactly one of: +# +# - `chars`: Send a byte sequence to the running application +# +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. To find escape codes for bindings +# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside +# of tmux. Note that applications use terminfo to map escape sequences back +# to keys. It is therefore required to update the terminfo when changing an +# escape sequence. +# +# - `action`: Execute a predefined action +# +# - ToggleViMode +# - SearchForward +# Start searching toward the right of the search origin. +# - SearchBackward +# Start searching toward the left of the search origin. +# - Copy +# - Paste +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollHalfPageUp +# - ScrollHalfPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# Remove the terminal's scrollback history. +# - Hide +# Hide the Alacritty window. +# - Minimize +# Minimize the Alacritty window. +# - Quit +# Quit Alacritty. +# - ToggleFullscreen +# - ToggleMaximized +# - SpawnNewInstance +# Spawn a new instance of Alacritty. +# - CreateNewWindow +# Create a new Alacritty window from the current process. +# - ClearLogNotice +# Clear Alacritty's UI warning and error notice. +# - ClearSelection +# Remove the active selection. +# - ReceiveChar +# - None +# +# - Vi mode exclusive actions: +# +# - Open +# Perform the action of the first matching hint under the vi mode cursor +# with `mouse.enabled` set to `true`. +# - ToggleNormalSelection +# - ToggleLineSelection +# - ToggleBlockSelection +# - ToggleSemanticSelection +# Toggle semantic selection based on `selection.semantic_escape_chars`. +# - CenterAroundViCursor +# Center view around vi mode cursor +# +# - Vi mode exclusive cursor motion actions: +# +# - Up +# One line up. +# - Down +# One line down. +# - Left +# One character left. +# - Right +# One character right. +# - First +# First column, or beginning of the line when already at the first column. +# - Last +# Last column, or beginning of the line when already at the last column. +# - FirstOccupied +# First non-empty cell in this terminal row, or first non-empty cell of +# the line when already at the first cell of the row. +# - High +# Top of the screen. +# - Middle +# Center of the screen. +# - Low +# Bottom of the screen. +# - SemanticLeft +# Start of the previous semantically separated word. +# - SemanticRight +# Start of the next semantically separated word. +# - SemanticLeftEnd +# End of the previous semantically separated word. +# - SemanticRightEnd +# End of the next semantically separated word. +# - WordLeft +# Start of the previous whitespace separated word. +# - WordRight +# Start of the next whitespace separated word. +# - WordLeftEnd +# End of the previous whitespace separated word. +# - WordRightEnd +# End of the next whitespace separated word. +# - Bracket +# Character matching the bracket at the cursor's location. +# - SearchNext +# Beginning of the next match. +# - SearchPrevious +# Beginning of the previous match. +# - SearchStart +# Start of the match to the left of the vi mode cursor. +# - SearchEnd +# End of the match to the right of the vi mode cursor. +# +# - Search mode exclusive actions: +# - SearchFocusNext +# Move the focus to the next search match. +# - SearchFocusPrevious +# Move the focus to the previous search match. +# - SearchConfirm +# - SearchCancel +# - SearchClear +# Reset the search regex. +# - SearchDeleteWord +# Delete the last word in the search regex. +# - SearchHistoryPrevious +# Go to the previous regex in the search history. +# - SearchHistoryNext +# Go to the next regex in the search history. +# +# - macOS exclusive actions: +# - ToggleSimpleFullscreen +# Enter fullscreen without occupying another space. +# +# - Linux/BSD exclusive actions: +# +# - CopySelection +# Copy from the selection buffer. +# - PasteSelection +# Paste from the selection buffer. +# +# - `command`: Fork and execute a specified command plus arguments +# +# The `command` field must be a map containing a `program` string and an +# `args` array of command line parameter strings. For example: +# `{ program: "alacritty", args: ["-e", "vttest"] }` +# +# And optionally: +# +# - `mods`: Key modifiers to filter binding actions +# +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: +# `mods: Control|Shift`. +# Whitespace and capitalization are relevant and must match the example. +# +# - `mode`: Indicate a binding for only specific terminal reported modes +# +# This is mainly used to send applications the correct escape sequences +# when in different modes. +# +# - AppCursor +# - AppKeypad +# - Search +# - Alt +# - Vi +# +# A `~` operator can be used before a mode to apply the binding whenever +# the mode is *not* active, e.g. `~Alt`. +# +# Bindings are always filled by default, but will be replaced when a new +# binding with the same triggers is defined. To unset a default binding, it can +# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for +# a no-op if you do not wish to receive input characters for that binding. +# +# If the same trigger is assigned to multiple actions, all of them are executed +# in the order they were defined in. +key_bindings: +# +# + - { key: P, mods: Control, action: Paste } + - { key: Insert, mods: Shift, action: Paste } + - { key: Slash, mods: Control, chars: "gc" } + - { key: Y, mods: Control, action: Copy } + - { key: Key0, mods: Control, action: ResetFontSize } + - { key: Equals, mods: Control, action: IncreaseFontSize } + - { key: Plus, mods: Control, action: IncreaseFontSize } + - { key: Minus, mods: Control, action: DecreaseFontSize } + + # Vi Mode + - { key: Space, mods: Control, action: ToggleViMode } + - { key: Space, mods: Control, mode: Vi, action: ScrollToBottom } + - { key: I, mode: Vi, action: ScrollToBottom } + - { key: I, mode: Vi, action: ToggleViMode } + - { key: C, mods: Control, mode: Vi, action: ScrollToBottom } + - { key: C, mods: Control, mode: Vi, action: ToggleViMode } + - { key: Escape, mode: Vi, action: ClearSelection } + - { key: Y, mods: Control, mode: Vi, action: ScrollLineUp } + - { key: E, mods: Control, mode: Vi, action: ScrollLineDown } + - { key: G, mode: Vi, action: ScrollToTop } + - { key: G, mods: Shift, mode: Vi, action: ScrollToBottom } + - { key: B, mods: Control, mode: Vi, action: ScrollPageUp } + - { key: F, mods: Control, mode: Vi, action: ScrollPageDown } + - { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp } + - { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown } + - { key: Y, mode: Vi, action: Copy } + - { key: Y, mode: Vi, action: ClearSelection } + - { key: V, mode: Vi, action: ToggleNormalSelection } + - { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection } + - { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection } + - { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection } + - { key: Return, mode: Vi, action: Open } + - { key: K, mode: Vi, action: Up } + - { key: J, mode: Vi, action: Down } + - { key: H, mode: Vi, action: Left } + - { key: L, mode: Vi, action: Right } + - { key: Up, mode: Vi, action: Up } + - { key: Down, mode: Vi, action: Down } + - { key: Left, mode: Vi, action: Left } + - { key: Right, mode: Vi, action: Right } + - { key: Key0, mode: Vi, action: First } + - { key: Key4, mode: Vi, action: Last } + - { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied } + - { key: H, mods: Shift, mode: Vi, action: High } + - { key: M, mods: Shift, mode: Vi, action: Middle } + - { key: L, mods: Shift, mode: Vi, action: Low } + - { key: B, mode: Vi, action: SemanticLeft } + - { key: W, mode: Vi, action: SemanticRight } + - { key: E, mode: Vi, action: SemanticRightEnd } + - { key: B, mods: Shift, mode: Vi, action: WordLeft } + - { key: W, mods: Shift, mode: Vi, action: WordRight } + - { key: E, mods: Shift, mode: Vi, action: WordRightEnd } + - { key: Key5, mods: Shift, mode: Vi, action: Bracket } + - { key: Slash, mode: Vi, action: SearchForward } + - { key: Slash, mods: Shift, mode: Vi, action: SearchBackward } + - { key: N, mode: Vi, action: SearchNext } + - { key: N, mods: Shift, mode: Vi, action: SearchPrevious } +# +# +# + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp } + #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } + #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop } + #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } + + # Vi Mode + #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } + #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } + #- { key: Escape, mode: Vi|~Search, action: ClearSelection } + #- { key: I, mode: Vi|~Search, action: ToggleViMode } + #- { key: I, mode: Vi|~Search, action: ScrollToBottom } + #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } + #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } + #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } + #- { key: G, mode: Vi|~Search, action: ScrollToTop } + #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } + #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } + #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } + #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } + #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } + #- { key: Y, mode: Vi|~Search, action: Copy } + #- { key: Y, mode: Vi|~Search, action: ClearSelection } + #- { key: Copy, mode: Vi|~Search, action: ClearSelection } + #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } + #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } + #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } + #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } + #- { key: Return, mode: Vi|~Search, action: Open } + #- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor } + #- { key: K, mode: Vi|~Search, action: Up } + #- { key: J, mode: Vi|~Search, action: Down } + #- { key: H, mode: Vi|~Search, action: Left } + #- { key: L, mode: Vi|~Search, action: Right } + #- { key: Up, mode: Vi|~Search, action: Up } + #- { key: Down, mode: Vi|~Search, action: Down } + #- { key: Left, mode: Vi|~Search, action: Left } + #- { key: Right, mode: Vi|~Search, action: Right } + #- { key: Key0, mode: Vi|~Search, action: First } + #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } + #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } + #- { key: H, mods: Shift, mode: Vi|~Search, action: High } + #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } + #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } + #- { key: B, mode: Vi|~Search, action: SemanticLeft } + #- { key: W, mode: Vi|~Search, action: SemanticRight } + #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } + #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } + #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } + #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } + #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } + #- { key: Slash, mode: Vi|~Search, action: SearchForward } + #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } + #- { key: N, mode: Vi|~Search, action: SearchNext } + #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } + + # Search Mode + #- { key: Return, mode: Search|Vi, action: SearchConfirm } + #- { key: Escape, mode: Search, action: SearchCancel } + #- { key: C, mods: Control, mode: Search, action: SearchCancel } + #- { key: U, mods: Control, mode: Search, action: SearchClear } + #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } + #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } + #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } + #- { key: Up, mode: Search, action: SearchHistoryPrevious } + #- { key: Down, mode: Search, action: SearchHistoryNext } + #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } + #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } + + # (Windows, Linux, and BSD only) + #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } + #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } + #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Plus, mods: Control, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Plus, mods: Command, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: H, mods: Command|Alt, action: HideOtherApplications } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: CreateNewWindow } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, mode: ~Search, action: SearchForward } + #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } + +#debug: + # Display the time it takes to redraw each frame. + #render_timer: false + + # Keep the log file after quitting Alacritty. + #persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - Off + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Renderer override. + # - glsl3 + # - gles2 + # - gles2_pure + #renderer: None + + # Print all received window events. + #print_events: false + + # Highlight window damage information. + #highlight_damage: false diff --git a/home-manager/soispha/config/alacritty/default.nix b/home-manager/soispha/config/alacritty/default.nix new file mode 100644 index 00000000..4e98f502 --- /dev/null +++ b/home-manager/soispha/config/alacritty/default.nix @@ -0,0 +1,6 @@ +{config, ...}: { + programs.alacritty = { + enable = true; + }; + xdg.configFile."alacritty/alacritty.yml".source = ./alacritty.yml; +} diff --git a/home-manager/soispha/config/btop/default.nix b/home-manager/soispha/config/btop/default.nix new file mode 100644 index 00000000..06b56ea7 --- /dev/null +++ b/home-manager/soispha/config/btop/default.nix @@ -0,0 +1,5 @@ +{config, ...}: { + programs.btop = { + enable = true; + }; +} diff --git a/home-manager/soispha/config/dconf/default.nix b/home-manager/soispha/config/dconf/default.nix new file mode 100644 index 00000000..dc439e1e --- /dev/null +++ b/home-manager/soispha/config/dconf/default.nix @@ -0,0 +1,9 @@ +{...}: { + # Also see: https://github.com/gvolpe/dconf2nix + dconf.settings = { + "org/gnome/desktop/wm/preferences" = { + # hide gtk buttons in titelbar + button-layout = ""; + }; + }; +} diff --git a/home-manager/soispha/config/default.nix b/home-manager/soispha/config/default.nix new file mode 100644 index 00000000..4dfb0f9b --- /dev/null +++ b/home-manager/soispha/config/default.nix @@ -0,0 +1,36 @@ +{...}: { + imports = [ + ./alacritty + ./btop + ./dconf + ./direnv + ./firefox + ./gammastep + ./git + ./gpg + ./grades + ./gtk + ./himalaya + ./keepassxc + ./latexindent + ./less + ./lf + ./mail + ./mako + ./mbsync + ./mpd + ./mpv + ./mumble + ./neomutt + ./neovim + ./nheko + ./npm + ./python + ./rclone + ./ssh + ./swayidle + ./swaylock + ./yambar + ./zsh + ]; +} diff --git a/home-manager/soispha/config/direnv/default.nix b/home-manager/soispha/config/direnv/default.nix new file mode 100644 index 00000000..3a7b8add --- /dev/null +++ b/home-manager/soispha/config/direnv/default.nix @@ -0,0 +1,6 @@ +{...}: { + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; +} diff --git a/home-manager/soispha/config/firefox/config/bookmarks/default.nix b/home-manager/soispha/config/firefox/config/bookmarks/default.nix new file mode 100644 index 00000000..4de83ac9 --- /dev/null +++ b/home-manager/soispha/config/firefox/config/bookmarks/default.nix @@ -0,0 +1,26 @@ +[ + { + name = "Feed - Piped"; + url = "https://piped.video/feed"; + } + + { + name = "DeepL Translate"; + url = "https://www.deepl.com/translator"; + } + + { + name = "HM Options"; + url = "https://mipmip.github.io/home-manager-option-search/"; + } + + { + name = "Nix lib"; + url = "https://teu5us.github.io/nix-lib.html"; + } + + { + name = "Nixpkgs manual"; + url = "https://ryantm.github.io/nixpkgs/"; + } +] diff --git a/home-manager/soispha/config/firefox/config/chrome/userChrome.css b/home-manager/soispha/config/firefox/config/chrome/userChrome.css new file mode 100644 index 00000000..0b3aff77 --- /dev/null +++ b/home-manager/soispha/config/firefox/config/chrome/userChrome.css @@ -0,0 +1,41 @@ +/* thickness of tab when you have too many open tabs */ +.tabbrowser-tab:not([pinned="true"]) { + min-width: 10px !important; + min-height: 10px !important; +} + +/* tab height +#TabsToolbar .tabbrowser-tabs { +min-height: 10px !important; +} +*/ + +/* +.tabbrowser-tab {min-width: 016px !important;} +.tabbrowser-tab {clip-width: 016px !important;} +*/ + +/* the + button that opens new tabs */ +#TabsToolbar .tabs-newtab-button { + margin-left: 10px !important; + height: Auto !important; +} + +#main-window[privatebrowsingmode="temporary"] #navigator-toolbox { + background-color: #c40944 !important; +} + +/* close button inside a tab */ +.tab-close-button * { + width: 10px !important; + height: 10px !important; +} + +/* bookmark toolbar */ +#personal-bookmarks .bookmark-item > .toolbarbutton-text { + font-size: 10pt !important; +} +#personal-bookmarks .bookmark-item > .toolbarbutton-icon { + height: 12px !important; + width: 12px !important; +} diff --git a/home-manager/soispha/config/firefox/config/extensions/extensions.json b/home-manager/soispha/config/firefox/config/extensions/extensions.json new file mode 100644 index 00000000..735ef932 --- /dev/null +++ b/home-manager/soispha/config/firefox/config/extensions/extensions.json @@ -0,0 +1,51 @@ +{ + "darkreader": { + "addonId": "addon@darkreader.org", + "pname": "darkreader", + "sha256": "sha256:c09ed43a96dccab1de3445aac263de0569e3333da330d645094e3f938f13b30e", + "url": "https://addons.mozilla.org/firefox/downloads/file/4128489/darkreader-4.9.64.xpi", + "version": "4.9.64" + }, + "keepassxc-browser": { + "addonId": "keepassxc-browser@keepassxc.org", + "pname": "keepassxc-browser", + "sha256": "sha256:deb1c3c29fabe90dd811536d434d64c200caab9a9f7febc3428aa170eefec5f2", + "url": "https://addons.mozilla.org/firefox/downloads/file/4134768/keepassxc_browser-1.8.7.xpi", + "version": "1.8.7" + }, + "libredirect": { + "addonId": "7esoorv3@alefvanoon.anonaddy.me", + "pname": "libredirect", + "sha256": "sha256:564e56e1ccccf2f445b6cb9485c602609589a23052d2a53ab491cbce51c6b42f", + "url": "https://addons.mozilla.org/firefox/downloads/file/4144580/libredirect-2.7.1.xpi", + "version": "2.7.1" + }, + "simple-tab-groups": { + "addonId": "simple-tab-groups@drive4ik", + "pname": "simple-tab-groups", + "sha256": "sha256:b56f30cea753a9c4d1c0e078c0e5e635f1885ea7e40305cee59b9e145fad0a6c", + "url": "https://addons.mozilla.org/firefox/downloads/file/4103800/simple_tab_groups-5.2.xpi", + "version": "5.2" + }, + "tridactyl-vim": { + "addonId": "tridactyl.vim@cmcaine.co.uk", + "pname": "tridactyl-vim", + "sha256": "sha256:08b7af97bef05300ab3ac3ad721322ff00505631233482568fc4489c16d51b71", + "url": "https://addons.mozilla.org/firefox/downloads/file/4036604/tridactyl_vim-1.23.0.xpi", + "version": "1.23.0" + }, + "ublock-origin": { + "addonId": "uBlock0@raymondhill.net", + "pname": "ublock-origin", + "sha256": "sha256:8b73468bc233a11dd2895219466381783d19123857dd0b6fd16a01820fca4834", + "url": "https://addons.mozilla.org/firefox/downloads/file/4141256/ublock_origin-1.51.0.xpi", + "version": "1.51.0" + }, + "video-pauser": { + "addonId": "video-pauser@addons.vhack.eu", + "pname": "video-pauser", + "sha256": "sha256:da02e29f1d50d3a6db8a28bb7972afaeaa788bb8d38a2e9ebbfcd73d65d84841", + "url": "https://addons.mozilla.org/firefox/downloads/file/4098103/video_pauser-0.1.0.xpi", + "version": "0.1.0" + } +} diff --git a/home-manager/soispha/config/firefox/config/prefs/default.nix b/home-manager/soispha/config/firefox/config/prefs/default.nix new file mode 100644 index 00000000..e0e72cf9 --- /dev/null +++ b/home-manager/soispha/config/firefox/config/prefs/default.nix @@ -0,0 +1,23 @@ +{ + pkgs, + config, + user_js, + lib, + ... +}: let + bookmarks = import ../bookmarks; + firefoxBookmarksFile = (import ../../functions/bookmarks) {inherit lib pkgs;}; + user_js_override = pkgs.writeText "user.override.js" (builtins.readFile ./override.js); +in + pkgs.runCommand "user.js" {} '' + mkdir $out; + cat "${user_js}/user.js" > $out/user.js; + cat "${user_js_override}" >> $out/user.js; + + cat << EOF >> $out/user.js; + // My bookmarks + user_pref("browser.bookmarks.file", "${toString (firefoxBookmarksFile bookmarks)}"); + user_pref("browser.startup.homepage", "file:///home/dt/home.html"); // 0103 // TODO add this from a flake + user_pref("browser.download.dir", "${config.home.homeDirectory}/media/downloads"); + EOF + '' diff --git a/home-manager/soispha/config/firefox/config/prefs/override.js b/home-manager/soispha/config/firefox/config/prefs/override.js new file mode 100644 index 00000000..7e63e532 --- /dev/null +++ b/home-manager/soispha/config/firefox/config/prefs/override.js @@ -0,0 +1,191 @@ +/* + 0100: STARTUP + 0200: GEOLOCATION / LANGUAGE / LOCALE + 0300: QUIETER FOX + 0400: SAFE BROWSING + 0600: BLOCK IMPLICIT OUTBOUND + 0700: DNS / DoH / PROXY / SOCKS / IPv6 + 0800: LOCATION BAR / SEARCH BAR / SUGGESTIONS / HISTORY / FORMS + 0900: PASSWORDS + 1000: DISK AVOIDANCE + 1200: HTTPS (SSL/TLS / OCSP / CERTS / HPKP) + 1400: FONTS + 1600: HEADERS / REFERERS + 1700: CONTAINERS + 2000: PLUGINS / MEDIA / WEBRTC + 2400: DOM (DOCUMENT OBJECT MODEL) + 2600: MISCELLANEOUS + 2700: ETP (ENHANCED TRACKING PROTECTION) + 2800: SHUTDOWN & SANITIZING + 4500: RFP (RESIST FINGERPRINTING) + 5000: OPTIONAL OPSEC + 5500: OPTIONAL HARDENING + 6000: DON'T TOUCH + 7000: DON'T BOTHER + 8000: DON'T BOTHER: FINGERPRINTING + 9000: NON-PROJECT RELATED + 9999: DEPRECATED / REMOVED / LEGACY / RENAMED +*/ + + +// restore session +user_pref("browser.startup.page", 3); // 0102 + +user_pref("browser.newtabpage.enabled", true); // 0104 + +// disable the geoservice, TODO don't know if I want this +//user_pref("geo.provider.use_geoclue", false); // 0202 + +// TODO is this something useful? +user_pref("datareporting.policy.dataSubmissionEnabled", true); // 0330 + +// enable health reports +user_pref("datareporting.healthreport.uploadEnabled", true); // 0331 + +// Do I want to opt-out? +user_pref("toolkit.telemetry.coverage.opt-out", false); // 0333 + +// enables studies +user_pref("app.shield.optoutstudies.enabled", true); // 0340 + +// I guess that browsing protection is useful +user_pref("browser.safebrowsing.downloads.remote.enabled", true); // 0403 + +// TODO does this (-> set to false) make things slower? +user_pref("network.prefetch-next", true); // 0601 + +// enable ipv6 because the rest of the system uses it +user_pref("network.dns.disableIPv6", false); // 0701 + +// TRR only +user_pref("network.trr.mode", 3); // 0710 + +// I trust my search engine +user_pref("keyword.enabled", true); // 801 +user_pref("browser.search.suggest.enabled", true); // 0804 +user_pref("browser.urlbar.suggest.searches", true); // 0804 +// TODO no idea what this does, enabling it +user_pref("browser.urlbar.showSearchTerms.enabled", true); // 9004 + +// prefetch urls, if the get auto completed +user_pref("browser.urlbar.speculativeConnect.enabled", true); // 0805 + +// Disable autoScrolling (clicking with the mouse wheel) +user_pref("general.autoScroll", false); + +// add new tabs after the current one +user_pref("browser.tabs.insertAfterCurrent", true); + +// TODO I might want to enable this +//user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); // 0807 + +// TODO enable form and search history? +//user_pref("browser.formfill.enable", false); // 0810 + +// disk cache should help performance +user_pref("browser.cache.disk.enable", true); // 1001 + +// store extra session data (form content, cookies and POST data) 0: everywhere +user_pref("browser.sessionstore.privacy_level", 0); // 1003 + +// Disable unsafe passive content (images) on https sites +user_pref("security.mixed_content.block_display_content", true); // 1241 + +// Disable the eme banner +user_pref("browser.eme.ui.enabled", false); // 2022 + +// Don't delete my precious temp files +user_pref("browser.helperApps.deleteTempFileOnExit", false); // 2603 + +// Download to the download dir +user_pref("browser.download.useDownloadDir", true); // 2651 + +// Open the download panel +user_pref("browser.download.alwaysOpenPanel", true); // 2652 + +// Block after custom ruleset +user_pref("browser.contentblocking.category", "custom"); // 2701 + +// set the custom settings // 7016 +user_pref("network.cookie.cookieBehavior", 1); +user_pref("network.http.referer.disallowCrossSiteRelaxingDefault", true); +user_pref("network.http.referer.disallowCrossSiteRelaxingDefault.top_navigation", true); +user_pref("privacy.partition.network_state.ocsp_cache", true); +user_pref("privacy.query_stripping.enabled", true); +user_pref("privacy.trackingprotection.enabled", true); +user_pref("privacy.trackingprotection.socialtracking.enabled", true); +user_pref("privacy.trackingprotection.cryptomining.enabled", true); +user_pref("privacy.trackingprotection.fingerprinting.enabled", true); + + +// I might want to change that, when it hinders session restore +//user_pref("privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage", false); // 2720 + +// I like my history very much! +user_pref("privacy.sanitize.sanitizeOnShutdown", false); // 2810 + +// The downsides (light theme + potential breakages): +//user_pref("privacy.resistFingerprinting", true); // 4501 +user_pref("privacy.resistFingerprinting.letterboxing", false); // 4504 + +// I would like to keep my gl, even in the web +user_pref("webgl.disabled", false); // 4520 + +// I like my service workers and am using a service using them. +user_pref("dom.serviceWorkers.enabled", true); // 7017 + +// I've got a password manager already +user_pref("signon.rememberSignons", false); // 5003 + +// Do not track header +user_pref("privacy.donottrackheader.enabled", true); // 7015 + +// Allow my custom css +user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); + +// might improve performance TODO +user_pref("gfx.webrender.all", true); + +// disable updates (pretty pointless with nix) +user_pref("extensions.update.autoUpdateDefault", false); +user_pref("extensions.update.enabled", false); +user_pref("app.update.channel", "default"); + +user_pref("browser.ctrlTab.recentlyUsedOrder", false); + +user_pref("browser.download.useDownloadDir", true); +user_pref("browser.download.folderList", 2); # TODO +user_pref("browser.download.viewableInternally.typeWasRegistered.svg", true); +user_pref("browser.download.viewableInternally.typeWasRegistered.webp", true); +user_pref("browser.download.viewableInternally.typeWasRegistered.xml", true); + +// TODO what does this do? +user_pref("browser.search.widget.inNavBar", true); + +user_pref("browser.shell.checkDefaultBrowser", false); +user_pref("browser.tabs.loadInBackground", true); +user_pref("browser.urlbar.placeholderName", "Brave"); + +// Set the tabs and bookmarks +user_pref("browser.tabs.inTitlebar", 1); +user_pref("browser.toolbars.bookmarks.visibility", "always"); +user_pref("browser.places.importBookmarksHTML", true); + +// Theme +user_pref("extensions.activeThemeID", "firefox-alpenglow@mozilla.org"); +user_pref("extensions.extensions.activeThemeID", "firefox-alpenglow@mozilla.org"); + +// highlight all entries when searching +user_pref("findbar.highlightAll", true); + +// TODO +//user_pref("extensions.webcompat.enable_picture_in_picture_overrides", true); +//user_pref("extensions.webcompat.enable_shims", true); +//user_pref("extensions.webcompat.perform_injections", true); +//user_pref("extensions.webcompat.perform_ua_overrides", true); + +// onlykey / copied from a yubikey config +//user_pref("security.webauth.u2f", true); +//user_pref("security.webauth.webauthn", true); +//user_pref("security.webauth.webauthn_enable_softtoken", true); +//user_pref("security.webauth.webauthn_enable_usbtoken", true); diff --git a/home-manager/soispha/config/firefox/config/search/engines/default.nix b/home-manager/soispha/config/firefox/config/search/engines/default.nix new file mode 100644 index 00000000..286d7247 --- /dev/null +++ b/home-manager/soispha/config/firefox/config/search/engines/default.nix @@ -0,0 +1,59 @@ +{pkgs, ...}: { + "Brave Search" = { + urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; + IconUpdateURL = "https://raw.githubusercontent.com/brave/brave-core/master/components/brave_welcome_ui/components/images/lion_logo.svg"; + updateInterval = 24; # every day + definedAliases = ["@bs"]; + }; + + # NIX + "Nix Packages" = { + urls = [{template = "https://search.nixos.org/packages?type=packages&query={searchTerms}";}]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = ["@np"]; + }; + "Nix Options" = { + urls = [{template = "https://search.nixos.org/options?type=options&query={searchTerms}";}]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = ["@no"]; + }; + "NixOS Wiki" = { + urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = ["@nw"]; + }; + + "Arch Wiki" = { + urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}]; + iconUpdateURL = "https://upload.wikimedia.org/wikipedia/commons/a/a5/Archlinux-icon-crystal-64.svg"; + updateInterval = 24; + definedAliases = ["@aw"]; + }; + + # RUST + "Rust std" = { + urls = [{template = "https://doc.rust-lang.org/std/?search={searchTerms}";}]; + iconUpdateURL = "https://rustacean.net/assets/rustacean-orig-noshadow.svg"; + updateInterval = 24; + definedAliases = ["@rs"]; + }; + + "Google Scholar" = { + urls = [{template = "https://scholar.google.com/scholar?hl=en&q={searchTerms}";}]; + iconUpdateURL = "https://scholar.google.com/favicon.ico"; + updateInterval = 24; + definedAliases = ["@gs"]; + }; + "Wikipedia" = { + urls = [{template = "https://en.wikipedia.org/wiki/{searchTerms}";}]; + iconUpdateURL = "https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg"; + updateInterval = 24; + definedAliases = ["@wp"]; + }; + + "Wikipedia (en)".metaData.hidden = true; + "DuckDuckGo".metaData.hidden = true; + "Bing".metaData.hidden = true; + "Google".metaData.hidden = true; + "Amazon.de".metaData.hidden = true; +} diff --git a/home-manager/soispha/config/firefox/default.nix b/home-manager/soispha/config/firefox/default.nix new file mode 100644 index 00000000..3c792045 --- /dev/null +++ b/home-manager/soispha/config/firefox/default.nix @@ -0,0 +1,65 @@ +{ + config, + pkgs, + lib, + user_js, + video_pause, + ... +}: let + userChrome = builtins.readFile ./config/chrome/userChrome.css; + + user_js_nix = (import ./config/prefs) {inherit pkgs lib config user_js;}; + + extensions = builtins.map buildFirefoxXpiAddon ( + lib.attrValues ( + lib.importJSON ./config/extensions/extensions.json + ) + ); + engines = (import ./config/search/engines) {inherit pkgs;}; + + # source: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/default.nix + buildFirefoxXpiAddon = (import ./functions/extensions) {inherit pkgs;}; + + video-pauser = (import ./functions/extensions/video-pauser.nix) {inherit pkgs video_pause;}; +in { + home.sessionVariables = { + # improve touch input & make scrolling smother + MOZ_USE_XINPUT2 = "1"; + # improve wayland support + MOZ_ENABLE_WAYLAND = 1; + }; + xdg.mimeApps = { + enable = true; + defaultApplications = { + "text/html" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; + "x-scheme-handler/about" = ["firefox.desktop"]; + "x-scheme-handler/unknown" = ["firefox.desktop"]; + }; + }; + programs.firefox = { + enable = true; + package = pkgs.firefox-wayland.override { + extraNativeMessagingHosts = [video-pauser]; + }; + profiles."default" = { + inherit extensions; + isDefault = true; + id = 0; + name = "default"; + + inherit userChrome; + + search = { + default = "Brave Search"; + force = true; + + inherit engines; + }; + + bookmarks = []; + extraConfig = builtins.readFile "${user_js_nix}/user.js"; + }; + }; +} diff --git a/home-manager/soispha/config/firefox/functions/bookmarks/default.nix b/home-manager/soispha/config/firefox/functions/bookmarks/default.nix new file mode 100644 index 00000000..d1d89dd2 --- /dev/null +++ b/home-manager/soispha/config/firefox/functions/bookmarks/default.nix @@ -0,0 +1,49 @@ +{ + lib, + pkgs, +}: bookmarks: let + indent = level: + lib.concatStringsSep "" (map (lib.const " ") (lib.range 1 level)); + + bookmarkToHTML = indentLevel: bookmark: '' + ${indent indentLevel}
${lib.escapeXML bookmark.name}''; + + directoryToHTML = indentLevel: directory: '' + ${indent indentLevel}
${ + if directory.toolbar + then ''

Bookmarks Toolbar'' + else "

${lib.escapeXML directory.name}" + }

+ ${indent indentLevel}

+ ${allItemsToHTML (indentLevel + 1) directory.bookmarks} + ${indent indentLevel}

''; + + itemToHTMLOrRecurse = indentLevel: item: + if item ? "url" + then bookmarkToHTML indentLevel item + else directoryToHTML indentLevel item; + + allItemsToHTML = indentLevel: bookmarks: + lib.concatStringsSep "\n" + (map (itemToHTMLOrRecurse indentLevel) bookmarks); + + bookmarkEntries = allItemsToHTML 1 bookmarks; +in + pkgs.writeText "firefox-bookmarks.html" '' + + + + Bookmarks +

Bookmarks Menu

+ +

+

Bookmarks Toolbar

+

+ ${bookmarkEntries} +

+

+ '' diff --git a/home-manager/soispha/config/firefox/functions/extensions/default.nix b/home-manager/soispha/config/firefox/functions/extensions/default.nix new file mode 100644 index 00000000..b84461c7 --- /dev/null +++ b/home-manager/soispha/config/firefox/functions/extensions/default.nix @@ -0,0 +1,25 @@ +{pkgs, ...}: { + pname, + version, + addonId, + url, + sha256, + #meta, + ... +}: +pkgs.stdenv.mkDerivation { + name = "${pname}-${version}"; + + #inherit meta; + + src = builtins.fetchurl {inherit url sha256;}; + + preferLocalBuild = true; + allowSubstitutes = true; + + buildCommand = '' + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + install -v -m644 "$src" "$dst/${addonId}.xpi" + ''; +} diff --git a/home-manager/soispha/config/firefox/functions/extensions/video-pauser.nix b/home-manager/soispha/config/firefox/functions/extensions/video-pauser.nix new file mode 100644 index 00000000..c4c5238f --- /dev/null +++ b/home-manager/soispha/config/firefox/functions/extensions/video-pauser.nix @@ -0,0 +1,30 @@ +{ + pkgs, + video_pause, + ... +}: +pkgs.runCommand "video_pause_native_messaging" {} '' + install -d $out/share/ + cat << EOF > $out/share/video_pauser.json + { + "name": "video_pauser", + "description": "Pause your Videos with a single key stroke!", + "path": "${video_pause}/bin/video_pause", + "type": "stdio", + "allowed_extensions": ["video-pauser@addons.vhack.eu"] + } + EOF + + nativeMessagingPaths=( + /lib/mozilla/native-messaging-hosts + /etc/opt/chrome/native-messaging-hosts + /etc/chromium/native-messaging-hosts + /etc/vivaldi/native-messaging-hosts + /lib/librewolf/native-messaging-hosts + ) + + for manifestDir in "''${nativeMessagingPaths[@]}"; do + install -d $out$manifestDir + ln -s $out/share/video_pauser.json $out$manifestDir/ + done +'' diff --git a/home-manager/soispha/config/firefox/scripts/unzip_mozlz4.py b/home-manager/soispha/config/firefox/scripts/unzip_mozlz4.py new file mode 100755 index 00000000..311fd214 --- /dev/null +++ b/home-manager/soispha/config/firefox/scripts/unzip_mozlz4.py @@ -0,0 +1,43 @@ +#!/usr/bin/python +# source: https://unix.stackexchange.com/a/497861 +# Command-line tool to decompress mozLz4 files used for example by Firefox to store various kinds of session backup information. +# Works in both Python 2.7.15 and 3.6.7, as of version 2.1.6 of the LZ4 Python bindings at pypi.org/project/lz4. +# To use in another script, simply cut and paste the import statement and the mozlz4_to_text() function (lines 8 to 17). + +import lz4.block # pip install lz4 --user + + +def mozlz4_to_text(filepath): + # Given the path to a "mozlz4", "jsonlz4", "baklz4" etc. file, + # return the uncompressed text. + bytestream = open(filepath, "rb") + bytestream.read(8) # skip past the b"mozLz40\0" header + valid_bytes = bytestream.read() + text = lz4.block.decompress(valid_bytes) + return text + + +def main(args): + # Given command-line arguments of an input filepath for a ".mozlz4" file + # and optionally an output filepath, write the decompressed text to the + # output filepath. + # Default output filepath is the input filepath minus the last three characters + # (e.g. "foo.jsonlz4" becomes "foo.json") + filepath_in = args[0] + if len(args) < 2: + filepath_out = filepath_in[:-3] + else: + filepath_out = args[1] + text = mozlz4_to_text(filepath_in) + with open(filepath_out, "wb") as outfile: + outfile.write(text) + print("Wrote decompressed text to {}".format(filepath_out)) + + +if __name__ == "__main__": + import sys + args = sys.argv[1:] + if args and not args[0] in ("--help", "-h"): + main(args) + else: + print("Usage: mozlz4.py ") diff --git a/home-manager/soispha/config/firefox/scripts/update_extensions b/home-manager/soispha/config/firefox/scripts/update_extensions new file mode 100755 index 00000000..05f47aad --- /dev/null +++ b/home-manager/soispha/config/firefox/scripts/update_extensions @@ -0,0 +1,22 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +#. ~/.local/lib/shell/lib + +tmp=$(mktemp) +cat << EOF > $tmp + darkreader + keepassxc-browser + simple-tab-groups + ublock-origin + tridactyl-vim + video-pauser + libredirect +EOF + +# The bin is provided in the devshell. The cat execution should be unquoted +generate_extensions $(cat "$tmp") > "$(dirname $0)"/../config/extensions/extensions.json + + + +rm "$tmp"; diff --git a/home-manager/soispha/config/gammastep/default.nix b/home-manager/soispha/config/gammastep/default.nix new file mode 100644 index 00000000..6090921b --- /dev/null +++ b/home-manager/soispha/config/gammastep/default.nix @@ -0,0 +1,29 @@ +{ + lib, + nixosConfig, + ... +}: let + temp = + if nixosConfig.soispha.laptop.enable + then 2000 + else 1300; +in { + services.gammastep = { + enable = true; + settings = { + general = { + temp-day = lib.mkForce temp; + temp-night = lib.mkForce temp; + gamma = "0.8:0.8:0.8"; + fade = 0; + adjustment-method = "wayland"; + location-provider = "manual"; + }; + + manual = { + lat = 48.1; + lon = 11.6; + }; + }; + }; +} diff --git a/home-manager/soispha/config/git/default.nix b/home-manager/soispha/config/git/default.nix new file mode 100644 index 00000000..9e15da1d --- /dev/null +++ b/home-manager/soispha/config/git/default.nix @@ -0,0 +1,76 @@ +{...}: let + gitIgnoreFile = ./git_ignore.git; + gitTemplateFile = ./git_template.git; +in { + programs.git = { + enable = true; + #package = pkgs.gitAndTools.gitFull; # TODO for git send-email support + aliases = { + st = "status"; + ds = "diff --staged"; + di = "diff"; + rs = "restore --staged"; + + ## Logging: + ls = "log --max-count=10 --color --format=format:'%C(bold red)%h%C(reset) %C(dim bold blue)%s%C(reset) %C(dim white)[%aN] %C(bold red)<%G?>%C(reset)%C(auto)%d%C(reset)'"; + + # https://stackoverflow.com/a/61487052 + lg = "lg1"; + lg1 = "lg1-specific --all"; + lg2 = "lg2-specific --all"; + lg3 = "lg3-specific --all"; + + lg1-specific = "log --graph --abbrev-commit --decorate \ + --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold cyan) [%G?]%C(reset)%C(auto)%d%C(reset)'"; + + lg2-specific = "log --graph --abbrev-commit --decorate \ + --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'"; + + lg3-specific = "log --graph --abbrev-commit --decorate \ + --format=format:'%C(bold blue)%h%C(reset)\ + - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)\ + %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)\ + %C(bold red)(signature: %G? by %GS, trust: %GT)%C(reset)%n\ + '' %C(white)%s%C(reset)%n''\ + %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)\ + %C(bold white)- trailers: %(trailers) %C(reset)'"; + }; + extraConfig = { + core = { + excludesFile = "${gitIgnoreFile}"; + }; + init = { + defaultBranch = "prime"; + }; + user = { + email = "soispha@vhack.eu"; + name = "Soispha"; + }; + help = { + autocorrect = 5; + }; + push = { + gpgSign = "if-asked"; + }; + commit = { + template = "${gitTemplateFile}"; + }; + }; + delta = { + enable = true; + options = { + decorations = { + commit-decoration-style = "bold yellow box ul"; + file-decoration-style = "none"; + file-style = "bold yellow ul"; + }; + features = "decorations"; + whitespace-error-style = "22 reverse"; + }; + }; + signing = { + key = "9606FC749FCE16360723D4ADA5E94010C3A642AD!"; + signByDefault = true; + }; + }; +} diff --git a/home-manager/soispha/config/git/git_ignore.git b/home-manager/soispha/config/git/git_ignore.git new file mode 100644 index 00000000..8f29815e --- /dev/null +++ b/home-manager/soispha/config/git/git_ignore.git @@ -0,0 +1,4 @@ +# default nvim Session file name +Session.vim + +# vim: ft=gitignore diff --git a/home-manager/soispha/config/git/git_template.git b/home-manager/soispha/config/git/git_template.git new file mode 100644 index 00000000..9621698d --- /dev/null +++ b/home-manager/soispha/config/git/git_template.git @@ -0,0 +1,66 @@ + +# Title: Summary, imperative, start upper case, don't end with a period +# If applied, this commit will + +# Body: Explain *what* and *why* (not *how*). + + +# BREAKING CHANGE: +# Fixes: # +# Refs: # +# Co-authored-by: + + + +# Convention Commits (https://www.conventionalcommits.org/en/v1.0.0/ or https://github.com/angular/angular/blob/85b4941be137a2fcdc664dc870e408dd72ad7de7/CONTRIBUTING.md#commit): +# Feat: [Features] -> MINOR version bump +# A new feature +# +# Fix: [Bug Fixes] -> PATCH version bump +# A bug fix +# +# append '!' after the type/scope: [Breaking Change] -> MAJOR version bump +# A breaking API change +# +# Docs: [Documentation] +# Documentation only changes +# +# Style: [Styles] +# Changes that do not affect the meaning of the code +# (white-space, formatting, missing semi-colons, etc) +# +# Refactor: [Code Refactoring] +# A code change that neither fixes a bug nor adds a feature +# +# Perf: [Performance Improvements] -> PATCH version bump +# A code change that improves performance +# +# Test: [Tests] +# Adding missing tests or correcting existing tests +# +# Build: [Builds] -> PATCH version bump +# Changes that affect the build system or external dependencies +# (example scopes: gulp, broccoli, npm) +# +# Ci: [Continuous Integrations] +# Changes to our CI configuration files and scripts +# (example scopes: Travis, Circle, BrowserStack, SauceLabs) +# +# Chore: [Chores] +# Other changes that don't modify src or test files +# +# Reverts: [Reverts] +# Reverts a previous commit + +# How to Write a Git Commit Message: +# [https://chris.beams.io/posts/git-commit/] -> https://cbea.ms/git-commit/ +# +# 1. Separate subject from body with a blank line +# 2. Limit the subject line to 50 characters +# 3. Capitalize the subject line +# 4. Do not end the subject line with a period +# 5. Use the imperative mood in the subject line +# 6. Wrap the body at 72 characters +# 7. Use the body to explain *what* and *why* vs. *how* +# +# vim: ft=gitcommit diff --git a/home-manager/soispha/config/gpg/agent-program b/home-manager/soispha/config/gpg/agent-program new file mode 100755 index 00000000..e6917db0 --- /dev/null +++ b/home-manager/soispha/config/gpg/agent-program @@ -0,0 +1,2 @@ +#!/bin/sh +onlykey-gpg-agent -v --skey-slot=ECC32 --dkey-slot=ECC32 "$@" diff --git a/home-manager/soispha/config/gpg/default.nix b/home-manager/soispha/config/gpg/default.nix new file mode 100644 index 00000000..52069c94 --- /dev/null +++ b/home-manager/soispha/config/gpg/default.nix @@ -0,0 +1,65 @@ +{ + config, + nixosConfig, + sysLib, + pkgs, + ... +}: let + agent-program = sysLib.writeShellScriptWithLibrary { + name = "onlykey-gpg-agent"; + src = ./agent-program; + dependencies = with pkgs; [ + python3 + onlykey-agent + ]; + }; + settings = + if nixosConfig.networking.hostName == "isimud" + then {} + else { + # Hardware-based GPG configuration + agent-program = "${agent-program}/bin/onlykey-gpg-agent"; + + default-key = "Soispha "; + # TODO add more + }; + gpg-agent = + if nixosConfig.networking.hostName == "isimud" + then { + enable = true; + enableZshIntegration = true; + enableScDaemon = true; # smartcards and such things + pinentryFlavor = "tty"; + } + else { + enable = false; + enableZshIntegration = true; + enableScDaemon = true; # smartcards and such things + pinentryFlavor = "tty"; + }; +in { + programs.gpg = { + enable = true; + homedir = "${config.xdg.dataHome}/gnupg/onlykey"; + mutableKeys = false; + mutableTrust = false; + inherit settings; + publicKeys = [ + { + source = ./keys/key_1; + trust = "ultimate"; + } + { + source = ./keys/key_2; + trust = "ultimate"; + } + { + source = ./keys/key_3; + trust = "full"; + } + ]; + }; + services = { + inherit gpg-agent; + }; +} diff --git a/home-manager/soispha/config/gpg/keys/key_1 b/home-manager/soispha/config/gpg/keys/key_1 new file mode 100644 index 00000000..b10b8b6c Binary files /dev/null and b/home-manager/soispha/config/gpg/keys/key_1 differ diff --git a/home-manager/soispha/config/gpg/keys/key_2 b/home-manager/soispha/config/gpg/keys/key_2 new file mode 100644 index 00000000..0b06cf3b Binary files /dev/null and b/home-manager/soispha/config/gpg/keys/key_2 differ diff --git a/home-manager/soispha/config/gpg/keys/key_3 b/home-manager/soispha/config/gpg/keys/key_3 new file mode 100644 index 00000000..22ffb931 Binary files /dev/null and b/home-manager/soispha/config/gpg/keys/key_3 differ diff --git a/home-manager/soispha/config/grades/config.yaml b/home-manager/soispha/config/grades/config.yaml new file mode 100644 index 00000000..36712971 --- /dev/null +++ b/home-manager/soispha/config/grades/config.yaml @@ -0,0 +1,68 @@ +# für oberstufe +--- +unit: Punkte +grade_groups: + - name: Zeugnis + weight: '100' + double_weight_on_class_type: false + - name: Sonstige + weight: '1' + double_weight_on_class_type: true + - name: Klausur + weight: '1' + double_weight_on_class_type: false + +grade_types: + - name: Zeugnis + group: Zeugnis + - name: Klausur + group: Klausur + - name: Epo + group: Sonstige + - name: Test + group: Sonstige + +class_types: + - name: NebenFach + double_weight_on_marked_grade_groups: true + - name: LeistungsKurs + double_weight_on_marked_grade_groups: false + +classes: + - name: M + long_name: Mathe + class_type: LeistungsKurs + - name: E + long_name: Englisch + class_type: LeistungsKurs + - name: CH + long_name: Chemie + class_type: LeistungsKurs + + - name: d + long_name: Deutsch + class_type: NebenFach + - name: g + long_name: Geschichte + class_type: NebenFach + - name: se + long_name: Sozialkunde/Erdkunde + class_type: NebenFach + - name: et + long_name: Ethik + class_type: NebenFach + - name: spj + long_name: Sport + class_type: NebenFach + - name: inf + long_name: Informatik + class_type: NebenFach + - name: ph + long_name: Phyisk + class_type: NebenFach + - name: phi + long_name: Philosophie + class_type: NebenFach + - name: bi + long_name: Biologie + class_type: NebenFach diff --git a/home-manager/soispha/config/grades/default.nix b/home-manager/soispha/config/grades/default.nix new file mode 100644 index 00000000..d2678174 --- /dev/null +++ b/home-manager/soispha/config/grades/default.nix @@ -0,0 +1,3 @@ +{...}: { + xdg.configFile."grades/config.yaml".source = ./config.yaml; +} diff --git a/home-manager/soispha/config/gtk/default.nix b/home-manager/soispha/config/gtk/default.nix new file mode 100644 index 00000000..f5411369 --- /dev/null +++ b/home-manager/soispha/config/gtk/default.nix @@ -0,0 +1,58 @@ +{ + config, + lib, + pkgs, + stdenv, + ... +}: { + gtk = { + enable = true; + theme = { + package = pkgs.nordic; + name = "Nordic"; + }; + cursorTheme = { + package = pkgs.nordzy-cursor-theme; + name = "Nordzy-cursors"; + }; + iconTheme = { + package = pkgs.nordzy-icon-theme; + name = "Nordzy-icon"; + }; + font = { + name = "Noto Sans"; + size = 10; + }; + gtk2 = { + configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; + # extraConfig = '' + # gtk-enable-animations=1 + # gtk-primary-button-warps-slider=0 + # gtk-toolbar-style=3 + # gtk-menu-images=1 + # gtk-button-images=1 + # + # ''; + }; + gtk3 = { + # extraConfig = '' + # gtk-button-images=true + # gtk-decoration-layout=icon:minimize,maximize,close + # gtk-enable-animations=true + # gtk-menu-images=true + # gtk-primary-button-warps-slider=false + # gtk-toolbar-style=3 + # #gtk-modules=window-decorations-gtk-module:colorreload-gtk-module + # ''; + extraCss = ""; + }; + gtk4 = { + # extraConfig = '' + # gtk-application-prefer-dark-theme=true + # gtk-decoration-layout=icon:minimize,maximize,close + # gtk-enable-animations=true + # gtk-primary-button-warps-slider=false + # ''; + }; + }; +} diff --git a/home-manager/soispha/config/himalaya/default.nix b/home-manager/soispha/config/himalaya/default.nix new file mode 100644 index 00000000..99329a34 --- /dev/null +++ b/home-manager/soispha/config/himalaya/default.nix @@ -0,0 +1,8 @@ +{...}: { + programs.himalaya = { + enable = true; + settings = { + # TODO + }; + }; +} diff --git a/home-manager/soispha/config/keepassxc/default.nix b/home-manager/soispha/config/keepassxc/default.nix new file mode 100644 index 00000000..3ac82812 --- /dev/null +++ b/home-manager/soispha/config/keepassxc/default.nix @@ -0,0 +1,7 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."keepassxc/keepassxc.ini".source = ./keepassxc.ini; +} diff --git a/home-manager/soispha/config/keepassxc/keepassxc.ini b/home-manager/soispha/config/keepassxc/keepassxc.ini new file mode 100644 index 00000000..288a194b --- /dev/null +++ b/home-manager/soispha/config/keepassxc/keepassxc.ini @@ -0,0 +1,58 @@ +[General] +AutoSaveAfterEveryChange=true +BackupBeforeSave=true +BackupFilePathPattern=/home/soispha/.local/share/keepassxc/{DB_FILENAME}.old.kdbx +ConfigVersion=2 +HideWindowOnCopy=false + +[Browser] +CustomProxyLocation= +Enabled=true + +[FdoSecrets] +Enabled=true + +[GUI] +AdvancedSettings=true +ApplicationTheme=dark +CompactMode=false +HidePasswords=true +ShowExpiredEntriesOnDatabaseUnlockOffsetDays=1 +TrayIconAppearance=monochrome-light + +[KeeShare] +Active="" +Own="" +QuietSuccess=true + +[PasswordGenerator] +AdditionalChars= +AdvancedMode=true +Braces=true +Dashes=true +EASCII=true +ExcludedChars= +Length=128 +Logograms=true +LowerCase=true +Math=true +Numbers=true +Punctuation=true +Quotes=true +SpecialChars=true +Type=0 +UpperCase=true +WordCount=4 +WordSeparator="," + +[SSHAgent] +Enabled=true + +[Security] +HidePasswordPreviewPanel=true +IconDownloadFallback=true +LockDatabaseIdle=false +LockDatabaseIdleSeconds=960 +PasswordEmptyPlaceholder=true +PasswordsHidden=true +PasswordsRepeatVisible=true diff --git a/home-manager/soispha/config/latexindent/default.nix b/home-manager/soispha/config/latexindent/default.nix new file mode 100644 index 00000000..0d776e14 --- /dev/null +++ b/home-manager/soispha/config/latexindent/default.nix @@ -0,0 +1,8 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."latexindent/indentconfig.yaml".source = ./indentconfig.yaml; + xdg.configFile."latexindent/mysettings.yaml".source = ./mysettings.yaml; +} diff --git a/home-manager/soispha/config/latexindent/indentconfig.yaml b/home-manager/soispha/config/latexindent/indentconfig.yaml new file mode 100644 index 00000000..d67351f3 --- /dev/null +++ b/home-manager/soispha/config/latexindent/indentconfig.yaml @@ -0,0 +1,2 @@ +paths: +- /home/dt/.config/latexindent/mysettings.yaml diff --git a/home-manager/soispha/config/latexindent/mysettings.yaml b/home-manager/soispha/config/latexindent/mysettings.yaml new file mode 100644 index 00000000..9a0f8b2f --- /dev/null +++ b/home-manager/soispha/config/latexindent/mysettings.yaml @@ -0,0 +1,672 @@ +# defaultSettings.yaml for latexindent.pl, version 3.19.1, 2022-12-04 +# a script that aims to +# beautify .tex, .sty, .cls files +# +# (or latexindent.exe if you're on Windows) +# +#--------------------------------------------------------------------------------------- +# 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. +# +# See http://www.gnu.org/licenses/. +# +# Chris Hughes, 2017 +# +# For all communication, please visit: https://github.com/cmhughes/latexindent.pl +# +#--------------------------------------------------------------------------------------- +# You should feel encouraged to change anything you like in these settings, but +# it would probably be better to have your own user settings +# files somewhere else - remember that this file may be overwritten +# when you update your tex distribution. Please see the manual linked from: +# +# https://github.com/cmhughes/latexindent.pl +# +# for details of how to create and configure your own settings files. +# +# Please read the manual (linked from above) first to understand what each switch does. +# +#--------------------------------------------------------------------------------------- + +# latexindent can be called to act on a file without using the file's extension, +# e.g, simply +# latexindent myfile +# in which case the choice of file extension is chosen +# according to the choices made in fileExtensionPreference +# Other file extensions can be added. +fileExtensionPreference: + .tex: 1 + .sty: 2 + .cls: 3 + .bib: 4 + +# default file extension of backup file (if -w switch is active) +# for example, if your .tex file is called +# myfile.tex +# and you specify the backupExtension as BACKUP.bak then your +# backup file will be +# myfileBACKUP.bak +backupExtension: .bak + +# only one backup per file: +# - if onlyOneBackUp is 0 then, as a safety measure, +# the number on the extension increments by 1 each time: +# +# myfile.bak0, myfile.bak1, myfile.bak2 +# - if you set onlyOnebackUp to 1, then the backup file will +# be overwritten each time (not recommended until you trust the script) +onlyOneBackUp: 0 + +# some users may want a finite number of backup files, +# say at most 3; in which case, they can change this maxNumberOfBackUps. +# +# If maxNumberOfBackUps is set to 0 (or less) then infinitely +# many backups are possible, unless onlyOneBackUp is switched on +maxNumberOfBackUps: 0 + +# some users may wish to cycle through back up files. +# +# for example, with maxNumberOfBackUps: 4, they may +# wish to delete the oldest back up file, and keep only the most recent. +# +# copy myfile.bak1 to myfile.bak0 +# copy myfile.bak2 to myfile.bak1 +# copy myfile.bak3 to myfile.bak2 +# copy myfile.bak4 to myfile.bak3 +# +# the back up will be written to myfile.bak4 +cycleThroughBackUps: 0 + +# preferences for information displayed in the log file +logFilePreferences: + showEveryYamlRead: 1 + showAmalgamatedSettings: 0 + showDecorationStartCodeBlockTrace: 0 + showDecorationFinishCodeBlockTrace: 0 + endLogFileWith: '--------------' + showGitHubInfoFooter: 1 + Dumper: + Terse: 1 + Indent: 1 + Useqq: 1 + Deparse: 1 + Quotekeys: 0 + Sortkeys: 1 + Pair: " => " + +# verbatim environments specified +# in this field will not be changed at all! +verbatimEnvironments: + verbatim: 1 + lstlisting: 1 + minted: 1 + +# verbatim commands such as \verb! body !, \lstinline$something else$ +verbatimCommands: + verb: 1 + lstinline: 1 + +# no indent blocks (not necessarily verbatim +# environments) which are marked as %\begin{noindent} +# or anything else that you detail in the following +noIndentBlock: + noindent: 1 + cmhtest: 1 + +# \begin{document} and \end{document} are treated differently +# by latexindent within filecontents environments +fileContentsEnvironments: + filecontents: 1 + filecontents*: 1 + +# indent preamble +indentPreamble: 1 + +# assume no preamble in cls, sty, by default +lookForPreamble: + .tex: 1 + .sty: 0 + .cls: 0 + .bib: 0 + +# some preambles can contain \begin and \end statements +# that are not in their 'standard environment block', for example, +# consider the following key = values: +# preheadhook={\begin{mdframed}[style=myframedstyle]}, +# postfoothook=\end{mdframed}, +preambleCommandsBeforeEnvironments: 0 + +# default value of indentation +defaultIndent: " " + +# remove trailing whitespace from all lines +removeTrailingWhitespace: + beforeProcessing: 0 + afterProcessing: 1 + +# name of code blocks that should have their body aligned at ampersand delimiters +lookForAlignDelims: + tabular: + delims: 1 + alignDoubleBackSlash: 1 + spacesBeforeDoubleBackSlash: 1 + multiColumnGrouping: 0 + alignRowsWithoutMaxDelims: 1 + spacesBeforeAmpersand: 1 + spacesAfterAmpersand: 1 + justification: left + alignFinalDoubleBackSlash: 0 + dontMeasure: 0 + delimiterRegEx: '(?]*?>)' + keyEqualsValuesBracesBrackets: + name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?' + follow: '(?:(?<]+?' + follow: '\h|\R|\{|\[|\$|\)|\(' + UnNamedGroupingBracesBrackets: + follow: '\{|\[|,|&|\)|\(|\$' + arguments: + before: '(?:#\d\h*;?,?\/?)+|\<.*?\>' + between: '_|\^|\*' + trailingComments: + notPreceededBy: '(? "$script" +chmod +x "$script" +"$VISUAL" "$script" + + +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/mk_scr_temp b/home-manager/soispha/config/lf/commands/scripts/mk_scr_temp new file mode 100755 index 00000000..a520469c --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/mk_scr_temp @@ -0,0 +1,31 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + + +prompt "Script name: " +name="" +while [ -z "$name" ] || [ -e "$name" ] +do + read -r name + if [ -e "$name" ]; then + prompt "Script already exists, overwrite [y|N]: " + read -r ans + + if [ "$ans" = "y" ]; then + break + else + prompt "Script Name: " + fi + fi +done + +script="$(pwd)"/"$name" + +sed 's|%TO_BE_SHELL_LIBRARY_PATH|%SHELL_LIBRARY_PATH|' "%SHELL_LIBRARY_TEMPLATE" > "$script" +chmod +x "$script" +"$VISUAL" "$script" + + +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/open b/home-manager/soispha/config/lf/commands/scripts/open new file mode 100755 index 00000000..c507482b --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/open @@ -0,0 +1,11 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +case $(file --mime-type "$f" -bL) in + text/*|application/json|application/vnd.hp-HPGL) "$EDITOR" "$f";; + image/*) "$IVIEWER" "$f";; + *) xdg-open "$f";; +esac +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/open_config b/home-manager/soispha/config/lf/commands/scripts/open_config new file mode 100755 index 00000000..c99422f1 --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/open_config @@ -0,0 +1,7 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +"$EDITOR" "$(bookmenu -b ~/.config/bookmenu/configs -f fzf -o)" # TODO implement this +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/restore_trash b/home-manager/soispha/config/lf/commands/scripts/restore_trash new file mode 100755 index 00000000..a7bf0094 --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/restore_trash @@ -0,0 +1,7 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +trash list | fzf --multi | awk '{print $NF}' | xargs trash restore --match=exact +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/set_wall_paper b/home-manager/soispha/config/lf/commands/scripts/set_wall_paper new file mode 100755 index 00000000..45049283 --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/set_wall_paper @@ -0,0 +1,10 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +die "No yet implemented" # TODO do what the 'die' says +#sed -i "s,export AWMWALLPAPER='.*',export AWMWALLPAPER='${f}'," ${ZDOTDIR}/.zshenv +#nohub swaybg -i "$f" +#feh --bg-max --no-fehbg "$f" +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/stripspace b/home-manager/soispha/config/lf/commands/scripts/stripspace new file mode 100755 index 00000000..91714712 --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/stripspace @@ -0,0 +1,31 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +files=$(mktmp); +echo "$fx" > "$files"; + +awk_source=$(mktmp); +cat << OFT > "$awk_source" +BEGIN {FS=" "} +{for (i=1; i != NF + 1; i++) + if (i == NF) { + parts[i]=tolower(\$i); + } else { + parts[i]=tolower(\$i"_"); + } +} +END {for (i in parts) printf parts[i]} +OFT + +while read -r file; do + dirty_name=$(mktmp) + basename "$file" > "$dirty_name"; + clean_name=$(awk -f "$awk_source" "$dirty_name"); + + [ -e "$clean_name" ] && die "file \"$clean_name\" already exists!"; + mv "$(cat "$dirty_name")" "$clean_name" || die "Move failed"; + lf -remote 'send reload' +done < "$files"; +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/trash b/home-manager/soispha/config/lf/commands/scripts/trash new file mode 100755 index 00000000..7f477550 --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/trash @@ -0,0 +1,26 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +trash_output=$(mktmp); +expected_error_output=$(mktmp); + +while read -r file; do + set -- "$@" "$file" +done < "$(tmp "echo '$fx'")" + +# TODO why are we using trashy at all, when trash-cli can do everything? +# try trashy first, trough nix because both trashy and trash-cli provide a trash command, which conflicts +nix run nixpkgs#trashy -- put "$@" 2> "$trash_output"; + +cat << EOF > "$expected_error_output"; +error: Error during a \`trash\` operation: Unknown { description: "Path: '\"/.Trash-1000\"'. Message: Permission denied (os error 13)" } +EOF + +if [ "$(cat "$expected_error_output")" = "$(cat "$trash_output")" ];then + warning "Deleting with trash-cli to the /.Trash folder"; + # this file could not be trashed because it is on the tempfs volume, trash-cli can do this this + trash-put "$@"; +fi +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/commands/scripts/unarchive b/home-manager/soispha/config/lf/commands/scripts/unarchive new file mode 100755 index 00000000..69cc601c --- /dev/null +++ b/home-manager/soispha/config/lf/commands/scripts/unarchive @@ -0,0 +1,22 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +# extract the current file with the right command +# (xkcd link: https://xkcd.com/1168/) +set -f +# TODO add support for multiple files at once +case "$f" in + *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf "$f";; + *.tar.gz|*.tgz) tar xzvf "$f";; + *.tar.xz|*.txz) tar xJvf "$f";; + *.zip) unzip "$f";; + *.rar) + die "rar is a unfree format!" + #unrar x $f + ;; + *.7z) 7z x "$f";; + *) die "Unsupported format" ;; +esac +# vim: ft=sh diff --git a/home-manager/soispha/config/lf/default.nix b/home-manager/soispha/config/lf/default.nix new file mode 100644 index 00000000..9f43a891 --- /dev/null +++ b/home-manager/soispha/config/lf/default.nix @@ -0,0 +1,52 @@ +{ + pkgs, + sysLib, + nixosConfig, + shell_library, + system, + ... +}: let + commands = import ./commands {inherit pkgs sysLib shell_library system;}; + keybindings = import ./keybindings {inherit nixosConfig;}; +in { + xdg.configFile."lf/icons".source = ./icons; + xdg.configFile."lf/colors".source = ./colors; + + # TODO add the systemd tempfile option here + + programs.lf = { + enable = true; + + inherit commands keybindings; + + previewer = { + keybinding = "i"; + source = "${pkgs.ctpv}/bin/ctpv"; + }; + settings = { + # TODO this needs to be added to nixos: + #autoquit = true; # quit the server, if no clients are left + #dirpreviews = true; # preview for directories + + dircounts = true; # count things in directories TODO this has performance impact + drawbox = true; + # errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m"; + errorfmt = "\\033[1;91m%s\\033[0m"; + hidden = true; # show hidden files + icons = true; + ifs = "\\n"; # internal field separator for shell commands + #info = "size"; # show the size of a directory + shell = "sh"; + shellopts = "-eu"; # e: exit on error; u: error for unset variables + }; + # TODO remove auto quit, if it has been added + extraConfig = '' + &${pkgs.ctpv}/bin/ctpv -s $id + cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id + set cleaner ${pkgs.ctpv}/bin/ctpvclear + + # close the server, after the last client exits + set autoquit true + ''; + }; +} diff --git a/home-manager/soispha/config/lf/icons b/home-manager/soispha/config/lf/icons new file mode 100644 index 00000000..7ef62a0b --- /dev/null +++ b/home-manager/soispha/config/lf/icons @@ -0,0 +1,357 @@ +# vim:ft=conf + +# These examples require Nerd Fonts or a compatible font to be used. +# See https://www.nerdfonts.com for more information. + +# default values from lf (with matching order) +# ln l # LINK +# or l # ORPHAN +# tw t # STICKY_OTHER_WRITABLE +# ow d # OTHER_WRITABLE +# st t # STICKY +# di d # DIR +# pi p # FIFO +# so s # SOCK +# bd b # BLK +# cd c # CHR +# su u # SETUID +# sg g # SETGID +# ex x # EXEC +# fi - # FILE + +# file types (with matching order) +ln  # LINK +or  # ORPHAN +tw t # STICKY_OTHER_WRITABLE +ow  # OTHER_WRITABLE # nf-oct-file_directory +st t # STICKY +di  # DIR # nf-oct-file_directory +pi p # FIFO +so s # SOCK +bd b # BLK +cd c # CHR +su u # SETUID +sg g # SETGID +ex  # EXEC +fi  # FILE # nf-fa-file_text_o + +# file extensions (vim-devicons) +*.styl  +*.sass  +*.scss  +*.htm  +*.html  +*.slim  +*.haml  +*.ejs  +*.css  +*.less  +*.md  +*.mdx  +*.markdown  +*.rmd  +*.json  +*.webmanifest  +*.js  +*.mjs  +*.jsx  +*.rb  +*.gemspec  +*.rake  +*.php  +*.py  +*.pyc  +*.pyo  +*.pyd  +*.coffee  +*.mustache  +*.hbs  +*.conf  +*.ini  +*.yml  +*.yaml  +*.toml  +*.bat  +*.mk  +*.jpg  +*.jpeg  +*.bmp  +*.png  +*.webp  +*.gif  +*.ico  +*.twig  +*.cpp  +*.c++  +*.cxx  +*.cc  +*.cp  +*.c  +*.cs 󰌛 +*.h  +*.hh  +*.hpp  +*.hxx  +*.hs  +*.lhs  +*.nix  +*.lua  +*.java  +*.sh  +*.fish  +*.bash  +*.zsh  +*.ksh  +*.csh  +*.awk  +*.ps1  +*.ml λ +*.mli λ +*.diff  +*.db  +*.sql  +*.dump  +*.clj  +*.cljc  +*.cljs  +*.edn  +*.scala  +*.go  +*.dart  +*.xul  +*.sln  +*.suo  +*.pl  +*.pm  +*.t  +*.rss  +'*.f#'  +*.fsscript  +*.fsx  +*.fs  +*.fsi  +*.rs  +*.rlib  +*.d  +*.erl  +*.hrl  +*.ex  +*.exs  +*.eex  +*.leex  +*.heex  +*.vim  +*.ai  +*.psd  +*.psb  +*.ts  +*.tsx  +*.jl  +*.pp  +*.vue  +*.elm  +*.swift  +*.xcplayground  +*.tex 󰙩 +*.r 󰟔 +*.rproj 󰗆 +*.sol 󰡪 +*.pem  + +# file names (vim-devicons) (case-insensitive not supported in lf) +*gruntfile.coffee  +*gruntfile.js  +*gruntfile.ls  +*gulpfile.coffee  +*gulpfile.js  +*gulpfile.ls  +*mix.lock  +*dropbox  +*.ds_store  +*.gitconfig  +*.gitignore  +*.gitattributes  +*.gitlab-ci.yml  +*.bashrc  +*.zshrc  +*.zshenv  +*.zprofile  +*.vimrc  +*.gvimrc  +*_vimrc  +*_gvimrc  +*.bashprofile  +*favicon.ico  +*license  +*node_modules  +*react.jsx  +*procfile  +*dockerfile  +*docker-compose.yml  +*rakefile  +*config.ru  +*gemfile  +*makefile  +*cmakelists.txt  +*robots.txt 󰚩 + +# file names (case-sensitive adaptations) +*Gruntfile.coffee  +*Gruntfile.js  +*Gruntfile.ls  +*Gulpfile.coffee  +*Gulpfile.js  +*Gulpfile.ls  +*Dropbox  +*.DS_Store  +*LICENSE  +*React.jsx  +*Procfile  +*Dockerfile  +*Docker-compose.yml  +*Rakefile  +*Gemfile  +*Makefile  +*CMakeLists.txt  + +# file patterns (vim-devicons) (patterns not supported in lf) +# .*jquery.*\.js$  +# .*angular.*\.js$  +# .*backbone.*\.js$  +# .*require.*\.js$  +# .*materialize.*\.js$  +# .*materialize.*\.css$  +# .*mootools.*\.js$  +# .*vimrc.*  +# Vagrantfile$  + +# file patterns (file name adaptations) +*jquery.min.js  +*angular.min.js  +*backbone.min.js  +*require.min.js  +*materialize.min.js  +*materialize.min.css  +*mootools.min.js  +*vimrc  +Vagrantfile  + +# archives or compressed (extensions from dircolors defaults) +*.tar  +*.tgz  +*.arc  +*.arj  +*.taz  +*.lha  +*.lz4  +*.lzh  +*.lzma  +*.tlz  +*.txz  +*.tzo  +*.t7z  +*.zip  +*.z  +*.dz  +*.gz  +*.lrz  +*.lz  +*.lzo  +*.xz  +*.zst  +*.tzst  +*.bz2  +*.bz  +*.tbz  +*.tbz2  +*.tz  +*.deb  +*.rpm  +*.jar  +*.war  +*.ear  +*.sar  +*.rar  +*.alz  +*.ace  +*.zoo  +*.cpio  +*.7z  +*.rz  +*.cab  +*.wim  +*.swm  +*.dwm  +*.esd  + +# image formats (extensions from dircolors defaults) +*.jpg  +*.jpeg  +*.mjpg  +*.mjpeg  +*.gif  +*.bmp  +*.pbm  +*.pgm  +*.ppm  +*.tga  +*.xbm  +*.xpm  +*.tif  +*.tiff  +*.png  +*.svg  +*.svgz  +*.mng  +*.pcx  +*.mov  +*.mpg  +*.mpeg  +*.m2v  +*.mkv  +*.webm  +*.ogm  +*.mp4  +*.m4v  +*.mp4v  +*.vob  +*.qt  +*.nuv  +*.wmv  +*.asf  +*.rm  +*.rmvb  +*.flc  +*.avi  +*.fli  +*.flv  +*.gl  +*.dl  +*.xcf  +*.xwd  +*.yuv  +*.cgm  +*.emf  +*.ogv  +*.ogx  + +# audio formats (extensions from dircolors defaults) +*.aac  +*.au  +*.flac  +*.m4a  +*.mid  +*.midi  +*.mka  +*.mp3  +*.mpc  +*.ogg  +*.ra  +*.wav  +*.oga  +*.opus  +*.spx  +*.xspf  + +# other formats +*.pdf  diff --git a/home-manager/soispha/config/lf/keybindings/default.nix b/home-manager/soispha/config/lf/keybindings/default.nix new file mode 100644 index 00000000..bd11f3e3 --- /dev/null +++ b/home-manager/soispha/config/lf/keybindings/default.nix @@ -0,0 +1,125 @@ +{nixosConfig, ...}: { + # Remove some defaults + m = null; + "\"'\"" = null; + "'\"'" = null; + d = null; + c = null; + e = null; + j = null; + k = null; + l = null; + ";" = null; + + # File Openers + ee = "\$\$EDITOR \"$f\""; + u = "%\$IVIEWER \"$f\""; + cc = "\$sudo -e \"$f\""; + + # Archive Mappings + au = "unarchive"; + aa = "archive"; + + # Trash Mappings + dd = "trash"; + jc = "clear_trash"; + jr = "restore_trash"; + + # Broot Mapping + f = "fzf_jump"; + + # Dragon Mapping + dr = "dragon"; + ds = "dragon-stay"; + di = "dragon-individual"; + #dm = "mvdragon"; + #dc = "cpdragon"; + dl = "dlfile"; + + cs = "stripspace"; + + # Vim keys + h = "updir"; + t = "down"; + n = "up"; + s = "open"; + + # Basic Functions + "." = "set hidden!"; + DD = "delete"; + p = "paste"; + x = "cut"; + y = "copy"; + "" = "open"; + + mk = "mk_ln"; + mf = "mk_file"; + md = "mk_dir"; + ms = "mk_scr_default"; + mt = "mk_scr_temp"; + + ch = "chmod"; + bg = "set_wall_paper"; + o = "open_config"; + r = "rename"; + H = "top"; + L = "bottom"; + R = "reload"; + C = "clear"; + U = "unselect"; + + # Movement + gjr = "cd ~/.local/share/Trash/files"; + gus = "cd /run/user/${builtins.toString nixosConfig.users.users.soispha.uid}"; + + "gr." = "cd ~/repos"; + grn = "cd ~/repos/nix"; + grcc = "cd ~/repos/c"; + grcp = "cd ~/repos/cpp"; + grl = "cd ~/repos/lua"; + grr = "cd ~/repos/rust"; + grs = "cd ~/repos/shell"; + grjs = "cd ~/repos/java_script"; + grmd = "cd ~/repos/mark_down"; + grty = "cd ~/repos/typst"; + grte = "cd ~/repos/tex"; + grj = "cd ~/repos/java"; + gra = "cd ~/repos/awk"; + grpy = "cd ~/repos/python"; + grpe = "cd ~/repos/perl"; + grahk = "cd ~/repos/auto_hot_key"; + grh = "cd ~/repos/html"; + # ------------- + "gm." = "cd ~/media"; + gmp = "cd ~/media/pictures"; + gmd = "cd ~/media/downloads"; + gmm = "cd ~/media/music"; + gmi = "cd ~/media/isos"; + # ------------- + "gs." = "cd ~/school"; + gsi = "cd ~/school/infomatik"; + gsc = "cd ~/school/chemie"; + gse = "cd ~/school/english"; + gsgo = "cd ~/school/geographie"; + gsgs = "cd ~/school/geschichte"; + gskr = "cd ~/school/katholische_religion"; + gsmu = "cd ~/school/musik"; + gsma = "cd ~/school/mathematik"; + gsl = "cd ~/school/latein"; + gsd = "cd ~/school/deutsch"; + gsb = "cd ~/school/biologie"; + gsso = "cd ~/school/sozialkunde"; + gssp = "cd ~/school/sport"; + gspy = "cd ~/school/physik"; + gspi = "cd ~/school/philosophie"; + # ------------- + + gc = "cd ~/.config"; + gl = "cd ~/.local"; + gE = "cd /etc"; + + "gU." = "cd /usr"; + gUs = " cd /usr/share"; + + gt = "cd /tmp"; +} diff --git a/home-manager/soispha/config/mail/default.nix b/home-manager/soispha/config/mail/default.nix new file mode 100644 index 00000000..f934b68c --- /dev/null +++ b/home-manager/soispha/config/mail/default.nix @@ -0,0 +1,64 @@ +{ + config, + pkgs, + lib, + ... +}: let + non_public_accounts = import ./non_public_accounts.nix {inherit pkgs;}; + accounts = lib.recursiveUpdate {inherit soispha;} non_public_accounts; + + soispha = { + address = "soispha@vhack.eu"; + userName = "soispha@vhack.eu"; + realName = "Soispha"; + primary = true; + passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup account soispha@vhack.eu"; + aliases = [ + "admin@vhack.eu" + ]; + folders = { + }; + gpg = { + encryptByDefault = true; + key = "9606FC749FCE16360723D4ADA5E94010C3A642AD"; + signByDefault = true; + }; + signature = { + # TODO + }; + neomutt = { + enable = true; + }; + mbsync = { + enable = true; + create = "both"; + }; + himalaya = { + enable = true; + backend = "imap"; + sender = "smtp"; + settings = { + # TODO + }; + }; + smtp = { + host = "server1.vhack.eu"; + port = 465; + }; + imap = { + host = "server1.vhack.eu"; + port = 993; + }; + jmap = { + # TODO + }; + maildir = { + path = "soispha"; + }; + }; +in { + accounts.email = { + maildirBasePath = "${config.xdg.dataHome}/maildir"; + inherit accounts; + }; +} diff --git a/home-manager/soispha/config/mail/non_public_accounts.nix b/home-manager/soispha/config/mail/non_public_accounts.nix new file mode 100644 index 00000000..edd2f6ba Binary files /dev/null and b/home-manager/soispha/config/mail/non_public_accounts.nix differ diff --git a/home-manager/soispha/config/mako/default.nix b/home-manager/soispha/config/mako/default.nix new file mode 100644 index 00000000..e6eb5eb3 --- /dev/null +++ b/home-manager/soispha/config/mako/default.nix @@ -0,0 +1,44 @@ +{ + config, + pkgs, + ... +}: { + services.mako = { + enable = true; + backgroundColor = "#2e3440"; + borderColor = "#88c0d0"; + borderRadius = 25; + borderSize = 2; + defaultTimeout = 5000; + font = "Source Code Pro 10"; + width = 500; + height = 500; + icons = true; + ignoreTimeout = true; + layer = "overlay"; + markup = true; # TODO + maxIconSize = 64; + sort = "-time"; + extraConfig = '' + [urgency=low] + border-color=#cccccc + + [urgency=normal] + border-color=#d08770 + + [urgency=high] + border-size=3 + border-color=#bf616a + default-timeout=0 + + [urgency=critical] + border-size=4 + border-color=#bf616a + default-timeout=0 + + [category=mpd] + default-timeout=2000 + group-by=category + ''; + }; +} diff --git a/home-manager/soispha/config/mbsync/default.nix b/home-manager/soispha/config/mbsync/default.nix new file mode 100644 index 00000000..6be4f57c --- /dev/null +++ b/home-manager/soispha/config/mbsync/default.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + ... +}: { + # TODO I have no clue if both are needed, but it looks neat, right? + programs.mbsync = { + enable = true; + }; + services.mbsync = { + enable = true; + # TODO enable after isync 1.5 drops + #configFile = "${config.xdg.configHome}/mbsync/mbsync.conf"; + }; + # Disable the timer, and only activate it on neomutt start + systemd.user.timers.mbsync = lib.mkForce {}; +} diff --git a/home-manager/soispha/config/mpd/default.nix b/home-manager/soispha/config/mpd/default.nix new file mode 100644 index 00000000..bbd345a7 --- /dev/null +++ b/home-manager/soispha/config/mpd/default.nix @@ -0,0 +1,39 @@ +{ + config, + pkgs, + lib, + osConfig, + ... +}: let + dataDir = "${config.xdg.dataHome}/mpd"; + playlistDirectory = "${dataDir}/playlists"; + runtimeDir = "/run/user/${builtins.toString osConfig.users.users.soispha.uid}/mpd"; +in { + systemd.user.services.mpd.Service.ExecStartPre = lib.mkForce '' + ${pkgs.coreutils}/bin/mkdir -p "${dataDir}" "${playlistDirectory}" "${runtimeDir}" + ''; + services.mpd = { + enable = true; + inherit dataDir; + musicDirectory = "~/media/music"; + network = { + listenAddress = "${runtimeDir}/socket"; + }; + extraConfig = '' + metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc,comment" + auto_update "yes" + + audio_output { + type "pipewire" + name "pipewire" + } + #database { + # plugin "simple" + # path "~/.local/share/mpd/db + # cache_directory "~/.local/share/mpd/cache" + #} + + filesystem_charset "UTF-8" + ''; + }; +} diff --git a/home-manager/soispha/config/mpd/mpdconf.example b/home-manager/soispha/config/mpd/mpdconf.example new file mode 100644 index 00000000..eaa5e641 --- /dev/null +++ b/home-manager/soispha/config/mpd/mpdconf.example @@ -0,0 +1,418 @@ +# An example configuration file for MPD. +# Read the user manual for documentation: http://www.musicpd.org/doc/user/ + + +# Files and directories ####################################################### +# +# This setting controls the top directory which MPD will search to discover the +# available audio files and add them to the daemon's online database. This +# setting defaults to the XDG directory, otherwise the music directory will be +# be disabled and audio files will only be accepted over ipc socket (using +# file:// protocol) or streaming files over an accepted protocol. +# +#music_directory "~/music" +# +# This setting sets the MPD internal playlist directory. The purpose of this +# directory is storage for playlists created by MPD. The server will use +# playlist files not created by the server but only if they are in the MPD +# format. This setting defaults to playlist saving being disabled. +# +#playlist_directory "~/.mpd/playlists" +# +# This setting sets the location of the MPD database. This file is used to +# load the database at server start up and store the database while the +# server is not up. This setting defaults to disabled which will allow +# MPD to accept files over ipc socket (using file:// protocol) or streaming +# files over an accepted protocol. +# +#db_file "~/.mpd/database" + +# These settings are the locations for the daemon log files for the daemon. +# +# The special value "syslog" makes MPD use the local syslog daemon. This +# setting defaults to logging to syslog. +# +# If you use systemd, do not configure a log_file. With systemd, MPD +# defaults to the systemd journal, which is fine. +# +#log_file "~/.mpd/log" + +# This setting sets the location of the file which stores the process ID +# for use of mpd --kill and some init scripts. This setting is disabled by +# default and the pid file will not be stored. +# +# If you use systemd, do not configure a pid_file. +# +#pid_file "~/.mpd/pid" + +# This setting sets the location of the file which contains information about +# most variables to get MPD back into the same general shape it was in before +# it was brought down. This setting is disabled by default and the server +# state will be reset on server start up. +# +#state_file "~/.mpd/state" +# +# The location of the sticker database. This is a database which +# manages dynamic information attached to songs. +# +#sticker_file "~/.mpd/sticker.sql" +# +############################################################################### + + +# General music daemon options ################################################ +# +# This setting specifies the user that MPD will run as. MPD should never run as +# root and you may use this setting to make MPD change its user ID after +# initialization. This setting is disabled by default and MPD is run as the +# current user. +# +#user "nobody" +# +# This setting specifies the group that MPD will run as. If not specified +# primary group of user specified with "user" setting will be used (if set). +# This is useful if MPD needs to be a member of group such as "audio" to +# have permission to use sound card. +# +#group "nogroup" +# +# This setting sets the address for the daemon to listen on. Careful attention +# should be paid if this is assigned to anything other than the default, any. +# This setting can deny access to control of the daemon. Not effective if +# systemd socket activation is in use. +# +# For network +#bind_to_address "any" +# +# And for Unix Socket +#bind_to_address "~/.mpd/socket" +# +# This setting is the TCP port that is desired for the daemon to get assigned +# to. +# +#port "6600" +# +# Suppress all messages below the given threshold. Use "verbose" for +# troubleshooting. Available setting arguments are "notice", "info", "verbose", +# "warning" and "error". +# +#log_level "notice" +# +# Setting "restore_paused" to "yes" puts MPD into pause mode instead +# of starting playback after startup. +# +#restore_paused "no" +# +# This setting enables MPD to create playlists in a format usable by other +# music players. +# +#save_absolute_paths_in_playlists "no" +# +# This setting defines a list of tag types that will be extracted during the +# audio file discovery process. The complete list of possible values can be +# found in the user manual. +#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" +# +# This example just enables the "comment" tag without disabling all +# the other supported tags: +#metadata_to_use "+comment" +# +# This setting enables automatic update of MPD's database when files in +# music_directory are changed. +# +#auto_update "yes" +# +# Limit the depth of the directories being watched, 0 means only watch +# the music directory itself. There is no limit by default. +# +#auto_update_depth "3" +# +############################################################################### + + +# Symbolic link behavior ###################################################### +# +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links outside of the configured music_directory. +# +#follow_outside_symlinks "yes" +# +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links inside of the configured music_directory. +# +#follow_inside_symlinks "yes" +# +############################################################################### + + +# Zeroconf / Avahi Service Discovery ########################################## +# +# If this setting is set to "yes", service information will be published with +# Zeroconf / Avahi. +# +#zeroconf_enabled "yes" +# +# The argument to this setting will be the Zeroconf / Avahi unique name for +# this MPD server on the network. %h will be replaced with the hostname. +# +#zeroconf_name "Music Player @ %h" +# +############################################################################### + + +# Permissions ################################################################# +# +# If this setting is set, MPD will require password authorization. The password +# setting can be specified multiple times for different password profiles. +# +#password "password@read,add,control,admin" +# +# This setting specifies the permissions a user has who has not yet logged in. +# +#default_permissions "read,add,control,admin" +# +############################################################################### + + +# Database ####################################################################### +# +# An example of a database section instead of the old 'db_file' setting. +# It enables mounting other storages into the music directory. +# +#database { +# plugin "simple" +# path "~/.local/share/mpd/db +# cache_directory "~/.local/share/mpd/cache" +#} +# +# An example of database config for a satellite setup +# +#music_directory "nfs://fileserver.local/srv/mp3" +#database { +# plugin "proxy" +# host "other.mpd.host" +# port "6600" +#} + +# Input ####################################################################### +# +input { + plugin "curl" +# proxy "proxy.isp.com:8080" +# proxy_user "user" +# proxy_password "password" +} + +# +############################################################################### + +# Audio Output ################################################################ +# +# MPD supports various audio output types, as well as playing through multiple +# audio outputs at the same time, through multiple audio_output settings +# blocks. Setting this block is optional, though the server will only attempt +# autodetection for one sound card. +# +# An example of an ALSA output: +# +#audio_output { +# type "alsa" +# name "My ALSA Device" +## device "hw:0,0" # optional +## mixer_type "hardware" # optional +## mixer_device "default" # optional +## mixer_control "PCM" # optional +## mixer_index "0" # optional +#} +# +# An example of an OSS output: +# +#audio_output { +# type "oss" +# name "My OSS Device" +## device "/dev/dsp" # optional +## mixer_type "hardware" # optional +## mixer_device "/dev/mixer" # optional +## mixer_control "PCM" # optional +#} +# +# An example of a shout output (for streaming to Icecast): +# +#audio_output { +# type "shout" +# encoder "vorbis" # optional +# name "My Shout Stream" +# host "localhost" +# port "8000" +# mount "/mpd.ogg" +# password "hackme" +# quality "5.0" +# bitrate "128" +# format "44100:16:1" +## protocol "icecast2" # optional +## user "source" # optional +## description "My Stream Description" # optional +## url "http://example.com" # optional +## genre "jazz" # optional +## public "no" # optional +## timeout "2" # optional +## mixer_type "software" # optional +#} +# +# An example of a recorder output: +# +#audio_output { +# type "recorder" +# name "My recorder" +# encoder "vorbis" # optional, vorbis or lame +# path "/var/lib/mpd/recorder/mpd.ogg" +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +#} +# +# An example of a httpd output (built-in HTTP streaming server): +# +#audio_output { +# type "httpd" +# name "My HTTP Stream" +# encoder "vorbis" # optional, vorbis or lame +# port "8000" +# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +# max_clients "0" # optional 0=no limit +#} +# +# An example of a pulseaudio output (streaming to a remote pulseaudio server) +# +#audio_output { +# type "pulse" +# name "My Pulse Output" +## server "remote_server" # optional +## sink "remote_server_sink" # optional +## media_role "media_role" #optional +#} +# +# An example of a winmm output (Windows multimedia API). +# +#audio_output { +# type "winmm" +# name "My WinMM output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +# or +## device "0" # optional +## mixer_type "hardware" # optional +#} +# +# An example of a wasapi output (Windows multimedia API). +# +#audio_output { +# type "wasapi" +# name "My WASAPI output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +# or +## device "0" # optional +## Exclusive mode blocks all other audio source, and get best audio quality without resampling. +## exclusive "no" # optional +## Enumerate all devices in log. +## enumerate "no" # optional +#} +# +# An example of an openal output. +# +#audio_output { +# type "openal" +# name "My OpenAL output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +#} +# +# An example of an sndio output. +# +#audio_output { +# type "sndio" +# name "sndio output" +# mixer_type "hardware" +#} +# +# An example of an OS X output: +# +#audio_output { +# type "osx" +# name "My OS X Device" +## device "Built-in Output" # optional +## channel_map "-1,-1,0,1" # optional +#} +# +## Example "pipe" output: +# +#audio_output { +# type "pipe" +# name "my pipe" +# command "aplay -f cd 2>/dev/null" +## Or if you're want to use AudioCompress +# command "AudioCompress -m | aplay -f cd 2>/dev/null" +## Or to send raw PCM stream through PCM: +# command "nc example.org 8765" +# format "44100:16:2" +#} +# +## An example of a null output (for no audio output): +# +#audio_output { +# type "null" +# name "My Null Output" +# mixer_type "none" # optional +#} +# +############################################################################### + + +# Normalization automatic volume adjustments ################################## +# +# This setting specifies the type of ReplayGain to use. This setting can have +# the argument "off", "album", "track" or "auto". "auto" is a special mode that +# chooses between "track" and "album" depending on the current state of +# random playback. If random playback is enabled then "track" mode is used. +# See for +# more details about ReplayGain. +# This setting is off by default. +# +#replaygain "album" +# +# This setting sets the pre-amp used for files that have ReplayGain tags. By +# default this setting is disabled. +# +#replaygain_preamp "0" +# +# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. +# By default this setting is disabled. +# +#replaygain_missing_preamp "0" +# +# This setting enables or disables ReplayGain limiting. +# MPD calculates actual amplification based on the ReplayGain tags +# and replaygain_preamp / replaygain_missing_preamp setting. +# If replaygain_limit is enabled MPD will never amplify audio signal +# above its original level. If replaygain_limit is disabled such amplification +# might occur. By default this setting is enabled. +# +#replaygain_limit "yes" +# +# This setting enables on-the-fly normalization volume adjustment. This will +# result in the volume of all playing audio to be adjusted so the output has +# equal "loudness". This setting is disabled by default. +# +#volume_normalization "no" +# +############################################################################### + +# Character Encoding ########################################################## +# +# If file or directory names do not display correctly for your locale then you +# may need to modify this setting. +# +#filesystem_charset "UTF-8" +# +############################################################################### diff --git a/home-manager/soispha/config/mpv/default.nix b/home-manager/soispha/config/mpv/default.nix new file mode 100644 index 00000000..63e36117 --- /dev/null +++ b/home-manager/soispha/config/mpv/default.nix @@ -0,0 +1,10 @@ +{ + config, + pkgs, + ... +}: { + programs.mpv = { + enable = true; + # TODO add config + }; +} diff --git a/home-manager/soispha/config/mumble/Mumble.conf b/home-manager/soispha/config/mumble/Mumble.conf new file mode 100644 index 00000000..2d895f41 --- /dev/null +++ b/home-manager/soispha/config/mumble/Mumble.conf @@ -0,0 +1,67 @@ +[General] +databaselocation=/home/soispha/.local/share/Mumble/Mumble/mumble.sqlite +lastupdate=3 + +[audio] +headphone=true +input=PipeWire +loudness=1549 +output=PipeWire +quality=72000 +vadmax=@Variant(\0\0\0\x87?Kw\x97) +vadmin=@Variant(\0\0\0\x87?7\x1e\xd4) + +[messages] +10\log=13 +12\log=13 +14\log=13 +15\log=13 +17\log=13 +18\log=13 +19\log=13 +2\log=13 +20\log=13 +21\log=13 +22\log=13 +23\log=13 +25\log=13 +26\log=13 +27\log=13 +28\log=13 +29\log=13 +30\log=13 +31\log=13 +5\log=13 +6\log=13 +9\log=13 +size=32 + +[messagesounds] +size=31 + +[net] +certificate="@ByteArray(0\x82\tX\x2\x1\x3\x30\x82\t\xe\x6\t*\x86H\x86\xf7\r\x1\a\x1\xa0\x82\b\xff\x4\x82\b\xfb\x30\x82\b\xf7\x30\x82\x3\xad\x6\t*\x86H\x86\xf7\r\x1\a\x1\xa0\x82\x3\x9e\x4\x82\x3\x9a\x30\x82\x3\x96\x30\x82\x3\x92\x6\v*\x86H\x86\xf7\r\x1\f\n\x1\x3\xa0\x82\x3+0\x82\x3'\x6\n*\x86H\x86\xf7\r\x1\t\x16\x1\xa0\x82\x3\x17\x4\x82\x3\x13\x30\x82\x3\xf\x30\x82\x1\xf7\xa0\x3\x2\x1\x2\x2\x1\x1\x30\r\x6\t*\x86H\x86\xf7\r\x1\x1\x5\x5\0\x30\x16\x31\x14\x30\x12\x6\x3U\x4\x3\f\vMumble User0\x1e\x17\r230710132716Z\x17\r430705132716Z0\x16\x31\x14\x30\x12\x6\x3U\x4\x3\f\vMumble User0\x82\x1\"0\r\x6\t*\x86H\x86\xf7\r\x1\x1\x1\x5\0\x3\x82\x1\xf\0\x30\x82\x1\n\x2\x82\x1\x1\0\xb3\x8c\xd2\xdbM\x90\xa6\xc7}\xf4\x6X\xf9O\x16Q\x12\xc7\x1\xca\x88\x9c\x96o\xd1\x11\xc1\xc3\xd1/\xb6\x9d\xcfn\xcd\x84\xd2\x1d\xcc\xfcO\xf9\xa4\"\xaa'2\x6\xee[\x3\xd3vx\x84`i@P|\xb8\xc5I\xa8\xa2\b\xc8\0\xbd\xf1\xcc\x63\xbe\x99Zj&\xa5t\xc5\bOr\xc1\xaen\xc7\n\xd2\xcc\xa1\x30\xb8\xe0\0\xe8\xc5\xb6\x86g\x14\x30S\x9d\x8b\xfb\xacP\x7f+\x93}3\xe3\xcbPJ\x86\xf7^Z\xda\x87Z\xfez\xec\xc0\xf7\xe9\x80\xbc\xe2\re@\xe7\x92\x84\xe5\x97\f\x8c\n\x3\x1c\xd1\xbb\x32\xce\xfe\xb6\x1d\xefUYz\xf\xd7,5\x4G\x1f\t\xf7\x43\f?wx\x1a\x12\xd4.I\xbd\xe4G\xea\x33\x9d\xb1\xb0\x62\x45\xcd\xe0\x8b\xe4\x31\x1a\x8c\xedLEyC\xf0\x9f\x32}c\xc9X\x19[\xf7\xfb\xfc\x39\xe0\xd5\x30\x87\xd0\x82:\xb5\x87j]\x9d\xf8\x1b\x4\xb2P \x5/\xb2H\xfa\x42I\x1dN\xa9\xb7\x9a\x91*\x83\xe\x45\xcf\xbe\t\xb5\x36)\xf7\x7f\x1\x43\x2\x3\x1\0\x1\xa3h0f0\f\x6\x3U\x1d\x13\x1\x1\xff\x4\x2\x30\0\x30\x13\x6\x3U\x1d%\x4\f0\n\x6\b+\x6\x1\x5\x5\a\x3\x2\x30\x1d\x6\x3U\x1d\xe\x4\x16\x4\x14\xb9\x41\x19t\x16\x18~\xe8\v\xa9\x9b\x86i\x86\xeP%\xd7\n\xc9\x30\"\x6\t`\x86H\x1\x86\xf8\x42\x1\r\x4\x15\x16\x13Generated by Mumble0\r\x6\t*\x86H\x86\xf7\r\x1\x1\x5\x5\0\x3\x82\x1\x1\0\x91+\r'hS\xc2\x12k\x13O\xb2\"\x85\xd6w\x96\x8a\x97\x46\xee\x95Q\x8b\x8b\t\x8a\xfcH\xab\x30\x1dxV\xc9\xf5\x80\x42;'o\xf1\xd1\xf2\xfb\x18\xe2+\x8d\x39 \xc3\xe\x44\xa9\t\xe2i\x8a\xa7?#\xcd]0\xf4\x1d\x4\a\xd6\x87\x62\xe2\xd8\x34\xb6\xcf\x89\xf2\v\xf1\x8b\xc6\xf8\x8f\x94H/\xfa`\x9d\xb5\xac\x66H\xef\xf4\tJ\xfeHg]!\xed\n\xaf\xa8nd@y\xe8>A\x10\xc4>\xc3\xf7\xe3\xffW\x90T\x87\x94[\x7fg0+p\xdd\x3\x8d\xdb\x80\f?\xe9\xf9l5\xac)z+4R\xbc\xf3\xe1\x82\xde\xc3u\xb2\xa1s\xe2\xbb\xdcpL#|\f\x7f\x93\x30-\x6\t*\x86H\x86\xf7\r\x1\t\x14\x31 \x1e\x1e\0M\0u\0m\0\x62\0l\0\x65\0 \0I\0\x64\0\x65\0n\0t\0i\0t\0y0\x82\x5\x42\x6\t*\x86H\x86\xf7\r\x1\a\x1\xa0\x82\x5\x33\x4\x82\x5/0\x82\x5+0\x82\x5'\x6\v*\x86H\x86\xf7\r\x1\f\n\x1\x1\xa0\x82\x4\xc0\x30\x82\x4\xbc\x2\x1\0\x30\r\x6\t*\x86H\x86\xf7\r\x1\x1\x1\x5\0\x4\x82\x4\xa6\x30\x82\x4\xa2\x2\x1\0\x2\x82\x1\x1\0\xb3\x8c\xd2\xdbM\x90\xa6\xc7}\xf4\x6X\xf9O\x16Q\x12\xc7\x1\xca\x88\x9c\x96o\xd1\x11\xc1\xc3\xd1/\xb6\x9d\xcfn\xcd\x84\xd2\x1d\xcc\xfcO\xf9\xa4\"\xaa'2\x6\xee[\x3\xd3vx\x84`i@P|\xb8\xc5I\xa8\xa2\b\xc8\0\xbd\xf1\xcc\x63\xbe\x99Zj&\xa5t\xc5\bOr\xc1\xaen\xc7\n\xd2\xcc\xa1\x30\xb8\xe0\0\xe8\xc5\xb6\x86g\x14\x30S\x9d\x8b\xfb\xacP\x7f+\x93}3\xe3\xcbPJ\x86\xf7^Z\xda\x87Z\xfez\xec\xc0\xf7\xe9\x80\xbc\xe2\re@\xe7\x92\x84\xe5\x97\f\x8c\n\x3\x1c\xd1\xbb\x32\xce\xfe\xb6\x1d\xefUYz\xf\xd7,5\x4G\x1f\t\xf7\x43\f?wx\x1a\x12\xd4.I\xbd\xe4G\xea\x33\x9d\xb1\xb0\x62\x45\xcd\xe0\x8b\xe4\x31\x1a\x8c\xedLEyC\xf0\x9f\x32}c\xc9X\x19[\xf7\xfb\xfc\x39\xe0\xd5\x30\x87\xd0\x82:\xb5\x87j]\x9d\xf8\x1b\x4\xb2P \x5/\xb2H\xfa\x42I\x1dN\xa9\xb7\x9a\x91*\x83\xe\x45\xcf\xbe\t\xb5\x36)\xf7\x7f\x1\x43\x2\x3\x1\0\x1\x2\x82\x1\0\x4\xd6\xf2\x66\v\xe0\xae\xc6(\xccw\x91Ub\xfe\xd8\x7f\x97\x92\xa2Imc\x16\xaf}y\x8a\x14,\xe3\x90\xbc\x63!\xb2\aQ\xdbQ\x1f\xbc\xbc\x62\\\xd0\xc2\xa5\xf2-\xcc\xdc\x19\xd0\xe4\xcc\x8ey\xb7\xd1\xac\xcfP\x8du\x94\xa4\x3u\x1b;\xe5\xa2\x61\x12\xd1R\xaaZ\v\xe7\x8d\xf0\xabl\xce\xba\x99\xbd\x95\xdbpkCJr\xfb\xc5P9\x1e\xf\xb1iI9&\xeb\x62\x8a#\xa7\x17\xcbw\x92\xf9\xf7JZ\xa6;F\xb3\xba\xb1H\x89]uU7\x1e\xd7\xf6U`\x8d\xa1\x1aG7\x11\x31\xbf\xf4\xdb\x32\x63\xbf\x3\xad&h\x82\x9b\xe7\x19/\xf6\r\x8c\x89\xc6\xd0\x1d\0\x87\t|\xc0\xf2\x8f\xbb\x87_8{\xf2\xc7\x8a\x34)\xe3\xf1\xcc(\xf4\xee\xeb($\x5\x84\xaf\x1\xaa\xf7\xff\x9b\x15h\x2y\xb3\x91\xba,Oq\xc9$\x81\x11Zg\xc4I3\v\xeay\f\xf0\x33\xc6p\xea\xc6\x9d\xac\xaa\xedp\xa7!\xcbHf5\xa0i\xbdo@\xb8![\x7f\xea\xad\x6\x31p\x81\x61\x2\x81\x81\0\xdc\x8d}{\xc3\x31\xb6(F\xc5\x36\x9b\xba\x66\xb1\xce\r_\x90\xc6\x1f\x87\x37\x84m\xd1\a8\xc0\v9\xe0\x8bm\xaf\x64\xbe\x81\xa8\xe7\xaf\x19\x43,vj\xaf!9rz\x87\"\xca\xbf\xcf\x16\x88\x46t\xbd\x12\xaa;\xf4x_\x1b\xb3\x90\b\xb6\xf6\xec\x1f\x95\x62\xac\xfa\x1b\xae\xa2\xa7oA\x9bhOW\xa8\x44\\\xadz T\xe3\x43\x46\x99\x98\xb4{*\"\xdb\xd9\xc8\xd2\x15\n4\"\x8d\x96$\x17\xfd^\xf7\x84\x93\x7fw{o\0\xe1\x2\x81\x81\0\xd0hNA\xc3\x9e\x93&iq\x1dQ\xb6\xc6\x1c\x32\xf3\xfc c&Y\xe7|\xbeq2P\xe1\xdb\x97\xf8\x9fI(\x98\x9d\xf1\xfe\xb6\xf\x90\xa5\xebi>\x14\x6\xd8.\xf4\xce\x86\x9d*\x87 \xf9X\x4\xdcZ\xf9g\x3\x98H{\xdf\x66\xde\xd6zr\xecG_\x14t\x1dm%P\xe5\xea\x8e\x6\xa2. \xa1\xd7\xd7W]\xdd\x15\x6\xcf+/\x11\vel\xd3\xe8\xc3/\xbc\x1f\xc3n\xd4\xb8\x62j\xf5\xc0\xc0\x89\xe3z\xb8\x36\xd5\xb2\xa3\x2\x81\x80z`W\xdc\x30\x36\x89(W\xfc]\x8c\x93% K\x80\xc8\"\0\x8c\xc5\xee\\ \xc2\xf7\n\xda$`|\xe3`}\r\x9dWV\xa8\0\xc9\xcd\xd2\xc4\f\xe4\x8d%k+\x16\xbc.\n\xf7\x44\x9d\xd6\xfc\x1a\x88\x8a\xdd\x11J\xd9\xc4%\xe6g\xd8\xbc.\xe2\x11/J\x81\x2\x81\x80\x63;W\xf\xbf:1,\x98\x6\x31\x4\xa8wz\x13\xd4\xd2\x97\x5>\xcc\x8e\tz\x90\x61y\xdb\xa0\xf8\xa2|\r\x94\x93\xde\x98\xcc\x44\x19\xf3\x30\xdd\x7fu\xfc\x89)\xc4i\xf2\x30l\x83\x44\x66\x31\xf3t\x15\f\b6\xc1\xa2o\xd8\xf3\x8d\x82\xcb\x32\xf0\xa7\x8ap>G\xef~\xf9\xc6\xa4\x42\xe3\xafJ\xe7\x95\xc8\x1a\x2\xc1\xe9\xc2\x8b\xf1{\x11?\xce\xe8\xd3\x39WI<.\xedo^Y\xd6U\x99\x1e\xfe\xb6\xf1\xb6v'\a\xb1\xac\\\xeb\x2\x81\x80@\x19\xc4\x32&\xcb\xc1\xca\x10K\xdf\x45\xf9\xf\x1d\x85\x39\x65\xdc\x33\x45\xbe\xac\x97~;\xe2m-\xd6\x9b\x82\x1\xbd\x90'W\xf5\xf5\xce\x35\xd7\xb4\xcdidTiP\\-vG+`\xb5u\xb7\x14\x44\xe1\xd9\xd3\r\x81\xb0GL\xe1U\xe3\xf0\xaa\xd1\x8f\xc6\"\xa5S\xb6\xbf\x4\x1a\xc4\xe0|\x8d\xa2+y(-\xad\ty\xd5\xe2g\xd3\x8c\xcdl\x96g3\xfe\x80\xb7|b[\xca\xb2\xbf\x61\xf7\x9c\x65\x30\x61\xa0\x35\xf6W\xb4\xcc\xdd\x34\x31T0#\x6\t*\x86H\x86\xf7\r\x1\t\x15\x31\x16\x4\x14\x9f\xdc\xf9\x38\xc2\x8a\x1c\xfe\x6}\xf6\x64\x62>L#|\f\x7f\x93\x30-\x6\t*\x86H\x86\xf7\r\x1\t\x14\x31 \x1e\x1e\0M\0u\0m\0\x62\0l\0\x65\0 \0I\0\x64\0\x65\0n\0t\0i\0t\0y0A010\r\x6\t`\x86H\x1\x65\x3\x4\x2\x1\x5\0\x4 Fm\xb6/lL\x18\x1b!\xfa+x\xb5\xd9?GrR\xb7\xd3\x90\xc1N)L\x9c\xc7')\xe^\xbe\x4\b\x8b\x2\xb2\xb2\x97\b\x8a\xf6\x2\x2\b\0)" +framesperpacket=1 + +[overlay] +blacklist=@Invalid() +blacklistexclude=@Invalid() +launchers=@Invalid() +launchersexclude=@Invalid() +paths=@Invalid() +pathsexclude=@Invalid() +version=1.4.0 +whitelist=@Invalid() +whitelistexclude=@Invalid() + +[shortcuts] +size=0 + +[ui] +HighContrast=true +connect\geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\f=\0\0\x1m\0\0\n\0\0\0\0\0\0\0\f=\0\0\x1m\0\0\0\x1\x2\0\0\0\a\x80\0\0\n\0\0\0\0\0\0\0\f=\0\0\x1m)" +connect\header=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2&\0\0\0\x3\x1\x1\0\0\0\0\0\0\x1\0\0\0\x2\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x3\0\0\x1w\0\0\0\x1\0\0\0\x1\0\0\0S\0\0\0\x1\0\0\0\x3\0\0\0\\\0\0\0\x1\0\0\0\x3\0\0\x3\xe8\0\0\0\0\x64) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\r\xb9\0\0\x3\xfa\0\0\n\0\0\0\0\0\0\0\f\xde\0\0\x1\xb2\0\0\0\x1\x2\0\0\0\a\x80\0\0\n\0\0\0\0\0\0\0\r\xb9\0\0\x3\xfa) +header=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2\xb0\0\0\0\x1\x1\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x1\0\0\x2\xb0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64) +server=mumble.vhack.eu +state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\0\0\0\x1\0\0\0\x3\xbd\xfc\x2\0\0\0\x2\xfb\0\0\0\f\0q\0\x64\0w\0L\0o\0g\x1\0\0\0>\0\0\x3\xa0\0\0\0z\0\xff\xff\xff\xfb\0\0\0\xe\0q\0\x64\0w\0\x43\0h\0\x61\0t\x1\0\0\x3\xe2\0\0\0\x19\0\0\0\x19\0\0\0\x19\0\0\x2\xb6\0\0\x3\xbd\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x1a\0q\0t\0I\0\x63\0o\0n\0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) diff --git a/home-manager/soispha/config/mumble/default.nix b/home-manager/soispha/config/mumble/default.nix new file mode 100644 index 00000000..6fa524dc --- /dev/null +++ b/home-manager/soispha/config/mumble/default.nix @@ -0,0 +1,3 @@ +{...}: { + xdg.configFile."Mumble/Mumble.conf".source = ./Mumble.conf; +} diff --git a/home-manager/soispha/config/neomutt/default.nix b/home-manager/soispha/config/neomutt/default.nix new file mode 100644 index 00000000..e4fbcb39 --- /dev/null +++ b/home-manager/soispha/config/neomutt/default.nix @@ -0,0 +1,168 @@ +{pkgs, ...}: { + programs.neomutt = { + enable = true; + package = pkgs.writeShellScriptBin "neomutt" '' + systemctl --user start mbsync.service; + ${pkgs.neomutt}/bin/neomutt; + ''; + vimKeys = false; # see the modified ones below + checkStatsInterval = 60; + binds = [ + #------------------------------------------------------------ + # Vi Key Bindings (taken from their configuration, modified for dvorak) + #------------------------------------------------------------ + + # Moving around + { + action = "noop"; + key = "g"; + map = ["attach" "browser" "index"]; + } + { + action = "first-entry"; + key = "gg"; + map = ["attach" "browser" "index"]; + } + { + action = "last-entry"; + key = "G"; + map = ["attach" "browser" "index"]; + } + { + action = "noop"; + key = "g"; + map = ["pager"]; + } + { + action = "top"; + key = "gg"; + map = ["pager"]; + } + { + action = "bottom"; + key = "G"; + map = ["pager"]; + } + { + action = "previous-line"; + key = "n"; + map = ["pager"]; + } + { + action = "next-line"; + key = "t"; + map = ["pager"]; + } + + # Scrolling + { + action = "next-page"; + key = "\\CF"; + map = ["attach" "browser" "pager" "index"]; + } + { + action = "previous-page"; + key = "\\CB"; + map = ["attach" "browser" "pager" "index"]; + } + { + action = "half-up"; + key = "\\Cu"; + map = ["attach" "browser" "pager" "index"]; + } + { + action = "half-down"; + key = "\\Cd"; + map = ["attach" "browser" "pager" "index"]; + } + { + action = "next-line"; + key = "\\Ce"; + map = ["browser" "pager"]; + } + { + action = "previous-line"; + key = "\\Cy"; + map = ["browser" "pager"]; + } + { + action = "next-line"; + key = "\\Ce"; + map = ["index"]; + } + { + action = "previous-line"; + key = "\\Cy"; + map = ["index"]; + } + + { + action = "noop"; + key = "d"; + map = ["pager" "index"]; + } + { + action = "delete-message"; + key = "dd"; + map = ["pager" "index"]; + } + + # Mail & Reply + { + # Doesn't work currently + action = "list-reply"; + key = "\\Cm"; + map = ["index"]; + } + + # Threads + { + action = "search-opposite"; + key = "N"; + map = ["browser" "pager" "index"]; + } + { + action = "delete-thread"; + key = "dT"; + map = ["pager" "index"]; + } + { + action = "delete-subthread"; + key = "dt"; + map = ["pager" "index"]; + } + { + action = "next-thread"; + key = "gt"; + map = ["pager" "index"]; + } + { + action = "previous-thread"; + key = "gT"; + map = ["pager" "index"]; + } + { + action = "collapse-thread"; + key = "za"; + map = ["index"]; + } + { + # Missing: folddisable/foldenable + action = "collapse-all"; + key = "zA"; + map = ["index"]; + } + + { + action = "search-next"; + key = "l"; + map = ["index"]; + } + { + action = "limit"; + key = "f"; + map = ["index"]; + } + ]; + }; +} diff --git a/home-manager/soispha/config/neovim/default.nix b/home-manager/soispha/config/neovim/default.nix new file mode 100644 index 00000000..c84b6aaa --- /dev/null +++ b/home-manager/soispha/config/neovim/default.nix @@ -0,0 +1,8 @@ +{ + config, + pkgs, + neovim_config, + ... +}: { + xdg.configFile."nvim".source = neovim_config; +} diff --git a/home-manager/soispha/config/nheko/default.nix b/home-manager/soispha/config/nheko/default.nix new file mode 100644 index 00000000..fd147c0b --- /dev/null +++ b/home-manager/soispha/config/nheko/default.nix @@ -0,0 +1,13 @@ +{ + config, + nixosConfig, + lib, + ... +}: { + config = lib.mkIf nixosConfig.soispha.secrets.enable { + xdg.configFile."nheko/nheko.conf".source = config.lib.file.mkOutOfStoreSymlink nixosConfig.age.secrets.nheko.path; + programs.nheko = { + enable = true; + }; + }; +} diff --git a/home-manager/soispha/config/npm/.npmrc b/home-manager/soispha/config/npm/.npmrc new file mode 100644 index 00000000..d0d846bd --- /dev/null +++ b/home-manager/soispha/config/npm/.npmrc @@ -0,0 +1,6 @@ +scripts-prepend-node-path=true +node_gyp= +prefix=${XDG_DATA_HOME}/npm +cache=${XDG_CACHE_HOME}/npm +tmp=${XDG_RUNTIME_DIR}/npm +init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js diff --git a/home-manager/soispha/config/npm/default.nix b/home-manager/soispha/config/npm/default.nix new file mode 100644 index 00000000..7b4bb6a1 --- /dev/null +++ b/home-manager/soispha/config/npm/default.nix @@ -0,0 +1,7 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."npm/.npmrc".source = ./.npmrc; +} diff --git a/home-manager/soispha/config/python/default.nix b/home-manager/soispha/config/python/default.nix new file mode 100644 index 00000000..eeaccdcf --- /dev/null +++ b/home-manager/soispha/config/python/default.nix @@ -0,0 +1,7 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."python/pythonrc".source = ./pythonrc; +} diff --git a/home-manager/soispha/config/python/pythonrc b/home-manager/soispha/config/python/pythonrc new file mode 100644 index 00000000..38c48e0f --- /dev/null +++ b/home-manager/soispha/config/python/pythonrc @@ -0,0 +1,11 @@ +import os +import atexit +import readline + +history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history') +readline.read_history_file(history) + +def write_history(): + readline.write_history_file(history) + +atexit.register(write_history) diff --git a/home-manager/soispha/config/rclone/default.nix b/home-manager/soispha/config/rclone/default.nix new file mode 100644 index 00000000..bd0c1ac2 --- /dev/null +++ b/home-manager/soispha/config/rclone/default.nix @@ -0,0 +1,7 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."rclone/rclone.conf".source = ./rclone.conf; +} diff --git a/home-manager/soispha/config/rclone/rclone.conf b/home-manager/soispha/config/rclone/rclone.conf new file mode 100644 index 00000000..9e1c4f08 --- /dev/null +++ b/home-manager/soispha/config/rclone/rclone.conf @@ -0,0 +1,10 @@ +[vhack1] +type = sftp +host = server1.vhack.eu +user = soispha +key_use_agent = true +known_hosts_file = ~/.local/share/ssh/known_hosts +shell_type = unix +md5sum_command = md5sum +sha1sum_command = sha1sum + diff --git a/home-manager/soispha/config/ssh/default.nix b/home-manager/soispha/config/ssh/default.nix new file mode 100644 index 00000000..7160adac --- /dev/null +++ b/home-manager/soispha/config/ssh/default.nix @@ -0,0 +1,15 @@ +{config, ...}: { + programs.ssh = { + enable = true; + compression = true; + hashKnownHosts = false; + serverAliveInterval = 240; + userKnownHostsFile = "${config.xdg.dataHome}/ssh/known_hosts"; + matchBlocks = { + "codeberg.org" = { + # TODO: Remove this once they fix their ipv6 config + addressFamily = "inet"; + }; + }; + }; +} diff --git a/home-manager/soispha/config/swayidle/config b/home-manager/soispha/config/swayidle/config new file mode 100644 index 00000000..8ba07850 --- /dev/null +++ b/home-manager/soispha/config/swayidle/config @@ -0,0 +1,5 @@ +timeout 180 'swaylock -fFu' + +timeout 360 'systemctl suspend-then-hibernate' + +before-sleep 'swaylock -f' diff --git a/home-manager/soispha/config/swayidle/default.nix b/home-manager/soispha/config/swayidle/default.nix new file mode 100644 index 00000000..073498a7 --- /dev/null +++ b/home-manager/soispha/config/swayidle/default.nix @@ -0,0 +1,29 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."swayidle/config".source = ./config; + + # services.swayidle = { + # enable = true; + # events = [ + # { + # event = "before-sleep"; + # command = "${pkgs.swaylock}/bin/swaylock -f "; + # } + # ]; + # timeouts = [ + # { + # timeout = 180; + # command = "${pkgs.swaylock}/bin/swaylock -fFu "; + # } + # { + # timeout = 360; + # # TODO systemctl is installed? + # command = "systemctl suspend-then-hibernate"; + # } + # ]; + # # systemdTarget = ""; # TODO this might be usefull + # }; +} diff --git a/home-manager/soispha/config/swaylock/commands.jpg b/home-manager/soispha/config/swaylock/commands.jpg new file mode 100644 index 00000000..54016503 Binary files /dev/null and b/home-manager/soispha/config/swaylock/commands.jpg differ diff --git a/home-manager/soispha/config/swaylock/default.nix b/home-manager/soispha/config/swaylock/default.nix new file mode 100644 index 00000000..7c3762cc --- /dev/null +++ b/home-manager/soispha/config/swaylock/default.nix @@ -0,0 +1,10 @@ +{...}: { + programs.swaylock = { + enable = true; + settings = { + #image = "$WALLPAPER"; + image = "${./commands.jpg}"; + color = "000000"; + }; + }; +} diff --git a/home-manager/soispha/config/swaylock/gnu.png b/home-manager/soispha/config/swaylock/gnu.png new file mode 100644 index 00000000..d07dee3e Binary files /dev/null and b/home-manager/soispha/config/swaylock/gnu.png differ diff --git a/home-manager/soispha/config/yambar/config/config.yml b/home-manager/soispha/config/yambar/config/config.yml new file mode 100644 index 00000000..bb742fd3 --- /dev/null +++ b/home-manager/soispha/config/yambar/config/config.yml @@ -0,0 +1,234 @@ +--- +# Config file for yambar +# Note that this may be version-dependent, this file is written for v1.8.0 + + +# Font anchors +font-main: &fontmain Source Code Pro:pixelsize=26 +font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=23 + +# Color anchors +fg-none: &fgnone 00000000 +fg-1: &fg1 c6ceefff +fg-blue: &fgblue 99d1dbff +fg-sapphire: &fgsapp 74c7ecdd +fg-green: &fggreen a6e3a1dd +fg-peach: &fgpeach fab387dd +fg-mauve: &fgmauve cba6f7dd +fg-teal: &fgteal 94e2d5dd +fg-lavendar: &fglav b4befedd +fg-focus: &fgfocus e78284ff +bg-1: &bg1 303446ff +bg-tag: &bgtag 585b70ff +bg-tag2: &bgtag2 45475aff +bg-urgent: &bgurgent e78284ff + +# Background blocks +background-block: &bgcblock {background: {color: *bg1 }} +background-block-urgent: &bgcurg {background: {color: *bgurgent }} + +# Underlines +underline-focused: &line {underline: { size: 3, color: *fgfocus}} +underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} +underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} +underline-resources: &linemem {underline: { size: 3, color: *fggreen}} +underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} +underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} +underline-weather: &linewea {underline: { size: 3, color: *fglav}} +underline-title: &linetitle {underline: { size: 3, color: *bgtag}} + +# Combined decorations +combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} +combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} +combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} +combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} +combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} + + +### Main + +bar: + location: top + height: 45 + layer: bottom + spacing: 0 + margin: 10 + border: {margin: 0, top-margin: 10} + foreground: *fg1 + background: *fgnone + font: *fontmain + + ### Left, river tags + left: + - river: + anchors: + - id: &name { text: "{id}" } + - string: &focus { stack: [ {background: {color: *bg1}} ] } + - string: &normal { string: { <<: *name, margin: 10 } } + - string: + &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } + - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } + - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - base: &river_base + default: *normal + conditions: + state == focused: *focused + state == unfocused: *unfocused + state == urgent: *urgent + state == invisible: + map: + conditions: + occupied: *occupied + ~occupied: *normal + content: + map: + on-click: + left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" + right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" + middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" + conditions: + id == 1: { map: { <<: *river_base } } + id == 2: { map: { <<: *river_base } } + id == 3: { map: { <<: *river_base } } + id == 4: { map: { <<: *river_base } } + id == 5: { map: { <<: *river_base } } + id == 6: { map: { <<: *river_base } } + id == 7: { map: { <<: *river_base } } + id == 8: { map: { <<: *river_base } } + id == 9: { map: { <<: *river_base } } + title: + map: + default: + { + string: + { + text: "{title}", + left-margin: 12, + right-margin: 12, + # max: 35, + deco: *linetitle + }, + } + conditions: + title == "": { string: { text: "" } } + + ### Center, clock & weather gadget + center: + - clock: + time-format: "%H:%M:%S %Z" + date-format: "%d/%m/%y (%a)" + foreground: *fgblue + content: + string: + text: " {date} {time} " + deco: *combclock + + ### Right, system tray + right: + #- network: + # name: wlp5s0 + # poll-interval: 10 + # content: + # map: + # on-click: /bin/sh -c "nmtui" + # conditions: + # ~carrier: {empty: {}} + # carrier: + # string: {text: "  {ssid} ", deco: *combutil} + #- network: + # name: enp4s0 + # content: + # map: + # on-click: /bin/sh -c "nmtui" + # conditions: + # ~carrier: + # string: {text: "  Eth failed ", deco: *combutil} + # carrier: {empty: {}} + + - script: # Sound volume + path: @volume_script@ + content: + map: + on-click: /bin/sh -c "pavucontrol" + conditions: + muted: + string: + text: " ﱝ " + deco: *bgcurg + ~muted: + string: {text: "  {volume}% ", deco: *combutil} + + - script: # Grade average + path: @grade_average_script@ + content: + string: + text: "  {grade} " + deco: *combmem + + #- backlight: + # name: intel_backlight + # content: + # - string: {text: "  {percent}% ", deco: *combutil} + + - script: # CPU + path: @cpu_script@ + content: + string: + text: "  {cpu}% " + deco: *combmem + + - script: # Memory info + path: @memory_script@ + content: + map: + conditions: + swapstate: + string: + text: "  {memperc}%({swapperc}%) " + deco: *combmem + ~swapstate: + string: + text: "  {memperc}% " + deco: *combmem + - script: # Disk space + path: @disk_script@ + content: + string: + text: "  {diskspace}({diskperc})" + deco: *combmem + #- battery: + # name: BAT0 + # poll-interval: 30 + # content: + # list: + # items: + # - ramp: + # tag: capacity + # items: + # - string: + # text: "  {capacity}%({estimate}) " + # deco: *bgcurg + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + #- script: # tray + # path: /home/dt/.config/yambar/scripts/yambar-tray + # content: + # empty: {} + #- script: + # path: /home/dt/.config/yambar/scripts/yambar-tray-width + # poll-interval: 10 + # content: + # string: + # text: "{padding}" + # deco: *combmem diff --git a/home-manager/soispha/config/yambar/config/laptop.yml b/home-manager/soispha/config/yambar/config/laptop.yml new file mode 100644 index 00000000..1c169820 --- /dev/null +++ b/home-manager/soispha/config/yambar/config/laptop.yml @@ -0,0 +1,234 @@ +--- +# Config file for yambar +# Note that this may be version-dependent, this file is written for v1.8.0 + + +# Font anchors +font-main: &fontmain Source Code Pro:pixelsize=22 +font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=20 + +# Color anchors +fg-none: &fgnone 00000000 +fg-1: &fg1 c6ceefff +fg-blue: &fgblue 99d1dbff +fg-sapphire: &fgsapp 74c7ecdd +fg-green: &fggreen a6e3a1dd +fg-peach: &fgpeach fab387dd +fg-mauve: &fgmauve cba6f7dd +fg-teal: &fgteal 94e2d5dd +fg-lavendar: &fglav b4befedd +fg-focus: &fgfocus e78284ff +bg-1: &bg1 303446ff +bg-tag: &bgtag 585b70ff +bg-tag2: &bgtag2 45475aff +bg-urgent: &bgurgent e78284ff + +# Background blocks +background-block: &bgcblock {background: {color: *bg1 }} +background-block-urgent: &bgcurg {background: {color: *bgurgent }} + +# Underlines +underline-focused: &line {underline: { size: 3, color: *fgfocus}} +underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} +underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} +underline-resources: &linemem {underline: { size: 3, color: *fggreen}} +underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} +underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} +underline-weather: &linewea {underline: { size: 3, color: *fglav}} +underline-title: &linetitle {underline: { size: 3, color: *bgtag}} + +# Combined decorations +combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} +combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} +combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} +combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} +combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} + + +### Main + +bar: + location: top + height: 25 + layer: bottom + spacing: 0 + margin: 10 + border: {margin: 0, top-margin: 5} + foreground: *fg1 + background: *fgnone + font: *fontmain + + ### Left, river tags + left: + - river: + anchors: + - id: &name { text: "{id}" } + - string: &focus { stack: [ {background: {color: *bg1}} ] } + - string: &normal { string: { <<: *name, margin: 10 } } + - string: + &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } + - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } + - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - base: &river_base + default: *normal + conditions: + state == focused: *focused + state == unfocused: *unfocused + state == urgent: *urgent + state == invisible: + map: + conditions: + occupied: *occupied + ~occupied: *normal + content: + map: + on-click: + left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" + right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" + middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" + conditions: + id == 1: { map: { <<: *river_base } } + id == 2: { map: { <<: *river_base } } + id == 3: { map: { <<: *river_base } } + id == 4: { map: { <<: *river_base } } + id == 5: { map: { <<: *river_base } } + id == 6: { map: { <<: *river_base } } + id == 7: { map: { <<: *river_base } } + id == 8: { map: { <<: *river_base } } + id == 9: { map: { <<: *river_base } } + title: + map: + default: + { + string: + { + text: "{title}", + left-margin: 12, + right-margin: 12, + # max: 35, + deco: *linetitle + }, + } + conditions: + title == "": { string: { text: "" } } + + ### Center, clock & weather gadget + center: + - clock: + time-format: "%H:%M:%S %Z" + date-format: "%d/%m/%y (%a)" + foreground: *fgblue + content: + string: + text: " {date} {time} " + deco: *combclock + + ### Right, system tray + right: + #- network: + # name: wlp5s0 + # poll-interval: 10 + # content: + # map: + # on-click: /bin/sh -c "nmtui" + # conditions: + # ~carrier: {empty: {}} + # carrier: + # string: {text: "  {ssid} ", deco: *combutil} + #- network: + # name: enp4s0 + # content: + # map: + # on-click: /bin/sh -c "nmtui" + # conditions: + # ~carrier: + # string: {text: "  Eth failed ", deco: *combutil} + # carrier: {empty: {}} + + - script: # Sound volume + path: @volume_script@ + content: + map: + on-click: /bin/sh -c "pavucontrol" + conditions: + muted: + string: + text: " ﱝ " + deco: *bgcurg + ~muted: + string: {text: "  {volume}% ", deco: *combutil} + + - script: # Grade average + path: @grade_average_script@ + content: + string: + text: "  {grade} " + deco: *combmem + + - backlight: + name: @backlight@ + content: + - string: {text: "  {percent}% ", deco: *combutil} + + - script: # CPU + path: @cpu_script@ + content: + string: + text: "  {cpu}% " + deco: *combmem + + - script: # Memory info + path: @memory_script@ + content: + map: + conditions: + swapstate: + string: + text: "  {memperc}%({swapperc}%) " + deco: *combmem + ~swapstate: + string: + text: "  {memperc}% " + deco: *combmem + - script: # Disk space + path: @disk_script@ + content: + string: + text: "  {diskspace}({diskperc})" + deco: *combmem + - battery: + name: BAT0 + poll-interval: 30 + content: + list: + items: + - ramp: + tag: capacity + items: + - string: + text: "  {capacity}%({estimate}) " + deco: *bgcurg + - string: + text: "  {capacity}%({estimate}) " + deco: {stack: [ <<: *bgcblock, <<: *linebat]} + - string: + text: "  {capacity}%({estimate}) " + deco: {stack: [ <<: *bgcblock, <<: *linebat]} + - string: + text: "  {capacity}%({estimate}) " + deco: {stack: [ <<: *bgcblock, <<: *linebat]} + - string: + text: "  {capacity}%({estimate}) " + deco: {stack: [ <<: *bgcblock, <<: *linebat]} + #- script: # tray + # path: /home/dt/.config/yambar/scripts/yambar-tray + # content: + # empty: {} + #- script: + # path: /home/dt/.config/yambar/scripts/yambar-tray-width + # poll-interval: 10 + # content: + # string: + # text: "{padding}" + # deco: *combmem diff --git a/home-manager/soispha/config/yambar/default.nix b/home-manager/soispha/config/yambar/default.nix new file mode 100644 index 00000000..0bcf8419 --- /dev/null +++ b/home-manager/soispha/config/yambar/default.nix @@ -0,0 +1,53 @@ +{ + nixosConfig, + sysLib, + system, + pkgs, + grades, + yambar_cpu, + yambar_memory, + ... +}: let + makeScript = { + file, + dependencies, + ... + }: + sysLib.writeShellScriptWithLibrary { + name = "${builtins.baseNameOf file}"; + src = file; + dependencies = dependencies ++ (builtins.attrValues {inherit (pkgs) dash;}); + } + + "/bin/${builtins.baseNameOf file}"; +in { + xdg.configFile."yambar/config.yml".source = pkgs.substituteAll { + src = + if nixosConfig.soispha.laptop.enable + then ./config/laptop.yml + else ./config/config.yml; + + backlight = + if nixosConfig.soispha.laptop.enable + then nixosConfig.soispha.laptop.backlight + else ""; + volume_script = makeScript { + dependencies = builtins.attrValues {inherit (pkgs) pulseaudio gawk coreutils;}; + file = ./scripts/sound-volume; + }; + grade_average_script = makeScript { + dependencies = + [ + grades.outputs.packages.${system}.default + ] + ++ (builtins.attrValues {inherit (pkgs) coreutils gawk;}); + file = ./scripts/grades-average; + }; + cpu_script = yambar_cpu.app.${system}.default.program; + memory_script = yambar_memory.app.${system}.default.program; + + disk_script = makeScript { + dependencies = builtins.attrValues {inherit (pkgs) gawk btrfs-progs coreutils;}; + file = ./scripts/disk; + }; + }; +} diff --git a/home-manager/soispha/config/yambar/scripts/disk b/home-manager/soispha/config/yambar/scripts/disk new file mode 100755 index 00000000..83b23ad9 --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/disk @@ -0,0 +1,22 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +# Main loop +while true; do + # vars + used_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1) + all_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB") + + + # Check space available (4) and percentage used (5) + spaceperc=$(echo "$(echo "$used_space" | tr -d "GiB" )" "$all_space" | awk '{div=$1/$2;div *= 100; printf"%2d%%\n",div }') + + echo "diskspace|string|$used_space" + echo "diskperc|string|$spaceperc" + echo "" + sleep 1 +done + +# vim: ft=sh diff --git a/home-manager/soispha/config/yambar/scripts/grades-average b/home-manager/soispha/config/yambar/scripts/grades-average new file mode 100755 index 00000000..20de5684 --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/grades-average @@ -0,0 +1,15 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +while true; do + grade="$(grades list average | awk '{print $2}')"; + + echo "grade|string|$grade"; + echo ""; + + sleep 1; +done + +# vim: ft=sh diff --git a/home-manager/soispha/config/yambar/scripts/network b/home-manager/soispha/config/yambar/scripts/network new file mode 100755 index 00000000..8e02d6dc --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/network @@ -0,0 +1,47 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +retest=120 +retest_if_con_fails=10 +backend=nmcli + +case "$backend" in + "nmcli") # Test for connectivity with nmcli + while true; do + connection_status=$(nmcli networking connectivity) + if [ "$connection_status" = "full" ]; then + echo "internet|string|Connected" + echo "" + sleep $retest + else + echo "internet|string|Disconnected" + echo "" + sleep $retest_if_con_fails + fi + done + ;; + "ping") # Test for connectivity with ping + ip_address='8.8.8.8' + ping_number=3 + + while true; do + + ping_result=$(mktmp) + ping $ip_address -c $ping_number -q | awk 'BEGIN {FS="/"} END {print $5}' > "$ping_result" + + if [ "$(cat "$ping_result" | wc -l)" -eq 0 ]; then + echo "med|string|No connection" + echo "" + sleep $retest_if_con_fails + else + echo "med|string|$(cat "$ping_result") ms" + echo "" + sleep $retest + fi + done + ;; +esac + +# vim: ft=sh diff --git a/home-manager/soispha/config/yambar/scripts/old/amixer-monitor b/home-manager/soispha/config/yambar/scripts/old/amixer-monitor new file mode 100755 index 00000000..9e75acfa --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/amixer-monitor @@ -0,0 +1,24 @@ +#!/bin/sh +# An improved amixer script that actually detects volume beyond 100% + + +SLEEPTIME=1 + + +while true; do + + volume=$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/"} {print $2 }' | tr -d "%" | tr -d ' ') + + if [ "$volume" -eq 0 ]; then + echo "muted|bool|true" + + else + # Read sink volume in percentages + echo "volume|string|$volume" + echo "muted|bool|false" + fi + + echo "" + sleep "$SLEEPTIME" + +done diff --git a/home-manager/soispha/config/yambar/scripts/old/cpu b/home-manager/soispha/config/yambar/scripts/old/cpu new file mode 100755 index 00000000..bae820d0 --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/cpu @@ -0,0 +1,126 @@ +#!/bin/bash +# I didn't write this script; this is almost directly copied from the dnkl/yambar github. + + +# cpu.sh - measures CPU usage at a configurable sample interval +# +# Usage: cpu.sh INTERVAL_IN_SECONDS +# +# This script will emit the following tags on stdout (N is the number +# of logical CPUs): +# +# Name Type +# -------------------- +# cpu range 0-100 +# cpu0 range 0-100 +# cpu1 range 0-100 +# ... +# cpuN-1 range 0-100 +# +# I.e. ‘cpu’ is the average (or aggregated) CPU usage, while cpuX is a +# specific CPU’s usage. +# +# Example configuration (update every second): +# +# - script: +# path: /path/to/cpu.sh +# args: [1] +# content: {string: {text: "{cpu}%"}} +# + +interval=2 + +case ${interval} in + ''|*[!0-9]*) + echo "interval must be an integer" + exit 1 + ;; + *) + ;; +esac + +# Get number of CPUs, by reading /proc/stat +# The output looks like: +# +# cpu A B C D ... +# cpu0 A B C D ... +# cpu1 A B C D ... +# cpuN A B C D ... +# +# The first line is a summary line, accounting *all* CPUs +IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) +cpu_count=$((${#all_cpu_stats[@]} - 1)) + +# Arrays of ‘previous’ idle and total stats, needed to calculate the +# difference between each sample. +prev_idle=() +prev_total=() +for i in $(seq ${cpu_count}); do + prev_idle+=(0) + prev_total+=(0) +done + +prev_average_idle=0 +prev_average_total=0 + +while true; do + IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) + + usage=() # CPU usage in percent, 0 <= x <= 100 + + average_idle=0 # All CPUs idle time since boot + average_total=0 # All CPUs total time since boot + + for i in $(seq 0 $((cpu_count - 1))); do + # Split this CPUs stats into an array + stats=($(echo "${all_cpu_stats[$((i + 1))]}")) + + # man procfs(5) + user=${stats[1]} + nice=${stats[2]} + system=${stats[3]} + idle=${stats[4]} + iowait=${stats[5]} + irq=${stats[6]} + softirq=${stats[7]} + steal=${stats[8]} + guest=${stats[9]} + guestnice=${stats[10]} + + # Guest time already accounted for in user + user=$((user - guest)) + nice=$((nice - guestnice)) + + idle=$((idle + iowait)) + + total=$((user + nice + system + irq + softirq + idle + steal + guest + guestnice)) + + average_idle=$((average_idle + idle)) + average_total=$((average_total + total)) + + # Diff since last sample + diff_idle=$((idle - prev_idle[i])) + diff_total=$((total - prev_total[i])) + + usage[i]=$((100 * (diff_total - diff_idle) / diff_total)) + + prev_idle[i]=${idle} + prev_total[i]=${total} + done + + diff_average_idle=$((average_idle - prev_average_idle)) + diff_average_total=$((average_total - prev_average_total)) + + average_usage=$((100 * (diff_average_total - diff_average_idle) / diff_average_total)) + + prev_average_idle=${average_idle} + prev_average_total=${average_total} + + echo "cpu|range:0-100|${average_usage}" + for i in $(seq 0 $((cpu_count - 1))); do + echo "cpu${i}|range:0-100|${usage[i]}" + done + + echo "" + sleep "${interval}" +done diff --git a/home-manager/soispha/config/yambar/scripts/old/dfspace b/home-manager/soispha/config/yambar/scripts/old/dfspace new file mode 100755 index 00000000..0b262481 --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/dfspace @@ -0,0 +1,23 @@ +#!/bin/sh + +# Sleep seconds +timer="60" + +# Main loop +while true; do + + # vars + used_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1) + all_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB") + + + # Check space available (4) and percentage used (5) + spaceperc=$(echo "$(echo "$used_space" | tr -d "GiB" )" "$all_space" | awk '{div=$1/$2;div *= 100; printf"%2d%%\n",div }') + + echo "diskspace|string|$used_space" + echo "diskperc|string|$spaceperc" + echo "" + sleep $timer + +done + diff --git a/home-manager/soispha/config/yambar/scripts/old/grades-average b/home-manager/soispha/config/yambar/scripts/old/grades-average new file mode 100755 index 00000000..a04b958c --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/grades-average @@ -0,0 +1,12 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +grade=$(grades list average | awk '{print $2}'); + +echo "grade|string|$grade"; +echo ""; + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/soispha/config/yambar/scripts/old/meminfo b/home-manager/soispha/config/yambar/scripts/old/meminfo new file mode 100755 index 00000000..0156e94c --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/meminfo @@ -0,0 +1,37 @@ +#!/bin/sh +# Checks memory usage + +# Number of seconds to retest +timer=5 + +# Main loop +while true; do + + mem_total=$(LANG=C free -b|awk '/^Mem:/{print $2}') + mem_used=$(LANG=C free -b|awk '/^Mem:/{print $3}') + swap_total=$(LANG=C free -b|awk '/^Swap:/{print $2}') + swap_used=$(LANG=C free -b|awk '/^Swap:/{print $3}') + + + memperc=$(echo "$mem_used" "$mem_total" | awk '{ div = 100 * ($1 / $2)} { printf "%.0f ", div }' | tr -d ' ' ) + swapperc=$(echo "$swap_used" "$swap_total" | awk '{ + if ( $1 == 0 || $2 == 0 ) { + print "%" + } else { + div = 100 * ($1 / $2); + printf "%.0f ", div +} +}' | tr -d ' ' ) + + +echo "memperc|string|$memperc" +if [ "$swapperc" = "%" ];then + echo "swapstate|bool|false" +else + echo "swapperc|string|$swapperc" + echo "swapstate|bool|true" +fi +echo "" +sleep "$timer" + +done diff --git a/home-manager/soispha/config/yambar/scripts/old/nmclitest b/home-manager/soispha/config/yambar/scripts/old/nmclitest new file mode 100755 index 00000000..3e8bc73a --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/nmclitest @@ -0,0 +1,23 @@ +#!/bin/sh +# Test for connectivity with nmcli + +Timer=${1:-120} # Number of seconds to retest +Timer2=${2:-10} # Number of seconds to retest if connection fails + +# Main loop +while true; do + + CONN=$(nmcli networking connectivity) + + if [[ "$CONN" == "full" ]]; then + echo "internet|string|Connected" + echo "" + sleep $Timer + else + echo "internet|string|Disconnected" + echo "" + sleep $Timer2 + fi + +done + diff --git a/home-manager/soispha/config/yambar/scripts/old/pingtest b/home-manager/soispha/config/yambar/scripts/old/pingtest new file mode 100755 index 00000000..2b5f9998 --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/pingtest @@ -0,0 +1,28 @@ +#!/bin/sh +# Test for connectivity with ping + +Timer=${1:-120} # Number of seconds to retest +Timer2=${2:-10} # Number of seconds to retest if connection fails +IP=${3:-'8.8.8.8'} # IP address to test, defaults to Google +PCount=${4:-3} # Number of pings to send + +# Main loop +while true; do + + # Pings the IP address for five times + PINGSTR=$(ping $IP -c $PCount -q) + # Use text formatting to get min/max ms delays + MED=$(echo $PINGSTR | sed 's/min\/avg\/max\/mdev = /\n/g' | tail -n 1 | sed 's/\//\t/g' | cut -f2) + + if [[ "$MED" == "" ]]; then + echo "med|string|No connection" + echo "" + sleep $Timer2 + else + echo "med|string|$MED ms" + echo "" + sleep $Timer + fi + +done + diff --git a/home-manager/soispha/config/yambar/scripts/old/yambar-tray b/home-manager/soispha/config/yambar/scripts/old/yambar-tray new file mode 100755 index 00000000..1704c6dd --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/yambar-tray @@ -0,0 +1,27 @@ +#!/bin/sh + + +pkill stalonetray +pkill trayer + +# launch a tray. +echo + +sleep 0.1 # make sure yambar starts first so we can draw on tpo of it + +# trayer-srg fork! +trayer \ + --edge top \ + --tint 0x24242400 \ + --align right \ + --height 20 \ + --expand false \ + --transparent true \ + --alpha 0 \ + --width 20 \ + --monitor primary \ + --widthtype request + # &>/dev/null + + + diff --git a/home-manager/soispha/config/yambar/scripts/old/yambar-tray-width b/home-manager/soispha/config/yambar/scripts/old/yambar-tray-width new file mode 100755 index 00000000..00544e70 --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/yambar-tray-width @@ -0,0 +1,28 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +CHARWIDTH=8 # i guess? + +tray_width_px() { + xwininfo -name panel | # trayer names its window "panel" + grep -i width: | + awk '{print $2}' +} + +px_to_spaces() { + spaces="$((1 + ${1:-0} / $CHARWIDTH))" + printf "% *s\n" $spaces +} + +sleep 0.2 # be sure trayer is already up + +output="$(px_to_spaces `tray_width_px`)" +echo "padding|string|$output" +echo "" + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/soispha/config/yambar/scripts/sound-volume b/home-manager/soispha/config/yambar/scripts/sound-volume new file mode 100755 index 00000000..8494cbd5 --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/sound-volume @@ -0,0 +1,20 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +while true; do + volume="$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/" } {gsub("%","",$2); gsub(" ","",$2)} {printf $2}')" + + if [ "$volume" -eq 0 ]; then + echo "muted|bool|true" + else + echo "volume|string|$volume" + echo "muted|bool|false" + fi + echo "" + + sleep 1; +done + +# vim: ft=sh diff --git a/home-manager/soispha/config/zsh/config/custom_cursor.sh b/home-manager/soispha/config/zsh/config/custom_cursor.sh new file mode 100644 index 00000000..9a6da012 --- /dev/null +++ b/home-manager/soispha/config/zsh/config/custom_cursor.sh @@ -0,0 +1,40 @@ +# Change cursor shape for different vi modes. +function zle-keymap-select { + if [[ ${KEYMAP} == vicmd ]] || + [[ $1 = 'block' ]]; then + echo -ne '\e[1 q' + elif [[ ${KEYMAP} == main ]] || + [[ ${KEYMAP} == viins ]] || + [[ ${KEYMAP} = '' ]] || + [[ $1 = 'beam' ]]; then + echo -ne '\e[5 q' + fi +} +zle -N zle-keymap-select + +# ci", ci', ci`, di", etc +autoload -U select-quoted +zle -N select-quoted +for m in visual viopp; do + for c in {a,i}{\',\",\`}; do + bindkey -M $m $c select-quoted + done +done + +# ci{, ci(, ci<, di{, etc +autoload -U select-bracketed +zle -N select-bracketed +for m in visual viopp; do + for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do + bindkey -M $m $c select-bracketed + done +done + +zle-line-init() { + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne "\e[5 q" +} +zle -N zle-line-init + +echo -ne '\e[5 q' # Use beam shape cursor on startup. +precmd() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. diff --git a/home-manager/soispha/config/zsh/config/zsh-init.sh b/home-manager/soispha/config/zsh/config/zsh-init.sh new file mode 100644 index 00000000..4d54d058 --- /dev/null +++ b/home-manager/soispha/config/zsh/config/zsh-init.sh @@ -0,0 +1,39 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Flex on the ubuntu users +[ "$NVIM" ] || hyfetch +#loginctl show-session $XDG_SESSION_ID + +## Enable colors and change prompt: +#autoload -Uz colors && colors +#autoload -Uz compinit && compinit -u +## Edit line in vim buffer ctrl-v +autoload -Uz edit-command-line; zle -N edit-command-line +## Enter vim buffer from normal mode +#autoload -Uz edit-command-line && zle -N edit-command-line +bindkey "^V" edit-command-line + +## zstyles +#zstyle ':completion:*' menu select +## Auto complete with case insensitivity +#zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + +#zmodload zsh/complist +#fpath+=/home/dt/.config/zsh/comp +#compinit +#_comp_options+=(globdots) # Include hidden files. +# +## Source configs +#source "${ZDOTDIR}/ali.sh" +#source "${ZDOTDIR}/prompt.sh" +#source "${ZDOTDIR}/hotkeys.sh" +#source "./${path_custom_cursor}" +#source ~/.local/lib/shell/lib +# +## Load zsh-syntax-highlighting +#source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +## Suggest aliases for commands +#source /usr/share/zsh/plugins/zsh-you-should-use/you-should-use.plugin.zsh +# +##eval "$(lua ~/scripts/z.lua --init zsh enhanced)" diff --git a/home-manager/soispha/config/zsh/config/zsh-prompt.sh b/home-manager/soispha/config/zsh/config/zsh-prompt.sh new file mode 100644 index 00000000..1af12443 --- /dev/null +++ b/home-manager/soispha/config/zsh/config/zsh-prompt.sh @@ -0,0 +1,63 @@ +#vim:ft=zsh +_command_time_preexec() { + timer=${timer:-$SECONDS} +} + +_command_time_precmd() { + PROMPT_TMP_DIR=$(mktemp) + if [ $timer ]; then + ts=$(($SECONDS - $timer)) + tts=$ts + mi=0 + ho=0 + if [ $ts -ge 3 ];then + while [ $ts -ge 60 ];do + ts=$((ts-60)) + mi=$((mi+1)) + done + + while [ $mi -ge 60 ];do + mi=$((mi-60)) + ho=$((ho+1)) + done + + if [ $tts -ge 3600 ];then + out=$(printf '%dh %dm %ds\n' $ho $mi $ts) + elif [ $tts -ge 60 ];then + out=$(printf '%dm %ds\n' $mi $ts) + elif [ $tts -lt 60 ];then + out=$(printf '%ds\n' $ts) + fi + + export psvar[1]="took $(printf '%s ' "$out")" + echo $psvar[1] > $PROMPT_TMP_DIR + fi + + unset timer + unset ts + unset tts + unset mi + unset ho +fi +} + +_command_ro_precmd() { +if ! [ -w $(pwd) ];then + echo " " +fi +} + +preexec_functions+=(_command_time_preexec) +precmd_functions+=(_command_time_precmd) + +blue="14" +red="9" +white="15" +setopt PROMPT_SUBST +export PROMPT='%(?.%F{$blue}.%F{$red})%B%3~%(!. %F{$red}as root %f. )%F{$white}$(if [ -n $PROMPT_TMP_DIR ];then cat $PROMPT_TMP_DIR 2>/dev/null; rm $PROMPT_TMP_DIR 2>/dev/null;fi)%f%(?.%F{$blue}.%F{$red})%F{$red}$(_command_ro_precmd)%F{$blue}❯ %b%f' +export RPROMPT='' + +#%(2V.%F{$red}%2v%f$(export psvar[2]="") .) + +# TODO: +# Add git support diff --git a/home-manager/soispha/config/zsh/default.nix b/home-manager/soispha/config/zsh/default.nix new file mode 100644 index 00000000..01a553d0 --- /dev/null +++ b/home-manager/soispha/config/zsh/default.nix @@ -0,0 +1,139 @@ +{ + config, + pkgs, + lib, + shell_library, + system, + osConfig, + ... +}: { + # TODO ADD THIS ADDON + # next one only works if your alias is only a command, e.g. if you `alias='cat some_file.txt &2> /dev/null'`, running `cat some_file.txt` won't trigger it. + # TODO find something better for this use case + # zsh-you-should-use # ZSH plugin that reminds you to use existing aliases for commands you just typed + home.sessionPath = []; + programs.zsh = { + enable = true; + enableAutosuggestions = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + + autocd = true; + + dotDir = ".config/zsh"; + + history = { + extended = true; + ignoreDups = false; + expireDuplicatesFirst = false; + ignoreSpace = false; # TODO I might change that + + path = "${config.xdg.dataHome}/zsh/history"; + save = 9000000; # number of lines to save + size = 9000000; # number of lines to keep + share = false; # share between sessions + }; + historySubstringSearch = { + enable = true; + searchDownKey = "^[[B"; # DOWN Arrow key + searchUpKey = "^[[A"; # UP Arrow key + }; + + loginExtra = + '' + eval $(ssh-agent -s) > /dev/null # start ssh agent + '' + + lib.concatStringsSep "\nsetopt " [ + "setopt AUTO_CD" # This is needed as first item + "AUTO_PUSHD" + "CHASE_DOTS" + + "ALWAYS_TO_END" + + "EXTENDED_HISTORY" + "HIST_ALLOW_CLOBBER" + "HIST_VERIFY" + "HIST_FCNTL_LOCK" + "APPEND_HISTORY" + + "DVORAK" + "CORRECT" + + "PROMPT_SUBST" + "TRANSIENT_RPROMPT" # maybe? + + "COMBINING_CHARS" + "VI" + ]; + + initExtraFirst = + builtins.readFile ./config/zsh-init.sh + + builtins.readFile ./config/zsh-prompt.sh + + builtins.readFile ./config/custom_cursor.sh + + builtins.readFile "${pkgs.fzf}/share/fzf/key-bindings.zsh" + + "SHELL_LIBRARY_VERSION=\"1.1.4\" source ${shell_library.rawLib.${system}}"; + shellAliases = { + ll = ". ll"; + hisea = "history 0 | grep"; + }; + sessionVariables = { + EDITOR = "nvim"; + IVIEWER = "imv"; + READER = "zathura"; + VISUAL = "nvim"; + CODEEDITOR = "nvim"; + TERMINAL = "alacritty"; + BROWSER = "firefox"; + COLORTERM = "truecolor"; + PAGER = "less -R"; + WM = "river"; + WALLPAPER = "${config.home.homeDirectory}/media/pictures/wallpaper"; + + # FUNCNEST for more functions in functions + #FUNCNEST = "2000"; + + WALLPAPERDIR = "$HOME/media/pictures/wallpapers/"; + LESS = "R"; + MANPAGER = "less -R --use-color -Dd+r -Du+b"; + LIBVIRT_DEFAULT_URI = "qemu:///system"; + + BEMENU_SCALE = "1.5"; + BEMENU_BACKEND = "wayland"; + BEMENU_OPTS = "--fn 'Source Code Pro 10' -c -l 30 -B 1 -W 0.9 --hf #ffffff"; + + MPD_HOST = "/run/user/${builtins.toString osConfig.users.users.soispha.uid}/mpd/socket"; + + # Clean the home dir {{{ + CARGO_HOME = "${config.xdg.dataHome}/cargo"; + + #_JAVA_OPTIONS = lib.concatStringsSep " " [ + # ''-Djava.util.prefs.userRoot="${config.xdg.configHome}/java"'' + # ''-Djavafx.cachedir="${config.xdg.cacheHome}/openjfx"'' + # ]; + #GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle"; + #GOPATH = "${config.xdg.dataHome}/go"; + #GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc"; + #LESSHISFILE = "${config.xdg.cacheHome}/less/history"; + #LESSKEYIN = "${config.xdg.configHome}/less/lesskey"; + #RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; + #NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; + #NUGET_PACKAGES = "${config.xdg.cacheHome}/NuGetPackages"; + #PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc"; + #XAUTHORITY = "${config.xdg.stateHome}/Xauthority"; + #COMPDUMPFILE = "${config.xdg.dataHome}/zsh/.zcompdump}"; + #IPYTHONDIR = "${config.xdg.configHome}/ipython"; + #PARALLEL_HOME = "${config.xdg.configHome}/parallel"; + #STACK_XDG = "1"; + #WINEPREFIX = "${config.xdg.dataHome}/wine"; + # }}} + + # Export Wayland env Vars {{{ + QT_QPA_PLATFORM = "wayland"; + QT_QPA_PLATFORMTHEME = "qt5ct"; # needs qt5ct + CLUTTER_BACKEND = "wayland"; + SDL_VIDEODRIVER = "wayland"; # might brake some things + MOZ_ENABLE_WAYLAND = "1"; + # }}} + }; + }; +} diff --git a/home-manager/soispha/default.nix b/home-manager/soispha/default.nix new file mode 100644 index 00000000..10043080 --- /dev/null +++ b/home-manager/soispha/default.nix @@ -0,0 +1,35 @@ +{impermanence, ...}: let + # TODO actually use this in the user config + username = "soispha"; + homeDirectory = "/home/${username}"; + + # xdg + configHome = "${homeDirectory}/.config"; + dataHome = "${homeDirectory}/.local/share"; + stateHome = "${homeDirectory}/.local/state"; + cacheHome = "${homeDirectory}/.cache"; + binHome = "${homeDirectory}/.local/bin"; + # TODO add XDG_RUNTIME_DIR +in { + imports = [ + impermanence.nixosModules.home-manager.impermanence + ./impermanence + ./packages + ./config + ./wms + ./files + ]; + + # I don't know what this does, but I've seen it a lot online, so it should be good, right? + programs.home-manager.enable = true; + + home = { + inherit username homeDirectory; + stateVersion = "23.05"; + enableNixpkgsReleaseCheck = true; + }; + xdg = { + inherit configHome dataHome stateHome cacheHome; #binHome; # TODO add binHome, when the standart is extended + enable = true; + }; +} diff --git a/home-manager/soispha/files/default.nix b/home-manager/soispha/files/default.nix new file mode 100644 index 00000000..4e16077c --- /dev/null +++ b/home-manager/soispha/files/default.nix @@ -0,0 +1,5 @@ +{config, ...}: { + imports = [ + ./wallpaper + ]; +} diff --git a/home-manager/soispha/files/wallpaper/abstract-nord.png b/home-manager/soispha/files/wallpaper/abstract-nord.png new file mode 100644 index 00000000..5ef498bf Binary files /dev/null and b/home-manager/soispha/files/wallpaper/abstract-nord.png differ diff --git a/home-manager/soispha/files/wallpaper/default.nix b/home-manager/soispha/files/wallpaper/default.nix new file mode 100644 index 00000000..2c9b3368 --- /dev/null +++ b/home-manager/soispha/files/wallpaper/default.nix @@ -0,0 +1,8 @@ +{config, ...}: { + home.file = { + wallpaper = { + source = ./abstract-nord.png; + target = "media/pictures/wallpaper"; + }; + }; +} diff --git a/home-manager/soispha/impermanence/default.nix b/home-manager/soispha/impermanence/default.nix new file mode 100644 index 00000000..90b2152b --- /dev/null +++ b/home-manager/soispha/impermanence/default.nix @@ -0,0 +1,30 @@ +{ + lib, + nixosConfig, + ... +}: { + config = lib.mkIf nixosConfig.soispha.impermanence.enable { + home.persistence."/srv/home/soispha" = { + allowOther = true; + directories = [ + ".local/share" + + ".local/state/nvim" + ".local/state/wireplumber" + + ".config/Signal" + ".config/Element" + + ".cache" + ".mozilla" + + "media" + "repos" + "school" + ]; + files = [ + ".local/state/lesshst" + ]; + }; + }; +} diff --git a/home-manager/soispha/packages/default.nix b/home-manager/soispha/packages/default.nix new file mode 100644 index 00000000..0d6528dd --- /dev/null +++ b/home-manager/soispha/packages/default.nix @@ -0,0 +1,160 @@ +{ + pkgs, + sysLib, + grades, + snap-sync, + system, + flake_update, + ... +}: +with pkgs; let + snap-sync-pkgs = pkgs.writeShellScriptBin "snap-sync" (builtins.readFile "${snap-sync}/bin/snap-sync"); + shell-scripts = (import ./scripts.nix) {inherit pkgs sysLib;}; + + Gui = { + Terminals = [ + # foot # wayland native terminal + alacritty # default terminal + ]; + Browsers = [ + #ungoogled-chromium # web browser (only for web programming) + #brave + ]; + + ImageManipulation = [ + #krita # new, and better (KDE) + #gimp # conservative, and old (GNOME) + ]; + + Social = [ + mumble # voice chat software (client) + lutris # multiple game store clients + + nheko # best matrix client (as of today) + # element-desktop # nheko didn't work + signal-desktop # to avoid encryption problems with signal-bridge + ]; + + Misc = [ + #kalzium # Periodic Table of Elements (`element` is [sort of] better) + keepassxc # password manager + #onlykey # OnlyKey Chrome Desktop App + anki-bin # spaced repetition + ]; + }; + + TuiCli = { + EyeCandy = [ + #banner # Print large banners to ASCII terminals + cmatrix # A curses-based scrolling 'Matrix'-like screen + hyfetch # Neofetch with LGBTQ pride flags. + ]; + + Misc = [ + android-file-transfer # Android MTP client with minimalistic UI + #xdg-ninja # A shell script which checks your $HOME for unwanted files and directories. + xdg-utils # open urls and such things + yokadi # Command line oriented, sqlite powered, todo list + killall # kill a application by name + ]; + + WM = { + river = [river]; # A dynamic tiling wayland compositor + + CLITools = [ + lswt # List Wayland toplevels + wl-clipboard # Command-line copy/paste utilities + swaylock # lockscreen + ]; + + Media = [ + wf-recorder # Screen recorder + ]; + }; + + Media = { + View = [ + imv # Image viewer + ]; + + Listen = [ + pulseaudio # set the volume with pactl + ncmpc # mpd player client + mpc-cli # a cli mpd client + ]; + }; + + Hardware = { + Storage = [ + #compsize # Calculate compression ratio of a set of files on Btrfs + # TODO smartmontools # Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives + ]; + + Input = [ + #piper # GTK application to configure gaming mice + ]; + + Printer = [ + # TODO sane-airscan # SANE - SANE backend for AirScan (eSCL) and WSD document scanners + ]; + }; + + FileListers = [ + tree # A directory listing program displaying a depth indented list of files + fd # Simple, fast and user-friendly alternative to find + ripgrep # A search tool that combines the usability of ag with the raw speed of grep + fzf # used to quickly move around with its keybindings + ]; + + Editors = [ + ed # A POSIX-compliant line-oriented text editor + #sed # GNU stream editor + vim # The original ex/vi text editor (this is `vim` and not `vi`, as `vi` is unfree) + neovim # Fork of Vim aiming to improve user experience, plugins, and GUIs + ]; + + Programming = { + GeneralTools = [ + git # the fast distributed version control system + git-crypt # mostly here to avoid problems in repositories, where the flake can't be loaded + glow # Command-line markdown renderer + ]; + }; + }; + # TODO unmaintained, find sth else: + # handlr # Powerful alternative to xdg-utils written in Rust + mapFun = x: + if builtins.isAttrs x + then + if lib.isDerivation x + then [x] + else builtins.attrValues x + else [x]; +in { + home.packages = + [ + snap-sync-pkgs + flake_update.outputs.packages.${system}.default + grades.outputs.packages.${system}.default + ] + ++ shell-scripts + ++ (with builtins; + concatLists + (concatLists [ + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (attrValues Gui))))))) + + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (attrValues TuiCli))))))) + ])); +} diff --git a/home-manager/soispha/packages/scripts.nix b/home-manager/soispha/packages/scripts.nix new file mode 100644 index 00000000..73b52d37 --- /dev/null +++ b/home-manager/soispha/packages/scripts.nix @@ -0,0 +1,97 @@ +{ + pkgs, + sysLib, + ... +}: let + write_script = { + name, + path, + dependencies, + }: + sysLib.writeShellScriptWithLibrary { + inherit name; + src = ./scripts/${path}/${name}; + dependencies = dependencies ++ [pkgs.dash]; + }; + aumo-scr = write_script { + name = "aumo"; + path = "apps"; + dependencies = builtins.attrValues {inherit (pkgs) udisks gawk gnused gnugrep sudo;}; + }; + con2pdf-scr = write_script { + name = "con2pdf"; + path = "apps"; + dependencies = builtins.attrValues {inherit (pkgs) sane-backends imagemagick coreutils fd;}; + }; + + dldragon-scr = write_script { + name = "dldragon"; + path = "small_functions"; + dependencies = builtins.attrValues {inherit (pkgs) curl xdragon;}; + }; + gtk-themes-scr = write_script { + name = "gtk-themes"; + path = "small_functions"; + dependencies = builtins.attrValues {inherit (pkgs) glib;}; + }; + screen_shot-scr = write_script { + name = "screen_shot"; + path = "small_functions"; + dependencies = builtins.attrValues {inherit (pkgs) grim slurp alacritty;}; # TODO add llp + }; + mocs-scr = write_script { + name = "mocs"; + path = "small_functions"; + dependencies = builtins.attrValues {inherit (pkgs) ncmpc procps;}; # TODO add mymocp + }; + update-sys-scr = write_script { + name = "update-sys"; + path = "small_functions"; + dependencies = builtins.attrValues {inherit (pkgs) git nixos-rebuild sudo openssh coreutils mktemp gnugrep gnused;}; + }; + + backsnap-scr = write_script { + name = "backsnap"; + path = "wrappers"; + dependencies = builtins.attrValues {}; # TODO add snap-sync + }; + ll-scr = sysLib.writeShellScriptWithLibraryUnwrapped { + name = "ll"; + src = ./scripts/wrappers/ll; + }; + # TODO this need to be replaced with a wayland alternative + # llp-scr = write_script { + # name = "llp"; + # path = "wrappers"; + # dependencies = builtins.attrValues {inherit (pkgs) lf ueberzug;}; + # }; + spodi-scr = write_script { + name = "spodi"; + path = "wrappers"; + dependencies = builtins.attrValues {inherit (pkgs) gawk expect spotdl fd coreutils;}; + }; + virsh-del-scr = write_script { + name = "virsh-del"; + path = "wrappers"; + dependencies = builtins.attrValues {inherit (pkgs) libvirt;}; + }; + yti-scr = write_script { + name = "yti"; + path = "wrappers"; + dependencies = builtins.attrValues {inherit (pkgs) gawk expect yt-dlp;}; + }; +in [ + aumo-scr + con2pdf-scr + dldragon-scr + gtk-themes-scr + screen_shot-scr + mocs-scr + update-sys-scr + backsnap-scr + ll-scr + # llp-scr # TODO see above + spodi-scr + virsh-del-scr + yti-scr +] diff --git a/home-manager/soispha/packages/scripts/apps/aumo b/home-manager/soispha/packages/scripts/apps/aumo new file mode 100755 index 00000000..014df638 --- /dev/null +++ b/home-manager/soispha/packages/scripts/apps/aumo @@ -0,0 +1,54 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +# TODO rewrite this + +if [ "$1" = "-u" ];then udisksctl unmount -b "$(cat "$HOME/.cache/aumo/mnt_disk")"; exit 0; fi +all_available_disks=$(mktemp) +awk '{print $4}' /proc/partitions | sed '1 s|.*||' > "$all_available_disks" + +mounted_disk=$(mktemp) +awk '{print $1}' /proc/mounts > "$mounted_disk" + +unmounted_disks=$(mktemp) + +for i in $(cat $all_available_disks);do + if ! grep -qw "/dev/$i" $mounted_disk && ! ls /sys/block/$i/*/partition > /dev/null 2> /dev/null;then echo $i >> $unmounted_disks;fi +done + + +u=1 +disk=-1 +while [ $disk -lt 0 ] || [ $disk -gt $(wc -l $unmounted_disks | awk '{print $1}') ];do + + [ "$1" = "-v" ] && for i in $(cat $unmounted_disks);do + sudo fdisk -l "/dev/$i" + done + + for i in $(cat $unmounted_disks);do + printf "%4s) %s\n" "$u" "$i" + u=$(( u + 1 )) + done + + printf "%4s) Exit\n" "0" + printf "Input number: " + read -r disk + + [ $disk -lt 0 ] || [ $disk -gt $(wc -l $unmounted_disks | awk '{print $1}') ] && printf "Wrong number. Please retry\n" + [ $disk -eq 0 ] && exit 0 +done + +mnt_disk="/dev/$(awk -v n=$disk 'NR==n' $unmounted_disks)" + +if ! [ "$1" = "-v" ] && [ -n "$1" ];then sudo mount "$mnt_disk" "$1" && exit 0;fi +[ -n "$2" ] && sudo mount "$mnt_disk" "$1" && exit 0 +if mount | grep -q ~/mnt ;then dien "Something is mounted at ~/mnt";else udisksctl mount -b "$mnt_disk";fi + +[ -e $HOME/.cache/aumo/mnt_disk ] || mkdir -p $HOME/.cache/aumo +echo $mnt_disk >> $HOME/.cache/aumo/mnt_disk +rm $all_available_disks +rm $mounted_disk +rm $unmounted_disks +[ -d /tmp/LIB_FILE_TEMP_DIR/ ] && rm -r /tmp/LIB_FILE_TEMP_DIR/ diff --git a/home-manager/soispha/packages/scripts/apps/con2pdf b/home-manager/soispha/packages/scripts/apps/con2pdf new file mode 100755 index 00000000..9cadc376 --- /dev/null +++ b/home-manager/soispha/packages/scripts/apps/con2pdf @@ -0,0 +1,152 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + + +# needed for help() and version +# shellcheck disable=2034 +AUTHORS="Soispha"; +# shellcheck disable=2034 +YEARS="2023"; +# shellcheck disable=2034 +VERSION="1.0.0"; + +help() { +cat << EOF +Scan images and turn them into a pdf. + +Usage: + $NAME [--help|--version|--out-dir|--num-pages|--method] --name --device + +Options: + --out-dir | -o + Path to place the generated pdf files (default: ./pdf). + --name | -n + Name for the pdf files (e.g. "\$name"_1.pdf). + --num-pages | -p + Number of pages to merge into one pdf (default: 1). + --device | -d + Device used for scanning. + --method | -m + Method to use for scanning (default: ADF). + --help | -h + Display this help and exit. + --version | -v + Display version and copyright information and exit. +EOF +} + +scan() { + number_of_pages="$1"; + device="$2"; + output_directory="$3"; + name="$4"; + method="$5"; + + [ -z "$number_of_pages" ] && die "Parameter 'number_of_pages' is not set!" + [ -z "$device" ] && die "Parameter 'device' is not set!" + [ -z "$output_directory" ] && die "Parameter 'output_directory' is not set!" + [ -z "$name" ] && die "Parameter 'name' is not set!" + [ -z "$method" ] && die "Parameter 'method' is not set!" + + tiff_temp_path="$(mktmp -d)"; + cd "$tiff_temp_path" || die "Bug" + + msg "Started scanning..."; + if [ "$method" = "Flatbed" ]; then + do_until_success \ + "scanimage --format=tiff --progress --source='$method' --device='$device' --output-file=1.tiff" \ + "warn 'Retrying scan, as we assume a network error!'" + else + for i in $(seq "$number_of_pages");do + do_until_success \ + "scanimage --format=tiff --progress --source='$method' --device='$device' --batch=%d.tif --batch-increment='$number_of_pages' --batch-start='$i'" \ + "warn 'Retrying scan, as we assume a network error!'" + + + if [ "$number_of_pages" -ne 1 ];then + msg "Finished turn, please change side!"; + readp "Press enter to continue" noop + fi + done + fi + + msg "Creating output directory..."; + mkdir "$output_directory"; + cd "$output_directory" || die "Bug" + + counter=0; + msg "Converting images to pdfs..."; + while read -r scanned_image_a;do + if [ "$number_of_pages" -ne 1 ];then + scanned_image_b_set=false; + if [ -z "$scanned_image_b" ];then + scanned_image_b="$i" + scanned_image_b_set=true; + : $((counter += 1)) + fi + + if [ -n "$scanned_image_a" ] && [ "$scanned_image_b_set" = false ];then + convert "$scanned_image_b" "$scanned_image_a" -compress jpeg -quality 100 "$name"_"$counter".pdf + fi + else + : $((counter += 1)) + convert "$scanned_image_a" -compress jpeg -quality 100 "$name"_"$counter".pdf + fi + + done < "$(tmp "fd . '$tiff_temp_path' | sort -n")" +} + +for input in "$@"; do + case "$input" in + "--help" | "-h") + help; + exit 0; + ;; + "--version" | "-v") + version; + exit 0; + ;; + esac +done + +number_of_pages="1"; +unset device; +output_directory="$(pwd)/pdf"; +unset name; +method="ADF"; + +while [ "$#" -ne 0 ]; do + case "$1" in + "--help" | "-h") + ;; + "--version" | "-v") + ;; + "--out-dir" | "-o") + shift 1; + output_directory="$1"; + ;; + "--name" | "-n") + shift 1; + name="$1"; + ;; + "--num-pages" | "-p") + shift 1; + number_of_pages="$1"; + ;; + "--device" | "-d") + shift 1; + device="$1"; + ;; + "--method" | "-m") + shift 1; + method="$1"; + ;; + *) + die "Command line arg $1 does not exist. See --help for a list."; + ;; + esac + shift 1; +done +scan "$number_of_pages" "$device" "$output_directory" "$name" "$method"; diff --git a/home-manager/soispha/packages/scripts/small_functions/dldragon b/home-manager/soispha/packages/scripts/small_functions/dldragon new file mode 100755 index 00000000..ea75c362 --- /dev/null +++ b/home-manager/soispha/packages/scripts/small_functions/dldragon @@ -0,0 +1,28 @@ +#! /usr/bin/env dash +# Provides the ability to download a file by dropping it into a window + +url=$(dragon -t -x) + +if [ -n "$url" ]; then + printf "File Name: " + name="" + while [ -z $name ] || [ -e $name ] + do + read -r name + if [ -e "$name" ]; then + printf "File already exists, overwrite (y|n): " + read -r ans + + if [ "$ans" = "y" ]; then + break + else + printf "File Name: " + fi + fi + done + + # Download the file with curl + [ -n "$name" ] && curl -o "$name" "$url" || exit 1 +else + exit 1 +fi diff --git a/home-manager/soispha/packages/scripts/small_functions/gtk-themes b/home-manager/soispha/packages/scripts/small_functions/gtk-themes new file mode 100755 index 00000000..6ebf2735 --- /dev/null +++ b/home-manager/soispha/packages/scripts/small_functions/gtk-themes @@ -0,0 +1,21 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + + +# TODO document, what this does + +# usage: import-gsettings +config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" +font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name" diff --git a/home-manager/soispha/packages/scripts/small_functions/mocs b/home-manager/soispha/packages/scripts/small_functions/mocs new file mode 100755 index 00000000..e14a84c8 --- /dev/null +++ b/home-manager/soispha/packages/scripts/small_functions/mocs @@ -0,0 +1,15 @@ +#! /bin/bash +if [[ "$(pgrep mocp)" -eq 0 ]]; +then + mocp -M "${XDG_CONFIG_HOME}"/moc -S + if [[ $1 -eq 0 ]]; + then + mocp -M "${XDG_CONFIG_HOME}"/moc -v 12 + else + mocp -M "${XDG_CONFIG_HOME}"/moc -v "$1" + fi + mocp -M "${XDG_CONFIG_HOME}"/moc -p + mymocp& +else + mocp -M "${XDG_CONFIG_HOME}"/moc -G +fi diff --git a/home-manager/soispha/packages/scripts/small_functions/screen_shot b/home-manager/soispha/packages/scripts/small_functions/screen_shot new file mode 100755 index 00000000..73eb2ee4 --- /dev/null +++ b/home-manager/soispha/packages/scripts/small_functions/screen_shot @@ -0,0 +1,10 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +date="$(date +%s)" +grim -g "$(slurp)" "$HOME/media/pictures/screenshots/$date.png" && + alacritty -e ll -command ":{{ set sortby atime; set reverse!; }}" "$HOME/media/pictures/screenshots/$date.png" + +# vim: ft=sh diff --git a/home-manager/soispha/packages/scripts/small_functions/update-sys b/home-manager/soispha/packages/scripts/small_functions/update-sys new file mode 100755 index 00000000..355682d1 --- /dev/null +++ b/home-manager/soispha/packages/scripts/small_functions/update-sys @@ -0,0 +1,78 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +help() { + cat << EOF +This is a NixOS System flake update manager. + +Usage: + $NAME [--branch ] [--help] + +Options: + --branch | -b BRANCHNAME + select a branch to update from. + --mode | -m MODE + select a mode to update with + --help | -h + output this help. +EOF + exit "$1"; +} +default_branch=$(mktmp); +BRANCH=""; + +while [ "$#" -gt 0 ];do + case "$1" in + "--help" | "-h") + help 0; + ;; + "--branch" | "-b") + if [ -n "$2" ];then + BRANCH="$2"; + else + error "$1 requires an argument"; + help 1; + fi + shift 2; + ;; + "--mode" | "-m") + if [ -n "$2" ];then + MODE="$2"; + else + error "$1 requires an argument"; + help 1; + fi + shift 2; + ;; + *) + error "the option $1 does not exist!"; + help 1; + ;; + esac +done + + +cd /etc/nixos || die "No /etc/nixos"; +msg "Starting system update..."; +git remote update origin --prune > /dev/null 2>&1; +if ! [ "$BRANCH" = "" ];then + git switch "$BRANCH" > /dev/null 2>&1 && msg2 "Switched to branch '$BRANCH'"; +fi +msg2 "Updating git repository..."; +git pull --rebase; + +git remote show origin | grep 'HEAD' | cut -d':' -f2 | sed -e 's/^ *//g' -e 's/ *$//g' > "$default_branch" & + +msg2 "Updating system..."; +if [ -n "$MODE" ]; then + nixos-rebuild "$MODE"; +else + nixos-rebuild switch; +fi + +git switch "$(cat "$default_branch")" > /dev/null 2>&1 && msg2 "Switched to branch '$(cat "$default_branch")'"; +msg "Finished Update!"; + +# vim: ft=sh diff --git a/home-manager/soispha/packages/scripts/wrappers/backsnap b/home-manager/soispha/packages/scripts/wrappers/backsnap new file mode 100755 index 00000000..cd08045d --- /dev/null +++ b/home-manager/soispha/packages/scripts/wrappers/backsnap @@ -0,0 +1,3 @@ +#! /usr/bin/env dash +snap-sync --noconfirm -u d1c6e0f6-1837-40fd-bb29-251d5ea0ddb0 +umount /run/dt/d1c6e0f6-1837-40fd-bb29-251d5ea0ddb0 diff --git a/home-manager/soispha/packages/scripts/wrappers/ll b/home-manager/soispha/packages/scripts/wrappers/ll new file mode 100755 index 00000000..cb1fc0ea --- /dev/null +++ b/home-manager/soispha/packages/scripts/wrappers/ll @@ -0,0 +1,14 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +last_directory="$(mktemp)" + +command lf -last-dir-path="$last_directory" "$@" + +dir="$(cat "$last_directory")" +cd "$dir" || die "$dir does not exist!" +rm "$last_directory" + +# vim: ft=sh diff --git a/home-manager/soispha/packages/scripts/wrappers/llp b/home-manager/soispha/packages/scripts/wrappers/llp new file mode 100755 index 00000000..2a21450c --- /dev/null +++ b/home-manager/soispha/packages/scripts/wrappers/llp @@ -0,0 +1,19 @@ +#! /bin/bash + +export LLP=1 +cleanup() { + exec 3>&- + rm "$FIFO_UEBERZUG" +} + +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + lf "$@" +else + [ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf" + export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" + mkfifo "$FIFO_UEBERZUG" + ueberzug layer -s <"$FIFO_UEBERZUG" -p json & + exec 3>"$FIFO_UEBERZUG" + trap cleanup EXIT + lf "$@" 3>&- +fi diff --git a/home-manager/soispha/packages/scripts/wrappers/spodi b/home-manager/soispha/packages/scripts/wrappers/spodi new file mode 100755 index 00000000..4ff53bff --- /dev/null +++ b/home-manager/soispha/packages/scripts/wrappers/spodi @@ -0,0 +1,45 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +DOWN_DIR="/home/soispha/media/music/down"; + +download_url="$1"; + + + +already_downloaded_files="$(mktmp)" +fd . "$DOWN_DIR" --exclude spotdl.log > "$already_downloaded_files"; + +config="$(mktmp)" +cat << EO > "$config" +--log-level INFO +--cache-path /home/soispha/.local/share/spotdl/.spotipy +--audio youtube-music youtube +--lyrics genius musixmatch azlyrics +--ffmpeg ffmpeg +--format mp3 +--output {artists}_-_{title} +--overwrite skip +--client-id 5f573c9620494bae87890c0f08a60293 +--client-secret 212476d9b0f3472eaa762d90b19b0ba8 +--threads 16 +--print-errors +--preload +EO + +if [ -z "$NO_CHECK" ] && [ "$(wc -l < "$already_downloaded_files" )" -ne 0 ];then + die "something is already downloaded" +fi + +rm "$DOWN_DIR/spotdl.log" +cd "$DOWN_DIR" || die "BUG: no $DOWN_DIR" + + +# The sub shell needs to be unquoted, as the arguments may not be treated as one. +# shellcheck disable=2046 +unbuffer spotdl $(cat "$config") download "$download_url" | tee "$DOWN_DIR/spotdl.log" + +[ -d ~/.spotdl ] && rm -r ~/.spotdl +# vim: ft=sh diff --git a/home-manager/soispha/packages/scripts/wrappers/virsh-del b/home-manager/soispha/packages/scripts/wrappers/virsh-del new file mode 100755 index 00000000..afcd87c1 --- /dev/null +++ b/home-manager/soispha/packages/scripts/wrappers/virsh-del @@ -0,0 +1,10 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +virsh destroy "$1" +virsh undefine "$1" --nvram +virsh vol-delete --pool default "$1".qcow2 + +# vim: ft=sh diff --git a/home-manager/soispha/packages/scripts/wrappers/yti b/home-manager/soispha/packages/scripts/wrappers/yti new file mode 100755 index 00000000..d30188a0 --- /dev/null +++ b/home-manager/soispha/packages/scripts/wrappers/yti @@ -0,0 +1,36 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +die "Use spodi instead!" # TODO fix this script +DOWN_DIR=/home/soispha/media/playlist/down/ + + +tmp=$(mktmp) +config=$(mktmp) + +for e in "$DOWN_DIR"/*.mp3;do echo "$e" >> "$tmp";done +[ "$(wc -l "$tmp" | awk '{print $1}')" -gt 2 ] && die "something is already downloaded" + +cat << EO > "$config" +--paths home:"$DOWN_DIR" +#--output %(fulltitle) +--restrict-filenames +--no-overwrites +--no-write-info-json +--clean-info-json +--prefer-free-formats +#--format mp3 +--extract-audio +--audio-quality 0 +--audio-format best +EO + + +rm ${DOWN_DIR}yt-dlp.log +cd $DOWN_DIR || die "BUG: no $DOWN_DIR" + +unbuffer yt-dlp --config-location "$config" "$1" | tee $DOWN_DIR/yt-dlp.log + +# vim: ft=sh diff --git a/home-manager/soispha/wms/default.nix b/home-manager/soispha/wms/default.nix new file mode 100644 index 00000000..610ea2f4 --- /dev/null +++ b/home-manager/soispha/wms/default.nix @@ -0,0 +1,7 @@ +{config, ...}: { + imports = [ + # ./sway + ./river + # ./plasma + ]; +} diff --git a/home-manager/soispha/wms/plasma/default.nix b/home-manager/soispha/wms/plasma/default.nix new file mode 100644 index 00000000..f68ee272 --- /dev/null +++ b/home-manager/soispha/wms/plasma/default.nix @@ -0,0 +1,5 @@ +{config, ...}: { + services.xserver.enable = true; + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; +} diff --git a/home-manager/soispha/wms/river/default.nix b/home-manager/soispha/wms/river/default.nix new file mode 100644 index 00000000..43a47b1a --- /dev/null +++ b/home-manager/soispha/wms/river/default.nix @@ -0,0 +1,68 @@ +{ + pkgs, + sysLib, + river_init_lesser, + nixosConfig, + system, + ... +}: let + inherit (nixosConfig.networking) hostName; + mappings = + if hostName == "tiamat" + then '' + err_fail riverctl keyboard-layout 'us' + err_fail river_init_lesser ~/.config/river/res/moonlander.ron + '' + else if hostName == "lahmu" || hostName == "apzu" || hostName == "mammun" || hostName == "isimud" + then '' + err_fail riverctl keyboard-layout 'dvorak' + err_fail river_init_lesser ~/.config/river/res/keys.ron + '' + else builtins.throw "Host not covered in river mappings"; + screen_setup = + if hostName == "lahmu" + then '' + err_fail wlr-randr --output Virtual-1 --mode 1920x1080 + '' + else if hostName == "tiamat" + then '' + err_fail wlr-randr --output DP-2 --pos 2560,0 + err_fail wlr-randr --output DP-1 --scale 1.5 --pos 0,0 + err_fail gammastep & + '' + else if hostName == "apzu" || hostName == "mammun" || hostName == "isimud" + then '' + err_fail gammastep & + '' + else builtins.throw "Host not covered in river screen setup"; + init_scr = pkgs.substituteAll { + src = ./init; + inherit mappings screen_setup; + }; +in { + xdg.configFile."river/init".source = + sysLib.writeShellScriptWithLibraryAndKeepPath { + name = "river_init"; + src = init_scr; + dependencies = builtins.attrValues { + river_init_lesser = river_init_lesser.packages.${system}.default; + inherit + (pkgs) + dash + river + glib # gnome lib + gammastep + wlr-randr + yambar + mako + swaybg + swayidle + swaylock + alacritty + ; + }; + } + + /bin/river_init; + + xdg.configFile."river/res".source = ./res; +} diff --git a/home-manager/soispha/wms/river/init b/home-manager/soispha/wms/river/init new file mode 100755 index 00000000..599992e6 --- /dev/null +++ b/home-manager/soispha/wms/river/init @@ -0,0 +1,80 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH + +err_fail() { + if ! "$@";then + warning "\"$*\" failed!\n" >> ~/river_log + # msg "Executing the safe init!" + # exec ~/.config/river/res/safe_init + fi +} +err_fail rm ~/river_log +exec 1>> "$HOME"/river_log +exec 2>> "$HOME"/river_log + +#trap err_fail ERR + +#Setup of environment variables {{{ +err_fail riverctl spawn "exec dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY DESKTOP_SESSION=river XDG_CURRENT_DESKTOP=river" +err_fail export XDG_CURRENT_DESKTOP=river +#}}} + +# Setup of mappings {{{ +@mappings@ +# }}} + +# Setup of Rules {{{ +err_fail riverctl float-filter-add app-id float +err_fail riverctl float-filter-add app-id mpv +err_fail riverctl float-filter-add app-id ModernGL +err_fail riverctl float-filter-add title "Manim Slides" + +err_fail riverctl csd-filter-add app-id firefox +# }}} + +# Set riverctl settings {{{ +# background +err_fail riverctl background-color 0x002b36 +err_fail riverctl border-color-focused 0x93a1a1 +err_fail riverctl border-color-unfocused 0x586e75 + +# keyboard repeat rate +err_fail riverctl set-repeat 50 300 + +# Cursor +err_fail riverctl focus-follows-cursor normal +#riverctl hide-cursor timeout 2000 +err_fail riverctl hide-cursor when-typing enabled +err_fail riverctl set-cursor-warp on-output-change +err_fail riverctl xcursor-theme Nordzy-cursors 24 + +err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 pointer-accel 0 +err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 accel-profile none + +err_fail riverctl input pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I pointer-accel 0 +err_fail riverctl input pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I accel-profile none +# }}} + +# Setup of general apps {{{ +@screen_setup@ + +err_fail yambar & + +err_fail mako & +err_fail swaybg -i "$WALLPAPER" & +err_fail swayidle & +err_fail alacritty & +# }}} + + + +# Setup of layout [acts as exec!] {{{ +err_fail riverctl default-layout rivertile +err_fail rivertile -main-ratio 0.5 -view-padding 1 -outer-padding 0 + +#riverctl default-layout luatile +#river-luatile +# }}} +# vim: ft=sh diff --git a/home-manager/soispha/wms/river/res/keys.ron b/home-manager/soispha/wms/river/res/keys.ron new file mode 100644 index 00000000..a4ad6988 --- /dev/null +++ b/home-manager/soispha/wms/river/res/keys.ron @@ -0,0 +1,57 @@ +#![enable(implicit_some)] +RiverctlCommandArray( + commands: [ + // Focus change + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super", command: "focus-view", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super", command: "focus-view", command_args: "previous",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Control", command: "focus-output", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Control", command: "focus-output", command_args: "previous",), + + // Standard program + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super", command: "spawn", command_args: "alacritty",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "q", mods: "Super+Shift", command: "exit", command_args: None,), + + // Screenshot + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Print", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/screen_shot",), + + // Audio + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "XF86AudioRaiseVolume", mods: "None", command: "spawn", command_args: "pactl set-sink-volume 1 +5%",), + RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioLowerVolume", mods: "None", command: "spawn", command_args: "~/.local/bin/ytcs",), + RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioMute", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/mocs",), + + // Launcher + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Super", command: "spawn", command_args: "bemenu-run",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F1", mods: "Super", command: "spawn", command_args: "firefox",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F2", mods: "Super", command: "spawn", command_args: "keepassxc",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F3", mods: "Super", command: "spawn", command_args: "nheko",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F4", mods: "Super", command: "spawn", command_args: "steam",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Super", command: "spawn", command_args: "swaylock -f",), + + // Client + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "f", mods: "Super", command: "toggle-fullscreen", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "c", mods: "Super+Shift", command: "close", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "space", mods: "Super+Control", command: "toggle-float", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super+Control", command: "zoom", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "o", mods: "Super", command: "send-to-output", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Shift", command: "swap", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Shift", command: "swap", command_args: "previous",), + + // Toggle all tags + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super", command: "set-focused-tags", command_args: "4294967295"), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super+Shift", command: "set-view-tags", command_args: "4294967295"), + + // Mouse + RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,), + RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,), + + ], + // Set these mappings for the tags 0-8 with key [1-9] + tags_number: 9, + tag_commands: [ + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super", command: "set-focused-tags",), + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift", command: "set-view-tags",), + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",), + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",), + ], +) + diff --git a/home-manager/soispha/wms/river/res/moonlander.ron b/home-manager/soispha/wms/river/res/moonlander.ron new file mode 100644 index 00000000..5a10f333 --- /dev/null +++ b/home-manager/soispha/wms/river/res/moonlander.ron @@ -0,0 +1,64 @@ +#![enable(implicit_some)] +RiverctlCommandArray( + // TODO add toggle-focus mapping + commands: [ + // Movement + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "A", mods: "Alt+Control+Super+Shift", command: "exit", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "B", mods: "Alt+Control+Super+Shift", command: "close", command_args: None,), + + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "C", mods: "Alt+Control+Super+Shift", command: "focus-view", command_args: "previous",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "D", mods: "Alt+Control+Super+Shift", command: "focus-view", command_args: "next",), + + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "E", mods: "Alt+Control+Super+Shift", command: "swap", command_args: "previous",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F", mods: "Alt+Control+Super+Shift", command: "swap", command_args: "next",), + + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "G", mods: "Alt+Control+Super+Shift", command: "zoom", command_args: None,), + + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "H", mods: "Alt+Control+Super+Shift", command: "toggle-fullscreen", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "I", mods: "Alt+Control+Super+Shift", command: "toggle-float", command_args: None,), + + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "J", mods: "Alt+Control+Super+Shift", command: "send-to-output", command_args: "next",), + + + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "K", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "alacritty",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "screen_shot",), + + // Audio + RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "M", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "stop_playing_sound",), + RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "N", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "mpc toggle",), + + // Launcher + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "O", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "P", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "firefox",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Q", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "keepassxc",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "nheko",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "S", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "signal-desktop",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "swaylock -f",), + + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "U", mods: "Alt+Control+Super+Shift", command: "focus-output", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "V", mods: "Alt+Control+Super+Shift", command: "focus-previous-tags", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "W", mods: "Alt+Control+Super+Shift", command: "send-to-previous-tags",command_args: None,), + //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "X", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), + //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Y", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), + //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Z", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), + + + // Toggle all tags + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Super+Shift", command: "set-focused-tags", command_args: "4294967295"), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Shift", command: "set-view-tags", command_args: "4294967295"), + + // Mouse + RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,), + RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,), + ], + + // Set these mappings for the tags 0-8 with key [1-9] + tags_number: 9, + tag_commands: [ + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Alt+Control+Super+Shift", command: "set-focused-tags",), + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Alt+Control+Shift", command: "set-view-tags",), + // TODO RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",), + // TODO RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",), + ], +) + diff --git a/home-manager/soispha/wms/river/res/safe_init b/home-manager/soispha/wms/river/res/safe_init new file mode 100755 index 00000000..8e80026a --- /dev/null +++ b/home-manager/soispha/wms/river/res/safe_init @@ -0,0 +1,160 @@ +#!/bin/sh + +# This is the example configuration file for river. +# +# If you wish to edit this, you will probably want to copy it to +# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first. +# +# See the river(1), riverctl(1), and rivertile(1) man pages for complete +# documentation. + +# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc. + +# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) +riverctl map normal Super Return spawn alacritty + +# Super+Q to close the focused view +riverctl map normal Super Q close + +# Super+Shift+E to exit river +riverctl map normal Super+Shift Q exit + +# Super+J and Super+K to focus the next/previous view in the layout stack +riverctl map normal Super J focus-view next +riverctl map normal Super K focus-view previous + +# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous +# view in the layout stack +riverctl map normal Super+Shift J swap next +riverctl map normal Super+Shift K swap previous + +# Super+Period and Super+Comma to focus the next/previous output +riverctl map normal Super Period focus-output next +riverctl map normal Super Comma focus-output previous + +# Super+Shift+{Period,Comma} to send the focused view to the next/previous output +riverctl map normal Super+Shift Period send-to-output next +riverctl map normal Super+Shift Comma send-to-output previous + +# Super+Return to bump the focused view to the top of the layout stack +riverctl map normal Super Return zoom + +# Super+H and Super+L to decrease/increase the main ratio of rivertile(1) +riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05" +riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05" + +# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1) +riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1" +riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1" + +# Super+Alt+{H,J,K,L} to move views +riverctl map normal Super+Alt H move left 100 +riverctl map normal Super+Alt J move down 100 +riverctl map normal Super+Alt K move up 100 +riverctl map normal Super+Alt L move right 100 + +# Super+Alt+Control+{H,J,K,L} to snap views to screen edges +riverctl map normal Super+Alt+Control H snap left +riverctl map normal Super+Alt+Control J snap down +riverctl map normal Super+Alt+Control K snap up +riverctl map normal Super+Alt+Control L snap right + +# Super+Alt+Shift+{H,J,K,L} to resize views +riverctl map normal Super+Alt+Shift H resize horizontal -100 +riverctl map normal Super+Alt+Shift J resize vertical 100 +riverctl map normal Super+Alt+Shift K resize vertical -100 +riverctl map normal Super+Alt+Shift L resize horizontal 100 + +# Super + Left Mouse Button to move views +riverctl map-pointer normal Super BTN_LEFT move-view + +# Super + Right Mouse Button to resize views +riverctl map-pointer normal Super BTN_RIGHT resize-view + +for i in $(seq 1 9) +do + tags=$((1 << ($i - 1))) + + # Super+[1-9] to focus tag [0-8] + riverctl map normal Super $i set-focused-tags $tags + + # Super+Shift+[1-9] to tag focused view with tag [0-8] + riverctl map normal Super+Shift $i set-view-tags $tags + + # Super+Ctrl+[1-9] to toggle focus of tag [0-8] + riverctl map normal Super+Control $i toggle-focused-tags $tags + + # Super+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view + riverctl map normal Super+Shift+Control $i toggle-view-tags $tags +done + +# Super+0 to focus all tags +# Super+Shift+0 to tag focused view with all tags +all_tags=$(((1 << 32) - 1)) +riverctl map normal Super 0 set-focused-tags $all_tags +riverctl map normal Super+Shift 0 set-view-tags $all_tags + +# Super+Space to toggle float +riverctl map normal Super Space toggle-float + +# Super+F to toggle fullscreen +riverctl map normal Super F toggle-fullscreen + +# Super+{Up,Right,Down,Left} to change layout orientation +riverctl map normal Super Up send-layout-cmd rivertile "main-location top" +riverctl map normal Super Right send-layout-cmd rivertile "main-location right" +riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom" +riverctl map normal Super Left send-layout-cmd rivertile "main-location left" + +# Declare a passthrough mode. This mode has only a single mapping to return to +# normal mode. This makes it useful for testing a nested wayland compositor +riverctl declare-mode passthrough + +# Super+F11 to enter passthrough mode +riverctl map normal Super F11 enter-mode passthrough + +# Super+F11 to return to normal mode +riverctl map passthrough Super F11 enter-mode normal + +# Various media key mapping examples for both normal and locked mode which do +# not have a modifier +for mode in normal locked +do + # Eject the optical drive (well if you still have one that is) + riverctl map $mode None XF86Eject spawn 'eject -T' + + # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) + riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5' + riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5' + riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute' + + # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) + riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' + riverctl map $mode None XF86AudioNext spawn 'playerctl next' + + # Control screen backlight brightness with light (https://github.com/haikarainen/light) + riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' + riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' +done + +# Set background and border color +riverctl background-color 0x002b36 +riverctl border-color-focused 0x93a1a1 +riverctl border-color-unfocused 0x586e75 + +# Set keyboard repeat rate +riverctl set-repeat 50 300 + +# Make certain views start floating +riverctl float-filter-add app-id float +riverctl float-filter-add title "popup title with spaces" + +# Set app-ids and titles of views which should use client side decorations +riverctl csd-filter-add app-id "gedit" + +# Set the default layout generator to be rivertile and start it. +# River will send the process group of the init executable SIGTERM on exit. +riverctl default-layout rivertile +rivertile -view-padding 6 -outer-padding 6 diff --git a/home-manager/soispha/wms/sway/default.nix b/home-manager/soispha/wms/sway/default.nix new file mode 100644 index 00000000..bb3ddb49 --- /dev/null +++ b/home-manager/soispha/wms/sway/default.nix @@ -0,0 +1,16 @@ +# also requires: +# security.polkit.enable = true; +{lib, ...}: { + wayland.windowManager.sway = { + enable = true; + config = { + modifier = "Mod4"; + # Use kitty as default terminal + terminal = "kitty"; + startup = [ + # Launch Firefox on start + {command = "firefox";} + ]; + }; + }; +} diff --git a/home-manager/wms/default.nix b/home-manager/wms/default.nix deleted file mode 100644 index 610ea2f4..00000000 --- a/home-manager/wms/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{config, ...}: { - imports = [ - # ./sway - ./river - # ./plasma - ]; -} diff --git a/home-manager/wms/plasma/default.nix b/home-manager/wms/plasma/default.nix deleted file mode 100644 index f68ee272..00000000 --- a/home-manager/wms/plasma/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{config, ...}: { - services.xserver.enable = true; - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; -} diff --git a/home-manager/wms/river/default.nix b/home-manager/wms/river/default.nix deleted file mode 100644 index 43a47b1a..00000000 --- a/home-manager/wms/river/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - pkgs, - sysLib, - river_init_lesser, - nixosConfig, - system, - ... -}: let - inherit (nixosConfig.networking) hostName; - mappings = - if hostName == "tiamat" - then '' - err_fail riverctl keyboard-layout 'us' - err_fail river_init_lesser ~/.config/river/res/moonlander.ron - '' - else if hostName == "lahmu" || hostName == "apzu" || hostName == "mammun" || hostName == "isimud" - then '' - err_fail riverctl keyboard-layout 'dvorak' - err_fail river_init_lesser ~/.config/river/res/keys.ron - '' - else builtins.throw "Host not covered in river mappings"; - screen_setup = - if hostName == "lahmu" - then '' - err_fail wlr-randr --output Virtual-1 --mode 1920x1080 - '' - else if hostName == "tiamat" - then '' - err_fail wlr-randr --output DP-2 --pos 2560,0 - err_fail wlr-randr --output DP-1 --scale 1.5 --pos 0,0 - err_fail gammastep & - '' - else if hostName == "apzu" || hostName == "mammun" || hostName == "isimud" - then '' - err_fail gammastep & - '' - else builtins.throw "Host not covered in river screen setup"; - init_scr = pkgs.substituteAll { - src = ./init; - inherit mappings screen_setup; - }; -in { - xdg.configFile."river/init".source = - sysLib.writeShellScriptWithLibraryAndKeepPath { - name = "river_init"; - src = init_scr; - dependencies = builtins.attrValues { - river_init_lesser = river_init_lesser.packages.${system}.default; - inherit - (pkgs) - dash - river - glib # gnome lib - gammastep - wlr-randr - yambar - mako - swaybg - swayidle - swaylock - alacritty - ; - }; - } - + /bin/river_init; - - xdg.configFile."river/res".source = ./res; -} diff --git a/home-manager/wms/river/init b/home-manager/wms/river/init deleted file mode 100755 index 599992e6..00000000 --- a/home-manager/wms/river/init +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH - -err_fail() { - if ! "$@";then - warning "\"$*\" failed!\n" >> ~/river_log - # msg "Executing the safe init!" - # exec ~/.config/river/res/safe_init - fi -} -err_fail rm ~/river_log -exec 1>> "$HOME"/river_log -exec 2>> "$HOME"/river_log - -#trap err_fail ERR - -#Setup of environment variables {{{ -err_fail riverctl spawn "exec dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY DESKTOP_SESSION=river XDG_CURRENT_DESKTOP=river" -err_fail export XDG_CURRENT_DESKTOP=river -#}}} - -# Setup of mappings {{{ -@mappings@ -# }}} - -# Setup of Rules {{{ -err_fail riverctl float-filter-add app-id float -err_fail riverctl float-filter-add app-id mpv -err_fail riverctl float-filter-add app-id ModernGL -err_fail riverctl float-filter-add title "Manim Slides" - -err_fail riverctl csd-filter-add app-id firefox -# }}} - -# Set riverctl settings {{{ -# background -err_fail riverctl background-color 0x002b36 -err_fail riverctl border-color-focused 0x93a1a1 -err_fail riverctl border-color-unfocused 0x586e75 - -# keyboard repeat rate -err_fail riverctl set-repeat 50 300 - -# Cursor -err_fail riverctl focus-follows-cursor normal -#riverctl hide-cursor timeout 2000 -err_fail riverctl hide-cursor when-typing enabled -err_fail riverctl set-cursor-warp on-output-change -err_fail riverctl xcursor-theme Nordzy-cursors 24 - -err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 pointer-accel 0 -err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 accel-profile none - -err_fail riverctl input pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I pointer-accel 0 -err_fail riverctl input pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I accel-profile none -# }}} - -# Setup of general apps {{{ -@screen_setup@ - -err_fail yambar & - -err_fail mako & -err_fail swaybg -i "$WALLPAPER" & -err_fail swayidle & -err_fail alacritty & -# }}} - - - -# Setup of layout [acts as exec!] {{{ -err_fail riverctl default-layout rivertile -err_fail rivertile -main-ratio 0.5 -view-padding 1 -outer-padding 0 - -#riverctl default-layout luatile -#river-luatile -# }}} -# vim: ft=sh diff --git a/home-manager/wms/river/res/keys.ron b/home-manager/wms/river/res/keys.ron deleted file mode 100644 index a4ad6988..00000000 --- a/home-manager/wms/river/res/keys.ron +++ /dev/null @@ -1,57 +0,0 @@ -#![enable(implicit_some)] -RiverctlCommandArray( - commands: [ - // Focus change - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super", command: "focus-view", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super", command: "focus-view", command_args: "previous",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Control", command: "focus-output", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Control", command: "focus-output", command_args: "previous",), - - // Standard program - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super", command: "spawn", command_args: "alacritty",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "q", mods: "Super+Shift", command: "exit", command_args: None,), - - // Screenshot - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Print", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/screen_shot",), - - // Audio - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "XF86AudioRaiseVolume", mods: "None", command: "spawn", command_args: "pactl set-sink-volume 1 +5%",), - RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioLowerVolume", mods: "None", command: "spawn", command_args: "~/.local/bin/ytcs",), - RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioMute", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/mocs",), - - // Launcher - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Super", command: "spawn", command_args: "bemenu-run",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F1", mods: "Super", command: "spawn", command_args: "firefox",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F2", mods: "Super", command: "spawn", command_args: "keepassxc",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F3", mods: "Super", command: "spawn", command_args: "nheko",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F4", mods: "Super", command: "spawn", command_args: "steam",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Super", command: "spawn", command_args: "swaylock -f",), - - // Client - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "f", mods: "Super", command: "toggle-fullscreen", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "c", mods: "Super+Shift", command: "close", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "space", mods: "Super+Control", command: "toggle-float", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super+Control", command: "zoom", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "o", mods: "Super", command: "send-to-output", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Shift", command: "swap", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Shift", command: "swap", command_args: "previous",), - - // Toggle all tags - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super", command: "set-focused-tags", command_args: "4294967295"), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super+Shift", command: "set-view-tags", command_args: "4294967295"), - - // Mouse - RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,), - RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,), - - ], - // Set these mappings for the tags 0-8 with key [1-9] - tags_number: 9, - tag_commands: [ - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super", command: "set-focused-tags",), - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift", command: "set-view-tags",), - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",), - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",), - ], -) - diff --git a/home-manager/wms/river/res/moonlander.ron b/home-manager/wms/river/res/moonlander.ron deleted file mode 100644 index 5a10f333..00000000 --- a/home-manager/wms/river/res/moonlander.ron +++ /dev/null @@ -1,64 +0,0 @@ -#![enable(implicit_some)] -RiverctlCommandArray( - // TODO add toggle-focus mapping - commands: [ - // Movement - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "A", mods: "Alt+Control+Super+Shift", command: "exit", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "B", mods: "Alt+Control+Super+Shift", command: "close", command_args: None,), - - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "C", mods: "Alt+Control+Super+Shift", command: "focus-view", command_args: "previous",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "D", mods: "Alt+Control+Super+Shift", command: "focus-view", command_args: "next",), - - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "E", mods: "Alt+Control+Super+Shift", command: "swap", command_args: "previous",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F", mods: "Alt+Control+Super+Shift", command: "swap", command_args: "next",), - - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "G", mods: "Alt+Control+Super+Shift", command: "zoom", command_args: None,), - - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "H", mods: "Alt+Control+Super+Shift", command: "toggle-fullscreen", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "I", mods: "Alt+Control+Super+Shift", command: "toggle-float", command_args: None,), - - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "J", mods: "Alt+Control+Super+Shift", command: "send-to-output", command_args: "next",), - - - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "K", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "alacritty",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "screen_shot",), - - // Audio - RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "M", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "stop_playing_sound",), - RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "N", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "mpc toggle",), - - // Launcher - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "O", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "P", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "firefox",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Q", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "keepassxc",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "nheko",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "S", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "signal-desktop",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "swaylock -f",), - - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "U", mods: "Alt+Control+Super+Shift", command: "focus-output", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "V", mods: "Alt+Control+Super+Shift", command: "focus-previous-tags", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "W", mods: "Alt+Control+Super+Shift", command: "send-to-previous-tags",command_args: None,), - //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "X", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), - //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Y", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), - //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Z", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), - - - // Toggle all tags - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Super+Shift", command: "set-focused-tags", command_args: "4294967295"), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Shift", command: "set-view-tags", command_args: "4294967295"), - - // Mouse - RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,), - RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,), - ], - - // Set these mappings for the tags 0-8 with key [1-9] - tags_number: 9, - tag_commands: [ - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Alt+Control+Super+Shift", command: "set-focused-tags",), - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Alt+Control+Shift", command: "set-view-tags",), - // TODO RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",), - // TODO RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",), - ], -) - diff --git a/home-manager/wms/river/res/safe_init b/home-manager/wms/river/res/safe_init deleted file mode 100755 index 8e80026a..00000000 --- a/home-manager/wms/river/res/safe_init +++ /dev/null @@ -1,160 +0,0 @@ -#!/bin/sh - -# This is the example configuration file for river. -# -# If you wish to edit this, you will probably want to copy it to -# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first. -# -# See the river(1), riverctl(1), and rivertile(1) man pages for complete -# documentation. - -# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc. - -# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) -riverctl map normal Super Return spawn alacritty - -# Super+Q to close the focused view -riverctl map normal Super Q close - -# Super+Shift+E to exit river -riverctl map normal Super+Shift Q exit - -# Super+J and Super+K to focus the next/previous view in the layout stack -riverctl map normal Super J focus-view next -riverctl map normal Super K focus-view previous - -# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous -# view in the layout stack -riverctl map normal Super+Shift J swap next -riverctl map normal Super+Shift K swap previous - -# Super+Period and Super+Comma to focus the next/previous output -riverctl map normal Super Period focus-output next -riverctl map normal Super Comma focus-output previous - -# Super+Shift+{Period,Comma} to send the focused view to the next/previous output -riverctl map normal Super+Shift Period send-to-output next -riverctl map normal Super+Shift Comma send-to-output previous - -# Super+Return to bump the focused view to the top of the layout stack -riverctl map normal Super Return zoom - -# Super+H and Super+L to decrease/increase the main ratio of rivertile(1) -riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05" -riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05" - -# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1) -riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1" -riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1" - -# Super+Alt+{H,J,K,L} to move views -riverctl map normal Super+Alt H move left 100 -riverctl map normal Super+Alt J move down 100 -riverctl map normal Super+Alt K move up 100 -riverctl map normal Super+Alt L move right 100 - -# Super+Alt+Control+{H,J,K,L} to snap views to screen edges -riverctl map normal Super+Alt+Control H snap left -riverctl map normal Super+Alt+Control J snap down -riverctl map normal Super+Alt+Control K snap up -riverctl map normal Super+Alt+Control L snap right - -# Super+Alt+Shift+{H,J,K,L} to resize views -riverctl map normal Super+Alt+Shift H resize horizontal -100 -riverctl map normal Super+Alt+Shift J resize vertical 100 -riverctl map normal Super+Alt+Shift K resize vertical -100 -riverctl map normal Super+Alt+Shift L resize horizontal 100 - -# Super + Left Mouse Button to move views -riverctl map-pointer normal Super BTN_LEFT move-view - -# Super + Right Mouse Button to resize views -riverctl map-pointer normal Super BTN_RIGHT resize-view - -for i in $(seq 1 9) -do - tags=$((1 << ($i - 1))) - - # Super+[1-9] to focus tag [0-8] - riverctl map normal Super $i set-focused-tags $tags - - # Super+Shift+[1-9] to tag focused view with tag [0-8] - riverctl map normal Super+Shift $i set-view-tags $tags - - # Super+Ctrl+[1-9] to toggle focus of tag [0-8] - riverctl map normal Super+Control $i toggle-focused-tags $tags - - # Super+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view - riverctl map normal Super+Shift+Control $i toggle-view-tags $tags -done - -# Super+0 to focus all tags -# Super+Shift+0 to tag focused view with all tags -all_tags=$(((1 << 32) - 1)) -riverctl map normal Super 0 set-focused-tags $all_tags -riverctl map normal Super+Shift 0 set-view-tags $all_tags - -# Super+Space to toggle float -riverctl map normal Super Space toggle-float - -# Super+F to toggle fullscreen -riverctl map normal Super F toggle-fullscreen - -# Super+{Up,Right,Down,Left} to change layout orientation -riverctl map normal Super Up send-layout-cmd rivertile "main-location top" -riverctl map normal Super Right send-layout-cmd rivertile "main-location right" -riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom" -riverctl map normal Super Left send-layout-cmd rivertile "main-location left" - -# Declare a passthrough mode. This mode has only a single mapping to return to -# normal mode. This makes it useful for testing a nested wayland compositor -riverctl declare-mode passthrough - -# Super+F11 to enter passthrough mode -riverctl map normal Super F11 enter-mode passthrough - -# Super+F11 to return to normal mode -riverctl map passthrough Super F11 enter-mode normal - -# Various media key mapping examples for both normal and locked mode which do -# not have a modifier -for mode in normal locked -do - # Eject the optical drive (well if you still have one that is) - riverctl map $mode None XF86Eject spawn 'eject -T' - - # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) - riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5' - riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5' - riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute' - - # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) - riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' - riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' - riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' - riverctl map $mode None XF86AudioNext spawn 'playerctl next' - - # Control screen backlight brightness with light (https://github.com/haikarainen/light) - riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' - riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' -done - -# Set background and border color -riverctl background-color 0x002b36 -riverctl border-color-focused 0x93a1a1 -riverctl border-color-unfocused 0x586e75 - -# Set keyboard repeat rate -riverctl set-repeat 50 300 - -# Make certain views start floating -riverctl float-filter-add app-id float -riverctl float-filter-add title "popup title with spaces" - -# Set app-ids and titles of views which should use client side decorations -riverctl csd-filter-add app-id "gedit" - -# Set the default layout generator to be rivertile and start it. -# River will send the process group of the init executable SIGTERM on exit. -riverctl default-layout rivertile -rivertile -view-padding 6 -outer-padding 6 diff --git a/home-manager/wms/sway/default.nix b/home-manager/wms/sway/default.nix deleted file mode 100644 index bb3ddb49..00000000 --- a/home-manager/wms/sway/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -# also requires: -# security.polkit.enable = true; -{lib, ...}: { - wayland.windowManager.sway = { - enable = true; - config = { - modifier = "Mod4"; - # Use kitty as default terminal - terminal = "kitty"; - startup = [ - # Launch Firefox on start - {command = "firefox";} - ]; - }; - }; -} diff --git a/secrets/default.nix b/secrets/default.nix deleted file mode 100644 index d1fc1714..00000000 --- a/secrets/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - lib, - ... -}: let - name = config.networking.hostName; -in { - config = lib.mkIf config.soispha.secrets.enable { - age = { - secrets = { - nheko = { - file = ./nheko/conf. + name; - mode = "700"; - owner = "soispha"; - group = "users"; - }; - serverphoneCa = { - file = ./serverphone/ca.key; - mode = "700"; - owner = "serverphone"; - group = "serverphone"; - }; - serverphoneServer = { - file = ./serverphone/server.key; - mode = "700"; - owner = "serverphone"; - group = "serverphone"; - }; - }; - }; - }; -} diff --git a/secrets/nheko/conf.apzu b/secrets/nheko/conf.apzu deleted file mode 100644 index a5437a95..00000000 --- a/secrets/nheko/conf.apzu +++ /dev/null @@ -1,46 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlTTFEV1VUWGwzR1ZUWTky -ZlR2aC9SVWNwM3UzZ3I5MWxXRXJ0Z3VlQURrClNtOUI5MC8zZzI3bENDZVdFblBF -TWtHcmR0aytTQjAwYUJPWDJGeGNpUkkKLT4gc3NoLWVkMjU1MTkgN0hmRlV3IDd6 -TXJwVXkrRlVrYlN3TTAxeS9nN3hqK3g0TVdNSTZMeTFTYllGaUJMQ2MKT3pyVndS -WjBqRXQzK3JYbWpBL1kzNEdMN0IzY1ZpZEhhNjBmMXRLTWY3NAotPiAvPDotZ3Jl -YXNlCmZSYy84QndWWFkzNwotLS0gcjJ5Q1J5bnpoRlpCSElNMGFFU3FUL053aDlH -Q3VzVWlPdlRPSC83ZWdsawqeZT1FZhjwJ2aVb0i4Dhozk/FdNxldZ1xG1C9rMMTt -04ZYUADO0LAWfnloCuH0BWDfiNCTrI4aXiYD+aumufO3OBx43S+OCx9vlDq3RzWi -Eusn9OkwzxVqh/ecHMLWaz+Z9qxdjDBYbDVY0jh+DdHLTswVP++yVXmNBVZ97YfB -L0/Sw4lmrKRsMD+M8EFXwhE7w8KjyPnvL6cHSHDtd4eQpdMkOj5GhXP7ntR8NShF -1oGAk7/z0T92h1WdzseSq8FJ8mHvzELx8AxYTsnsgEbyXOCA2J3nc/R4vqhHFgXA -6+RH7jUmCQdQ1O9P5qH9pJlNjOr7TemTZSZocj51i6tI9iTxtlSYahjGC72WzLwt -PlIkDTgVFJOApg7tReEijsUAwcemmZFu5YayZYnqv3DOGMBZGWDEWRmfZAtHpr+t -rjcyQpAmz5IQ5XWiIIuuNzwzi60VdSnrmjiOFCm04mR1OwfqISJr3OInXK2h4RJg -KuK6Nyyu+U8qF1K1VrfUwhVKdrYZQZD16OMNWGPaWcdfe8l9byJh0/UkHSNOXlv4 -cedD2/hnJOFl7n7p/V9jLEJn5oxIzxfVLuCQ/1dEg3nbvInpx/80NlqLTakdg9wE -BiCQ+xpmGTZpPOct/OYKrEo0VIfkYZ16wsttncjAAStBzCiPhMEh/OIHmZrq8gVf -6WUnOG07y9y/fWQeWVFQK1VkaCCKUe4i2ZPhWvLN4NLsoeUVHa5x3xZVZqKIZq7+ -ZKOAemgD9tGOnYkLP+om+MhJaj9oIlVPVcGn+NpzsmpQ1Duy7WT+3MN6c52343QE -TawuB00PtYt7xGXikjXwU4df7iKwtGRHAgXyBeCyxcnbdPZzlq6IHPmNETg8Q0Qx -JombpQ9hCRE58hcO7uOOij8ki1hrU7UHXpMIz7B9RMpMvFQC8rJBsEuYWIWa682x -Px0jMWEHPtMGEcRI72ayz3a9ILtgaIHgpR4DGsvBmeJzUQbW909SeVSzgucrJee1 -4rUlZosyPF14/MmyawOJIJmXG6vQbIJFPqdl8lKRWjfOn08HD1RXLZ6izoK4aNK1 -xqyO4D1TRGooncMvZWnTDAufYjoar2N1CVtHdWT5bck3Siv8A4lLt0YF8tBjjVIM -0Drk5BcfJy6dNi6Xn8koXsNHUctqFXy7VgPWLsN5I4aLO09bLRAaVN/5vhz2YEg0 -D1VP0AeclxBtDEyeN+q2CixNO4o0N/pF0Tv84Gh+pT68GArs8h6Rh7PnRtUg9H6f -fHOp+/Ohwgv7RVa3+NHCrJvUn2i8MoJCBc/wbcye83JbPMRN/At3RxzjgiKivHJc -0VOPZOk9rPJgs6PC8XAOwgSsoTS7gncAnDWEG3Bf8dJTyneRX7Tia/F2ygQ4qgZK -Y2V3uZn+hsshVtQJIC16cob/qg0ZShMBVBjuqgI3GHZLCvIjWYBziYMvxb/n2rTV -vxwuYfvbW3NLPXIlIy8OCpBnoFXCWgPaurMF0XMwbINCEYrAgcy9+OZPOGz+/K8p -CJZxmPw9FiYBokZvrDr/zIIdMNOQp8PVjp2ZJU7WQyy3r5sH+uu/+tNfPw4bfYXL -d/fu4bo0qwEgpGAkd/IcBHLMO+IY0WyNtn2INkPRLLMzmk32N38Y1dUL44nf7v0p -y8TGd6bjkW+dlI483tCSdlNOlik4ko9ct/MX/mBIKXrueMhQV6mfh5TD8+IoAEk9 -ULGIanwIYyxWL+Wa3zTvJTc5Q6znoq2SpHyUBaCadrHL3vgLXDdpxwk7sKbiR+NH -nJwzMMFc/cUHhR3HZIXx6JKxFlhqL7k788HzlYE3Cy1+nvL8JZdgSR1tEJtj2FbG -ST7BaMBJyX64V8D02NAhgzDhzrdOlrLIlZt7JikK+csz3t7e+Nup32q31q1cbVXD -MGuqojNtvCZQ0RcYUL/1EA3t6tSWWuNwAuG+uhrUX/EzMINKM02jrQhaH6Cu8hJw -czzM+OLG8FRG76bXRPwKsByTAxhk86sMcI9pnL0TVKYg+ATRhZTWBk907WlkkBs1 -jbjtclvqR0tJKVZ+Qs36ftA2LEhFrL4ZdOcAwzgVKMf7Hh2qoZCTNZ+LEkf6lURs -EFZdy7TN1uEQSje68k2V3Fc4/XOf69hBCqm5ZcSoOloCE2DlWBonOcF7qQCcMcEX -aWopiL2S5j6trciTsP8Yhs1txC6wU7B+SKOOysKQ3/kdGJWU05Oo8TxCNsHNb24c -+UDBF+mbp0eNnnwHR3NzrYnbNq29hoQasICQ1yVejomQzO1UP1xP/nW8h8TaDIZ5 -5AWVCgygsamqpPKW2d+s6CdaNkCLwYUn9UPafbPmTxe+BA8sdJAAxxfKrSUCwF92 -rNvlwq1dPjzBOrnv ------END AGE ENCRYPTED FILE----- diff --git a/secrets/nheko/conf.isimud b/secrets/nheko/conf.isimud deleted file mode 100644 index ef6c52b6..00000000 --- a/secrets/nheko/conf.isimud +++ /dev/null @@ -1,47 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwa0Fvb0p0aU5yRGFCSm5h -d1lNSWc3aWl1NS9FcXpsalVVVGpuZGNRMnlrClVBM2R3aXpSa3pjZFpQbEV0Njcv -QUkySlJRNkV3THBjYUt3RWY3ZWRtaTgKLT4gc3NoLWVkMjU1MTkgN0hmRlV3IHda -dUU2WEwxdjNIZ0R2Wi9rbFQyb1l1TlFBZUJMWlFuMXZNSWZaZFIza2MKVGwyOExv -cW5GK0JsOFVRLzloaVUyQjhvYzR5QnNIc1RTaStISXdnT003ZwotPiBjejctZ3Jl -YXNlIFR9UFRJZyAwTjpdfCBrXlc4TXVnCmlHWTBMOUhPWU4vTzV1ZWFZVTVzTTRC -aitrNHJMQlBrMm85bWhBU29ONHpvSnkvSEFzcnZOTk5Ma1FNM20yVDUKMGF0M25C -UzR5RDdrN3cKLS0tIFNUQk1jU05lSStkQXdYMkttYjY2UVczMi9xZkhZYkdIQWw1 -RkpIOTBvWncKIACBrSaYzKJ84Kjpj57B/WC2vjIvvDAfy3TF1gVEWFOUgYkCpO52 -4sjWpd3JVpdLzsJczS7Ty0HZYBlmz3Qtejf7x6b4xftJSari5WUK6loGtmGKbgJW -lk2LZonpTsnyyALFavanlQKkv1isR9jqWxRe0KZu76zbX/QTUVfHyjV+4m6kleUI -ZJj1mLUKxYdJn2aGyTr4kwTfbLYR8/xxJYGqPUmCrFrLhsr7qy/yBXvPyIfJ+sd/ -ab2/Qz2U8wE8d0JRiwoguFaRTbrIKBzliF84CrbDznJtLQjn02zbc78lzn4n/7MV -3VArXkqw1pICkbrfLl1+own3Mw6ge73tDnSunzgJWBKSOFOrs/b/J1uMMjoiTGWi -THy8+asIFw/zZTmrUnlfmm0gE20nm/HYTJ+428nGrMwdh++LqgocxqX+CNcNTT56 -QhXwR3JuliST8jptRaFo8fzoJUImclSj+o3X2/KORm4fS8u67lcDA6KB/lw6WOie -UE09CVsrkR4X7ACe5Y7PYr0fWYNh1PrYxIabYttQq3aus5SunfkrCX+/+xtbMNsm -FX0TxMintrp3UV4eWEZzsHNz18PaXtyZTFCF4sTmnxjfP7TelZRTHNh/LbKLFrqL -kna9ChqIUiHIEYbugkZsSWUICWMbEGBWQxD4CT6DfGuve4vOgw5FWtqdvHz43f0j -9Agjvab5H+fBvDJTbJiHOFn681Wl219hR4z1plM1eVu+59JIFECVeEePoDrjGy9n -K50HUNs5Vq0p8RFus2BbjTuECmggkzd0P7mZb34bVo6K/89lCny21WeGyhwim8Hr -KKBmpm+hCh7gikBKXP0tnpmt4A5sPg30+YxePgaKCNtUjLLnN4moEGzzAsks1qsJ -GYvzSZv7AmTfyww2cjVm9ZSrlo4EHL5dMPEVBHpy6pcSV6WotkZiDklYPD4g0ZO2 -wgbLU5/YDhve9FOKoP7Y4wocP18O6ffjiPVeCg9XDUmoKq5Y/Ea1d317q973G2hf -YxUD8z9I8+fGlfqmgIjJZx8/0wTFlrCxI1oam6xPDmbSjrdVI+nr/2lfNqy/VOYN -SQMr/Po7DcAwB5SS4ItxYXKYo9FAFyoHAljYhV156l7dveqehZDKaqBzBF+pCefQ -BfiwvYg3by/R9jtMdh6MwfMeF1Z0siJdrPouIKmsuITLexuj85GkzPzSPDa69H2s -iInDepGDX2YvH2BUsUi8QPwoxRXROFwDqaIpA/aaPf224YN7D46TzU+a2HQzlpmV -xWqh/pBEwKdTpbgtdoG9GLrETDD5/2FV9FiQXxQgvV8934nlOAvdwHEJqGMlNIT2 -mlNhZyx49lOfx8BFP+NXb2adUY49Aahkdx4/uB6fN0H/RyNh39R74DCbjvIQUxRV -OUKyWZ2a2wSbZbA6tNmB5sXYtfCUOZLfE8mUwJgUSVrEccQ7UlSlEy9+gZDiHjS+ -OYnTBdRdG2AjPy3mBAdfqooTdzQwT5HNnFskg7Q3wnWRf230yZ6Qr2lBOyBgtnm1 -Hj8fI9VrACfAtYMIWUarBAnnoWHB1pHfoZOui6Zr4jtqlH7lgOAUFx/b60g4SsSF -jAJnRCFyUYbTv53GefabjkDg3WkCiyxrNhr7gS7oONa1qHai/1TQeWPCe9zj9kaR -nMRZQKI1/wmK8szhH7sA+tShtM3ktqkNlIWXuwId3OJ8ne2vcES92NRfyUI8qY39 -atndXRUg47+2MubBZhP1pnLEdxpvdOQVgDIzoNx3mu0mWkSi2K3Dy/Y4mZGVaee/ -K98cPo3S42eKEulsN/iyTWD1nJpaDNp4fWDCDMSK8dy7vSWYcT3htzzR3a4WIlLk -PV3/7l99y/HLjlJmqUwRri1hydRdC74Lk3FSV6gc6snn54WnaLUCVOpCIgHefNVr -zYmUR+4I6zioxp9540zrD8YvrK8YSSs47PtbpDYI8E9O4L7+uy7gujwJtSupZVRc -BP48+5NddK3gpQt4BagYj6CO/vENwDmUiA+kUM9WdQbnV/lmeNPdqm2VjVbxNObZ -5xHlXODOOCVg+LSpFybFT+3A2MNA/jRKGID5Kai0a9c7jY/XIrUdIaCpyVylj2dX -4JDC6AsRb1VXu7FaqhLhOabZZzW+o8m94ZjayWA2BT3IMf5Kd6eq+v9zh5RPlvtu -vcoLBTEsLPZeAyERpaTto431yRqzSKMvDQ6nwpXbdIcHLIvbp+utRoaqtel2JGO4 -PBz21qEI/ACc6sDhyUHHLz+MybEQilTSrBJ+jYSohFfm0DEpG8cThgm6mMSDUMEM -6ehgKHIYdlMa7YIBcIpJBsl8Xs6If2+FA7cbeh6xqbw= ------END AGE ENCRYPTED FILE----- diff --git a/secrets/nheko/conf.tiamat b/secrets/nheko/conf.tiamat deleted file mode 100644 index 51cab7df..00000000 --- a/secrets/nheko/conf.tiamat +++ /dev/null @@ -1,45 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCUDQ4ZUtkcEVTVWpTQ0Zy -Yi9naWRDaDJFYm9GR0k1QVhJR3V2Rmc0a2hNClNxeTQ2YmFHRkxRWnhlc3IrKzJE -eHpWNGFSTEV2WDR0OHNwTEZiMGdxOFEKLT4gc3NoLWVkMjU1MTkgelpFb25nIDFH -M3orVXZFMndGc0hPN1hWY0xyeXJuYmFLVks4bFVqdHFQVEN5eUhNRmcKUWlZdjlH -ZWtrcGlnZ2ZGVHBwNEZrM29CT3c0MERBNm5SVjhMdWxGbEgvbwotPiBULWdyZWFz -ZSBoOGYKdzBOVGpYNVJFdXoxK1dZdU9rdG5jU21UbUp4UjJYZXRoTTJqNnJvCi0t -LSBwZTJaUS9XRVRINmpNVFhxMnkvdGxkVTJaNkZTZG1PUGVZN0F5QmpJWkxrCohN -YfE5W/OxshJPerGCFWpYkFcQhJaz/HEknz13rCqH4yXfp3M7uoHWKfEFi1uzFdZs -H9MnIKS5NN8bLW4xssBaogalqCAigEUDuLPKmep8224Y4h9i+7fWOMBhgHjU322N -7iJCjnHiKT2tM4uv95c9Fa676xHcfZwzaCFDxbasQZmZL3G3U1wDseSK7EHCZ78R -sXqqd54ApUQyAwdSLPFVvX/YlhOIL6MMUWvhmmgHcNRYa71cQcoojleJI28fu53w -6X0qez81+/D8txyCEtF07m7ckCtYTe7oKT+mF5cvT99lHqEJBJzq/PxUIQt2dA2y -AQr09/7LJ5h8RYVG8emwlqzBasvCdLFXwtCNRMQGb5kDJ5CcZKy50SIpYvDdj269 -Ap4Lq/luQIeOMXQudbc+ECToxbrRKy4gcG8oKsvIXytIOszA8x4WjR14zSBTNunx -Z4mOb0zDy1GdKWsgPcyYdiOBIKzEpTLvjCbWYWJunGSPIlsksBvAAP6MsCbV0WQo -brp48ds24jlCjtqW+AdSIvo5+YVdyCEho8Gdw7k134cIhjoC0SU1vmNNzh1swoW0 -yRKG8ql2Tj6myIDcLM/KDozsgu/gNC2ugRwTCDv+gcApZBmKUXN2w0abhI2UMksH -FEw2ITrWDhPE87bXWNua+vdaBa619lg43xoJTGeJHqF5gXEV3blZ5bTvVjT2H7Dy -uBfCk+XQ4G51Dwh5iyjrQyWxCkYS0FJGD6WUTBU0nrxc6d9UERcxVurtPr7I9Tmf -IVdl6jkrjpfVIL/Imo+YgfdG9CvhyEl/x50c4umDsLxEi67v8TE/yEBhY+o5RnKD -EU0NjdHDIgtI9+Fa0KujnkIN6DqJ0V+QHKv7K8yiR8BScIq2YD1LOOApb6pom7+4 -440vZwmo4NgPsPyM/GgGUIyTeR4tU42BPyMTPjKEuN97ZwWZqIFreUl+nyLzViK/ -bGLYcRfVjjHTJPIeZRosYUo0ZMFggXAuslx5trQcb1B4iHvL7k2jjnMRJmyYZX2d -CWohscc+7+1iFNdH++tefcED8T8HCGpM1RxSM31kfpnKnINeBdo9E9ZDmNCElZm+ -nds5fgTm/MLKsuC/t+MecVdfeHTufc/Akh343DMdIMNmZ35xLcpNLmxTJ+iCALS7 -nheIWAFUaTh6GB6IGocSSjQ0RwS0wIftka4QdW+UEtEjnvB0D/CjwDLSO3pUl0mj -44r8fH8IZVcQcnqhuEsFoih/XOlH3N95O0HxXCvUcI13/HaSpUKdJqyAIn8w/jBM -FL/boJVA1zOH5sIY0AD2IMavuS5b/ZgJtPsESrc0LUiL4nztDVdAEtpHUM0OEzb9 -tSAIN888UKTC8MFSIwA+4cXIyCEpxXP3HbSNaar5gp75oG5/BqOu1aF5sC0kKpmn -9C9+z9sLTDigzV1GKlPpUGd9lVOeH2JpAY8ZUyn2gxh7C6IHwwUbWUclEPy2siYd -HcAMneEwXpm6DfJevMi2o0wOdVakcpN+YUNzIgferM/IU5FbgtC8gNBpDCBo2yLe -X7ERSzP177QWwXLIF2WhZeG4Cvszj4tySYsRJhoZPc9jpRjiK/ccOoNo8A1UKbJC -H/836MNskBmmbNoPsS979mLv8ijpRzvjnwbWn+ZlCo3gZAKVM7PcXuTODcWfoAJ4 -2ugEHCAiOobGQtGUp5HOhXYfAK2Wene0a9RmSAT3SgPmx95u1Fy8n+m/PDK2opIe -REpj9UTcoT0+5aHIwp2gqLVpQH2953Prd0qaNfc1t6gQKwDXDDU+b+QmxAaPBwpu -0TEIEYKsx237lX314XSaq+Nt7Ko1OPABR4gkz/ELL4WOKwFbf7oAAV3UiNPwweY8 -R3cpVvQ70y+M2Nnwepxf7wSruo+FDtgsic9vtobdpwBViPC+AG2QbI1hTD3uhslE -KunFtbO08ARcTMeMgZ0BE3XXnrgxdKjXmPEybQiyObFxDGbV1EX/2i1MKArQdQzs -MxCpKOzDi5axr3Qd/W6Y/foMZWfRYgb+0xITHU7haR8QRD80uTbt9TfsqK98H1A1 -UMosMKhkzKG70qdNvTiEh+OqBAIbUL42IKNn4SCiZt7ZCQ6/QqwcCi6ND0w8+dO1 -u8vZdRF+r/3AAPpa3W7BiIiLUmmU8IUI8A/72cCrY6PyrjaomXnpVWlZjQ616i9Q -TU9IwBahMa2j/a4317pv/7ltQQCpCkRs/HweQy5CQS+yFuOcoOVikL0ZHd9XC4YX -QJ/T6R5+OngxkJgoPRtJ ------END AGE ENCRYPTED FILE----- diff --git a/secrets/secrets.nix b/secrets/secrets.nix deleted file mode 100644 index 36757546..00000000 --- a/secrets/secrets.nix +++ /dev/null @@ -1,15 +0,0 @@ -let - soispha = "age1mshh4ynzhhzhff25tqwkg4j054g3xwrfznh98ycchludj9wjj48qn2uffn"; - - tiamat = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMD87QQIUXdEv3TaNRrI9clD9VgpsuVLFg2CrNGa5lVB"; - apzu = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBivF5b6PyxsR/t+4Qg4IEDXHVXrjmZpslTUNXpvcVbO"; -in { - "nheko/conf.tiamat".publicKeys = [soispha tiamat]; - "nheko/conf.apzu".publicKeys = [soispha apzu]; - - # only here to satisfy the nix evaluation - "nheko/conf.isimud".publicKeys = [soispha]; - - "serverphone/ca.key".publicKeys = [soispha tiamat apzu]; - "serverphone/server.key".publicKeys = [soispha tiamat apzu]; -} diff --git a/secrets/serverphone/ca.key b/secrets/serverphone/ca.key deleted file mode 100644 index d49c5395..00000000 --- a/secrets/serverphone/ca.key +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyaGJNQkRRVy9MRXZ3b2tJ -Q2R1NUcrYUNGRE5uQkNyUDdkSm5rUWYxaXpjCjduMG1FSG1VamozdnJoVFFZUDYz -T2pyK1k3ekZ4RnFMaDFKdUZPWVNuR3MKLT4gc3NoLWVkMjU1MTkgelpFb25nIEpP -d0xwS3Nia3AwNmppRjZhODdzNXhEcnRsZW5rUzBQcTN6NWhWeTNiQ0EKTkpUZ1Jk -NHE3WVRzVEhpMnJGaVFpdkFBVW5QNThCSUdFSHVQR1RrQUJsZwotPiBzc2gtZWQy -NTUxOSA3SGZGVXcgdjJKUUtlRjE5UFEyR2tBOWhEbHNMVlNSOUMyZ1dkYkhYZWRW -by9QZ2UxTQpVSnhJcFFYay9LSStrSFFJcXJPWUxydXNGbUNXRVpLcHJibjM2TDlw -RnlVCi0+IGNHPjMiSyQtZ3JlYXNlIGcgdWZkbApmY0YzMmhDdzBWT0RKaWlUUmZP -bmRPOExuRVJ3Yk5mMFhYSnhlRENqWXJxK1VWdnBibUxzNWV1NHMyNVNXN054CmR0 -VFAzYUR0RHVaZUpOTlB3USt2TXVDcXdLOGtpZwotLS0gaTliQzBjbjdUYkVidURX -em9wcU04cDhNMHB6KzNBSVMyMmtSRERKS240SQryB70ZEgDQ4eJ/pjIWh6MBEUQr -iAx2i+J+XJu+74bC9DfB5rWpR4/HAdp8EF6wmi05TuEPUpG9brwm/mHi+FB/Drpu -00viGfM3dlCyALz1jB2W/MbruouK85o2L3RWDCgc+eT1gA+u2C7ZxO6iYA3aP4lu -ShDcSHlsKkh9lx4cRsNTua/8N+GQZLciSC7iMDroruxWj1HET9IxeeVN+VSuqcjW -ocX3LU2uU8vP9WT9zT1lbQB5Z0EM7W+ez61SjGpzrpXB2mpmi+SHOIWF3VdG1H8R -18BIyRjKIj5Op+8XD7qAe6nl9SSCnMURH+arc7yjNMgEbzFykfldfug2ibI2G/kW -OxeiEBoSFlC+V8ivS6I= ------END AGE ENCRYPTED FILE----- diff --git a/secrets/serverphone/server.key b/secrets/serverphone/server.key deleted file mode 100644 index a2720406..00000000 --- a/secrets/serverphone/server.key +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJZnBXSzF4K0ljR3B1Rkk1 -M0lSSkVmVlA2Tjcrd0JCRmhHWDY4bzNoYnhjCmsvQjJmYU5vNVh1Umw0dzhCQjNF -WVRhVHpUTUIzRVBxaXhFWHpuenZHN0kKLT4gc3NoLWVkMjU1MTkgelpFb25nIHAz -aG02dkxiNVRreVNadXJjbnc0bXBtSFRSNDhrYjljanUrNldwVFlabXcKU2c2L25r -VlNjeDFENUdQeWllenRGWlRqRW53UU5VNEdCaUZsbHpaL1ZFTQotPiBzc2gtZWQy -NTUxOSA3SGZGVXcgZytvUUhZSXhwQ01mQmtkZmhzdHJUd2tlQS9yYkxCdTBYZ2pJ -UEd4WEF4SQp4WVh2UEJReDVES2tCWlpqQS9aanQzRGRsSTA4S0VXSWZxZ2hoKzZq -YllzCi0+IEc4eC1ncmVhc2UgaGQhIGFydERoaS4gLERUcQprczdDdHhaOXpmN1VU -MDlHNlYzVmMxY09Oa2xzTVN6M0ZyYnpRSzJEMS9nMmlqRVo4Wk1qN1lKZnp0N0RT -UStuCm51L01Rb3ZxNUhEa0c5Z3orYlp0YmlXMkhpeHVJMjNkRFZYWmR3QmV2Zwot -LS0gdWJDeHZvc0xOMU9uUjUyMlRGUnlGSW9PZzVKWWNoa3pWbVM1OE9LdFk2NAo+ -WS82jL1us5iVw+xWVI80luHMs31hxZfQgJDBuFbtpY0nKkM97U7rusl6t8P+s93c -R0IYBEUuz6n33GTeVOLipDqkZftlOOvSZkFneZ766+GpEO01dCjeSW9KViDC1jI/ -721IXq9TQNZw0Ou3Vf5E0nDypsfG0UhEoLCy6QZL9YCIyl5s//kyFFnpQjyaGT/P -pRHGhD0BxZa2ib07WDWzBpsTFtVemwcn9lqAx7DlYV2X3UwCT3qVOVjDuA/j6qUt -8bCDoXs4/dWleHNHzpwRhe+j2W4OWDKp7o0zYqxkUuPpEWXL7+A+B/+/08nAtZQk -ZvJyaZSL5wicIPAjLxrD00z2QcE/ZPyUrXsi0gOovuk= ------END AGE ENCRYPTED FILE----- diff --git a/system/default.nix b/system/default.nix index 17ed00bc..5faa402d 100644 --- a/system/default.nix +++ b/system/default.nix @@ -4,7 +4,7 @@ ./disks ./font ./hardware - #./impermanence already at flake level imported + ./impermanence ./libvirtd ./locale ./network @@ -13,6 +13,7 @@ ./polkit ./power ./services + ./secrets ./sound ./tempfiles ./users # the position of this item is fully arbitrary diff --git a/system/font/default.nix b/system/font/default.nix index 484db7e7..3864b60e 100644 --- a/system/font/default.nix +++ b/system/font/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: let +{pkgs, ...}: let nerdFont = pkgs.nerdfonts.override { fonts = [ "SourceCodePro" diff --git a/system/secrets/default.nix b/system/secrets/default.nix new file mode 100644 index 00000000..d1fc1714 --- /dev/null +++ b/system/secrets/default.nix @@ -0,0 +1,32 @@ +{ + config, + lib, + ... +}: let + name = config.networking.hostName; +in { + config = lib.mkIf config.soispha.secrets.enable { + age = { + secrets = { + nheko = { + file = ./nheko/conf. + name; + mode = "700"; + owner = "soispha"; + group = "users"; + }; + serverphoneCa = { + file = ./serverphone/ca.key; + mode = "700"; + owner = "serverphone"; + group = "serverphone"; + }; + serverphoneServer = { + file = ./serverphone/server.key; + mode = "700"; + owner = "serverphone"; + group = "serverphone"; + }; + }; + }; + }; +} diff --git a/system/secrets/nheko/conf.apzu b/system/secrets/nheko/conf.apzu new file mode 100644 index 00000000..a5437a95 --- /dev/null +++ b/system/secrets/nheko/conf.apzu @@ -0,0 +1,46 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlTTFEV1VUWGwzR1ZUWTky +ZlR2aC9SVWNwM3UzZ3I5MWxXRXJ0Z3VlQURrClNtOUI5MC8zZzI3bENDZVdFblBF +TWtHcmR0aytTQjAwYUJPWDJGeGNpUkkKLT4gc3NoLWVkMjU1MTkgN0hmRlV3IDd6 +TXJwVXkrRlVrYlN3TTAxeS9nN3hqK3g0TVdNSTZMeTFTYllGaUJMQ2MKT3pyVndS +WjBqRXQzK3JYbWpBL1kzNEdMN0IzY1ZpZEhhNjBmMXRLTWY3NAotPiAvPDotZ3Jl +YXNlCmZSYy84QndWWFkzNwotLS0gcjJ5Q1J5bnpoRlpCSElNMGFFU3FUL053aDlH +Q3VzVWlPdlRPSC83ZWdsawqeZT1FZhjwJ2aVb0i4Dhozk/FdNxldZ1xG1C9rMMTt +04ZYUADO0LAWfnloCuH0BWDfiNCTrI4aXiYD+aumufO3OBx43S+OCx9vlDq3RzWi +Eusn9OkwzxVqh/ecHMLWaz+Z9qxdjDBYbDVY0jh+DdHLTswVP++yVXmNBVZ97YfB +L0/Sw4lmrKRsMD+M8EFXwhE7w8KjyPnvL6cHSHDtd4eQpdMkOj5GhXP7ntR8NShF +1oGAk7/z0T92h1WdzseSq8FJ8mHvzELx8AxYTsnsgEbyXOCA2J3nc/R4vqhHFgXA +6+RH7jUmCQdQ1O9P5qH9pJlNjOr7TemTZSZocj51i6tI9iTxtlSYahjGC72WzLwt +PlIkDTgVFJOApg7tReEijsUAwcemmZFu5YayZYnqv3DOGMBZGWDEWRmfZAtHpr+t +rjcyQpAmz5IQ5XWiIIuuNzwzi60VdSnrmjiOFCm04mR1OwfqISJr3OInXK2h4RJg +KuK6Nyyu+U8qF1K1VrfUwhVKdrYZQZD16OMNWGPaWcdfe8l9byJh0/UkHSNOXlv4 +cedD2/hnJOFl7n7p/V9jLEJn5oxIzxfVLuCQ/1dEg3nbvInpx/80NlqLTakdg9wE +BiCQ+xpmGTZpPOct/OYKrEo0VIfkYZ16wsttncjAAStBzCiPhMEh/OIHmZrq8gVf +6WUnOG07y9y/fWQeWVFQK1VkaCCKUe4i2ZPhWvLN4NLsoeUVHa5x3xZVZqKIZq7+ +ZKOAemgD9tGOnYkLP+om+MhJaj9oIlVPVcGn+NpzsmpQ1Duy7WT+3MN6c52343QE +TawuB00PtYt7xGXikjXwU4df7iKwtGRHAgXyBeCyxcnbdPZzlq6IHPmNETg8Q0Qx +JombpQ9hCRE58hcO7uOOij8ki1hrU7UHXpMIz7B9RMpMvFQC8rJBsEuYWIWa682x +Px0jMWEHPtMGEcRI72ayz3a9ILtgaIHgpR4DGsvBmeJzUQbW909SeVSzgucrJee1 +4rUlZosyPF14/MmyawOJIJmXG6vQbIJFPqdl8lKRWjfOn08HD1RXLZ6izoK4aNK1 +xqyO4D1TRGooncMvZWnTDAufYjoar2N1CVtHdWT5bck3Siv8A4lLt0YF8tBjjVIM +0Drk5BcfJy6dNi6Xn8koXsNHUctqFXy7VgPWLsN5I4aLO09bLRAaVN/5vhz2YEg0 +D1VP0AeclxBtDEyeN+q2CixNO4o0N/pF0Tv84Gh+pT68GArs8h6Rh7PnRtUg9H6f +fHOp+/Ohwgv7RVa3+NHCrJvUn2i8MoJCBc/wbcye83JbPMRN/At3RxzjgiKivHJc +0VOPZOk9rPJgs6PC8XAOwgSsoTS7gncAnDWEG3Bf8dJTyneRX7Tia/F2ygQ4qgZK +Y2V3uZn+hsshVtQJIC16cob/qg0ZShMBVBjuqgI3GHZLCvIjWYBziYMvxb/n2rTV +vxwuYfvbW3NLPXIlIy8OCpBnoFXCWgPaurMF0XMwbINCEYrAgcy9+OZPOGz+/K8p +CJZxmPw9FiYBokZvrDr/zIIdMNOQp8PVjp2ZJU7WQyy3r5sH+uu/+tNfPw4bfYXL +d/fu4bo0qwEgpGAkd/IcBHLMO+IY0WyNtn2INkPRLLMzmk32N38Y1dUL44nf7v0p +y8TGd6bjkW+dlI483tCSdlNOlik4ko9ct/MX/mBIKXrueMhQV6mfh5TD8+IoAEk9 +ULGIanwIYyxWL+Wa3zTvJTc5Q6znoq2SpHyUBaCadrHL3vgLXDdpxwk7sKbiR+NH +nJwzMMFc/cUHhR3HZIXx6JKxFlhqL7k788HzlYE3Cy1+nvL8JZdgSR1tEJtj2FbG +ST7BaMBJyX64V8D02NAhgzDhzrdOlrLIlZt7JikK+csz3t7e+Nup32q31q1cbVXD +MGuqojNtvCZQ0RcYUL/1EA3t6tSWWuNwAuG+uhrUX/EzMINKM02jrQhaH6Cu8hJw +czzM+OLG8FRG76bXRPwKsByTAxhk86sMcI9pnL0TVKYg+ATRhZTWBk907WlkkBs1 +jbjtclvqR0tJKVZ+Qs36ftA2LEhFrL4ZdOcAwzgVKMf7Hh2qoZCTNZ+LEkf6lURs +EFZdy7TN1uEQSje68k2V3Fc4/XOf69hBCqm5ZcSoOloCE2DlWBonOcF7qQCcMcEX +aWopiL2S5j6trciTsP8Yhs1txC6wU7B+SKOOysKQ3/kdGJWU05Oo8TxCNsHNb24c ++UDBF+mbp0eNnnwHR3NzrYnbNq29hoQasICQ1yVejomQzO1UP1xP/nW8h8TaDIZ5 +5AWVCgygsamqpPKW2d+s6CdaNkCLwYUn9UPafbPmTxe+BA8sdJAAxxfKrSUCwF92 +rNvlwq1dPjzBOrnv +-----END AGE ENCRYPTED FILE----- diff --git a/system/secrets/nheko/conf.isimud b/system/secrets/nheko/conf.isimud new file mode 100644 index 00000000..ef6c52b6 --- /dev/null +++ b/system/secrets/nheko/conf.isimud @@ -0,0 +1,47 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwa0Fvb0p0aU5yRGFCSm5h +d1lNSWc3aWl1NS9FcXpsalVVVGpuZGNRMnlrClVBM2R3aXpSa3pjZFpQbEV0Njcv +QUkySlJRNkV3THBjYUt3RWY3ZWRtaTgKLT4gc3NoLWVkMjU1MTkgN0hmRlV3IHda +dUU2WEwxdjNIZ0R2Wi9rbFQyb1l1TlFBZUJMWlFuMXZNSWZaZFIza2MKVGwyOExv +cW5GK0JsOFVRLzloaVUyQjhvYzR5QnNIc1RTaStISXdnT003ZwotPiBjejctZ3Jl +YXNlIFR9UFRJZyAwTjpdfCBrXlc4TXVnCmlHWTBMOUhPWU4vTzV1ZWFZVTVzTTRC +aitrNHJMQlBrMm85bWhBU29ONHpvSnkvSEFzcnZOTk5Ma1FNM20yVDUKMGF0M25C +UzR5RDdrN3cKLS0tIFNUQk1jU05lSStkQXdYMkttYjY2UVczMi9xZkhZYkdIQWw1 +RkpIOTBvWncKIACBrSaYzKJ84Kjpj57B/WC2vjIvvDAfy3TF1gVEWFOUgYkCpO52 +4sjWpd3JVpdLzsJczS7Ty0HZYBlmz3Qtejf7x6b4xftJSari5WUK6loGtmGKbgJW +lk2LZonpTsnyyALFavanlQKkv1isR9jqWxRe0KZu76zbX/QTUVfHyjV+4m6kleUI +ZJj1mLUKxYdJn2aGyTr4kwTfbLYR8/xxJYGqPUmCrFrLhsr7qy/yBXvPyIfJ+sd/ +ab2/Qz2U8wE8d0JRiwoguFaRTbrIKBzliF84CrbDznJtLQjn02zbc78lzn4n/7MV +3VArXkqw1pICkbrfLl1+own3Mw6ge73tDnSunzgJWBKSOFOrs/b/J1uMMjoiTGWi +THy8+asIFw/zZTmrUnlfmm0gE20nm/HYTJ+428nGrMwdh++LqgocxqX+CNcNTT56 +QhXwR3JuliST8jptRaFo8fzoJUImclSj+o3X2/KORm4fS8u67lcDA6KB/lw6WOie +UE09CVsrkR4X7ACe5Y7PYr0fWYNh1PrYxIabYttQq3aus5SunfkrCX+/+xtbMNsm +FX0TxMintrp3UV4eWEZzsHNz18PaXtyZTFCF4sTmnxjfP7TelZRTHNh/LbKLFrqL +kna9ChqIUiHIEYbugkZsSWUICWMbEGBWQxD4CT6DfGuve4vOgw5FWtqdvHz43f0j +9Agjvab5H+fBvDJTbJiHOFn681Wl219hR4z1plM1eVu+59JIFECVeEePoDrjGy9n +K50HUNs5Vq0p8RFus2BbjTuECmggkzd0P7mZb34bVo6K/89lCny21WeGyhwim8Hr +KKBmpm+hCh7gikBKXP0tnpmt4A5sPg30+YxePgaKCNtUjLLnN4moEGzzAsks1qsJ +GYvzSZv7AmTfyww2cjVm9ZSrlo4EHL5dMPEVBHpy6pcSV6WotkZiDklYPD4g0ZO2 +wgbLU5/YDhve9FOKoP7Y4wocP18O6ffjiPVeCg9XDUmoKq5Y/Ea1d317q973G2hf +YxUD8z9I8+fGlfqmgIjJZx8/0wTFlrCxI1oam6xPDmbSjrdVI+nr/2lfNqy/VOYN +SQMr/Po7DcAwB5SS4ItxYXKYo9FAFyoHAljYhV156l7dveqehZDKaqBzBF+pCefQ +BfiwvYg3by/R9jtMdh6MwfMeF1Z0siJdrPouIKmsuITLexuj85GkzPzSPDa69H2s +iInDepGDX2YvH2BUsUi8QPwoxRXROFwDqaIpA/aaPf224YN7D46TzU+a2HQzlpmV +xWqh/pBEwKdTpbgtdoG9GLrETDD5/2FV9FiQXxQgvV8934nlOAvdwHEJqGMlNIT2 +mlNhZyx49lOfx8BFP+NXb2adUY49Aahkdx4/uB6fN0H/RyNh39R74DCbjvIQUxRV +OUKyWZ2a2wSbZbA6tNmB5sXYtfCUOZLfE8mUwJgUSVrEccQ7UlSlEy9+gZDiHjS+ +OYnTBdRdG2AjPy3mBAdfqooTdzQwT5HNnFskg7Q3wnWRf230yZ6Qr2lBOyBgtnm1 +Hj8fI9VrACfAtYMIWUarBAnnoWHB1pHfoZOui6Zr4jtqlH7lgOAUFx/b60g4SsSF +jAJnRCFyUYbTv53GefabjkDg3WkCiyxrNhr7gS7oONa1qHai/1TQeWPCe9zj9kaR +nMRZQKI1/wmK8szhH7sA+tShtM3ktqkNlIWXuwId3OJ8ne2vcES92NRfyUI8qY39 +atndXRUg47+2MubBZhP1pnLEdxpvdOQVgDIzoNx3mu0mWkSi2K3Dy/Y4mZGVaee/ +K98cPo3S42eKEulsN/iyTWD1nJpaDNp4fWDCDMSK8dy7vSWYcT3htzzR3a4WIlLk +PV3/7l99y/HLjlJmqUwRri1hydRdC74Lk3FSV6gc6snn54WnaLUCVOpCIgHefNVr +zYmUR+4I6zioxp9540zrD8YvrK8YSSs47PtbpDYI8E9O4L7+uy7gujwJtSupZVRc +BP48+5NddK3gpQt4BagYj6CO/vENwDmUiA+kUM9WdQbnV/lmeNPdqm2VjVbxNObZ +5xHlXODOOCVg+LSpFybFT+3A2MNA/jRKGID5Kai0a9c7jY/XIrUdIaCpyVylj2dX +4JDC6AsRb1VXu7FaqhLhOabZZzW+o8m94ZjayWA2BT3IMf5Kd6eq+v9zh5RPlvtu +vcoLBTEsLPZeAyERpaTto431yRqzSKMvDQ6nwpXbdIcHLIvbp+utRoaqtel2JGO4 +PBz21qEI/ACc6sDhyUHHLz+MybEQilTSrBJ+jYSohFfm0DEpG8cThgm6mMSDUMEM +6ehgKHIYdlMa7YIBcIpJBsl8Xs6If2+FA7cbeh6xqbw= +-----END AGE ENCRYPTED FILE----- diff --git a/system/secrets/nheko/conf.tiamat b/system/secrets/nheko/conf.tiamat new file mode 100644 index 00000000..51cab7df --- /dev/null +++ b/system/secrets/nheko/conf.tiamat @@ -0,0 +1,45 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCUDQ4ZUtkcEVTVWpTQ0Zy +Yi9naWRDaDJFYm9GR0k1QVhJR3V2Rmc0a2hNClNxeTQ2YmFHRkxRWnhlc3IrKzJE +eHpWNGFSTEV2WDR0OHNwTEZiMGdxOFEKLT4gc3NoLWVkMjU1MTkgelpFb25nIDFH +M3orVXZFMndGc0hPN1hWY0xyeXJuYmFLVks4bFVqdHFQVEN5eUhNRmcKUWlZdjlH +ZWtrcGlnZ2ZGVHBwNEZrM29CT3c0MERBNm5SVjhMdWxGbEgvbwotPiBULWdyZWFz +ZSBoOGYKdzBOVGpYNVJFdXoxK1dZdU9rdG5jU21UbUp4UjJYZXRoTTJqNnJvCi0t +LSBwZTJaUS9XRVRINmpNVFhxMnkvdGxkVTJaNkZTZG1PUGVZN0F5QmpJWkxrCohN +YfE5W/OxshJPerGCFWpYkFcQhJaz/HEknz13rCqH4yXfp3M7uoHWKfEFi1uzFdZs +H9MnIKS5NN8bLW4xssBaogalqCAigEUDuLPKmep8224Y4h9i+7fWOMBhgHjU322N +7iJCjnHiKT2tM4uv95c9Fa676xHcfZwzaCFDxbasQZmZL3G3U1wDseSK7EHCZ78R +sXqqd54ApUQyAwdSLPFVvX/YlhOIL6MMUWvhmmgHcNRYa71cQcoojleJI28fu53w +6X0qez81+/D8txyCEtF07m7ckCtYTe7oKT+mF5cvT99lHqEJBJzq/PxUIQt2dA2y +AQr09/7LJ5h8RYVG8emwlqzBasvCdLFXwtCNRMQGb5kDJ5CcZKy50SIpYvDdj269 +Ap4Lq/luQIeOMXQudbc+ECToxbrRKy4gcG8oKsvIXytIOszA8x4WjR14zSBTNunx +Z4mOb0zDy1GdKWsgPcyYdiOBIKzEpTLvjCbWYWJunGSPIlsksBvAAP6MsCbV0WQo +brp48ds24jlCjtqW+AdSIvo5+YVdyCEho8Gdw7k134cIhjoC0SU1vmNNzh1swoW0 +yRKG8ql2Tj6myIDcLM/KDozsgu/gNC2ugRwTCDv+gcApZBmKUXN2w0abhI2UMksH +FEw2ITrWDhPE87bXWNua+vdaBa619lg43xoJTGeJHqF5gXEV3blZ5bTvVjT2H7Dy +uBfCk+XQ4G51Dwh5iyjrQyWxCkYS0FJGD6WUTBU0nrxc6d9UERcxVurtPr7I9Tmf +IVdl6jkrjpfVIL/Imo+YgfdG9CvhyEl/x50c4umDsLxEi67v8TE/yEBhY+o5RnKD +EU0NjdHDIgtI9+Fa0KujnkIN6DqJ0V+QHKv7K8yiR8BScIq2YD1LOOApb6pom7+4 +440vZwmo4NgPsPyM/GgGUIyTeR4tU42BPyMTPjKEuN97ZwWZqIFreUl+nyLzViK/ +bGLYcRfVjjHTJPIeZRosYUo0ZMFggXAuslx5trQcb1B4iHvL7k2jjnMRJmyYZX2d +CWohscc+7+1iFNdH++tefcED8T8HCGpM1RxSM31kfpnKnINeBdo9E9ZDmNCElZm+ +nds5fgTm/MLKsuC/t+MecVdfeHTufc/Akh343DMdIMNmZ35xLcpNLmxTJ+iCALS7 +nheIWAFUaTh6GB6IGocSSjQ0RwS0wIftka4QdW+UEtEjnvB0D/CjwDLSO3pUl0mj +44r8fH8IZVcQcnqhuEsFoih/XOlH3N95O0HxXCvUcI13/HaSpUKdJqyAIn8w/jBM +FL/boJVA1zOH5sIY0AD2IMavuS5b/ZgJtPsESrc0LUiL4nztDVdAEtpHUM0OEzb9 +tSAIN888UKTC8MFSIwA+4cXIyCEpxXP3HbSNaar5gp75oG5/BqOu1aF5sC0kKpmn +9C9+z9sLTDigzV1GKlPpUGd9lVOeH2JpAY8ZUyn2gxh7C6IHwwUbWUclEPy2siYd +HcAMneEwXpm6DfJevMi2o0wOdVakcpN+YUNzIgferM/IU5FbgtC8gNBpDCBo2yLe +X7ERSzP177QWwXLIF2WhZeG4Cvszj4tySYsRJhoZPc9jpRjiK/ccOoNo8A1UKbJC +H/836MNskBmmbNoPsS979mLv8ijpRzvjnwbWn+ZlCo3gZAKVM7PcXuTODcWfoAJ4 +2ugEHCAiOobGQtGUp5HOhXYfAK2Wene0a9RmSAT3SgPmx95u1Fy8n+m/PDK2opIe +REpj9UTcoT0+5aHIwp2gqLVpQH2953Prd0qaNfc1t6gQKwDXDDU+b+QmxAaPBwpu +0TEIEYKsx237lX314XSaq+Nt7Ko1OPABR4gkz/ELL4WOKwFbf7oAAV3UiNPwweY8 +R3cpVvQ70y+M2Nnwepxf7wSruo+FDtgsic9vtobdpwBViPC+AG2QbI1hTD3uhslE +KunFtbO08ARcTMeMgZ0BE3XXnrgxdKjXmPEybQiyObFxDGbV1EX/2i1MKArQdQzs +MxCpKOzDi5axr3Qd/W6Y/foMZWfRYgb+0xITHU7haR8QRD80uTbt9TfsqK98H1A1 +UMosMKhkzKG70qdNvTiEh+OqBAIbUL42IKNn4SCiZt7ZCQ6/QqwcCi6ND0w8+dO1 +u8vZdRF+r/3AAPpa3W7BiIiLUmmU8IUI8A/72cCrY6PyrjaomXnpVWlZjQ616i9Q +TU9IwBahMa2j/a4317pv/7ltQQCpCkRs/HweQy5CQS+yFuOcoOVikL0ZHd9XC4YX +QJ/T6R5+OngxkJgoPRtJ +-----END AGE ENCRYPTED FILE----- diff --git a/system/secrets/secrets.nix b/system/secrets/secrets.nix new file mode 100644 index 00000000..36757546 --- /dev/null +++ b/system/secrets/secrets.nix @@ -0,0 +1,15 @@ +let + soispha = "age1mshh4ynzhhzhff25tqwkg4j054g3xwrfznh98ycchludj9wjj48qn2uffn"; + + tiamat = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMD87QQIUXdEv3TaNRrI9clD9VgpsuVLFg2CrNGa5lVB"; + apzu = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBivF5b6PyxsR/t+4Qg4IEDXHVXrjmZpslTUNXpvcVbO"; +in { + "nheko/conf.tiamat".publicKeys = [soispha tiamat]; + "nheko/conf.apzu".publicKeys = [soispha apzu]; + + # only here to satisfy the nix evaluation + "nheko/conf.isimud".publicKeys = [soispha]; + + "serverphone/ca.key".publicKeys = [soispha tiamat apzu]; + "serverphone/server.key".publicKeys = [soispha tiamat apzu]; +} diff --git a/system/secrets/serverphone/ca.key b/system/secrets/serverphone/ca.key new file mode 100644 index 00000000..d49c5395 --- /dev/null +++ b/system/secrets/serverphone/ca.key @@ -0,0 +1,19 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyaGJNQkRRVy9MRXZ3b2tJ +Q2R1NUcrYUNGRE5uQkNyUDdkSm5rUWYxaXpjCjduMG1FSG1VamozdnJoVFFZUDYz +T2pyK1k3ekZ4RnFMaDFKdUZPWVNuR3MKLT4gc3NoLWVkMjU1MTkgelpFb25nIEpP +d0xwS3Nia3AwNmppRjZhODdzNXhEcnRsZW5rUzBQcTN6NWhWeTNiQ0EKTkpUZ1Jk +NHE3WVRzVEhpMnJGaVFpdkFBVW5QNThCSUdFSHVQR1RrQUJsZwotPiBzc2gtZWQy +NTUxOSA3SGZGVXcgdjJKUUtlRjE5UFEyR2tBOWhEbHNMVlNSOUMyZ1dkYkhYZWRW +by9QZ2UxTQpVSnhJcFFYay9LSStrSFFJcXJPWUxydXNGbUNXRVpLcHJibjM2TDlw +RnlVCi0+IGNHPjMiSyQtZ3JlYXNlIGcgdWZkbApmY0YzMmhDdzBWT0RKaWlUUmZP +bmRPOExuRVJ3Yk5mMFhYSnhlRENqWXJxK1VWdnBibUxzNWV1NHMyNVNXN054CmR0 +VFAzYUR0RHVaZUpOTlB3USt2TXVDcXdLOGtpZwotLS0gaTliQzBjbjdUYkVidURX +em9wcU04cDhNMHB6KzNBSVMyMmtSRERKS240SQryB70ZEgDQ4eJ/pjIWh6MBEUQr +iAx2i+J+XJu+74bC9DfB5rWpR4/HAdp8EF6wmi05TuEPUpG9brwm/mHi+FB/Drpu +00viGfM3dlCyALz1jB2W/MbruouK85o2L3RWDCgc+eT1gA+u2C7ZxO6iYA3aP4lu +ShDcSHlsKkh9lx4cRsNTua/8N+GQZLciSC7iMDroruxWj1HET9IxeeVN+VSuqcjW +ocX3LU2uU8vP9WT9zT1lbQB5Z0EM7W+ez61SjGpzrpXB2mpmi+SHOIWF3VdG1H8R +18BIyRjKIj5Op+8XD7qAe6nl9SSCnMURH+arc7yjNMgEbzFykfldfug2ibI2G/kW +OxeiEBoSFlC+V8ivS6I= +-----END AGE ENCRYPTED FILE----- diff --git a/system/secrets/serverphone/server.key b/system/secrets/serverphone/server.key new file mode 100644 index 00000000..a2720406 --- /dev/null +++ b/system/secrets/serverphone/server.key @@ -0,0 +1,19 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJZnBXSzF4K0ljR3B1Rkk1 +M0lSSkVmVlA2Tjcrd0JCRmhHWDY4bzNoYnhjCmsvQjJmYU5vNVh1Umw0dzhCQjNF +WVRhVHpUTUIzRVBxaXhFWHpuenZHN0kKLT4gc3NoLWVkMjU1MTkgelpFb25nIHAz +aG02dkxiNVRreVNadXJjbnc0bXBtSFRSNDhrYjljanUrNldwVFlabXcKU2c2L25r +VlNjeDFENUdQeWllenRGWlRqRW53UU5VNEdCaUZsbHpaL1ZFTQotPiBzc2gtZWQy +NTUxOSA3SGZGVXcgZytvUUhZSXhwQ01mQmtkZmhzdHJUd2tlQS9yYkxCdTBYZ2pJ +UEd4WEF4SQp4WVh2UEJReDVES2tCWlpqQS9aanQzRGRsSTA4S0VXSWZxZ2hoKzZq +YllzCi0+IEc4eC1ncmVhc2UgaGQhIGFydERoaS4gLERUcQprczdDdHhaOXpmN1VU +MDlHNlYzVmMxY09Oa2xzTVN6M0ZyYnpRSzJEMS9nMmlqRVo4Wk1qN1lKZnp0N0RT +UStuCm51L01Rb3ZxNUhEa0c5Z3orYlp0YmlXMkhpeHVJMjNkRFZYWmR3QmV2Zwot +LS0gdWJDeHZvc0xOMU9uUjUyMlRGUnlGSW9PZzVKWWNoa3pWbVM1OE9LdFk2NAo+ +WS82jL1us5iVw+xWVI80luHMs31hxZfQgJDBuFbtpY0nKkM97U7rusl6t8P+s93c +R0IYBEUuz6n33GTeVOLipDqkZftlOOvSZkFneZ766+GpEO01dCjeSW9KViDC1jI/ +721IXq9TQNZw0Ou3Vf5E0nDypsfG0UhEoLCy6QZL9YCIyl5s//kyFFnpQjyaGT/P +pRHGhD0BxZa2ib07WDWzBpsTFtVemwcn9lqAx7DlYV2X3UwCT3qVOVjDuA/j6qUt +8bCDoXs4/dWleHNHzpwRhe+j2W4OWDKp7o0zYqxkUuPpEWXL7+A+B/+/08nAtZQk +ZvJyaZSL5wicIPAjLxrD00z2QcE/ZPyUrXsi0gOovuk= +-----END AGE ENCRYPTED FILE----- diff --git a/system/services/nix/default.nix b/system/services/nix/default.nix index 1477be1b..491b6a4d 100644 --- a/system/services/nix/default.nix +++ b/system/services/nix/default.nix @@ -1,12 +1,10 @@ { - config, - lib, pkgs, - nixpkgs-as-input, + nixpkgs_as_input, templates, ... }: let - nixpkgs = nixpkgs-as-input; + nixpkgs = nixpkgs_as_input; in { nix = { package = pkgs.nixStable; diff --git a/system/services/serverphone/keys/key_1 b/system/services/serverphone/keys/key_1 index a3496d00..67720882 120000 --- a/system/services/serverphone/keys/key_1 +++ b/system/services/serverphone/keys/key_1 @@ -1 +1 @@ -../../../../home-manager/config/gpg/keys/key_1 \ No newline at end of file +../../../../home-manager/soispha/config/gpg/keys/key_1 \ No newline at end of file diff --git a/system/services/serverphone/keys/key_2 b/system/services/serverphone/keys/key_2 index ff3dd5b6..24df7207 120000 --- a/system/services/serverphone/keys/key_2 +++ b/system/services/serverphone/keys/key_2 @@ -1 +1 @@ -../../../../home-manager/config/gpg/keys/key_2 \ No newline at end of file +../../../../home-manager/soispha/config/gpg/keys/key_2 \ No newline at end of file diff --git a/update.sh b/update.sh index 9bb8eba2..f6431055 100755 --- a/update.sh +++ b/update.sh @@ -1,4 +1,4 @@ #!/bin/sh # shellcheck disable=SC2086 -"$(dirname "$0")"/home-manager/config/firefox/scripts/update_extensions +./home-manager/soispha/config/firefox/scripts/update_extensions -- cgit 1.4.1