1
0
mirror of https://github.com/kmein/niveum synced 2026-03-20 12:01:06 +01:00

162 Commits

Author SHA1 Message Date
b274a59a50 niri: add shortcut to float windows 2025-08-26 08:29:09 +02:00
b4de03bb3c replace more instances of rofi by wofi 2025-08-26 08:28:56 +02:00
b0062abbfe passmenu: fix 2025-08-26 07:50:31 +02:00
0e9a046c5f obsidian-vim: add fugitive 2025-08-26 07:50:24 +02:00
72ab319e65 niri: set window rules 2025-08-26 07:50:06 +02:00
f08e43067b configure niri 2025-08-26 07:19:54 +02:00
d0ac0af7c3 use wl-clipboard 2025-08-26 07:19:17 +02:00
5febabb7fa use wofi 2025-07-11 11:37:23 +02:00
44d29f90e9 working niri config 2025-07-10 06:51:51 +02:00
1aaf0fe5ae configure wayland for kabsa 2025-07-09 09:23:41 +02:00
e8e165ff03 hledger: disable remote auto-sync 2025-07-05 10:41:02 +02:00
5175bd5f4a simplescreenrecorder 2025-07-05 10:40:51 +02:00
874c502094 brave 2025-07-05 10:40:43 +02:00
4490c0a97c Merge remote-tracking branch 'origin/update_flake_lock_action' 2025-06-22 08:07:49 +02:00
github-actions[bot]
8e76899b40 flake.lock: Update
Flake lock file updates:

• Updated input 'agenix':
    'github:ryantm/agenix/4835b1dc898959d8547a871ef484930675cb47f1?narHash=sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY%2BD81k%3D' (2025-05-18)
  → 'github:ryantm/agenix/531beac616433bac6f9e2a19feb8e99a22a66baf?narHash=sha256-9P1FziAwl5%2B3edkfFcr5HeGtQUtrSdk/MksX39GieoA%3D' (2025-06-17)
• Updated input 'home-manager':
    'github:nix-community/home-manager/282e1e029cb6ab4811114fc85110613d72771dea?narHash=sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew%3D' (2025-05-31)
  → 'github:nix-community/home-manager/7aae0ee71a17b19708b93b3ed448a1a0952bf111?narHash=sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg%3D' (2025-06-05)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/a59eb7800787c926045d51b70982ae285faa2346?narHash=sha256-q8jG2HJWgooWa9H0iatZqBPF3bp0504e05MevFmnFLY%3D' (2025-05-31)
  → 'github:NixOS/nixpkgs/b2485d56967598da068b5a6946dadda8bfcbcd37?narHash=sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA%3D' (2025-06-20)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/3603bcb66c0a5d4529370510bd6529d34107d63a?narHash=sha256-Ea5JtjFUoTpMJGnbXmXirk8dDdVIWmDp0o%2BeQDc9vzs%3D' (2025-06-02)
  → 'github:NixOS/nixpkgs/ba476a871a35075644c3340b3651101ddf77ee0d?narHash=sha256-zgPnxYqkf/CEl5m/lx02D%2BFaLWPRUM/RLo/qekTuu8Q%3D' (2025-06-22)
• Updated input 'nur':
    'github:nix-community/NUR/7995f4bde30d1dc463f7d39a5118709e19d8e608?narHash=sha256-sBG2NR%2BtB1y4xMYguJT2IsTV2mf8PzWRoz2gScUFHg8%3D' (2025-06-02)
  → 'github:nix-community/NUR/8d68e170fd6f9e8b8921db79419c209a1aeabc36?narHash=sha256-rtItxhQM%2BZkd2ys/lT2MoXCUVEhyj51Em5o9Wd6qqGU%3D' (2025-06-22)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/910796cabe436259a29a72e8d3f5e180fc6dfacc?narHash=sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8%3D' (2025-05-31)
  → 'github:nixos/nixpkgs/08f22084e6085d19bcfb4be30d1ca76ecb96fe54?narHash=sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50%3D' (2025-06-19)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/7ec2ea005b600dac9436a7c5c6b66d960cbfcea2?narHash=sha256-TQSaFa1wWJr6GOs%2BK8lecK4AKKr8k6mwxHIPCOmVkgs%3D' (2025-06-02)
  → 'github:oxalica/rust-overlay/3d7d4c4e284f26d6dc4840491c66884912be0062?narHash=sha256-wiW2j63MyGQyyijRF25hf7Ab7vx4G8pCiGjUe3OGV4c%3D' (2025-06-21)
• Updated input 'stylix':
    'github:danth/stylix/2ccc6cbd33b3d9c52b6f6c096a66880a52f37933?narHash=sha256-kG45D1iaM8j///luopldYoVBd4L%2B41YscY8PjwLtcZM%3D' (2025-06-02)
  → 'github:danth/stylix/cc82dae884f45ffeb996d2b5116afa70933e507f?narHash=sha256-Yblt2LusglzBXlg%2BekckztIUgvl1WQwJ7gLRJEt/IHE%3D' (2025-06-19)
2025-06-22 01:12:22 +00:00
8617c8e982 add portfolio-performance 2025-06-10 09:16:01 +02:00
0025d82cd8 literature-quote: fix selection with xan 2025-06-09 11:34:19 +02:00
03c0e49572 mahlzeit: disable 2025-06-05 13:01:53 +02:00
7c3c13abb8 anubis: weigh the souls of the AI scrapers 2025-06-03 21:06:53 +02:00
f954e867dc tlg-wotd: update cltk 2025-06-03 20:08:04 +02:00
67f682aa88 radio-news: package 2025-06-03 20:07:49 +02:00
0ceecf4c14 ci: disable kibbeh 2025-06-03 15:21:38 +02:00
6fdac40832 24.11 → 25.05 2025-06-03 14:55:09 +02:00
2ba3c05e4a radio-news: good news only 2025-05-28 09:32:26 +02:00
6ab7e96894 wallabag: init 2025-05-28 09:31:50 +02:00
ddd759a838 ssh: kibbeh -> kabsa 2025-05-21 10:51:05 +02:00
5244ae3850 fu-vpn: include xauthority setup 2025-05-21 10:50:38 +02:00
b90aa5ef07 fu-vpn: use sudo 2025-05-21 10:46:43 +02:00
d52c10bc84 format 2025-05-21 10:46:32 +02:00
a6bc317141 i3status-rust: display all batteries with remaining time 2025-05-21 10:46:18 +02:00
d4ee3cf692 heavily simplify dashboard 2025-05-21 10:45:45 +02:00
c96ac804df reinstate kabsa 2025-05-21 07:43:52 +02:00
4af218f7ad radio-news: send earlier 2025-05-16 14:03:42 +02:00
b08576c972 radio-news: expire earlier 2025-05-16 10:08:30 +02:00
44cb0bf8a5 remock secrets 2025-05-14 16:39:04 +02:00
4c9305c89d init brainmelter 2025-05-14 06:57:06 +02:00
8c838966f2 radio news: automatically post digest 2025-05-13 20:22:42 +02:00
6ffb80322b radio news digest 2025-05-13 19:51:43 +02:00
6e1bbb878a update 2025-05-10 22:08:32 +02:00
4a1abf06f6 pls: more musical criticism 2025-05-07 10:54:17 +02:00
e9a6a482ee install packages for photography 2025-05-07 09:14:53 +02:00
3bdf539540 neovim: set colorscheme light 2025-04-28 13:17:38 +02:00
f053f6292d update 2025-04-28 13:10:56 +02:00
e350eac5c7 librsvg 2025-04-28 11:00:09 +02:00
046f2ca75d systemd-tmpfiles-clean: enable for user 2025-04-15 14:22:28 +02:00
6fcba6dc75 ssh: kabsa -> kibbeh 2025-03-31 10:20:09 +02:00
3750b6c131 update 2025-03-30 22:35:46 +02:00
4046339f5b get ready for VPNing to germany 2025-03-21 09:07:43 +01:00
da224a0e4b stylix: spring has begun 2025-03-21 09:07:29 +01:00
60a73a81be ssh: add travel laptop public key 2025-03-16 08:56:18 +01:00
889eb1d5c2 yta: download best quality opus 2025-03-16 08:56:07 +01:00
github-actions[bot]
e34b3e02b3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1546c45c538633ae40b93e2d14e0bb6fd8f13347?narHash=sha256-F0qDu2egq18M3edJwEOAE%2BD%2BVQ%2ByESK6YWPRQBfOqq8%3D' (2025-03-02)
  → 'github:NixOS/nixpkgs/cdd2ef009676ac92b715ff26630164bb88fec4e0?narHash=sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB%2Bikn74/xQoNrGQ%3D' (2025-03-13)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/4f8cf457154521f90d60ed0b785774a728842875?narHash=sha256-ADrsBEvcCGQEZWrkmUES6PpoqSKXVlrHhteHT6Sbr2o%3D' (2025-03-04)
  → 'github:NixOS/nixpkgs/1a4711b6be669d31f21b417a7f8b60801367dfee?narHash=sha256-03bPiYMWpguzc4JwAGoD7j2GEi1K2k9wrNbfoaFrYg4%3D' (2025-03-16)
• Updated input 'nur':
    'github:nix-community/NUR/8cf34376717c39b3f8ed2d28091ff2a2455b3ab8?narHash=sha256-SN5pa746g3yeOBaouHZU1RCS2ZtUFKWpZtDG86xgSig%3D' (2025-03-04)
  → 'github:nix-community/NUR/cbd6b0ec3da4afb2e45f3275af8cb9f1dc718534?narHash=sha256-ylgdokg/pY5a2GPddDGGNR8MA0MOYStuxjwn8AnPDbk%3D' (2025-03-15)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/ba487dbc9d04e0634c64e3b1f0d25839a0a68246?narHash=sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM%3D' (2025-03-03)
  → 'github:nixos/nixpkgs/6607cf789e541e7873d40d3a8f7815ea92204f32?narHash=sha256-cPfs8qMccim2RBgtKGF%2Bx9IBCduRvd/N5F4nYpU0TVE%3D' (2025-03-13)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/aefb7017d710f150970299685e8d8b549d653649?narHash=sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8%3D' (2025-03-04)
  → 'github:oxalica/rust-overlay/028cd247a6375f83b94adc33d83676480fc9c294?narHash=sha256-6wuOGWkyW6R4A6Th9NMi6WK2jjddvZt7V2%2BrLPk6L3o%3D' (2025-03-15)
• Updated input 'stylix':
    'github:danth/stylix/aaa2eb8956770c096f9c46fb163bb26602e20e56?narHash=sha256-QRlcA8rtfNdyKpBE%2BptjiB9717Tzum4/sKBSbsyqL6k%3D' (2025-02-25)
  → 'github:danth/stylix/9bfc74f330ead111e8ea354b2220a431b0cfaa26?narHash=sha256-utsgC6H3ja6sLAXMd8//I2D7yjyScFqVDRX0wpbqPZo%3D' (2025-03-14)
• Updated input 'stylix/firefox-gnome-theme':
    'github:rafaelmardojai/firefox-gnome-theme/a89108e6272426f4eddd93ba17d0ea101c34fb21?narHash=sha256-vAxN2f3rvl5q62gQQjZGVSvF93nAsOxntuFz%2Be/655w%3D' (2025-02-10)
  → 'github:rafaelmardojai/firefox-gnome-theme/5a81d390bb64afd4e81221749ec4bffcbeb5fa80?narHash=sha256-RsvHGNTmO2e/eVfgYK7g%2BeYEdwwh7SbZa%2BgZkT24MEA%3D' (2025-03-10)
• Updated input 'stylix/git-hooks':
    'github:cachix/git-hooks.nix/9364dc02281ce2d37a1f55b6e51f7c0f65a75f17?narHash=sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg%3D' (2025-01-21)
  → 'github:cachix/git-hooks.nix/b5a62751225b2f62ff3147d0a334055ebadcd5cc?narHash=sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc%3D' (2025-03-07)
• Updated input 'stylix/tinted-tmux':
    'github:tinted-theming/tinted-tmux/b6c7f46c8718cc484f2db8b485b06e2a98304cd0?narHash=sha256-/etfUV3HzAaLW3RSJVwUaW8ULbMn3v6wbTlXSKbcoWQ%3D' (2025-02-23)
  → 'github:tinted-theming/tinted-tmux/d48ee86394cbe45b112ba23ab63e33656090edb4?narHash=sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU%3D' (2025-03-02)
• Updated input 'voidrice':
    'github:Lukesmithxyz/voidrice/59632a5668f1af956ec325f8d8455d312727b8a8?narHash=sha256-y80KJjdbvko53yK6AvxVrmU/yYnyYQxTT6FZOXhCDVk%3D' (2025-03-02)
  → 'github:Lukesmithxyz/voidrice/5f385da9f686ffb9ab61c194a46539cbe53357ea?narHash=sha256-ZoEyircvifmAH7QqDpdDxhaHMdAfWtjZB6JiSvMBRVg%3D' (2025-03-09)
2025-03-16 01:03:16 +00:00
d7f01e0a5e manakish: switch to network manager 2025-03-05 14:28:05 +01:00
6ea3629f77 mycelium: add manakish 2025-03-05 14:27:51 +01:00
b010f7e7cc kibbeh: unify locale 2025-03-05 10:05:13 +01:00
0b60f953b7 mycelium host aliases for all 2025-03-05 10:05:13 +01:00
d64ce2036a ci: apt-get update 2025-03-05 10:05:13 +01:00
ebe3997beb init mycelium 2025-03-05 10:05:13 +01:00
1b23814dc3 update 2025-03-04 20:37:09 +01:00
df35d1d935 flake: change retiolum to stockholm mirror 2025-02-26 10:13:28 +01:00
b01c289a26 kibbeh: install tmux 2025-02-26 10:06:44 +01:00
dafa3229bb kibbeh: install telegram 2025-02-13 19:14:55 +01:00
dee784472f mock secrets 2025-02-11 21:18:14 +01:00
295f8257e3 kibbeh: configure 2025-02-11 21:04:02 +01:00
5adc8309f2 init kibbeh (ex-kabsa) 2025-02-11 15:51:06 +01:00
cd58ea209e fonts+keyboards: add syriac 2025-02-10 11:35:38 +01:00
0ae493a0f5 nil: add nixfmt as formatter 2025-02-07 15:45:51 +01:00
c0f6fc1121 aerc: add letos, remove fysi, fix cock 2025-02-07 13:02:01 +01:00
dc519dc055 stylix: unify code 2025-02-01 14:42:21 +01:00
4d178f7bb8 weechat: clean up brockman channels 2025-01-27 22:52:51 +01:00
c0ba0e605a update 2025-01-27 22:52:41 +01:00
4620390411 browser: install tor browser 2025-01-23 07:38:44 +01:00
a18e295a9e unify color scheme 2025-01-21 16:19:28 +01:00
f3ae88c6d1 monitor zodiac.fly.dev api 2025-01-20 13:04:23 +01:00
d08ed06bc5 zoom 2025-01-20 13:04:11 +01:00
b648661e60 bluetooth: replace by bluetuith 2025-01-20 13:04:01 +01:00
b26b48034c prometheus: monitor brockman.news 2025-01-06 22:29:58 +01:00
6acfa2927c brockman: remove 2024-12-31 15:05:14 +01:00
914a464e4f fonts: fix hash 2024-12-31 14:03:36 +01:00
505031d103 weechat: add brockman 2024-12-31 14:03:23 +01:00
b5927a5217 klem: update paste scripts to use 4d2.org, remove ix.io (which is offline) 2024-12-29 11:45:19 +01:00
5c87fd6cd4 celan: use tei edition 2024-12-16 17:17:43 +01:00
dbb5fe131e tlg-wotd: work around until cltk works with 3.12
https://github.com/NixOS/nixpkgs/pull/353367
2024-12-16 13:20:25 +01:00
89cd81b2f4 cltk: move to nixpkgs 2024-12-16 13:20:01 +01:00
2c58405314 gpg-agent: use qt pinentry (rofi does not work) 2024-12-16 10:55:35 +01:00
ffe9f90b4e alew: fix 2024-12-13 13:42:51 +01:00
f8c3a9dbef neovim: use bas16 manually 2024-12-13 13:42:39 +01:00
2c6007d404 upgrade to 24.11 2024-12-13 13:42:16 +01:00
3253a217d7 bye bye hu 2024-12-10 13:04:44 +01:00
7c67964ea8 streams: add ancient fm 2024-12-10 12:37:20 +01:00
b42ea3d7b6 update 2024-12-02 13:12:38 +01:00
eb2179c0ad nextcloud: update and backup correctly 2024-12-02 13:12:24 +01:00
61ec35a29b bots: run tlg wotd on social.krebsco.de 2024-11-26 21:27:02 +01:00
56e44e94e0 alertmanager: add social.krebsco.de 2024-11-26 21:17:41 +01:00
ee24ef7340 alew: init on ful 2024-11-15 09:48:11 +01:00
a1a0a517a2 readd secrets 2024-11-13 16:32:05 +01:00
265a697136 remove secrets 2024-11-13 16:30:16 +01:00
6e53b32f5d move to social.krebsco.de mastodon 2024-11-13 14:03:56 +01:00
af6553abf6 backup: electrum wallets 2024-11-13 06:13:40 +01:00
d22682519b nextcloud: config -> settings 2024-11-09 16:57:16 +01:00
b2065c4155 nas: add sd-card to shared storage 2024-11-09 16:55:39 +01:00
63f5db1c58 alertmanager: summary -> description 2024-11-09 16:55:14 +01:00
f3a5e0a54c neovim: move lsp to config file, add xml lsp 2024-11-09 15:38:21 +01:00
136000540b zaatar: add nas share 2024-11-05 09:09:45 +01:00
762d766db5 keyboards: add urdu keyboard 2024-10-27 15:45:18 +01:00
812c795723 deno: use newest version 2024-10-27 15:45:07 +01:00
cf72c1df1f alertmanager: more alerts? 2024-10-27 15:44:52 +01:00
05b35bd9f0 chore: update 2024-10-27 15:44:39 +01:00
4eb7c46286 gimp: bring out 2024-10-25 21:09:31 +02:00
b42945ac7d panoptikon: do not report on IRC 2024-10-25 06:58:13 +02:00
ea4d334d10 aider: bye 2024-10-24 07:34:11 +02:00
dd1bc890bd monopolize on deno 2024-10-23 07:56:38 +02:00
f9fe700f68 magic-wormhole 2024-10-23 07:54:26 +02:00
a0b7362fc5 fix-sd: recheck after cleanup 2024-10-23 07:54:18 +02:00
e7a77fbfb5 fu-berlin: they changed their vpn 2024-10-23 07:53:53 +02:00
7d38f3a718 bots: program nietzschebot 2024-10-11 14:37:01 +02:00
70dde17e88 htmlq: remove
it is shitty python software
2024-10-11 14:37:01 +02:00
5f11a95d32 transits: do not post natal transits 2024-10-09 10:12:59 +02:00
d78e738f51 alertmanager: report on matrix 2024-10-09 00:01:39 +02:00
c9770d065a radio: deactivate wikipedia and lyrikline 2024-10-08 22:54:20 +02:00
f42d1ebf28 movk secrets 2024-10-08 22:54:04 +02:00
f6621a5bb9 panoptikon: send news on matrix 2024-10-08 22:36:14 +02:00
136d4e699f bots: post on matrix as well 2024-10-08 22:35:41 +02:00
a28fca11a7 rename bot structure 2024-10-08 19:33:01 +02:00
e26b8408f6 smyth: post url 2024-10-08 18:49:34 +02:00
69d1fd44f8 literature-quote: improve formatting 2024-10-08 18:49:34 +02:00
677aefbe73 hesychius: also post on mastodon 2024-10-08 18:49:34 +02:00
e2f784ed3b smyth: also post on mastodon 2024-10-08 18:49:34 +02:00
ac3758e027 bots: post on mastodon as well 2024-10-08 18:49:33 +02:00
f43e4ff664 mock secrets 2024-10-07 23:22:41 +02:00
c15e9812c4 gnupg: use nixos instead of home-manager 2024-10-07 22:58:55 +02:00
a2390d52c5 literature-quote: also post on mastodon 2024-10-07 22:58:33 +02:00
7ee17cb5b8 transits: do not post personalized transits 2024-10-07 07:26:23 +02:00
f535ba7b2a mock secrets 2024-10-05 15:22:26 +02:00
48d10b25ee autorenkalender: also post on mastodon 2024-10-05 15:22:13 +02:00
ccd8d63d8d hesychius: also post on mastodon 2024-10-05 15:13:57 +02:00
519a1079bc smyth: also post on mastodon 2024-10-05 15:09:11 +02:00
84fa3ee4b6 transits: also post on mastodon 2024-10-05 15:03:35 +02:00
4774a0ec0f fix-sd: backup corrupt files to pwd 2024-10-05 14:53:59 +02:00
5ba3dfc451 bots: post on mastodon as well 2024-10-05 14:42:44 +02:00
729f1180b7 tlg-wotd: also post on mastodon 2024-10-04 17:07:06 +02:00
1e74d0470c chore: update 2024-10-01 22:28:15 +02:00
c1b58f7038 wireguard: no autostart 2024-10-01 22:28:04 +02:00
904cc4401e weechat: use relay instead of API 2024-10-01 21:03:33 +02:00
7e033412bd add sd card fixer 2024-09-25 22:14:38 +02:00
3bdf71425b fritzbox VPN 2024-09-23 19:34:59 +02:00
2067944151 tlg-wotd: use cltk for transcription 2024-09-22 17:33:04 +02:00
c34708b989 cltk: init at 1.3.0 2024-09-22 17:32:49 +02:00
a07b871bbb unicodmenu: create cache 2024-09-22 00:37:30 +02:00
9b0b4ca08c tlg-wotd: generate fance image
big thanks to @soerface
2024-09-22 00:27:51 +02:00
09c631b4e5 noise generators 2024-09-19 09:54:12 +02:00
c246310cab noise-waves 2024-09-18 09:20:26 +02:00
fef3a1fbff update 2024-09-15 20:58:17 +02:00
dacf34ebc0 scrabble: host without containers 2024-09-15 20:58:01 +02:00
4b96e82d25 add another web radio stream 2024-09-15 19:39:46 +02:00
967c5f32c7 nextcloud: reenable onlyoffice 2024-09-11 10:17:46 +02:00
18c5a087f3 aider 2024-09-08 20:35:53 +02:00
f40ce68ced XCompose: add aspirates/fricatives 2024-09-08 19:14:47 +02:00
bfa2b1e9b1 makanek: host online scrabble 2024-09-08 19:14:30 +02:00
6908b75571 brockman: backup 2024-08-17 14:52:13 +02:00
ce7fd6074b miniflux: add random unread script 2024-08-14 06:40:51 +02:00
297b3aba37 ful: host brockman 2024-08-14 06:40:24 +02:00
104 changed files with 3635 additions and 1062 deletions

21
.bin/fix-sd.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
set -xfu
drive="$1"
mountpoint="/media/sd-card-$(date +%s)"
backup_directory="$(pwd)"
trap clean EXIT
clean() {
umount "$mountpoint"
rmdir "$mountpoint"
fsck.exfat "$drive"
}
filenames="$(fsck.exfat "$drive" 2>&1 | sed -nE "s/.* file '(.*?)' is not allocated.*/\1/p")"
mkdir "$mountpoint"
mount "$drive" "$mountpoint"
echo "$filenames" | while read -r filename; do
find "$mountpoint" -type f -name "$filename" -exec mv {} "$backup_directory" \;
done

View File

@@ -11,7 +11,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install QEMU (ARM)
run: sudo apt-get install -y qemu-user-static
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
if: ${{ matrix.system == 'ful' }}
- name: Install Nix (ARM)
uses: cachix/install-nix-action@v16

View File

@@ -15,6 +15,7 @@ in {
pkgs.unzip
pkgs.unrar
pkgs.p7zip
pkgs.sshuttle
pkgs.zip
# MONITORS
pkgs.iftop # interface bandwidth monitor
@@ -52,6 +53,22 @@ in {
pkgs.psmisc # for killall, pstree
];
security.wrappers = {
pmount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pumount";
};
};
environment.shellAliases = let
take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1"

View File

@@ -14,6 +14,12 @@ in {
group = config.users.users.me.group;
mode = "400";
};
email-password-letos = {
file = ../secrets/email-password-letos.age;
owner = config.users.users.me.name;
group = config.users.users.me.group;
mode = "400";
};
email-password-posteo = {
file = ../secrets/email-password-posteo.age;
owner = config.users.users.me.name;
@@ -79,9 +85,24 @@ in {
address = "2210@cock.li";
userName = address;
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
realName = "";
realName = "2210";
imap.host = "mail.cock.li";
imap.port = 993;
smtp.host = imap.host;
smtp.port = 25;
smtp.tls.useStartTls = true;
};
letos =
lib.recursiveUpdate defaults
{
userName = "slfletos";
address = "letos.sprachlit@hu-berlin.de";
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
imap.host = "mailbox.cms.hu-berlin.de";
imap.port = 993;
smtp.host = "mailhost.cms.hu-berlin.de";
smtp.port = 25;
smtp.tls.useStartTls = true;
};
posteo =
lib.recursiveUpdate defaults

View File

@@ -1,58 +1,8 @@
{
pkgs,
lib,
config,
...
}: let
alacritty-cfg = theme:
(pkgs.formats.yaml {}).generate "alacritty.yml" {
bell = {
animation = "EaseOut";
duration = 100;
color = "#ffffff";
};
font = {
normal.family = "Monospace";
size = 6;
};
live_config_reload = true;
key_bindings = [
{
key = "Plus";
mods = "Control";
action = "IncreaseFontSize";
}
{
key = "Minus";
mods = "Control";
action = "DecreaseFontSize";
}
{
key = "Key0";
mods = "Control";
action = "ResetFontSize";
}
];
colors = let
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
colourPairs = lib.getAttrs colourNames theme;
in {
primary = {inherit (theme) background foreground;};
cursor = {inherit (theme) cursor;};
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
};
alacritty-pkg = pkgs.symlinkJoin {
name = "alacritty";
paths = [
(pkgs.writers.writeDashBin "alacritty" ''
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml msg create-window "$@" ||
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
'')
pkgs.alacritty
];
};
in {
environment.variables.TERMINAL = "alacritty";

View File

@@ -24,6 +24,7 @@ in {
"/home/kfm/cloud"
"/home/kfm/mobile"
"/home/kfm/.gnupg"
"/home/kfm/.electrum"
"/home/kfm/.ssh"
];
};

View File

@@ -6,9 +6,5 @@
};
};
services.blueman.enable = true;
# environment.systemPackages = [pkgs.blueman];
home-manager.users.me = {services.blueman-applet.enable = true;};
environment.systemPackages = [ pkgs.bluetuith ];
}

View File

@@ -13,17 +13,18 @@
autorenkalender =
pkgs.python3Packages.callPackage autorenkalender-package {};
in {
niveum.telegramBots.autorenkalender = {
niveum.bots.autorenkalender = {
enable = true;
time = "07:00";
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@autorenkalender"];
parseMode = "Markdown";
telegram = {
enable = true;
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@autorenkalender"];
parseMode = "Markdown";
};
command = "${autorenkalender}/bin/autorenkalender";
};
age.secrets.telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
niveum.passport.services = [
{
title = "Autorenkalender";

79
configs/bots/celan.nix Normal file
View File

@@ -0,0 +1,79 @@
{
pkgs,
lib,
config,
...
}: {
niveum.bots.celan = {
enable = true;
time = "08:00";
telegram = {
enable = true;
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@PaulCelan"];
};
mastodon = {
enable = true;
tokenFile = config.age.secrets.mastodon-token-celan.path;
language = "de";
};
command = toString (pkgs.writers.writePython3 "random-celan.py" { libraries = [pkgs.python3Packages.lxml]; } ''
from lxml import etree
import random
def xml_text(elements):
return "".join("".join(t.itertext()) for t in elements).strip()
tree = etree.parse('${pkgs.fetchurl {
url = "http://c.krebsco.de/celan.tei.xml";
hash = "sha256-HgNmJYfhuwyfm+FcNtnnYWpJpIIU1ElHLeLiIFjF9mE=";
}}')
root = tree.getroot()
tei = {"tei": "http://www.tei-c.org/ns/1.0"}
poems = root.xpath(".//tei:lg[@type='poem']", namespaces=tei)
poem = random.choice(poems)
for stanza in poem.xpath("./tei:lg[@type='stanza']", namespaces=tei):
for line in stanza.xpath('./tei:l', namespaces=tei):
if line.text:
print(line.text.strip())
print()
current_element = poem
while current_element is not None:
if current_element.tag == "{http://www.tei-c.org/ns/1.0}text":
text_element = current_element
title = xml_text(text_element.xpath("./tei:front/tei:docTitle",
namespaces=tei))
print(f"Aus: #{title.replace(" ", "_")}", end=" ")
if date := xml_text(text_element.xpath("./tei:front/tei:docDate",
namespaces=tei)):
print(f"({date})")
break
current_element = current_element.getparent()
print("\n\n#PaulCelan #Celan #Lyrik #poetry")
'');
};
age.secrets = {
mastodon-token-celan.file = ../../secrets/mastodon-token-celan.age;
};
systemd.timers.bot-celan.timerConfig.RandomizedDelaySec = "10h";
niveum.passport.services = [
{
title = "Paul Celan Bot";
description = "sends a random poem by Paul Celan to Telegram.";
link = "https://t.me/PaulCelan";
}
];
}

View File

@@ -11,14 +11,15 @@
inherit (import ../../lib) tmpfilesConfig;
in {
imports = [
./literature-quote.nix
./astrology.nix
./logotheca.nix
./transits.nix
./autorenkalender.nix
./hesychius.nix
./smyth.nix
./nachtischsatan.nix
./tlg-wotd.nix
./celan.nix
./nietzsche.nix
];
systemd.tmpfiles.rules = map (path:

View File

@@ -0,0 +1,39 @@
{
pkgs,
config,
inputs,
lib,
...
}: let
hesychius = inputs.scripts.outPath + "/hesychius/hesychius.txt";
in {
niveum.bots.hesychius = {
enable = true;
time = "08:00";
mastodon = {
enable = true;
language = "el";
tokenFile = config.age.secrets.mastodon-token-hesychius.path;
};
telegram = {
enable = true;
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@HesychiosAlexandreus"];
};
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
};
systemd.timers.bot-hesychius.timerConfig.RandomizedDelaySec = "10h";
age.secrets = {
mastodon-token-hesychius.file = ../../secrets/mastodon-token-hesychius.age;
};
niveum.passport.services = [
{
title = "Hesychius of Alexandria Bot";
description = "sends a random word from Hesychius of Alexandria's lexicon to Telegram.";
link = "https://t.me/HesychiosAlexandreus";
}
];
}

View File

@@ -0,0 +1,38 @@
{
pkgs,
config,
lib,
niveumPackages,
...
}: {
niveum.bots.logotheca = {
enable = true;
time = "08/6:00";
telegram = {
enable = true;
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["-1001760262519"];
parseMode = "Markdown";
};
matrix = {
enable = true;
homeserver = "matrix.4d2.org";
tokenFile = config.age.secrets.matrix-token-lakai.path;
chatIds = [
"!zlwCuPiCNMSxDviFzA:4d2.org"
];
};
command = "${niveumPackages.literature-quote}/bin/literature-quote";
};
age.secrets = {
matrix-token-lakai.file = ../../secrets/matrix-token-lakai.age;
};
niveum.passport.services = [
{
title = "Literature quote bot";
description = "sends me and my friends three <a href=\"https://logotheca.xn--kiern-0qa.de/\">logotheca</a> quotes a day.";
}
];
}

View File

@@ -0,0 +1,31 @@
{
config,
pkgs,
niveumPackages,
...
}: {
niveum.bots.nietzsche = {
enable = true;
time = "08:00";
mastodon = {
enable = true;
tokenFile = config.age.secrets.mastodon-token-nietzsche.path;
language = "de";
};
command = toString (pkgs.writers.writeBash "random-nietzsche" ''
set -efu
random_number=$(( ($RANDOM % 10) + 1 ))
if [ "$random_number" -eq 1 ]; then
${niveumPackages.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
else
${niveumPackages.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
fi
'');
};
systemd.timers.bot-nietzsche.timerConfig.RandomizedDelaySec = "10h";
age.secrets = {
mastodon-token-nietzsche.file = ../../secrets/mastodon-token-nietzsche.age;
};
}

View File

@@ -4,11 +4,19 @@
lib,
...
}: {
niveum.telegramBots.smyth = {
niveum.bots.smyth = {
enable = true;
time = "08:00";
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@HerbertWeirSmyth"];
mastodon = {
enable = true;
tokenFile = config.age.secrets.mastodon-token-smyth.path;
language = "en";
};
telegram = {
enable = true;
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@HerbertWeirSmyth"];
};
command = toString (pkgs.writers.writeDash "random-smyth" ''
set -efu
@@ -19,14 +27,21 @@
| ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//'
)
${pkgs.curl}/bin/curl -sSL http://www.perseus.tufts.edu/hopper/text?doc=$RANDOM_SECTION\
url="http://www.perseus.tufts.edu/hopper/text?doc=$RANDOM_SECTION"
${pkgs.curl}/bin/curl -sSL "$url"\
| ${pkgs.htmlq}/bin/htmlq '#text_main' \
| ${pkgs.gnused}/bin/sed 's/<\/\?hr>//g' \
| ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none
printf '\n%s\n\n#AncientGreek' "$url"
'');
};
systemd.timers.telegram-bot-smyth.timerConfig.RandomizedDelaySec = "10h";
systemd.timers.bot-smyth.timerConfig.RandomizedDelaySec = "10h";
age.secrets = {
mastodon-token-smyth.file = ../../secrets/mastodon-token-smyth.age;
};
niveum.passport.services = [
{

163
configs/bots/tlg-wotd.nix Normal file
View File

@@ -0,0 +1,163 @@
{
pkgs,
lib,
config,
niveumPackages,
...
}: let
mastodonEndpoint = "https://social.krebsco.de";
in {
systemd.services.bot-tlg-wotd = {
enable = true;
wants = ["network-online.target"];
startAt = "9:30";
path = [ pkgs.jq pkgs.curl pkgs.recode pkgs.deno pkgs.imagemagick pkgs.gawk pkgs.gnugrep pkgs.coreutils ];
environment = {
NPM_CONFIG_CACHE = "/tmp";
CLTK_DATA = "/tmp";
};
script = ''
set -efux
chat_id=@tlgwotd
export TELEGRAM_TOKEN="$(cat "$CREDENTIALS_DIRECTORY/telegram-token")"
export MASTODON_TOKEN="$(cat "$CREDENTIALS_DIRECTORY/mastodon-token")"
json_data=$(curl -sSL http://stephanus.tlg.uci.edu/Iris/Wotd | recode html..utf8)
word=$(echo "$json_data" | jq -r '.word')
compact_word=$(echo "$word" | sed 's/,.*$//')
definition=$(echo "$json_data" | jq -r '.definition | sub("<.*>"; "") | rtrimstr(" ")')
first_occurrence=$(echo "$json_data" | jq -r '.firstOccurrence')
total_occurrences=$(echo "$json_data" | jq -r '.totalOccurrences')
telegram_caption="*$word* $definition
First occurrence (century): $first_occurrence
Number of occurrences (in all Ancient Greek texts): $total_occurrences"
mastodon_caption="$word $definition
First occurrence (century): $first_occurrence
Number of occurrences (in all Ancient Greek texts): $total_occurrences"
#ancientgreek #classics #wotd #wordoftheday
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" {
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged
libraries = [ pkgs.python3Packages.cltk ];
} ''
import sys
from cltk.phonology.grc.transcription import Transcriber
probert = Transcriber("Attic", "Probert")
text = " ".join(sys.argv[1:])
ipa = probert.transcribe(text)
print(ipa)
''} "$compact_word")
photo_path=/tmp/output.png
hex_to_rgb() {
hex="$1"
r=$(printf "%d" "0x$(echo "$hex" | cut -c2-3)")
g=$(printf "%d" "0x$(echo "$hex" | cut -c4-5)")
b=$(printf "%d" "0x$(echo "$hex" | cut -c6-7)")
echo "$r $g $b"
}
calculate_luminance() {
r="$1"
g="$2"
b="$3"
r_l=$(echo "$r" | awk '{print ($1 / 255 <= 0.03928) ? $1 / 255 / 12.92 : (($1 / 255 + 0.055) / 1.055)^2.4}')
g_l=$(echo "$g" | awk '{print ($1 / 255 <= 0.03928) ? $1 / 255 / 12.92 : (($1 / 255 + 0.055) / 1.055)^2.4}')
b_l=$(echo "$b" | awk '{print ($1 / 255 <= 0.03928) ? $1 / 255 / 12.92 : (($1 / 255 + 0.055) / 1.055)^2.4}')
echo "$r_l $g_l $b_l" | awk '{print 0.2126*$1 + 0.7152*$2 + 0.0722*$3}'
}
hex_color="#$(echo "$compact_word" | md5sum | cut -c 1-6)"
if echo "$hex_color" | grep -qE '^#[0-9A-Fa-f]{6}$'; then
set -- $(hex_to_rgb "$hex_color")
r="$1"
g="$2"
b="$3"
fi
luminance=$(calculate_luminance "$r" "$g" "$b")
threshold="0.1"
echo "$r $g $b"
if [ "$(echo "$luminance" | awk -v threshold="$threshold" '{print ($1 > threshold)}')" -eq 1 ]; then
color1="black"
color2="#333"
else
color1="white"
color2=lightgrey
fi
magick -size 1400x846 \
xc:"$hex_color" \
-font "${pkgs.gentium}/share/fonts/truetype/GentiumBookPlus-Bold.ttf" \
-fill "$color1" \
-pointsize 150 -gravity west \
-annotate +100-160 "$compact_word" \
-font "${pkgs.gentium}/share/fonts/truetype/GentiumBookPlus-Regular.ttf" \
-fill "$color2" \
-pointsize 60 -gravity west \
-annotate +100+00 "$transliteration" \
-fill "$color1" \
-annotate +100+120 "$definition" \
-fill "$color2" \
-pointsize 40 -gravity southwest \
-annotate +100+60 "attested $total_occurrences times" \
-pointsize 40 -gravity southeast \
-annotate +100+60 "$(date -I)" \
"$photo_path"
curl -X POST "https://api.telegram.org/bot$TELEGRAM_TOKEN/sendPhoto" \
-F "chat_id=\"$chat_id\"" \
-F "photo=@$photo_path" \
-F parse_mode=Markdown \
-F caption="$telegram_caption"
mastodon_upload_response=$(curl -X POST "${mastodonEndpoint}/api/v2/media" \
-H "Authorization: Bearer $MASTODON_TOKEN" \
-F "file=@$photo_path" \
-F "description=$word $definition")
mastodon_image_id=$(echo $mastodon_upload_response | jq -r .id)
curl -X POST "${mastodonEndpoint}/api/v1/statuses" \
-H "Authorization: Bearer $MASTODON_TOKEN" \
-d "status=$mastodon_caption" \
-d "visibility=public" \
-d "media_ids[]=$mastodon_image_id"
'';
serviceConfig = {
Type = "oneshot";
DynamicUser = true;
StateDirectory = "tlgwotd";
PrivateTmp = true;
LoadCredential = [
"telegram-token:${config.age.secrets.telegram-token-kmein.path}"
"mastodon-token:${config.age.secrets.mastodon-token-tlgwotd.path}"
];
};
};
age.secrets = {
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
};
niveum.passport.services = [
{
title = "Thesaurus Linguae Graecae Word of the Day";
description = "sends <a href=\"https://stephanus.tlg.uci.edu/\">TLG</a>'s word of the day to Telegram.";
link = "https://t.me/tlgwotd";
}
];
}

View File

@@ -41,18 +41,32 @@
'
'';
in {
niveum.telegramBots.transits = {
niveum.bots.transits = {
enable = true;
time = "*:0/1";
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["-1001796440545"];
mastodon = {
enable = true;
tokenFile = config.age.secrets.mastodon-token-transits.path;
};
telegram = {
enable = true;
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["-1001796440545"];
};
command = toString (pkgs.writers.writeDash "common-transits" ''
set -efu
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
{
${pkgs.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node" -A 2
${pkgs.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
(
cd ${pkgs.astrolog}/bin
# ./astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
./astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node" -A 2
) | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
'');
};
age.secrets = {
mastodon-token-transits.file = ../../secrets/mastodon-token-transits.age;
};
}

View File

@@ -1,10 +1,16 @@
{
pkgs,
config,
pkgs,
niveumPackages,
...
}: let
inherit (import ../lib) tmpfilesConfig;
in {
}: {
environment.systemPackages = [
niveumPackages.cro
pkgs.tor-browser-bundle-bin
pkgs.firefox
pkgs.brave
];
home-manager.users.me = {
programs.firefox = {
enable = true;

View File

@@ -6,6 +6,16 @@
}: let
inherit (import ../lib) tmpfilesConfig;
in {
systemd.user.services.systemd-tmpfiles-clean = {
enable = true;
wantedBy = [ "default.target" ];
startAt = "daily";
script = "systemd-tmpfiles --user --clean";
serviceConfig = {
Type = "oneshot";
};
};
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
{
type = "d";

View File

@@ -6,23 +6,25 @@
unstablePackages,
inputs,
...
}: let
}:
let
inherit (lib.strings) makeBinPath;
inherit (import ../lib) localAddresses kieran remoteDir;
defaultApplications = (import ../lib).defaultApplications {inherit pkgs;};
in {
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
in
{
imports = [
inputs.self.nixosModules.system-dependent
inputs.self.nixosModules.power-action
{
boot.supportedFilesystems = ["ntfs"];
boot.supportedFilesystems = [ "ntfs" ];
}
{
nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: {
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi -dmenu "$@"'';
};
permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
@@ -63,17 +65,6 @@ in {
};
};
}
{
environment.systemPackages = [
pkgs.capitaine-cursors
];
stylix.cursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
size = 12;
};
}
{
users.mutableUsers = false;
@@ -85,7 +76,10 @@ in {
hashedPasswordFile = config.age.secrets.kfm-password.path;
isNormalUser = true;
uid = 1000;
extraGroups = ["pipewire" "audio"];
extraGroups = [
"pipewire"
"audio"
];
};
nix.settings.trusted-users = [ config.users.users.me.name ];
@@ -98,24 +92,27 @@ in {
}
{
environment.interactiveShellInit = "export PATH=$PATH";
environment.shellAliases = let
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
in {
o = "${pkgs.xdg-utils}/bin/xdg-open";
ns = "nix-shell --run zsh";
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
tmux = "${pkgs.tmux}/bin/tmux -2";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura";
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
};
environment.shellAliases =
let
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
in
{
o = "${pkgs.xdg-utils}/bin/xdg-open";
ns = "nix-shell --run zsh";
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
tmux = "${pkgs.tmux}/bin/tmux -2";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format opus --audio-quality 0 -xic"; # Download with audio
};
}
{
i18n = {
defaultLocale = "en_DK.UTF-8";
supportedLocales = ["all"];
supportedLocales = [ "all" ];
};
}
{
@@ -131,42 +128,37 @@ in {
enable = true;
greeters.gtk = {
enable = true;
indicators = ["~spacer" "~host" "~spacer" "~session" "~power"];
indicators = [
"~spacer"
"~host"
"~spacer"
"~session"
"~power"
];
};
};
};
}
{ programs.command-not-found.enable = true; }
{
security.wrappers = {
pmount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pumount";
};
};
}
{programs.command-not-found.enable = true;}
{
home-manager.users.me = {
services.gpg-agent = rec {
programs.gnupg = {
agent = {
enable = true;
enableZshIntegration = true;
defaultCacheTtl = 2 * 60 * 60;
maxCacheTtl = 4 * defaultCacheTtl;
pinentryPackage = pkgs.pinentry-rofi;
pinentryPackage = pkgs.pinentry-qt;
settings = rec {
default-cache-ttl = 2 * 60 * 60;
max-cache-ttl = 4 * default-cache-ttl;
};
};
};
environment.systemPackages = [
pkgs.gnupg
(pkgs.pass.withExtensions (e: [e.pass-otp e.pass-import e.pass-genphrase]))
(pkgs.pass.withExtensions (e: [
e.pass-otp
e.pass-import
e.pass-genphrase
]))
];
}
{
@@ -179,12 +171,10 @@ in {
};
}
{
networking.hosts =
lib.mapAttrs' (name: address: {
name = address;
value = ["${name}.local"];
})
localAddresses;
networking.hosts = lib.mapAttrs' (name: address: {
name = address;
value = [ "${name}.local" ];
}) localAddresses;
}
{
home-manager.users.me.home.stateVersion = "22.05";
@@ -192,9 +182,9 @@ in {
}
{
systemd.user.services.udiskie = {
after = ["udisks2.service"];
wants = ["udisks2.service"];
wantedBy = ["graphical-session.target"];
after = [ "udisks2.service" ];
wants = [ "udisks2.service" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify";
};
@@ -231,14 +221,15 @@ in {
./git.nix
./hledger.nix
./htop.nix
./hu-berlin.nix
./fu-berlin.nix
./fysi.nix
./i3.nix
./niri.nix
./i3status-rust.nix
./keyboard.nix
./mycelium.nix
./kdeconnect.nix
{home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose;}
{ home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; }
{ services.upower.enable = true; }
./lb.nix
./mpv.nix
./mime.nix
@@ -246,6 +237,7 @@ in {
./nix.nix
./newsboat.nix
./flameshot.nix
./fritzbox.nix
./packages.nix
./picom.nix
./stardict.nix
@@ -265,6 +257,11 @@ in {
./watson.nix
./wallpaper.nix
./zsh.nix
{
home-manager.users.me.home.file.".zshrc".text = ''
# nothing to see here
'';
}
./tor.nix
./stw-berlin.nix
./mastodon-bot.nix
@@ -296,7 +293,7 @@ in {
download = "${config.users.users.me.home}/sync/Downloads";
music = "${config.users.users.me.home}/mobile/audio";
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
videos = pictures;
};
};

View File

@@ -5,12 +5,12 @@
}: {
home-manager.users.me = {
services.flameshot = {
package = pkgs.flameshot.override { enableWlrSupport = true; };
enable = true;
settings.General = {
autoCloseIdleDaemon = true;
drawColor = "#ff0000";
drawThickness = 2;
checkForUpdates = false;
showDesktopNotification = true;
disabledTrayIcon = true;
showHelp = false;

View File

@@ -1,5 +1,6 @@
{
pkgs,
config,
niveumPackages,
...
}: let
@@ -22,12 +23,7 @@
egyptianHiero = zip-font "EgyptianHiero" {
url = "https://github.com/MKilani/Djehuty/archive/master.zip";
sha256 = "sha256-KbY4vedm757NWfDlgmNhslbZd+2Vs+o5PjtMMGDt61Y=";
};
brill = zip-font "Brill" {
url = "https://brill.com/fileasset/The_Brill_Typeface_Package_v_4_0.zip";
stripRoot = false;
hash = "sha256-ugmEIkeBzD/4C9wkVfbctEtnzI8Kw+YD6KGcbk4BAf4=";
sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c=";
};
antinoou = zip-font "Antinoou" {
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
@@ -92,7 +88,7 @@ in {
newGardiner
junicode
koineGreek
brill
# brill
ezra-sil
fira
font-awesome
@@ -110,8 +106,9 @@ in {
roboto
roboto-mono
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-emoji
nerd-fonts.blex-mono
roboto-slab
scheherazade-new
source-code-pro
@@ -124,10 +121,10 @@ in {
zilla-slab
]; # google-fonts league-of-moveable-type
fontconfig.defaultFonts = rec {
monospace = ["Noto Sans Mono"] ++ emoji;
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic"];
emoji = ["Noto Color Emoji"];
monospace = [config.stylix.fonts.monospace.name] ++ emoji;
serif = [config.stylix.fonts.serif.name "Scheherazade New" "Ezra SIL" "Antinoou" "Noto Serif Devanagari"];
sansSerif = [config.stylix.fonts.sansSerif.name "Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
emoji = [config.stylix.fonts.emoji.name];
};
# xelatex fails with woff files
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other

19
configs/fritzbox.nix Normal file
View File

@@ -0,0 +1,19 @@
{ config, ... }:
{
networking.firewall.allowedUDPPorts = [ 51820 ];
networking.wg-quick.interfaces.aether = {
autostart = false;
dns = ["192.168.178.1" "fritz.box"];
listenPort = 51820;
privateKeyFile = config.age.secrets.wireguard-aether-key.path;
peers = [
{
allowedIPs = ["192.168.178.0/24" "0.0.0.0/0"];
endpoint = "lng5gx2rmssv8ge1.myfritz.net:58997";
persistentKeepalive = 25;
presharedKeyFile = config.age.secrets.wireguard-aether-psk.path;
publicKey = "8Rr7BueC0CGmycBQFS7YM7VF7Adkdc1ZcLFy8YXyOQk=";
}
];
};
}

View File

@@ -127,8 +127,20 @@ in {
cifs-credentials-zodiac.file = ../secrets/cifs-credentials-zodiac.age;
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "fu-vpn" ''
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
then
# root firefox will not open login window unless root owns Xauthority
sudo cp $XAUTHORITY /root/.Xauthority
sudo chown root: /root/.Xauthority
XAUTHORITY=/root/.Xauthority sudo ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect
fi
'')
];
systemd.services.fu-vpn = {
enable = true;
enable = false;
wants = ["network-online.target"];
serviceConfig.LoadCredential = "password:${config.age.secrets.email-password-meinhak99.path}";
script = ''

View File

@@ -1,148 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
inherit (import ../lib/email.nix) defaults pronouns;
inherit (import ../lib) remoteDir;
hu-defaults = {
imap.host = "mailbox.cms.hu-berlin.de";
imap.port = 993;
smtp.host = "mailhost.cms.hu-berlin.de";
smtp.port = 25;
smtp.tls.useStartTls = true;
};
hu-berlin-cifs-options = [
"uid=${toString config.users.users.me.uid}"
"gid=${toString config.users.groups.users.gid}"
"sec=ntlmv2"
"workgroup=german"
"credentials=${config.age.secrets.cifs-credentials-hu-berlin.path}"
"noauto"
"x-systemd.automount"
"x-systemd.device-timeout=1"
"x-systemd.idle-timeout=1min"
];
in {
fileSystems."${remoteDir}/hu/germpro2" = {
device = "//hugerm31c.user.hu-berlin.de/germpro2/ling";
fsType = "cifs";
options = hu-berlin-cifs-options;
};
fileSystems."${remoteDir}/hu/meinhaki/home" = {
device = "//hugerm31c.user.hu-berlin.de/germhome/ling/meinhaki";
fsType = "cifs";
options = hu-berlin-cifs-options;
};
age.secrets = {
cifs-credentials-hu-berlin.file = ../secrets/cifs-credentials-hu-berlin.age;
email-password-meinhaki = {
file = ../secrets/email-password-meinhaki.age;
owner = config.users.users.me.name;
group = config.users.users.me.group;
mode = "400";
};
email-password-dslalewa = {
file = ../secrets/email-password-dslalewa.age;
owner = config.users.users.me.name;
group = config.users.users.me.group;
mode = "400";
};
};
home-manager.users.me = {
programs.ssh = {
matchBlocks = {
"alew.hu-berlin.de" = {
user = "centos";
hostname = "141.20.187.219";
};
};
};
accounts.email.accounts = rec {
hu-employee =
lib.recursiveUpdate defaults
(lib.recursiveUpdate hu-defaults
rec {
userName = "meinhaki";
address = "kieran.meinhardt@hu-berlin.de";
aliases = ["${userName}@hu-berlin.de"];
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhaki.path}";
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text);
himalaya = {
enable = true;
settings.backend = "imap";
};
signature = {
showSignature = "append";
text = ''
${defaults.realName}
${pronouns}
Studentische Hilfskraft / Administrator ALEW
Humboldt-Universität zu Berlin
Telefon: +49 (0)30 2093 9634
Raum 3.212, Dorotheenstraße 24, 10117 Berlin-Mitte
https://alew.hu-berlin.de
'';
};
});
hu-admin =
lib.recursiveUpdate defaults
(lib.recursiveUpdate hu-defaults
rec {
userName = "dslalewa";
address = "admin.alew.vglsprwi@hu-berlin.de";
himalaya = {
enable = true;
settings.backend = "imap";
};
aliases = ["${userName}@hu-berlin.de"];
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-dslalewa.path}";
inherit (hu-employee) signature;
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text);
});
};
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "hu-ip" ''
${pkgs.w3m}/bin/w3m -dump meineip.hu-berlin.de | head --lines=-4 | tail --lines=+3
'')
(
pkgs.writers.writePython3Bin "hu-eduroam-install"
{
libraries = with pkgs.python3Packages; [distro pyopenssl dbus-python];
flakeIgnore = ["E501" "E123" "W504" "E722" "F821" "E226" "E126" "E265" "W291"];
}
(builtins.readFile (builtins.fetchurl {
url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/linux-installer/eduroam-linux-hub.py";
sha256 = "19x2kvwxx13265b2hj5fjf53g0liw6dw7xf9j9cav67cswmz60kf";
}))
)
];
# ref https://github.com/NixOS/nixpkgs/issues/231038#issuecomment-1591888919
environment.etc."ppp/options".text = "ipcp-accept-remote";
systemd.services.hu-vpn = {
enable = true;
wants = ["network-online.target"];
serviceConfig.LoadCredential = "password:${config.age.secrets.email-password-meinhaki.path}";
script = ''
${pkgs.openfortivpn}/bin/openfortivpn \
--password="$(cat "$CREDENTIALS_DIRECTORY/password")" \
--config=${
pkgs.writeText "hu-berlin.config" ''
host = forti-ssl.vpn.hu-berlin.de
port = 443
username = meinhaki
''
}
'';
};
}

View File

@@ -6,37 +6,36 @@
...
}: let
dashboard = pkgs.writers.writeDashBin "dashboard" ''
${pkgs.alacritty}/bin/alacritty --class wtf --command ${pkgs.writers.writeDash "dashboard-inner" ''
export WTF_OWM_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})"
export WTF_MINIFLUX_API_KEY="$(cat ${config.age.secrets.miniflux-api-token.path})"
exec ${niveumPackages.dashboard}/bin/dashboard
${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
''}
'';
inherit (import ../lib) defaultApplications;
klem = niveumPackages.klem.override {
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
config.scripts = {
"p.r" = pkgs.writers.writeDash "p.r" ''
"p.r paste" = pkgs.writers.writeDash "p.r" ''
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
| ${pkgs.coreutils}/bin/tail --lines=1 \
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
'';
# "envs.sh host" = pkgs.writers.writeDash "envs-host" ''
# ${pkgs.curl}/bin/curl -F "file=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
# '';
"envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
"envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
'';
# this segfaults
# "envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
# ${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
# '';
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
'';
"ix.io" = pkgs.writers.writeDash "ix.io" ''
${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io
'';
"go.r" = pkgs.writers.writeDash "go.r" ''
"go.r shorten" = pkgs.writers.writeDash "go.r" ''
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
'';
"0x0.st" = pkgs.writers.writeDash "0x0.st" ''
"4d2.org paste" = pkgs.writers.writeDash "4d2-paste" ''
${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/
'';
"0x0.st shorten" = pkgs.writers.writeDash "0x0.st" ''
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
'';
"rot13" = pkgs.writers.writeDash "rot13" ''
@@ -309,7 +308,7 @@ in {
exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}"
exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
assign [class="wtf"] ${infoWorkspace}
assign [class="dashboard"] ${infoWorkspace}
exec ${dashboard}/bin/dashboard
'';
config = lib.mkMerge [

View File

@@ -55,7 +55,9 @@
}
{
block = "battery";
device = config.niveum.batteryName;
format = "$icon $percentage $time";
device = "DisplayDevice";
driver = "upower";
}
{
block = "sound";

View File

@@ -3,19 +3,23 @@
lib,
...
}: let
commaSep = builtins.concatStringsSep ",";
xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
languages = {
deutsch = { code = "de"; variant = "T3"; };
greek = { code = "gr"; variant = "polytonic"; };
russian = { code = "ru"; variant = "phonetic"; };
arabic = ../lib/keyboards/arabic;
coptic = ../lib/keyboards/coptic;
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic;
avestan = ../lib/keyboards/avestan;
coptic = ../lib/keyboards/coptic;
deutsch = { code = "de"; variant = "T3"; };
farsi = { code = "ir"; variant = "qwerty"; };
gothic = ../lib/keyboards/gothic;
sanskrit = { code = "in"; variant = "san-kagapa"; };
greek = { code = "gr"; variant = "polytonic"; };
gujarati = {code = "in"; variant = "guj-kagapa"; };
hebrew = {code = "il"; variant = "phonetic";};
russian = { code = "ru"; variant = "phonetic"; };
sanskrit = { code = "in"; variant = "san-kagapa"; };
syriac = { code = "sy"; variant = "syc_phonetic"; };
urdu = {code = "in"; variant = "urd-phonetic"; };
};
defaultLanguage = languages.deutsch;
in {
@@ -23,23 +27,33 @@ in {
# man 7 xkeyboard-config
services.xserver = {
exportConfiguration = true; # link /usr/share/X11 properly
# exportConfiguration = true; # link /usr/share/X11 properly
xkb.layout = defaultLanguage.code;
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
# buckwalter: http://www.qamus.org/transliteration.htm
xkb.variant = defaultLanguage.variant;
xkb.options = commaSep xkbOptions;
xkb.dir = pkgs.symlinkJoin {
name = "x-keyboard-directory";
paths = [
"${pkgs.xkeyboard_config}/etc/X11/xkb"
(pkgs.linkFarm "custom-x-keyboards" (
lib.mapAttrsToList (name: value: {
name = "symbols/${name}";
path = value;
}) (lib.filterAttrs (_: value: builtins.typeOf value == "path") languages)
))
];
xkb.extraLayouts = {
"coptic" = {
languages = ["cop"];
description = "Coptic";
symbolsFile = ../lib/keyboards/coptic;
};
"gothic" = {
languages = ["got"];
description = "Gothic";
symbolsFile = ../lib/keyboards/gothic;
};
"avestan" = {
languages = ["ave"];
description = "Avestan";
symbolsFile = ../lib/keyboards/avestan;
};
"farsi-good" = {
languages = ["fas"];
description = "Farsi, but good";
symbolsFile = ../lib/keyboards/farsi;
};
};
};
@@ -57,7 +71,16 @@ in {
pkgs.writers.writeDashBin "kb-${language}" ''
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${toString (map (option: "-option ${option}") xkbOptions)}
'')
languages;
languages ++
lib.mapAttrsToList
(language: settings:
let
code = if settings ? "code" then settings.code else language;
variant = if settings ? "variant" then settings.variant else "";
in
pkgs.writers.writeDashBin "kb-niri-${language}" ''
${pkgs.gnused}/bin/sed -i 's/^\(\s*layout\) ".*"$/\1 "${defaultLanguage.code},${code}"/;s/^\(\s*variant\) ".*"$/\1 "${defaultLanguage.variant},${variant}"/' ~/.config/niri/config.kdl
'') languages;
# improve held key rate
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";

View File

@@ -36,7 +36,7 @@ in {
"Alt+j" = "add video-pan-y -0.05";
};
scripts = [
pkgs.mpvScripts.quality-menu
# pkgs.mpvScripts.quality-menu
niveumPackages.mpv-visualizer
];
};

15
configs/mycelium.nix Normal file
View File

@@ -0,0 +1,15 @@
{ lib, ... }:
let
myceliumAddresses = import ../lib/mycelium-network.nix;
in
{
services.mycelium = {
enable = true;
openFirewall = true;
};
networking.hosts = lib.mapAttrs' (name: address: {
name = address;
value = [ "${name}.m" ];
}) myceliumAddresses;
}

View File

@@ -1,6 +1,7 @@
{
pkgs,
niveumPackages,
config,
...
}: {
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
@@ -35,6 +36,23 @@
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
niveumPackages.vim
(niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors;
# colorscheme = "base16-gruvbox-light-medium";
})
# language servers
pkgs.pyright
pkgs.haskellPackages.haskell-language-server
pkgs.texlab
pkgs.nil
pkgs.nixfmt-rfc-style
pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server
pkgs.nodePackages.vscode-langservers-extracted
pkgs.lemminx
niveumPackages.jq-lsp
pkgs.dhall-lsp-server
];
}

View File

@@ -0,0 +1,46 @@
{ pkgs, niveumPackages, config, ... }: {
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
environment.shellAliases.vi = "nvim";
environment.shellAliases.vim = "nvim";
environment.shellAliases.view = "nvim -R";
home-manager.users.me = {
editorconfig = {
enable = true;
settings = {
"*" = {
charset = "utf-8";
end_of_line = "lf";
trim_trailing_whitespace = true;
insert_final_newline = true;
indent_style = "space";
indent_size = 2;
};
"*.py" = { indent_size = 4; };
Makefile = { indent_style = "tab"; };
"*.md" = { trim_trailing_whitespace = false; };
};
};
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors;
# colorscheme = "base16-gruvbox-dark-medium";
})
# language servers
pkgs.pyright
pkgs.haskellPackages.haskell-language-server
pkgs.texlab
pkgs.nil
pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server
pkgs.nodePackages.vscode-langservers-extracted
pkgs.lemminx
niveumPackages.jq-lsp
pkgs.dhall-lsp-server
];
}

View File

@@ -1,47 +1,7 @@
{
lib,
pkgs,
...
}: let
profile = name: custom:
lib.recursiveUpdate {
connection.id = name;
connection.type = "wifi";
connection.interface-name = "wlp3s0";
connection.permissions = "";
wifi.mac-address-blacklist = "";
wifi.ssid = name;
wifi.mode = "infrastructure";
ipv4.dns-search = "";
ipv4.method = "auto";
ipv6.addr-gen-mode = "stable-privacy";
ipv6.dns-search = "";
ipv6.method = "auto";
proxy = {};
}
custom;
eduroamProfile = {
connection.uuid = "eae9fee6-a7d2-4120-a609-440b457d6fcf";
wifi-security = {
group = "ccmp;tkip;";
key-mgmt = "wpa-eap";
pairwise = "ccmp;";
proto = "rsn;";
};
"802-1x" = {
altsubject-matches = "DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de;";
anonymous-identity = "anonymous@wlan.hu-berlin.de";
ca-cert = pkgs.fetchurl {
url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
};
eap = "ttls;";
identity = lib.strings.fileContents <secrets/eduroam/identity>;
password = lib.strings.fileContents <secrets/eduroam/password>;
phase2-auth = "pap";
};
};
in {
}: {
programs.nm-applet.enable = true;
networking.networkmanager = {

View File

@@ -1,118 +1,17 @@
{
pkgs,
config,
lib,
...
}: let
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.yt-dlp}/bin/yt-dlp -f ${ytdl-format} --add-metadata";
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
linkhandler = pkgs.writers.writeDash "linkhandler" ''
# Feed script a url or file location.
# If an image, it will view in sxiv,
# if a video or gif, it will view in mpv
# if a music file or pdf, it will download,
# otherwise it opens link in browser.
# If no url given. Opens browser. For using script as $BROWSER.
[ -z "$1" ] && { "$BROWSER"; exit; }
case "$1" in
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
setsid -f ${pkgs.mpv}/bin/mpv -quiet "$1" >/dev/null 2>&1 ;;
*png|*jpg|*jpe|*jpeg|*gif)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;
*mp3|*flac|*opus|*mp3?source*)
setsid -f tsp curl -LO "$1" >/dev/null 2>&1 ;;
*)
if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR" "$1"
else setsid -f "$BROWSER" "$1" >/dev/null 2>&1; fi ;;
esac
'';
newsboat-config = pkgs.writeText "config" ''
auto-reload no
reload-threads 8
prepopulate-query-feeds yes
# dont keep a search history
history-limit 0
datetime-format %F
text-width 85
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler} {}'"
browser ${linkhandler}
macro , open-in-browser
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler}
macro v set browser "${pkgs.util-linux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler}
macro y set browser "${youtube-download}" ; open-in-browser ; set browser ${linkhandler}
bind-key j down
bind-key k up
bind-key j next articlelist
bind-key k prev articlelist
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key G end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key x pb-delete
save-path ${newsboat-home}/saved/
highlight all "---.*---" yellow default
# highlight feedlist ".*(0/0))" default default
highlight article "^Title:.*" yellow default bold
highlight article "^Author:.*" yellow default
highlight article "^Flags:.*" red default
highlight article "\\[[0-9][0-9]*\\]" color66 default bold
highlight article "\\[image [0-9][0-9]*\\]" color109 default bold
highlight article "\\[embedded flash: [0-9][0-9]*\\]" color66 default bold
color listfocus blue default
color listfocus_unread blue default bold
color info red default bold
urls-source "miniflux"
miniflux-url "https://feed.kmein.de"
miniflux-login "kfm"
miniflux-password "${lib.strings.fileContents <secrets/miniflux/password>}"
'';
newsboat-sql = "${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db";
in {
}: {
environment.systemPackages = [
pkgs.newsboat
(pkgs.writers.writeDashBin "newsboat-unread-count" ''
if [ -f ${newsboat-home}/cache.db.lock ]; then
${pkgs.jq}/bin/jq -n '{state: "Info", text: "", icon: "rss"}'
else
${pkgs.jq}/bin/jq -n \
--argjson unread "$(${newsboat-sql} "SELECT COUNT(DISTINCT id) FROM rss_item WHERE unread=1")" \
--argjson watchLater "$(${newsboat-sql} "SELECT COUNT(DISTINCT id) FROM rss_item WHERE flags='e' AND deleted=0")" \
'{
state: (if $unread > 0 then "Good" else "Idle" end),
text: (if $unread > 0 then "\($unread)" else "[\($watchLater)]" end),
icon: "rss"
}'
fi
'')
(pkgs.writers.writeDashBin "mpv-watch-later" ''
${newsboat-sql} "SELECT url FROM rss_item WHERE flags='e' AND deleted=0 ORDER BY pubDate DESC" \
| ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv
(pkgs.writers.writeDashBin "miniflux-watch-later" ''
miniflux_api_token=$(cat ${config.age.secrets.miniflux-api-token.path})
random_feed_item=$(
${pkgs.curl}/bin/curl -u "$miniflux_api_token" --basic -s 'https://feed.kmein.de/v1/entries?starred=true&limit=0' \
| ${pkgs.jq}/bin/jq -r '.entries[].id' \
| ${pkgs.coreutils}/bin/shuf -n1
)
${pkgs.xdg-utils}/bin/xdg-open "https://feed.kmein.de/starred/entry/$random_feed_item"
'')
];
}

445
configs/niri.nix Normal file
View File

@@ -0,0 +1,445 @@
{
pkgs,
config,
niveumPackages,
lib,
...
}:
let
inherit (import ../lib) defaultApplications;
niriConfig =
let
klem = niveumPackages.klem.override {
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
config.scripts = {
"p.r paste" = pkgs.writers.writeDash "p.r" ''
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
| ${pkgs.coreutils}/bin/tail --lines=1 \
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
'';
"envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
'';
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
'';
"go.r shorten" = pkgs.writers.writeDash "go.r" ''
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
'';
"4d2.org paste" = pkgs.writers.writeDash "4d2-paste" ''
${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/
'';
"0x0.st shorten" = pkgs.writers.writeDash "0x0.st" ''
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
'';
"rot13" = pkgs.writers.writeDash "rot13" ''
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
'';
"ipa" = pkgs.writers.writeDash "ipa" ''
${niveumPackages.ipa}/bin/ipa
'';
"betacode" = pkgs.writers.writeDash "betacode" ''
${niveumPackages.betacode}/bin/betacode
'';
"curl" = pkgs.writers.writeDash "curl" ''
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
'';
ocr = pkgs.writers.writeDash "ocr" ''
${pkgs.tesseract4}/bin/tesseract -l eng+deu - stdout
'';
emojai = pkgs.writers.writeDash "emojai" ''
${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result
'';
"gpt-3.5" = pkgs.writers.writeDash "gpt" ''
${niveumPackages.gpt35}/bin/gpt
'';
gpt-4 = pkgs.writers.writeDash "gpt" ''
${niveumPackages.gpt4}/bin/gpt
'';
};
};
in
''
spawn-at-startup "${pkgs.ironbar}/bin/ironbar"
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
environment {
DISPLAY ":0"
ANKI_WAYLAND "1"
}
input {
warp-mouse-to-focus
focus-follows-mouse max-scroll-amount="0%"
keyboard {
repeat-rate 35
repeat-delay 350
track-layout "global"
xkb {
layout "de"
variant "T3"
options "ctrl:nocaps,compose:caps,grp:ctrls_toggle"
}
}
touchpad {
click-method "clickfinger"
tap
dwt
dwtp
}
}
prefer-no-csd
hotkey-overlay {
skip-at-startup
}
layout {
gaps 5
default-column-width {
proportion 0.5
}
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
focus-ring {
width 2
}
shadow {
// on
softness 30
spread 5
offset x=0 y=5
draw-behind-window true
color "#00000070"
// inactive-color "#00000054"
}
tab-indicator {
// off
hide-when-single-tab
place-within-column
gap 5
width 4
length total-proportion=1.0
position "right"
gaps-between-tabs 2
corner-radius 8
active-color "red"
inactive-color "gray"
urgent-color "blue"
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
// urgent-gradient from="#800" to="#a33" angle=45
}
border {
off
}
}
animations {
// off
workspace-switch {
spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
}
window-open {
duration-ms 150
curve "ease-out-expo"
}
window-close {
duration-ms 150
curve "ease-out-quad"
}
horizontal-view-movement {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
window-movement {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
window-resize {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
config-notification-open-close {
spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
}
screenshot-ui-open {
duration-ms 200
curve "ease-out-quad"
}
overview-open-close {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
}
window-rule {
geometry-corner-radius 0
clip-to-geometry true
}
window-rule {
match app-id="mpv"
open-floating true
}
window-rule {
match app-id="rofi"
open-floating true
}
window-rule {
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
default-floating-position x=32 y=32 relative-to="bottom-left"
}
window-rule {
match is-window-cast-target=true
border {
on
width 3
active-color "#f38ba8"
inactive-color "#7d0d2d"
}
}
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Return { spawn "${(defaultApplications pkgs).terminal}"; }
Mod+D { spawn "${pkgs.wofi}/bin/wofi" "--show" "run"; }
Mod+Shift+D { spawn "${niveumPackages.notemenu}/bin/notemenu"; }
Mod+T { spawn "${(defaultApplications pkgs).fileManager}"; }
Mod+Y { spawn "${(defaultApplications pkgs).browser}"; }
Mod+P { spawn "${niveumPackages.passmenu}/bin/passmenu"; }
Mod+U { spawn "${niveumPackages.unicodmenu}/bin/unicodmenu"; }
Mod+Shift+Z { toggle-window-floating; }
Mod+B { spawn "${pkgs.ironbar}/bin/ironbar" "bar" "bar-1337" "toggle-visible"; }
Mod+F12 { spawn "${klem}/bin/klem"; }
Mod+Shift+Q { close-window; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -i 5"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -d 5"; }
XF86AudioMute allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -t"; }
XF86AudioPause allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
XF86AudioPlay allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
XF86AudioNext allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl next"; }
XF86AudioPrev allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl previous"; }
XF86AudioStop allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl stop"; }
Print { spawn "flameshot gui"; }
Mod+Shift+W { spawn "swaylock"; }
Mod+Comma { consume-or-expel-window-left; }
Mod+Period { consume-or-expel-window-right; }
Mod+W { toggle-column-tabbed-display; }
Mod+A repeat=false { toggle-overview; }
Mod+F { maximize-column; }
Mod+C { center-column; }
Mod+Minus { set-column-width "-25%"; }
Mod+Plus { set-column-width "+25%"; }
Mod+Ctrl+0 { spawn "niri" "msg" "action" "switch-layout" "0"; }
Mod+Ctrl+1 { spawn "niri" "msg" "action" "switch-layout" "1"; }
Mod+Ctrl+2 { spawn "niri" "msg" "action" "switch-layout" "2"; }
Mod+Ctrl+3 { spawn "niri" "msg" "action" "switch-layout" "3"; }
Mod+Ctrl+4 { spawn "niri" "msg" "action" "switch-layout" "4"; }
Mod+Ctrl+5 { spawn "niri" "msg" "action" "switch-layout" "5"; }
Mod+Ctrl+6 { spawn "niri" "msg" "action" "switch-layout" "6"; }
Mod+Ctrl+7 { spawn "niri" "msg" "action" "switch-layout" "7"; }
Mod+Ctrl+8 { spawn "niri" "msg" "action" "switch-layout" "8"; }
Mod+Ctrl+9 { spawn "niri" "msg" "action" "switch-layout" "9"; }
Mod+H { focus-column-or-monitor-left; }
Mod+J { focus-window-or-workspace-down; }
Mod+K { focus-window-or-workspace-up; }
Mod+L { focus-column-or-monitor-right; }
Mod+Shift+H { move-column-left-or-to-monitor-left; }
Mod+Shift+J { move-window-down-or-to-workspace-down; }
Mod+Shift+K { move-window-up-or-to-workspace-up; }
Mod+Shift+L { move-column-right-or-to-monitor-right; }
Mod+Ctrl+H { focus-monitor-left; }
Mod+Ctrl+J { focus-monitor-down; }
Mod+Ctrl+K { focus-monitor-up; }
Mod+Ctrl+L { focus-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-workspace-down; }
Mod+Shift+Ctrl+K { move-column-to-workspace-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
Mod+Shift+Alt+Ctrl+H { move-workspace-to-monitor-left; }
Mod+Shift+Alt+Ctrl+J { move-workspace-down; }
Mod+Shift+Alt+Ctrl+K { move-workspace-up; }
Mod+Shift+Alt+Ctrl+L { move-workspace-to-monitor-right; }
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+0 { focus-workspace 10; }
Mod+Shift+1 { move-window-to-workspace "1"; }
Mod+Shift+2 { move-window-to-workspace "2"; }
Mod+Shift+3 { move-window-to-workspace "3"; }
Mod+Shift+4 { move-window-to-workspace "4"; }
Mod+Shift+5 { move-window-to-workspace "5"; }
Mod+Shift+6 { move-window-to-workspace "6"; }
Mod+Shift+7 { move-window-to-workspace "7"; }
Mod+Shift+8 { move-window-to-workspace "8"; }
Mod+Shift+9 { move-window-to-workspace "9"; }
Mod+Shift+0 { move-window-to-workspace "0"; }
}
'';
in
{
system.activationScripts.niriConfig = {
text = ''
cp ${pkgs.writeText "config.kdl" niriConfig} ${config.users.users.me.home}/.config/niri/config.kdl
chown ${config.users.users.me.name}:${config.users.users.me.group} ${config.users.users.me.home}/.config/niri/config.kdl
'';
};
programs.niri.enable = true;
services.displayManager.defaultSession = lib.mkForce "niri";
home-manager.users.me = {
xdg.configFile."ironbar/style.css".text = ''
* {
font-size: 8pt;
font-family: "Gentium Plus", "BlexMono Nerd Font";
}
box, menubar, button {
background-color: unset;
box-shadow: none;
background-image: none;
}
.clock, .upower, .volume {
font-weight: unset;
}
tooltip * {
font-family: "BlexMono Nerd Font";
font-size: 7pt;
}
'';
xdg.configFile."ironbar/config.json".source = (pkgs.formats.json { }).generate "ironbar.json" {
name = "bar-1337";
height = 12;
layer = "top";
position = "bottom";
start = [ ];
center = [
{
type = "tray";
icon_size = 8;
}
{ type = "clipboard"; }
{ type = "notifications"; }
];
end = [
{
type = "upower";
icon_size = 8;
format = "{percentage}%";
}
{
type = "label";
tooltip = "{{df -h --output=size,used,avail,pcent,target}}";
label = "\t{{5000:df -h / --output=avail | tail +2}}";
}
{
type = "label";
tooltip = "{{free -Lh --si | awk '{for(i=1;i<=NF;i++){printf \"%s%s\", $i, (i%2? OFS: ORS)} if(NF%2) printf ORS}'}}";
label = "󰍛\t{{500:free -h --si | awk 'NR==2{printf $3 \"\\n\"}'}}";
}
{
type = "label";
tooltip = "{{}}";
on_click_left = "pamixer -t";
on_scroll_up = "pamixer -i 1";
on_scroll_down = "pamixer -d 1";
label = "{{500:if $(pamixer --get-mute) = true; then echo ; else echo ; fi}}\t{{500:pamixer --get-volume}}%";
}
{
type = "label";
tooltip = "{{uptime}}";
label = "\t{{500:uptime | sed 's/.*load average: \\([^ ]*\\);.*/\\1/' | tr ' ' '\n'}}";
}
{
type = "label";
tooltip = "{{khal list today today -d astro-test-3 }}";
label = "";
}
{
type = "label";
tooltip = "{{curl wttr.in/?0 | ${pkgs.ansifilter}/bin/ansifilter}}";
label = "󰔏";
}
{
type = "label";
name = "cal";
tooltip = "{{cal}}";
label = "{{500:date +'<U+F017>\t%Y-%m-%d (%W %a) %H:%M'}}";
}
];
};
programs.alacritty.enable = true; # Super+T in the default setting (terminal)
programs.swaylock.enable = true; # Super+Alt+L in the default setting (screen locker)
services.swaync = {
enable = true;
settings = {
notification-window-width = 300;
control-center-width = 300;
widgets = [
"volume"
"mpris"
"title"
"dnd"
"notifications"
];
widget-config = {
title = {
text = "ϥ̄";
"clear-all-button" = true;
"button-text" = "";
};
dnd.text = "̄̄ϣ̄̄";
label.text = "";
};
};
};
services.swayidle.enable = true; # idle management daemon
home.packages = with pkgs; [
xdg-desktop-portal-gnome
swaybg
];
};
services.gnome.gnome-keyring.enable = true; # secret service
security.pam.services.swaylock = { };
}

View File

@@ -7,7 +7,7 @@
config.allowUnfree = true;
};
nix = {
package = pkgs.nixFlakes;
package = pkgs.nixVersions.stable;
extraOptions = "experimental-features = nix-command flakes";
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
};

View File

@@ -65,9 +65,7 @@ in {
environment.systemPackages = with pkgs; [
# INTERNET
aria2
firefox
tdesktop
gomuks
whois
dnsutils
# FILE MANAGERS
@@ -75,6 +73,7 @@ in {
pcmanfm
# MEDIA
ffmpeg
simplescreenrecorder
imagemagick
exiftool
nsxiv
@@ -87,23 +86,24 @@ in {
gcc
python3Packages.jsonschema # json validation
pup # html toolkit
htmlq
xsv # csv toolkit
xan # csv toolkit
magic-wormhole-rs # file transfer
man-pages
man-pages-posix
exfat # to mount windows drives
# HARDWARE TOOLS
gnome.gnome-disk-utility
gnome-disk-utility
arandr # xrandr for noobs
libnotify # for notify-send
xclip # clipboard CLI
wl-clipboard # clipboard CLI
xdragon # drag and drop
xorg.xkill # kill by clicking
portfolio # personal finance overview
audacity
calibre
electrum
inkscape
krita
niveumPackages.gimp
gthumb
astrolog
obsidian
@@ -111,8 +111,7 @@ in {
aichat # chat with llms
anki-bin # flashcards
jbofihe # lojbanic software
unstablePackages.zoom-us # video conferencing
unstablePackages.weechat
zoom-us # video conferencing
(pkgs.writers.writeDashBin "im" ''
weechat_password=$(${pkgs.pass}/bin/pass weechat)
exec ${unstablePackages.weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
@@ -122,14 +121,15 @@ in {
pdftk # pdf toolkit
mupdf
poppler_utils # pdf toolkit
okular # the word is nucular
kdePackages.okular # the word is nucular
xournalpp # for annotating pdfs
pdfpc # presenter console for pdf slides
niveumPackages.hc # print files as qr codes
# niveumPackages.hc # print files as qr codes
yt-dlp
espeak
rink # unit converter
niveumPackages.auc
niveumPackages.noise-waves
niveumPackages.cheat-sh
niveumPackages.polyglot
niveumPackages.qrpaste
@@ -144,11 +144,10 @@ in {
niveumPackages.pls
niveumPackages.mpv-tv
niveumPackages.mpv-iptv
jellyfin-media-player
# jellyfin-media-player
niveumPackages.devanagari
niveumPackages.betacode # ancient greek betacode to unicode converter
niveumPackages.meteo
niveumPackages.mahlzeit
niveumPackages.jq-lsp
niveumPackages.swallow # window swallowing
niveumPackages.literature-quote
@@ -162,7 +161,6 @@ in {
niveumPackages.emailmenu
niveumPackages.closest
niveumPackages.trans
niveumPackages.cro
(niveumPackages.mpv-radio.override {
di-fm-key-file = config.age.secrets.di-fm-key.path;
})
@@ -213,7 +211,7 @@ in {
#krebs
niveumPackages.dic
config.nur.repos.mic92.ircsink
pkgs.nur.repos.mic92.ircsink
(haskellPackages.ghcWithHoogle (hs: [
hs.text
@@ -233,18 +231,6 @@ in {
]))
# python3Packages.poetry
# language servers
pyright
haskell-language-server
texlab
nil
rust-analyzer
elmPackages.elm-language-server
nodePackages.typescript-language-server
lua-language-server
nodePackages.vscode-langservers-extracted
dhall-lsp-server
dhall-nix
dhall-bash
dhall-json
@@ -253,13 +239,8 @@ in {
html-tidy
nodePackages.csslint
nodePackages.jsonlint
nodePackages.prettier
nodePackages.typescript
nodePackages.eslint
nodePackages.yarn
deno # better node.js
nodejs
texlive.combined.scheme-full
# texlive.combined.scheme-full
latexrun
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
# haskellPackages.pandoc-citeproc
@@ -270,6 +251,7 @@ in {
# gnumeric
dia
pandoc
librsvg # pandoc depends on this to include SVG in documents
# niveumPackages.man-pandoc
typst
# proselint
@@ -281,6 +263,10 @@ in {
# nightly.rust
shellcheck
# photography
gphoto2
darktable
(pkgs.writers.writeDashBin "hass-cli" ''
HASS_SERVER=http://zaatar.r:8123 HASS_TOKEN="$(cat ${config.age.secrets.home-assistant-token.path})" exec ${pkgs.home-assistant-cli}/bin/hass-cli "$@"
'')

View File

@@ -1,23 +0,0 @@
{
pkgs,
config,
...
}: {
services.xserver.displayManager.sessionCommands = "${pkgs.seafile-client}/bin/seafile-applet &";
home-manager.users.me.xdg.configFile = {
"Seafile/Seafile Client.conf".source = (pkgs.formats.ini {}).generate "Seafile Client.conf" {
Behavior = {
hideDockIcon = false;
hideMainWindowWhenStarted = true;
};
Settings = {
computerName = config.networking.hostName;
lastShiburl = "https://box.hu-berlin.de";
};
UsedServerAddresses.main = "https://box.hu-berlin.de";
};
};
environment.systemPackages = [pkgs.seafile-client];
}

View File

@@ -1,6 +1,4 @@
{pkgs, ...}: {
sound.enable = true;
services.pipewire = {
enable = true;
alsa = {

View File

@@ -3,7 +3,6 @@
externalNetwork = import ../lib/external-network.nix;
in {
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
programs.ssh.startAgent = true;
home-manager.users.me = {

View File

@@ -17,5 +17,7 @@ in {
};
};
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys;
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
];
}

View File

@@ -18,6 +18,15 @@ in {
stylix.enable = true;
stylix.image = generatedWallpaper;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-light.yaml";
stylix.cursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
size = 12;
};
# environment.etc."stylix/wallpaper.png".source = generatedWallpaper;
# stylix.polarity = "either";
@@ -43,18 +52,18 @@ in {
stylix.fonts = {
serif = {
package = pkgs.noto-fonts;
name = "Noto Serif";
package = pkgs.gentium;
name = "Gentium Plus";
};
sansSerif = {
package = pkgs.noto-fonts;
name = "Noto Sans";
package = pkgs.gentium;
name = "Gentium Plus";
};
monospace = {
package = pkgs.noto-fonts;
name = "Noto Sans Mono";
package = pkgs.nerd-fonts.blex-mono;
name = "BlexMono Nerd Font";
};
emoji = {

View File

@@ -1,36 +0,0 @@
{
pkgs,
lib,
config,
...
}: let
celan = pkgs.fetchzip {
url = "http://c.krebsco.de/celan.tar.gz";
sha256 = "sha256-nA+EwAH2vkeolsy9AoPLEMt1uGKDZe/aPrS95CZvuus=";
};
in {
niveum.telegramBots.celan = {
enable = true;
time = "08:00";
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@PaulCelan"];
command = toString (pkgs.writers.writeDash "random-celan" ''
cd ${celan}
poem="$(${pkgs.findutils}/bin/find . -type f | ${pkgs.coreutils}/bin/shuf -n1)"
source="$(${pkgs.coreutils}/bin/dirname "$poem" | ${pkgs.gnused}/bin/sed 's#^\./##;s/[-_]/ /g;s!/! !g;s/0\([0-9]\+\)/\1/g')"
cat "$poem"
echo
printf "Aus: %s\n" "$source"
'');
};
systemd.timers.telegram-bot-celan.timerConfig.RandomizedDelaySec = "10h";
niveum.passport.services = [
{
title = "Paul Celan Bot";
description = "sends a random poem by Paul Celan to Telegram.";
link = "https://t.me/PaulCelan";
}
];
}

View File

@@ -1,27 +0,0 @@
{
pkgs,
config,
inputs,
lib,
...
}: let
hesychius = inputs.scripts.outPath + "/hesychius/hesychius.txt";
in {
niveum.telegramBots.hesychius = {
enable = true;
time = "08:00";
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["@HesychiosAlexandreus"];
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
};
systemd.timers.telegram-bot-hesychius.timerConfig.RandomizedDelaySec = "10h";
niveum.passport.services = [
{
title = "Hesychius of Alexandria Bot";
description = "sends a random word from Hesychius of Alexandria's lexicon to Telegram.";
link = "https://t.me/HesychiosAlexandreus";
}
];
}

View File

@@ -1,23 +0,0 @@
{
pkgs,
config,
lib,
niveumPackages,
...
}: {
niveum.telegramBots.quotebot = {
enable = true;
time = "08/6:00";
tokenFile = config.age.secrets.telegram-token-kmein.path;
chatIds = ["-1001760262519"];
command = "${niveumPackages.literature-quote}/bin/literature-quote";
parseMode = "Markdown";
};
niveum.passport.services = [
{
title = "Literature quote bot";
description = "sends me and my friends three <a href=\"https://logotheca.xn--kiern-0qa.de/\">logotheca</a> quotes a day.";
}
];
}

View File

@@ -1,29 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
niveum.telegramBots.tlg-wotd = {
enable = true;
time = "9:30";
chatIds = ["@tlgwotd"];
tokenFile = config.age.secrets.telegram-token-kmein.path;
command = toString (pkgs.writers.writeDash "tlg-wotd" ''
${pkgs.curl}/bin/curl -sSL http://stephanus.tlg.uci.edu/Iris/Wotd \
| ${pkgs.recode}/bin/recode html..utf8 \
| ${pkgs.jq}/bin/jq -r '
"*\(.word)* '\'''\(.definition | sub("<.*>"; "") | rtrimstr(" "))'\'''\n\nFirst occurrence: \(.firstOccurrence)\nNumber of occurrences: \(.totalOccurrences)"
'
'');
parseMode = "Markdown";
};
niveum.passport.services = [
{
title = "Thesaurus Linguae Graecae Word of the Day";
description = "sends <a href=\"https://stephanus.tlg.uci.edu/\">TLG</a>'s word of the day to Telegram.";
link = "https://t.me/tlgwotd";
}
];
}

View File

@@ -2,11 +2,10 @@
config,
pkgs,
...
}: {
home-manager.users.me.home.file.".zshrc".text = ''
# nothing to see here
'';
}: let
promptColours.success = "cyan";
promptColours.failure = "red";
in {
environment.systemPackages = [pkgs.atuin];
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
auto_sync = true
@@ -58,7 +57,7 @@
fpath=(${zsh-completions}/src $fpath)
'';
promptInit = with config.niveum; ''
promptInit = ''
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes true

906
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,22 +3,25 @@
inputs = {
agenix.url = "github:ryantm/agenix";
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
coptic-dictionary.url = "github:kmein/coptic-dictionary";
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.url = "github:nix-community/home-manager/release-25.05";
menstruation-backend.url = "github:kmein/menstruation.rs";
menstruation-telegram.url = "github:kmein/menstruation-telegram";
centerpiece.url = "github:friedow/centerpiece";
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
nixinate.url = "github:matthewcroughan/nixinate";
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nur.url = "github:nix-community/NUR";
recht.url = "github:kmein/recht";
retiolum.url = "git+https://git.thalheim.io/Mic92/retiolum";
retiolum.url = "github:krebs/retiolum";
rust-overlay.url = "github:oxalica/rust-overlay";
scripts.url = "github:kmein/scripts";
stylix.url = "github:danth/stylix/release-24.05";
stockholm.url = "github:krebs/stockholm";
stylix.url = "github:danth/stylix/release-25.05";
telebots.url = "github:kmein/telebots";
tinc-graph.url = "github:kmein/tinc-graph";
voidrice.url = "github:Lukesmithxyz/voidrice";
@@ -69,6 +72,7 @@
nixinate,
flake-utils,
nix-on-droid,
centerpiece,
stylix,
...
}:
@@ -109,6 +113,7 @@
tabula = "root@tabula";
kabsa = "root@kabsa";
fatteh = "root@fatteh";
kibbeh = "root@kibbeh";
};
in
lib.attrsets.nameValuePair "deploy-${hostname}" {
@@ -205,8 +210,10 @@
inputs.self.nixosModules.passport
inputs.self.nixosModules.panoptikon
inputs.self.nixosModules.htgen
inputs.stockholm.nixosModules.reaktor2
retiolum.nixosModules.retiolum
nur.nixosModules.nur
nur.modules.nixos.default
{ nixpkgs.overlays = [ inputs.stockholm.overlays.default ]; }
{
_module.args.nixinate = {
host = "ful";
@@ -223,7 +230,15 @@
specialArgs = niveumSpecialArgs system;
modules = [
systems/zaatar/configuration.nix
inputs.self.nixosModules.moodle-dl
agenix.nixosModules.default
retiolum.nixosModules.retiolum
];
};
kibbeh = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = niveumSpecialArgs system;
modules = [
systems/kibbeh/configuration.nix
agenix.nixosModules.default
retiolum.nixosModules.retiolum
];
@@ -239,7 +254,7 @@
inputs.self.nixosModules.passport
agenix.nixosModules.default
retiolum.nixosModules.retiolum
nur.nixosModules.nur
nur.modules.nixos.default
];
};
tahina = nixpkgs.lib.nixosSystem rec {
@@ -268,7 +283,7 @@
agenix.nixosModules.default
retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager
nur.nixosModules.nur
nur.modules.nixos.default
stylix.nixosModules.stylix
];
};
@@ -280,7 +295,7 @@
agenix.nixosModules.default
retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager
nur.nixosModules.nur
nur.modules.nixos.default
stylix.nixosModules.stylix
];
};
@@ -292,7 +307,7 @@
agenix.nixosModules.default
retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager
nur.nixosModules.nur
nur.modules.nixos.default
stylix.nixosModules.stylix
];
};
@@ -302,10 +317,10 @@
pkgs = import nixpkgs {
inherit system;
overlays = [
nur.overlay
nur.overlays.default
(self: super: {
mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];};
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi --dmenu "$@"'';
})
];
};
@@ -322,6 +337,7 @@
packages = rec {
auc = pkgs.callPackage packages/auc.nix {};
betacode = pkgs.callPackage packages/betacode.nix {};
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
brassica = pkgs.callPackage packages/brassica.nix {};
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
closest = pkgs.callPackage packages/closest {};
@@ -368,6 +384,7 @@
manual-sort = pkgs.callPackage packages/manual-sort.nix {};
menu-calc = pkgs.callPackage packages/menu-calc.nix {};
meteo = pkgs.callPackage packages/meteo.nix {};
noise-waves = pkgs.callPackage packages/noise-waves.nix {};
mpv-radio = pkgs.callPackage packages/mpv-radio.nix {di-fm-key-file = "/dev/null";};
mpv-tuner = pkgs.callPackage packages/mpv-tuner.nix {di-fm-key-file = "/dev/null";};
mpv-tv = pkgs.callPackage packages/mpv-tv.nix {};
@@ -380,13 +397,17 @@
opustags = pkgs.callPackage packages/opustags.nix {};
pls = pkgs.callPackage packages/pls.nix {};
polyglot = pkgs.callPackage packages/polyglot.nix {};
q = pkgs.callPackage packages/q.nix {};
qrpaste = pkgs.callPackage packages/qrpaste.nix {};
random-zeno = pkgs.callPackage packages/random-zeno.nix {};
rfc = pkgs.callPackage packages/rfc.nix {};
gimp = pkgs.callPackage packages/gimp.nix {};
scanned = pkgs.callPackage packages/scanned.nix {};
swallow = pkgs.callPackage packages/swallow.nix {};
text2pdf = pkgs.callPackage packages/text2pdf.nix {};
timer = pkgs.callPackage packages/timer.nix {};
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
passmenu = pkgs.callPackage packages/passmenu.nix {};
trans = pkgs.callPackage packages/trans.nix {};
ttspaste = pkgs.callPackage packages/ttspaste.nix {};
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
@@ -395,6 +416,7 @@
vg = pkgs.callPackage packages/vg.nix {};
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
radio-news = pkgs.callPackage packages/radio-news.nix {};
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {};
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {};
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {};

View File

@@ -45,11 +45,11 @@
theme = pkgs: {
gtk = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
package = pkgs.gnome-themes-extra;
};
icon = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
package = pkgs.adwaita-icon-theme;
};
cursor = {
name = "capitaine-cursors-white";

View File

@@ -13,6 +13,9 @@ include "%L"
<Multi_key> <E> <E> : "ɛ" U025B
<Multi_key> <O> <O> : "ɔ" U0254
<Multi_key> <s> <h> : "ʃ" U0283
<Multi_key> <g> <h> : "ɣ" U0283
<Multi_key> <b> <h> : "β" U0283
<Multi_key> <p> <h> : "ɸ" U0283
<Multi_key> <z> <h> : "ʒ" U0292
<Multi_key> <e> <i> : "ɪ" U026A
<Multi_key> <e> <u> : "ʊ" U028A

114
lib/keyboards/farsi Normal file
View File

@@ -0,0 +1,114 @@
// https://github.com/gpuminingir/Farsi-Phonetic-Keyboard-Linux
// by @gpuminingir
partial alphanumeric_keys
xkb_symbols "qwerty" {
// Classic Finnish keyboard layout without dead keys and {[]} on asdf + AltG
name[Group1]="Persian (QWERTY)";
include "ir(pesq_part_basic)"
include "ir(pesq_part_ext)"
include "ir(pesq_part_keypad)"
include "nbsp(zwnj2nb3nnb4)"
include "level3(ralt_switch)"
};
hidden partial alphanumeric_keys
xkb_symbols "pesq_part_basic" {
// Persian digits
key <AE01> { [ Arabic_1, exclam, exclam ] }; // ١ ! !
key <AE02> { [ Arabic_2, at, at ] }; // ٢ @ @
key <AE03> { [ Arabic_3, numbersign, numbersign ] }; // ٣ # #
key <AE04> { [ Farsi_4, dollar, dollar ] }; // ۴ $ $
key <AE05> { [ Farsi_5, percent, percent ] }; // ۵ % %
key <AE06> { [ Farsi_6, asciicircum, asciicircum ] }; // ۶ ^ ^
key <AE07> { [ Arabic_7, ampersand, ampersand ] }; // ٧ & &
key <AE08> { [ Arabic_8, KP_Multiply, KP_Multiply ] }; // ٨ * *
key <AE09> { [ Arabic_9, Armenian_parenright, Armenian_parenright, Armenian_parenleft ] }; // ٩ ) ) (
key <AE10> { [ Farsi_0, Armenian_parenleft, Armenian_parenleft ] }; // ۰ ( (
key <AE11> { [ underbar, KP_Subtract, KP_Subtract ] }; // _
key <AE12> { [ KP_Equal, KP_Add, KP_Add ] }; // = + +
// Persian letters and symbols
key <AD01> { [ Arabic_qaf, Arabic_ghain ] }; // ق غ
key <AD02> { [ Arabic_sheen ] }; // ش
key <AD03> { [ Arabic_ain ] }; // ع
key <AD04> { [ Arabic_ra ] }; // ر
key <AD05> { [ Arabic_teh, Arabic_tah ] }; // ت ط
key <AD06> { [ Farsi_yeh ] }; // ى
key <AD07> { [ Arabic_waw ] }; // و
key <AD08> { [ Farsi_yeh ] }; // ى
key <AD09> { [ Arabic_waw ] }; // و
key <AD10> { [ Arabic_peh ] }; // پ
key <AD11> { [ bracketright, braceleft ] }; // ] } {
key <AD12> { [ bracketleft, braceright ] }; // [ { }
key <AC01> { [ Arabic_alef, Arabic_maddaonalef, Arabic_maddaonalef ] }; // ا آ آ
key <AC02> { [ Arabic_seen, Arabic_sad, Arabic_sheen, Arabic_sheen ] }; // س ص ش
key <AC03> { [ Arabic_dal, Arabic_thal ] }; // د ذ ذ
key <AC04> { [ Arabic_feh ] }; // ف
key <AC05> { [ Arabic_gaf, Arabic_ghain ] }; // گ
key <AC06> { [ Arabic_heh, Arabic_hah ] }; // ە ح ه
key <AC07> { [ Arabic_jeem, Arabic_jeh ] }; // ج ژ ژ
key <AC08> { [ Arabic_keheh ] }; // ک
key <AC09> { [ Arabic_lam ] }; // ل
key <AC10> { [ Arabic_semicolon, colon ] }; // ؛ : ։
key <AC11> { [ Arabic_comma, quotedbl, quotedbl ] }; // ، ” ”
key <AB01> { [ Arabic_zain, Arabic_dad, Arabic_zah, Arabic_zah ] }; // ض ض ز خ
key <AB02> { [ Arabic_khah, Arabic_zah ] }; // ظ خ
key <AB03> { [ Arabic_theh, Arabic_tcheh ] }; // چ ث
key <AB04> { [ Arabic_hamza, Arabic_waw ] }; // و
key <AB05> { [ Arabic_beh ] }; // ب
key <AB06> { [ Arabic_noon ] }; // ن
key <AB07> { [ Arabic_meem ] }; // م
key <AB08> { [ Arabic_comma, rightcaret, leftcaret ] }; // , > <
key <AB09> { [ period, leftcaret, rightcaret ] }; // . < >
key <AB10> { [ slash, Arabic_question_mark, question ] }; // / ?
key <AE11> { [ minus, underscore ] };
key <AE12> { [ equal, plus, 0x1002212 ] };
key <BKSL> { [ backslash, bar, 0x1002010 ] };
key <TLDE> { [ U02DC, UFDFC, UFDF2 ] }; // ˜ ﷼ ﷲ
};
hidden partial alphanumeric_keys
xkb_symbols "pesq_part_ext" {
// Persian and ASCII digits
key <AE01> { [ Farsi_1, exclam, grave, 1 ] };
key <AE02> { [ Farsi_2, 0x100066c, at, 2 ] };
key <AE03> { [ Farsi_3, 0x100066b, numbersign, 3 ] };
key <AE04> { [ Farsi_4, 0x100fdfc, dollar, 4 ] };
key <AE05> { [ Farsi_5, 0x100066a, percent, 5 ] };
key <AE06> { [ Farsi_6, multiply, asciicircum, 6 ] };
key <AE07> { [ Farsi_7, Arabic_comma, ampersand, 7 ] };
key <AE08> { [ Farsi_8, asterisk, enfilledcircbullet, 8 ] };
key <AE09> { [ Farsi_9, parenright, 0x100200e, 9 ] };
key <AE10> { [ Farsi_0, parenleft, 0x100200f, 0 ] };
};
hidden partial alphanumeric_keys
xkb_symbols "pesq_part_keypad" {
// Persian digits and Mathematical operators
key <KPDV> { [ division, XF86_Ungrab ] };
key <KPMU> { [ multiply, XF86_ClearGrab ] };
key <KPSU> { [ 0x1002212, XF86_Prev_VMode ] };
key <KPAD> { [ plus, XF86_Next_VMode ] };
key <KPEN> { [ KP_Enter ] };
key <KPEQ> { [ equal ] };
key <KP7> { [ KP_Home, Farsi_7 ] };
key <KP8> { [ KP_Up, Farsi_8 ] };
key <KP9> { [ KP_Prior, Farsi_9 ] };
key <KP4> { [ KP_Left, Farsi_4 ] };
key <KP5> { [ KP_Begin, Farsi_5 ] };
key <KP6> { [ KP_Right, Farsi_6 ] };
key <KP1> { [ KP_End, Farsi_1 ] };
key <KP2> { [ KP_Down, Farsi_2 ] };
key <KP3> { [ KP_Next, Farsi_3 ] };
key <KP0> { [ KP_Insert, Farsi_0 ] };
key <KPDL> { [ KP_Delete, 0x100066b ] };
};

8
lib/mycelium-network.nix Normal file
View File

@@ -0,0 +1,8 @@
{
zaatar = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
fatteh = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
ful = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
kabsa = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
makanek = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
manakish = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
}

View File

@@ -2,7 +2,6 @@
pkgs,
lib,
niveumPackages,
config,
...
}: {
# watcher scripts
@@ -37,7 +36,7 @@
then "2"
else "3"
}s/^/${messagePrefix}/p" \
| ${config.nur.repos.mic92.ircsink}/bin/ircsink \
| ${pkgs.nur.repos.mic92.ircsink}/bin/ircsink \
--nick ${nick} \
--server ${server} \
--target ${target}

View File

@@ -185,6 +185,12 @@ in
logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png";
tags = [tags.turkish];
}
{
station = "Ancient FM";
stream = "https://mediaserv73.live-streams.nl:18058/stream";
desc = " Music of the Mediæval and Renaissance";
tags = [tags.trad];
}
{
stream = "http://rb-stream.de:8000/rrb_128.mp3";
station = "Radio Golos Berlina";
@@ -1548,6 +1554,11 @@ in
desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen.";
tags = [tags.text];
}
{
station = "Kontrafunk";
stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3";
tags = [tags.text];
}
{
logo = "http://www.beatlesradio.com/content/images/thumbs/0000587.gif";
station = "Beatles Radio";
@@ -2014,6 +2025,10 @@ in
stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3";
station = "Hitradio FFH";
}
{ # Lex Fridman's favourite
stream = "av://lavfi:anoisesrc=color=brown";
station = "Brownian noise";
}
]
++ map (name: {
stream = "https://${name}.stream.publicradio.org/${name}.aac";

175
lib/style.css Normal file
View File

@@ -0,0 +1,175 @@
* {
font-size: 14px;
border-radius: 5px;
}
window#waybar {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, monospace;
background-color: transparent;
border-bottom: 0px;
color: #ebdbb2;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
window#waybar.empty #window {
background-color: transparent;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
.modules-right {
margin: 10px 10px 0 0;
}
.modules-center {
margin: 10px 0 0 0;
}
.modules-left {
margin: 10px 0 0 10px;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
/* box-shadow: inset 0 -3px transparent; */
border: none;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
/*
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ebdbb2;
} */
#workspaces {
background-color: #282828;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ebdbb2;
border-radius: 0;
}
#workspaces button:first-child {
border-radius: 5px 0 0 5px;
}
#workspaces button:last-child {
border-radius: 0 5px 5px 0;
}
#workspaces button:hover {
color: #d79921;
}
#workspaces button.focused {
background-color: #665c54;
/* box-shadow: inset 0 -3px #ffffff; */
}
#workspaces button.urgent {
background-color: #b16286;
}
#idle_inhibitor,
#cava,
#scratchpad,
#mode,
#window,
#clock,
#battery,
#backlight,
#wireplumber,
#tray,
#mpris,
#load {
padding: 0 10px;
background-color: #282828;
color: #ebdbb2;
}
#mode {
background-color: #689d6a;
color: #282828;
/* box-shadow: inset 0 -3px #ffffff; */
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#cava {
padding: 0 5px;
}
#battery.charging, #battery.plugged {
background-color: #98971a;
color: #282828;
}
@keyframes blink {
to {
background-color: #282828;
color: #ebdbb2;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #cc241d;
color: #ebdbb2;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#wireplumber.muted {
background-color: #458588;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#mpris.playing {
background-color: #d79921;
color: #282828;
}
#tray menu {
font-family: sans-serif;
}
#scratchpad.empty {
background: transparent;
}

View File

@@ -88,10 +88,10 @@ local lsp_flags = {
local language_servers = {
clangd = {},
pyright = {}, -- pyright
tsserver = {}, -- typescript-language-server
-- tsserver = {}, -- typescript-language-server
cssls = {},
elmls = {}, -- elm-language-server
-- denols = {}, -- deno built in
denols = {}, -- deno built in
bashls = {}, -- bash-language-server
lua_ls = {
Lua = {
@@ -112,12 +112,19 @@ local language_servers = {
hls = {}, -- haskell-language-server
html = {}, -- vscode-langservers-extracted
jsonls = {}, -- vscode-langservers-extracted
nil_ls = {}, -- github:oxalica/nil
lemminx = {}, -- lemminx (for xml)
nil_ls = {
['nil'] = {
formatting = {
command = { "nixfmt" },
},
},
}, -- github:oxalica/nil
dhall_lsp_server = {}, -- dhall-lsp-server
-- rnix = {}, -- rnix-lsp
jqls = {}, -- jq-lsp
rust_analyzer = { ["rust-analyzer"] = {} },
eslint = {},
-- eslint = {},
-- volar? vls?
texlab = {
texlab = {

View File

@@ -3,8 +3,6 @@ vnoremap a= :Tabularize /=<CR>
vnoremap a; :Tabularize /::<CR>
vnoremap a- :Tabularize /-><CR>
colorscheme dim
" noremap <Leader>h :<C-u>split<CR>
" noremap <Leader>v :<C-u>vsplit<CR>
noremap <Leader>gs :Git<CR>
@@ -42,8 +40,6 @@ let g:netrw_banner=0
let g:netrw_browse_split=4
let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
let g:netrw_winsize = 25
call matchadd('colorcolumn', '\%101v', 100)

View File

@@ -5,48 +5,117 @@
...
}:
with lib; let
cfg = config.niveum.telegramBots;
cfg = config.niveum.bots;
botService = name: bot:
nameValuePair "telegram-bot-${name}" {
nameValuePair "bot-${name}" {
enable = bot.enable;
startAt = bot.time;
serviceConfig = {
Type = "oneshot";
LoadCredential = "token:${bot.tokenFile}";
LoadCredential = lib.optionals (bot.telegram.enable) [
"telegram-token:${bot.telegram.tokenFile}"
] ++ lib.optionals (bot.mastodon.enable) [
"mastodon-token:${bot.mastodon.tokenFile}"
] ++ lib.optionals (bot.matrix.enable) [
"matrix-token:${bot.matrix.tokenFile}"
];
};
wants = ["network-online.target"];
script = ''
export TOKEN="$(cat "$CREDENTIALS_DIRECTORY/token")"
QUOTE=$(${bot.command})
if [ -n "$QUOTE" ]; then
echo $QUOTE >&2
${strings.concatStringsSep "\n" (map (chatId: ''
${pkgs.curl}/bin/curl -X POST "https://api.telegram.org/bot''${TOKEN}/sendMessage" \
-d chat_id="${chatId}" \
-d text="$QUOTE" ${
lib.strings.optionalString (bot.parseMode != null)
"-d parse_mode=${bot.parseMode}"
} | ${pkgs.jq}/bin/jq -e .ok
'')
bot.chatIds)}
${lib.optionalString (bot.matrix.enable) ''
export MATRIX_TOKEN="$(cat "$CREDENTIALS_DIRECTORY/matrix-token")"
export JSON_PAYLOAD=$(${pkgs.jq}/bin/jq -n --arg msgtype "m.text" --arg body "$QUOTE" '{msgtype: $msgtype, body: $body}')
${strings.concatStringsSep "\n" (map (chatId: ''
${pkgs.curl}/bin/curl -X POST "https://${bot.matrix.homeserver}/_matrix/client/r0/rooms/${chatId}/send/m.room.message" \
-d "$JSON_PAYLOAD" \
-H "Authorization: Bearer $MATRIX_TOKEN" \
-H "Content-Type: application/json"
'') bot.matrix.chatIds)}
''}
${lib.optionalString (bot.mastodon.enable) ''
export MASTODON_TOKEN="$(cat "$CREDENTIALS_DIRECTORY/mastodon-token")"
${pkgs.curl}/bin/curl -X POST "https://${bot.mastodon.homeserver}/api/v1/statuses" \
-H "Authorization: Bearer $MASTODON_TOKEN" \
-d status="$QUOTE" \
-d "language=${bot.mastodon.language}" \
-d "visibility=public"
''}
${lib.optionalString (bot.telegram.enable) ''
export TELEGRAM_TOKEN="$(cat "$CREDENTIALS_DIRECTORY/telegram-token")"
${strings.concatStringsSep "\n" (map (chatId: ''
${pkgs.curl}/bin/curl -X POST "https://api.telegram.org/bot''${TELEGRAM_TOKEN}/sendMessage" \
-d chat_id="${chatId}" \
-d text="$QUOTE" ${
lib.strings.optionalString (bot.telegram.parseMode != null)
"-d parse_mode=${bot.telegram.parseMode}"
} | ${pkgs.jq}/bin/jq -e .ok
'')
bot.telegram.chatIds)}
''}
fi
'';
};
in {
options.niveum.telegramBots = mkOption {
options.niveum.bots = mkOption {
type = types.attrsOf (types.submodule {
options = {
enable = mkEnableOption "Telegram bot";
enable = mkEnableOption "Mastodon and Telegram bot";
time = mkOption {type = types.str;};
tokenFile = mkOption {type = types.path;};
chatIds = mkOption {
type = types.listOf (types.strMatching "-?[0-9]+|@[A-Za-z0-9]+");
};
command = mkOption {type = types.str;};
parseMode = mkOption {
type = types.nullOr (types.enum ["HTML" "Markdown"]);
default = null;
matrix = mkOption {
default = {};
type = types.submodule {
options = {
enable = mkEnableOption "Posting to Matrix";
tokenFile = mkOption {type = types.path;};
homeserver = mkOption {
type = types.str;
};
chatIds = mkOption {
type = types.listOf types.str;
};
};
};
};
mastodon = mkOption {
default = {};
type = types.submodule {
options = {
enable = mkEnableOption "Posting to Mastodon";
language = mkOption {
type = types.str;
default = "en";
};
tokenFile = mkOption {type = types.path;};
homeserver = mkOption {
type = types.str;
default = "social.krebsco.de";
};
};
};
};
telegram = mkOption {
default = {};
type = types.submodule {
options = {
enable = mkEnableOption "Posting to Telegram";
tokenFile = mkOption {type = types.path;};
chatIds = mkOption {
type = types.listOf (types.strMatching "-?[0-9]+|@[A-Za-z0-9]+");
};
parseMode = mkOption {
type = types.nullOr (types.enum ["HTML" "Markdown"]);
default = null;
};
};
};
};
};
});

39
packages/brainmelter.nix Executable file
View File

@@ -0,0 +1,39 @@
{ writers, flite, netcat, gnused, ... }:
writers.writeDashBin "brainmelter" ''
SERVER="brockman.news"
PORT=6667
NICK="irccat"
USER="irccat"
CHANNEL="#all"
# Open connection to IRC server using a FIFO and netcat
FIFO=$(mktemp -u)
mkfifo "$FIFO"
trap "rm -f $FIFO" EXIT
# Send IRC commands
{
echo "NICK $NICK"
echo "USER $USER 0 * :$USER"
sleep 5
echo "JOIN $CHANNEL"
while true; do
sleep 30
echo "PING :keepalive"
done
} > "$FIFO" &
# Read from server and write to stdout
${netcat}/bin/nc "$SERVER" "$PORT" < "$FIFO" | while IFS= read -r line; do
voice="$(echo -e "awb\nkal\nrms\nslt" | shuf -n1)"
echo "$line" \
| ${gnused}/bin/sed -n 's/.*go.brockman.news\/\S\+ //p' \
| tee /dev/stderr \
| ${flite}/bin/flite -voice "$voice"
# Respond to PINGs to avoid timeout
if [ "$line" = PING* ]; then
server_ping=$(echo "$line" | cut -d':' -f2)
echo "PONG :$server_ping" > "$FIFO"
fi
done
''

20
packages/gimp.nix Normal file
View File

@@ -0,0 +1,20 @@
{ gimp, fetchurl, runCommand, symlinkJoin, writers }:
let
bring-out-the-gimp = fetchurl {
url = "https://c.krebsco.de/bring-out-the-gimp.png";
hash = "sha256-k42M5j58OzbcMJwx9CeM2mD2VsVwPKHwJvU55+Rkowc=";
};
data-dir-prefix = "share/gimp/2.0";
data-dir = symlinkJoin {
name = "gimp";
paths = [
(runCommand "splash" {} ''
mkdir -p $out/${data-dir-prefix}/images
install ${bring-out-the-gimp} $out/share/gimp/2.0/images/gimp-splash.png
'')
gimp
];
};
in writers.writeDashBin "gimp" ''
exec env GIMP2_DATADIR=${data-dir}/${data-dir-prefix} ${gimp}/bin/gimp "$@"
''

View File

@@ -1,7 +1,7 @@
{
writers,
fetchurl,
xsv,
xan,
}: let
database = fetchurl {
url = "http://c.krebsco.de/greek.csv";
@@ -9,5 +9,5 @@
};
in
writers.writeDashBin "heuretes" ''
${xsv}/bin/xsv search -s simple "^$*$" ${database} | ${xsv}/bin/xsv table
${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table
''

View File

@@ -42,14 +42,14 @@ in
pkgs.writers.writeDashBin "klem" ''
set -efu
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \
${pkgs.wl-clipboard}/bin/wl-paste \
| case $(echo "${
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
}" | ${cfg.dmenu}) in
${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
*) ${pkgs.coreutils}/bin/cat ;;
esac \
| ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in
| ${pkgs.wl-clipboard}/bin/wl-copy
${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
''

View File

@@ -1,19 +1,38 @@
{
writers,
lib,
xsv,
xan,
curl,
gnused,
}:
writers.writeDashBin "literature-quote" ''
PATH=$PATH:${lib.makeBinPath [xsv curl gnused]}
PATH=$PATH:${lib.makeBinPath [xan curl gnused]}
ROW=$(curl -Ls http://kmein.github.io/logotheca/quotes.csv | shuf -n1)
(
printf '%s\n\n %s: _%s_, %s\n' \
"$(echo "$ROW" | xsv select 4)" \
"$(echo "$ROW" | xsv select 1)" \
"$(echo "$ROW" | xsv select 2)" \
"$(echo "$ROW" | xsv select 3 | tr : ,)"
) | sed 's/ | /\n/g;s/ || /\n\n/g;s/"\(.*\)"/\1/'
QUOTE="$(echo "$ROW" | xan select 3)"
echo "$QUOTE" | sed 's/^"//;s/"$//;s/\s*||\s*/\n\n/g;s/\s*|\s*/\n/g'
echo
AUTHOR="$(echo "$ROW" | xan select 0)"
# Prepare the output
ATTRIBUTION="($AUTHOR"
SOURCE="$(echo "$ROW" | xan select 1)"
# Add SOURCE if it's not empty
if [ -n "$SOURCE" ]; then
ATTRIBUTION="$ATTRIBUTION: $SOURCE"
fi
LOC="$(echo "$ROW" | xan select 2 | sed 's/""//;s/-//g')"
# Add LOC if it's not empty
if [ -n "$LOC" ]; then
ATTRIBUTION="$ATTRIBUTION, $LOC"
fi
ATTRIBUTION="$ATTRIBUTION)"
echo "$ATTRIBUTION"
)
''

17
packages/noise-waves.nix Normal file
View File

@@ -0,0 +1,17 @@
{ sox, mpv, writers, coreutils }:
# ref https://askubuntu.com/a/789472
writers.writeDashBin "noise-waves" ''
file="/tmp/noise-$(${coreutils}/bin/date +%s | ${coreutils}/bin/md5sum | ${coreutils}/bin/cut -d' ' -f1).wav"
trap clean EXIT
clean() {
rm "$file"
}
${coreutils}/bin/mkfifo "$file"
${sox}/bin/sox -c2 -r44.1k -b8 -n "$file" synth brownnoise synth pinknoise mix synth sine amod 0.3 10 &
${mpv}/bin/mpv "$file"
''
# play -c2 -r44.1k -b8 -n synth -1 brownnoise .1 40
# play -c2 -r44.1k -b8 -n synth -1 pinknoise .1 60

View File

@@ -1,7 +1,7 @@
{
writers,
lib,
rofi,
wofi,
findutils,
coreutils,
noteDirectory ? "~/state/obsidian",
@@ -11,7 +11,7 @@
writers.writeDashBin "notemenu" ''
set -efu
PATH=$PATH:${
lib.makeBinPath [rofi findutils coreutils]
lib.makeBinPath [wofi findutils coreutils]
}
cd ${noteDirectory}
@@ -21,7 +21,7 @@ writers.writeDashBin "notemenu" ''
echo $(date -I -d yesterday).md
''}
find . -not -path '*/.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2-
} | rofi -dmenu -i -p 'notes')
} | wofi -dmenu -i -p 'notes')
if test "$note_file"
then
alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file"

View File

@@ -35,6 +35,7 @@ neovim.override {
vimPlugins.nerdtree
vimPlugins.fzf-vim
vimPlugins.fzfWrapper
vimPlugins.vim-fugitive
];
};
}

18
packages/passmenu.nix Normal file
View File

@@ -0,0 +1,18 @@
{ writers, wofi, pass, fd, libnotify, ... }:
writers.writeBashBin "passmenu" ''
shopt -s nullglob globstar
IFS=$'\n'
prefix=$(readlink -f ''${PASSWORD_STORE_DIR-~/.password-store})
password_files=( $( ${fd}/bin/fd -L ".gpg\$" "$prefix" ) )
password_files=( "''${password_files[@]#"$prefix"/}" )
password_files=( "''${password_files[@]%.gpg}" )
password=$( printf '%s\n' "''${password_files[@]}" | ${wofi}/bin/wofi -i -k /dev/null -d menu -- "$@" )
[[ -n $password ]] || exit
OUT=$(${pass}/bin/pass show --clip "$password")
${libnotify}/bin/notify-send -t 5000 "$(echo "$OUT" | grep '^login:' | sed 's/^login: //')"
''

View File

@@ -30,10 +30,27 @@
"that's a good song!"
"👍"
"vibin'"
"this is a jam!"
"absolutely love it!"
"such a vibe!"
"this track is fire!"
"feeling this one!"
"pure gold!"
"this is my jam!"
"so catchy!"
"on repeat!"
"this is a masterpiece!"
"let's dance!"
"I'm all in!"
"so gut!"
"mega!"
"ich fühl's!"
"das ist Musik für die Seele!"
];
messages.bad = [
"how can anyone listen to this?"
"(°° "
"(°° "
"skip this!"
"next, please! i'm suffering!"
"that's just bad music"
@@ -43,12 +60,40 @@
"turn that down"
"make it stooop"
"noooo"
"this is painful to listen to"
"what is this noise?"
"not my cup of tea"
"this is a hard pass"
"yikes!"
"please no more"
"this is a disaster"
"I can't handle this"
"this is just wrong"
"let's skip this one"
"ugh, why?"
"definitely not a fan"
"wie kann man das hören?"
"das ist schrecklich!"
"bitte nicht!"
"das ist einfach schlecht"
"oh nein, nicht das!"
];
messages.neutral = [
"meh"
"i have no opinion about this song"
"idk man"
"it's okay"
"not bad, not great"
"just average"
"it's fine"
"i can take it or leave it"
"kann man hören"
"ist in ordnung"
"naja"
"nicht schlecht, nicht gut"
"ich kann damit leben"
"es ist was es ist"
];
in
writers.writeDashBin "pls" ''

9
packages/q.nix Normal file
View File

@@ -0,0 +1,9 @@
{ writers, lib, todoman, khal, util-linux, wego, pass }:
writers.writeDashBin "q" ''
export PATH=$PATH:${lib.makeBinPath [todoman khal util-linux wego pass]}
(todo list --due 240; echo) &
(khal list today today; echo) &
(cal -3; echo) &
(wego -location Berlin -owm-api-key "$(pass api-keys/openweathermap)" -frontend emoji -days 2; echo) &
wait
''

View File

@@ -2,7 +2,7 @@
writers,
mktemp,
qrencode,
xclip,
wl-clipboard,
nsxiv,
}:
writers.writeDashBin "qrpaste" ''
@@ -11,6 +11,6 @@ writers.writeDashBin "qrpaste" ''
clean() {
rm "$file"
}
${qrencode}/bin/qrencode "$(${xclip}/bin/xclip -selection clipboard -out)" -o "$file"
${qrencode}/bin/qrencode "$(${wl-clipboard}/bin/wl-paste)" -o "$file"
${nsxiv}/bin/nsxiv "$file"
''

47
packages/radio-news.nix Normal file
View File

@@ -0,0 +1,47 @@
{ writers, lib, gnused, curl, jq, yq }:
writers.writeBashBin "radio-news" ''
set -efu
PATH=$PATH:${lib.makeBinPath [gnused curl jq yq]}
EVENTS=$(
curl https://www.goodnewsnetwork.org/feed/ \
| xq '
.rss.channel.item
| map(select((.pubDate|strptime("%a, %d %b %Y %H:%M:%S %z")) as $date | ($date | mktime) > (now - (60 * 60 * 24))) | {title, description})
'
)
SYSTEM_PROMPT=$(cat <<EOF
You are a news anchor writing a short news digest for a radio broadcast.
Summarize the following news headlines into a cohesive, engaging script under 400 words.
Keep it professional, concise as possible, and easy to follow.
Please no unnecessary explanations why the news is good.
Begin the digest with: "Here's your good news update."
EOF
)
REQUEST=$(cat <<EOF
{
"system_instruction": {
"parts": [
{
"text": $(jq -Rs <<< "$SYSTEM_PROMPT")
}
]
},
"contents": [
{
"parts": [
{
"text": $(jq -Rs <<< "$EVENTS")
}
]
}
]
}
EOF
)
echo "$REQUEST" | curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:generateContent?key=$GEMINI_API_KEY" -s -H "Content-Type: application/json" -d @-
''

71
packages/random-zeno.nix Executable file
View File

@@ -0,0 +1,71 @@
{ writers, lib, curl, pup, gnused, coreutils, pandoc, gawk, jq }:
writers.writeDashBin "random-zeno" ''
set -efu
export PATH=${lib.makeBinPath [ curl pup gnused coreutils pandoc gawk jq ]}
root="http://www.zeno.org"
character_limit=350
fetch() {
curl -sSL "$root$1"
}
blacklist='\/Biographie$'
next_links() {
html="$1"
echo "$html" | pup '.zenoTXLinkInt attr{href}' | sed "/$blacklist/d"
echo "$html" | pup '.zenoTRNavBottom a attr{href}' | sed "/$blacklist/d"
}
eval_html() {
url="$1"
html="$(fetch "$url")"
links="$(next_links "$html" | sed '/^\s*$/d')"
links_count="$(echo "$links" | wc -l)"
if [ -z "$links" ]
then
random_paragraph="$(echo "$html" | pup '.zenoCOMain p' | tr '\n' ' ' | sed 's/<\/p>/&\n/g')"
[ "$random_paragraph" = null ] && exit
prettify "$url" "$random_paragraph"
else
next_link="$(echo "$links" | shuf -n1)"
eval_html "$next_link"
fi
}
prettify() {
url="$1"
html="$2"
plain_text="$(echo "$html" | tr '\n' ' ' \
| sed \
-e 's/<h[1-6][^>]*>[^<]*<\/h[1-6]>//g' \
-e 's/\[[0-9]*\]\s*//g' \
| pandoc -f html -t plain \
| tr '\n' ' '
)"
truncated=$(echo "$plain_text" | awk -v limit="$character_limit" '
{
for (i = 1; i <= NF; i++) {
word_length = length($i) + 1; # +1 for the space
if (total_length + word_length > limit) {
print "";
break;
} else {
total_length += word_length;
printf "%s ", $i; # Print the word followed by a space
}
}
print "";
}
' | sed 's/\([:,.!?;]\)[^:,.!?;]*/\1 /')
url="$(echo "$url" | jq -sRr @uri)"
printf "%s\n\n%s\n" "$truncated" "$root$url"
}
eval_html "$1"
''

View File

@@ -1,10 +1,10 @@
{
writers,
xclip,
wl-clipboard,
espeak,
}:
writers.writeDashBin "ttspaste" ''
${xclip}/bin/xclip -selection clipboard -out | ${espeak}/bin/espeak
${wl-clipboard}/bin/paste | ${espeak}/bin/espeak
''
# curl, mpv,
# ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv -

View File

@@ -8,7 +8,7 @@
dmenu,
gnused,
libnotify,
xclip,
wl-clipboard,
xdotool,
gawk,
fetchFromGitHub,
@@ -89,7 +89,8 @@ in
# ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
writers.writeDashBin "unicodmenu" ''
history_file=$HOME/.cache/unicodmenu
PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify xclip xdotool]}
touch "$history_file"
PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify wl-clipboard xdotool]}
all_characters() {
tac "$history_file"
@@ -100,7 +101,7 @@ in
[ "$chosen" != "" ] || exit
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
echo "$chosen" | tr -d '\n' | wl-copy
if [ -n "$1" ]; then
xdotool key Shift+Insert

View File

@@ -4,6 +4,10 @@
fetchFromGitHub,
vimUtils,
niveumPackages,
writeText,
stylixColors ? null,
colorscheme ? null,
lib,
...
}: (neovim.override {
configure = {
@@ -12,9 +16,21 @@
source ${../lib/vim/init.vim}
let g:snippet_directory = '${vimPlugins.friendly-snippets}'
luafile ${../lib/vim/init.lua}
'' + lib.optionalString (stylixColors != null) (with stylixColors.withHashtag; ''
luafile ${writeText "colors.lua" ''
require('base16-colorscheme').setup({
base00 = '${base00}', base01 = '${base01}', base02 = '${base02}', base03 = '${base03}',
base04 = '${base04}', base05 = '${base05}', base06 = '${base06}', base07 = '${base07}',
base08 = '${base08}', base09 = '${base09}', base0A = '${base0A}', base0B = '${base0B}',
base0C = '${base0C}', base0D = '${base0D}', base0E = '${base0E}', base0F = '${base0F}'
})
''}
'') + lib.optionalString (colorscheme != null) ''
colorscheme ${colorscheme}
'';
packages.nvim = with vimPlugins; {
start = [
base16-nvim
nvim-cmp
cmp-buffer
cmp-path

Submodule secrets updated: a4e26dd9df...e14a3170cc

View File

@@ -1,22 +1,22 @@
secrets/alertmanager-token-reporters.age
secrets/cifs-credentials-hu-berlin.age
secrets/cifs-credentials-zodiac.age
secrets/di-fm-key.age
secrets/email-password-cock.age
secrets/email-password-dslalewa.age
secrets/email-password-fsklassp.age
secrets/email-password-fysi.age
secrets/email-password-letos.age
secrets/email-password-meinhak99.age
secrets/email-password-meinhaki.age
secrets/email-password-posteo.age
secrets/fatteh-retiolum-privateKey-ed25519.age
secrets/fatteh-retiolum-privateKey-rsa.age
secrets/fatteh-syncthing-cert.age
secrets/fatteh-syncthing-key.age
secrets/fatteh-wireguard-aether-key.age
secrets/fatteh-wireguard-aether-psk.age
secrets/ful-retiolum-privateKey-ed25519.age
secrets/ful-retiolum-privateKey-rsa.age
secrets/ful-root.age
secrets/fu-sftp-key.age
secrets/gemini-api-key.age
secrets/github-token-i3status-rust.age
secrets/grafana-password-admin.age
secrets/hetzner-storagebox-credentials.age
@@ -25,7 +25,13 @@ secrets/kabsa-retiolum-privateKey-ed25519.age
secrets/kabsa-retiolum-privateKey-rsa.age
secrets/kabsa-syncthing-cert.age
secrets/kabsa-syncthing-key.age
secrets/kabsa-wireguard-aether-key.age
secrets/kabsa-wireguard-aether-psk.age
secrets/kfm-password.age
secrets/kibbeh-retiolum-privateKey-ed25519.age
secrets/kibbeh-retiolum-privateKey-rsa.age
secrets/kibbeh-syncthing-cert.age
secrets/kibbeh-syncthing-key.age
secrets/ledger-basicAuth.age
secrets/makanek-retiolum-privateKey-ed25519.age
secrets/makanek-retiolum-privateKey-rsa.age
@@ -33,6 +39,16 @@ secrets/manakish-retiolum-privateKey-ed25519.age
secrets/manakish-retiolum-privateKey-rsa.age
secrets/manakish-syncthing-cert.age
secrets/manakish-syncthing-key.age
secrets/manakish-wireguard-aether-key.age
secrets/manakish-wireguard-aether-psk.age
secrets/mastodon-token-celan.age
secrets/mastodon-token-hesychius.age
secrets/mastodon-token-nietzsche.age
secrets/mastodon-token-smyth.age
secrets/mastodon-token-tlgwotd.age
secrets/mastodon-token-transits.age
secrets/matrix-token-lakai.age
secrets/matrix-token-lakai-env.age
secrets/maxmind-license-key.age
secrets/mega-password.age
secrets/miniflux-api-token.age

View File

@@ -20,8 +20,6 @@ in {
services.illum.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/selenized-light.yaml";
age.secrets = {
retiolum-rsa = {
file = ../../secrets/fatteh-retiolum-privateKey-rsa.age;
@@ -38,8 +36,12 @@ in {
restic.file = ../../secrets/restic.age;
syncthing-cert.file = ../../secrets/fatteh-syncthing-cert.age;
syncthing-key.file = ../../secrets/fatteh-syncthing-key.age;
wireguard-aether-key.file = ../../secrets/fatteh-wireguard-aether-key.age;
wireguard-aether-psk.file = ../../secrets/fatteh-wireguard-aether-psk.age;
};
networking.wg-quick.interfaces.aether.address = ["192.168.178.202/24"];
networking.hostName = "fatteh";
networking.retiolum = retiolumAddresses.fatteh;

89
systems/ful/alew.nix Normal file
View File

@@ -0,0 +1,89 @@
{ pkgs, config, inputs, ... }:
let
postgrestPort = 3001;
alewPort = 3000;
in
{
systemd.services.postgrest = {
enable = true;
wantedBy = ["podman-alew.service"];
wants = ["postgresql.service"];
environment = {
PGRST_DB_ANON_ROLE = "alew_1";
PGRST_DB_SCHEMA = "alew_2022_05"; # alew_2023_09 for most recent (beta)
PGRST_DB_URI = "postgres://alew_1:alew_1@localhost:5432/alew";
PGRST_SERVER_PORT = toString postgrestPort;
};
script = "${pkgs.postgrest}/bin/postgrest";
serviceConfig = {
User = "postgres";
Group = "postgres";
};
};
services.nginx.virtualHosts."alew.kmein.de" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString alewPort}";
};
};
# deploy nuxt app using
# $ cd alew/web/
# $ rsync -rav --delete . ful:/var/lib/alew --exclude .git --exclude .nuxt --exclude node_modules
systemd.services.alew = {
enable = true;
wantedBy = ["multi-user.target"];
wants = ["postgrest.service"];
path = [
pkgs.yarn
pkgs.python3
pkgs.gcc
pkgs.bash
pkgs.coreutils
pkgs.gnumake
];
environment = {
NODE_OPTIONS= "--openssl-legacy-provider";
POSTGREST_URL = "http://localhost:${toString postgrestPort}";
BETA = "0";
PORT = toString alewPort;
};
preStart = ''
# rsync -rav --delete ALEW_SRC .
yarn install
yarn build
'';
script = "yarn start";
serviceConfig = {
User = "alew";
Group = "alew";
WorkingDirectory = config.users.extraUsers.alew.home;
};
};
users.extraUsers.alew = {
isSystemUser = true;
createHome = true;
home = "/var/lib/alew";
group = "alew";
};
users.extraGroups.alew = {};
environment.systemPackages = [pkgs.podman];
services.postgresql = {
enable = true;
ensureDatabases = ["alew"];
ensureUsers = [
{
name = "alew";
ensureDBOwnership = true;
}
{ name = "alew_1"; } # readonly
];
package = pkgs.postgresql_16;
};
}

View File

@@ -12,7 +12,10 @@ in {
./radio.nix
./panoptikon.nix
./hledger.nix
./wallabag.nix
./alew.nix
../../configs/monitoring.nix
../../configs/mycelium.nix
../../configs/tor.nix
../../configs/save-space.nix
../../configs/spacetime.nix

View File

@@ -14,7 +14,7 @@
};
systemd.services.hledger-backup = {
enable = true;
enable = false;
startAt = "hourly";
wants = ["network-online.target"];
wantedBy = ["multi-user.target"];

View File

@@ -21,6 +21,7 @@ in {
nginx = {
serverName = "matomo.kmein.de";
};
package = pkgs.matomo_5;
};
services.mysql = {

View File

@@ -13,6 +13,23 @@
retiolumLink = true;
};
matrix = {
server ? "matrix.4d2.org",
target,
}:
pkgs.writers.writeDash "matrix-reporter" ''
export RAW_MESSAGE="$(cat)"
export MESSAGE=$(printf '<b>%s</b><br><pre>%s</pre>' "$PANOPTIKON_WATCHER" "$RAW_MESSAGE")
export MATRIX_TOKEN="$(cat ${config.age.secrets.matrix-token-lakai.path})"
export JSON_PAYLOAD=$(${pkgs.jq}/bin/jq -n --arg msgtype "m.text" --arg body "$RAW_MESSAGE" --arg formattedBody "$MESSAGE" '{msgtype: $msgtype, body: $body, format: "org.matrix.custom.html", formatted_body: $formattedBody}')
${pkgs.curl}/bin/curl -X POST "https://${server}/_matrix/client/r0/rooms/${target}/send/m.room.message" \
-d "$JSON_PAYLOAD" \
-H "Authorization: Bearer $MATRIX_TOKEN" \
-H "Content-Type: application/json"
'';
matrix-kmein = matrix { target = "!zlwCuPiCNMSxDviFzA:4d2.org"; };
telegram-kmein = let
chatId = "-1001796440545";
in
@@ -32,6 +49,12 @@
};
in {
age.secrets.telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
age.secrets.matrix-token-lakai = {
file = ../../secrets/matrix-token-lakai.age;
owner = "panoptikon";
group = "panoptikon";
mode = "400";
};
services.panoptikon = {
enable = true;
@@ -49,79 +72,79 @@ in {
};
lammla = {
script = panoptikon.url "http://lammla.info/index.php?reihe=30";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
kratylos = {
script = panoptikon.url "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
kobudo-tesshinkan = {
script = panoptikon.url "https://kobudo-tesshinkan.eu/index.php/de/termine-berichte/lehrgaenge/";
reporters = [irc-kmein telegram-kmein];
reporters = [telegram-kmein matrix-kmein];
};
zeno-free = {
script = panoptikon.urlSelector ".zenoCOMain" "http://www.zeno.org/Lesesaal/M/E-Books";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
carolinawelslau = {
script = panoptikon.urlSelector "#main" "https://carolinawelslau.de/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
humboldt-preis = {
script = panoptikon.urlSelector "#content-core" "https://www.hu-berlin.de/de/ueberblick/menschen/ehrungen/humboldtpreis";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
lisalittmann = {
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
lisalittmann-archive = {
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/archive/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
lisalittmann-projects = {
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/projects/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
tatort = {
script = panoptikon.urlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
warpgrid-idiomarium = {
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/idiomarium/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
warpgrid-futurism = {
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/futurism/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
warpgrid-imagiary = {
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/imagiary/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
warpgrid-alchemy = {
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/alchemy/";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
indogermanische-forschungen = {
script = panoptikon.urlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
ig-neuigkeiten = {
script = panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
ig-tagungen = {
script = panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
fu-distant = {
script = panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/en/e/ma-distant/Termine/index.html";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
fu-aegyptologie = {
script = panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/e/aegyptologie/termine/index.html";
reporters = [irc-kmein];
reporters = [matrix-kmein];
};
};
};

View File

@@ -118,10 +118,10 @@ in {
)
end
make_streams("lyrikline", random_url("${lyrikline-poem}"), description="lyrikline. listen to the poet (unofficial)", genre="poetry")
# make_streams("lyrikline", random_url("${lyrikline-poem}"), description="lyrikline. listen to the poet (unofficial)", genre="poetry")
make_streams("qasida", random_url("${qasida-poem}"), description="Qasa'id. Classical arabic poetry", genre="poetry")
make_streams("lyrik", random_url("${stavenhagen-poem}"), description="Fritz Stavenhagen Lyrik für alle | www.deutschelyrik.de", genre="poetry")
make_streams("wikipedia", random_url("${wikipedia-article}"), description="Zufällige Artikel von Wikipedia", genre="useless knowledge")
# make_streams("wikipedia", random_url("${wikipedia-article}"), description="Zufällige Artikel von Wikipedia", genre="useless knowledge")
'';
systemd.services.radio = {

44
systems/ful/wallabag.nix Normal file
View File

@@ -0,0 +1,44 @@
{ pkgs, config, ... }:
let
domain = "pocket.kmein.de";
port = "8088";
dataPath = "/var/lib/wallabag";
in
{
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${port}";
proxyWebsockets = true;
};
extraConfig = ''
client_body_timeout 3000s;
client_header_timeout 3000s;
keepalive_timeout 3000s;
proxy_read_timeout 3000s;
proxy_connect_timeout 3000s;
proxy_send_timeout 3000s;
'';
};
services.restic.backups.niveum.paths = [ dataPath ];
virtualisation.oci-containers.containers."${domain}" = {
autoStart = true;
image = "wallabag/wallabag:2.6.12";
ports = [ "${port}:80" ];
volumes = [
"${dataPath}/data:/var/www/wallabag/data"
"${dataPath}/images:/var/www/wallabag/web/assets/images"
];
environment = {
SYMFONY__ENV__DOMAIN_NAME = "https://${domain}";
SYMFONY__ENV__FOSUSER_CONFIRMATION = "false";
PHP_MEMORY_LIMIT = "512M";
SYMFONY__ENV__SERVER_NAME = "Wallabag";
};
extraOptions = [ "--pull=always" ];
};
}

View File

@@ -1,13 +1,18 @@
{
config,
niveumPackages,
pkgs,
lib,
inputs,
...
}: let
}:
let
# TODO wrap obsidian: obsidian --no-sandbox --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations %U
inherit (import ../../lib) retiolumAddresses;
in {
in
{
imports = [
./hardware-configuration.nix
../kibbeh/hardware-configuration.nix
../../configs/tlp.nix
../../configs/default.nix
../../configs/networkmanager.nix
@@ -20,8 +25,6 @@ in {
promptColours.success = "cyan";
};
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
nix.settings = {
cores = 1;
max-jobs = 2;
@@ -43,15 +46,19 @@ in {
restic.file = ../../secrets/restic.age;
syncthing-cert.file = ../../secrets/kabsa-syncthing-cert.age;
syncthing-key.file = ../../secrets/kabsa-syncthing-key.age;
wireguard-aether-key.file = ../../secrets/kabsa-wireguard-aether-key.age;
wireguard-aether-psk.file = ../../secrets/kabsa-wireguard-aether-psk.age;
};
environment.systemPackages = [pkgs.zeroad];
networking.wg-quick.interfaces.aether.address = [ "192.168.178.203/24" ];
environment.systemPackages = [ pkgs.zeroad ];
networking = {
hostName = "kabsa";
wireless.interfaces = ["wlp3s0"];
wireless.interfaces = [ "wlp3s0" ];
retiolum = retiolumAddresses.kabsa;
};
system.stateVersion = "19.03";
system.stateVersion = "23.11";
}

View File

@@ -0,0 +1,97 @@
{
config,
pkgs,
niveumPackages,
...
}:
{
imports = [
./hardware-configuration.nix
../../configs/spacetime.nix
../../configs/admin-essentials.nix
../../configs/keyboard.nix
../../configs/sound.nix
../../configs/printing.nix
../../configs/nix.nix
../../configs/flix.nix
../../configs/fonts.nix
../../configs/mycelium.nix
../../configs/retiolum.nix
../../configs/sshd.nix
../../configs/sudo.nix
../../configs/zsh.nix
../../configs/tor.nix
];
age.secrets = {
retiolum-rsa = {
file = ../../secrets/kibbeh-retiolum-privateKey-rsa.age;
mode = "400";
owner = "tinc-retiolum";
group = "tinc-retiolum";
};
retiolum-ed25519 = {
file = ../../secrets/kibbeh-retiolum-privateKey-ed25519.age;
mode = "400";
owner = "tinc-retiolum";
group = "tinc-retiolum";
};
};
services.gnome.gnome-keyring.enable = true;
security.pam.services.lightdm.enableGnomeKeyring = true;
services.openssh.enable = true;
networking.hostName = "kibbeh";
networking.networkmanager.enable = true;
i18n.defaultLocale = "en_DK.UTF-8";
services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
# services.displayManager.autoLogin.enable = true;
# services.displayManager.autoLogin.user = config.users.users.me.name;
age.secrets = {
di-fm-key.file = ../../secrets/di-fm-key.age;
};
users.users.me = {
name = "kfm";
isNormalUser = true;
description = "ि";
extraGroups = [ "networkmanager" ];
password = "hackme";
packages = with pkgs; [
# packages TODO
firefox
thunderbird
alacritty
tor-browser-bundle-bin
zathura
okular
anki-bin
libreoffice
xournalpp
jellyfin-media-player
niveumPackages.mpv-tv
telegram-desktop
(niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
niveumPackages.meteo
spotify
];
};
environment.systemPackages = with pkgs; [
htop
git
vim
tmux
(niveumPackages.vim.override { colorscheme = "base16-gruvbox-dark-medium"; })
];
system.stateVersion = "23.11";
}

View File

@@ -0,0 +1,55 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd = {
availableKernelModules = [
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
luks.devices."luks-16a8b3b0-5e0a-4d36-920c-eb6322a3c181".device =
"/dev/disk/by-uuid/16a8b3b0-5e0a-4d36-920c-eb6322a3c181";
luks.devices."luks-b3988d35-72a9-4e7c-992d-f500bb388554".device =
"/dev/disk/by-uuid/b3988d35-72a9-4e7c-992d-f500bb388554";
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/ecab6acb-66f1-41c9-8281-59c76cf8f0c6";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/8066-63C2";
fsType = "vfat";
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/8cebdb17-4f2e-4750-8e91-71aa942bdfde"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -92,7 +92,7 @@ in {
home.username = "xm7234fu";
home.homeDirectory = "/Users/${config.home.username}";
nixpkgs.config.allowUnfree = true;
nix.package = pkgs.nixFlakes;
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = "experimental-features = nix-command flakes";
}

View File

@@ -15,7 +15,9 @@ in {
./monitoring
./names.nix
./nextcloud.nix
../../configs/mycelium.nix
./radio-news.nix
./scrabble.nix
# ./onlyoffice.nix
./retiolum-map.nix
./tarot.nix
@@ -28,7 +30,7 @@ in {
../../configs/retiolum.nix
../../configs/spacetime.nix
../../configs/sshd.nix
../../configs/telegram-bots
../../configs/bots
../../configs/admin-essentials.nix
];

View File

@@ -1,20 +1,45 @@
{ config, ... }:
let
inherit (import ../../lib) sshPort;
domain = "https://code.kmein.de";
domain = "code.kmein.de";
in {
services.anubis = {
defaultOptions.settings = {
USER_DEFINED_DEFAULT = true;
};
instances = {
"gitea".settings = {
TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
USER_DEFINED_INSTANCE = true;
OG_PASSTHROUGH = true;
SERVE_ROBOTS_TXT = true;
};
};
};
users.users.nginx.extraGroups = [ config.services.anubis.instances."gitea".group ];
services.gitea = {
enable = true;
appName = "code.kmein.de";
appName = domain;
settings = {
server.ROOT_URL = domain;
server.ROOT_URL = "https://${domain}";
server.DOMAIN = domain;
server.SSH_PORT = sshPort;
service.DISABLE_REGISTRATION = true;
};
};
services.nginx.virtualHosts."code.kmein.de" = {
services.nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = "proxy_pass http://localhost:3000;";
# locations."/".extraConfig = "proxy_pass http://localhost:3000;";
locations = {
"/" = {
proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.BIND}";
proxyWebsockets = true;
};
"/metrics".proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.METRICS_BIND}";
};
};
niveum.passport.services = [

View File

@@ -1,6 +1,5 @@
{
pkgs,
config,
...
}: {
systemd.services.moinbot = {
@@ -9,7 +8,7 @@
greeting=$(echo "moin
MOIN
moin: gib" | shuf -n1)
echo "$greeting" | ${config.nur.repos.mic92.ircsink}/bin/ircsink \
echo "$greeting" | ${pkgs.nur.repos.mic92.ircsink}/bin/ircsink \
--nick "$greeting""bot" \
--server irc.hackint.org \
--port 6697 \

View File

@@ -89,10 +89,10 @@ in {
name = "niveum";
rules = [
{
alert = "ServiceDown";
expr = ''node_systemd_unit_state{state="failed"} == 1'';
alert = "HostSystemdServiceCrashed";
expr = ''(node_systemd_unit_state{state="failed"} == 1) * on(instance) group_left (nodename) node_uname_info{nodename=~".+"}'';
annotations = {
summary = "{{$labels.name}} failed on {{$labels.job}}";
description = "{{$labels.name}} failed on {{$labels.instance}}";
};
}
{
@@ -100,7 +100,7 @@ in {
for = "10m";
expr = ''(node_filesystem_free_bytes{mountpoint="/"} * 100) / node_filesystem_size_bytes{mountpoint="/"} < ${toString diskFreeThreshold}'';
annotations = {
summary = ''{{ $labels.job }} running out of space: {{ $value | printf "%.2f" }}% < ${toString diskFreeThreshold}%'';
description = ''{{ $labels.instance }} running out of space: {{ $value | printf "%.2f" }}% < ${toString diskFreeThreshold}%'';
};
}
{
@@ -110,7 +110,7 @@ in {
''node_filesystem_free_bytes{mountpoint="/"} ''
+ ''and predict_linear(node_filesystem_free_bytes{mountpoint="/"}[2d], 7*24*3600) <= 0'';
annotations = {
summary = "{{$labels.job}} running out of space in 7 days";
description = "{{$labels.instance}} running out of space in 7 days";
};
}
{
@@ -118,62 +118,98 @@ in {
expr = ''node_load15 / on(job) count(node_cpu_seconds_total{mode="system"}) by (job) >= 1.0'';
for = "10m";
annotations = {
summary = "{{$labels.job}} running on high load: {{$value}}";
description = "{{$labels.instance}} running on high load: {{$value}}";
};
}
{
alert = "HostUnusualNetworkThroughputIn";
expr = ''(rate(node_network_receive_bytes_total[2m])) / 1024 / 1024 > 100'';
for = "5m";
annotations.description = "Host unusual network throughput in (instance {{ $labels.instance }})";
}
{
alert = "HostUnusualNetworkThroughputOut";
expr = ''(rate(node_network_transmit_bytes_total[2m])) / 1024 / 1024 > 100'';
for = "5m";
annotations.description = "Host unusual network throughput out (instance {{ $labels.instance }})";
}
{
alert = "HostUnusualDiskReadRate";
expr = ''(rate(node_disk_read_bytes_total[2m])) / 1024 / 1024 > 50'';
for = "5m";
annotations.description = "Host unusual disk read rate (instance {{ $labels.instance }})";
}
{
alert = "HostUnusualDiskWriteRate";
expr = ''(rate(node_disk_written_bytes_total[2m])) / 1024 / 1024 > 50'';
for = "2m";
annotations.description = "Host unusual disk write rate (instance {{ $labels.instance }})";
}
{
alert = "HostOutOfInodes";
expr = ''node_filesystem_files_free{fstype!="msdosfs"} / node_filesystem_files{fstype!="msdosfs"} * 100 < 10 and ON (instance, device, mountpoint) node_filesystem_readonly == 0'';
for = "2m";
annotations.description = "Host out of inodes (instance {{ $labels.instance }})";
}
{
alert = "HostInodesWillFillIn24Hours";
expr = ''node_filesystem_files_free{fstype!="msdosfs"} / node_filesystem_files{fstype!="msdosfs"} * 100 < 10 and predict_linear(node_filesystem_files_free{fstype!="msdosfs"}[1h], 24 * 3600) < 0 and ON (instance, device, mountpoint) node_filesystem_readonly{fstype!="msdosfs"} == 0'';
for = "2m";
annotations.description = "Host inodes will fill in 24 hours (instance {{ $labels.instance }})";
}
{
alert = "HighRAM";
expr = "node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes < node_memory_MemTotal_bytes * 0.1";
for = "1h";
annotations.summary = "{{$labels.job}} using lots of RAM";
annotations.description = "{{$labels.instance}} using lots of RAM";
}
{
alert = "UptimeMonster";
expr = "time() - node_boot_time_seconds > 2592000";
annotations.summary = "uptime monster {{$labels.job}} up for more than 30 days";
annotations.description = "uptime monster {{$labels.instance}} up for more than 30 days";
}
{
alert = "HostDown";
expr = ''up == 0'';
for = "5m";
annotations = {
summary = "{{ $labels.job }} seeming down since 5 minutes";
description = "{{ $labels.instance }} seeming down since 5 minutes";
};
}
{
alert = "Reboot";
expr = "time() - node_boot_time_seconds < 300";
annotations.summary = "{{$labels.job}} rebooted";
annotations.description = "{{$labels.instance}} rebooted";
}
{
alert = "ProbeFailed";
expr = "probe_success == 0";
for = "5m";
annotations.summary = "HTTP probe failed for {{$labels.instance}}";
annotations.description = "HTTP probe failed for {{$labels.instance}}";
}
{
alert = "SlowProbe";
expr = "avg_over_time(probe_http_duration_seconds[1m]) > 1";
for = "5m";
annotations.summary = "HTTP probe slow for {{$labels.instance}}";
annotations.description = "HTTP probe slow for {{$labels.instance}}";
}
{
alert = "HttpStatusCode";
expr = "probe_http_status_code != 0 AND (probe_http_status_code <= 199 OR probe_http_status_code >= 400)";
for = "5m";
annotations.summary = "status code {{$value}} for {{$labels.instance}}";
annotations.description = "status code {{$value}} for {{$labels.instance}}";
}
{
alert = "SslExpirySoon";
expr = "probe_ssl_earliest_cert_expiry - time() < 86400 * 30";
for = "5m";
annotations.summary = "SSL certificate for {{$labels.instance}} expires in 30 days";
annotations.description = "SSL certificate for {{$labels.instance}} expires in 30 days";
}
{
alert = "SslExpiry";
expr = "probe_ssl_earliest_cert_expiry - time() <= 0";
for = "5m";
annotations.summary = "SSL certificate for {{$labels.instance}} has expired";
annotations.description = "SSL certificate for {{$labels.instance}} has expired";
}
];
}
@@ -181,6 +217,39 @@ in {
})
];
# ref https://github.com/Mic92/dotfiles/blob/f44bac5dd6970ed3fbb4feb906917331ec3c2be5/machines/eva/modules/prometheus/default.nix
systemd.services.matrix-hook = {
description = "Matrix Hook";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = {
HTTP_ADDRESS = "[::1]";
HTTP_PORT = "9088";
MX_HOMESERVER = "https://matrix.4d2.org";
MX_ID = "@lakai:4d2.org";
MX_ROOMID = "!zlwCuPiCNMSxDviFzA:4d2.org";
MX_MSG_TEMPLATE = "${pkgs.matrix-hook}/message.html.tmpl";
};
serviceConfig = {
EnvironmentFile = [
# format: MX_TOKEN=<token>
config.age.secrets.matrix-token-lakai-env.path
];
Type = "simple";
ExecStart = "${pkgs.matrix-hook}/bin/matrix-hook";
Restart = "always";
RestartSec = "10";
DynamicUser = true;
User = "matrix-hook";
Group = "matrix-hook";
};
};
age.secrets = {
matrix-token-lakai-env.file = ../../../secrets/matrix-token-lakai-env.age;
};
services.prometheus.alertmanager = {
enable = true;
listenAddress = "localhost";
@@ -190,39 +259,17 @@ in {
route = {
group_wait = "30s";
repeat_interval = "24h";
receiver = "all";
receiver = "matrix";
};
receivers = [
{
name = "all";
telegram_configs = [
name = "matrix";
webhook_configs = [
{
bot_token = "$TELEGRAM_TOKEN";
chat_id = 18980945;
parse_mode = "";
api_url = "https://api.telegram.org";
send_resolved = true;
message = ''
{{range .Alerts -}}
{{ .Status }}: {{ index .Annotations "summary" }}
{{end -}}
'';
url = "http://localhost:9088/alert";
max_alerts = 5;
}
];
email_configs = let
inherit (import ../../../lib) kieran;
inherit (import ../../../lib/email.nix {inherit lib;}) cock;
cockConfig = {
send_resolved = true;
to = kieran.email;
from = cock.user;
smarthost = "${cock.smtp}:587";
auth_username = cock.user;
auth_identity = cock.user;
auth_password = "$EMAIL_PASSWORD";
};
in [
];
}
];
};
@@ -303,10 +350,12 @@ in {
"https://beta.alew.hu-berlin.de"
"https://alew.hu-berlin.de/api/search?substring=die&domain=lemma&derivations=true&addition=true&diacritics=false&position=infix"
"https://beta.alew.hu-berlin.de/api/search?substring=die&domain=lemma&derivations=true&addition=true&diacritics=false&position=infix"
"https://zodiac.fly.dev/api/lemma/get?lemmaId=2582"
"https://pad.kmein.de"
"https://code.kmein.de"
"https://radio.kmein.de"
"https://tarot.kmein.de"
"https://social.krebsco.de"
"https://cloud.kmein.de"
"http://grafana.kmein.r"
# "names.kmein.r"
@@ -327,6 +376,18 @@ in {
}
];
}
{
job_name = "brockman";
static_configs = [
{
targets = [
"brockman.news:9002" # node
"brockman.news:9121" # redis
"brockman.news:9113" # nginx
];
}
];
}
{
job_name = "home_assistant";
scrape_interval = "60s";

View File

@@ -47,7 +47,7 @@ in {
services.nextcloud = {
enable = true;
package = pkgs.nextcloud29;
package = pkgs.nextcloud31;
https = true;
@@ -58,13 +58,11 @@ in {
hostName = "cloud.kmein.de";
datadir = "${storageBoxMountPoint}/nextcloud";
home = "${storageBoxMountPoint}/nextcloud";
phpOptions."opcache.interned_strings_buffer" = "32"; # buffer size in MB
config = {
overwriteProtocol = "https";
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
@@ -73,13 +71,14 @@ in {
adminpassFile = config.age.secrets.nextcloud-password-admin.path;
adminuser = "admin";
# extraTrustedDomains = [ "toum.r" ];
defaultPhoneRegion = "DE";
};
logLevel = 2;
extraOptions = {
settings = {
defaultapp = "files";
overwriteprotocol = "https";
default_phone_region = "DE";
log_level = 2;
};
};

View File

@@ -1,6 +1,8 @@
{
config,
pkgs,
lib,
niveumPackages,
...
}: let
inherit (import ../../lib) serveHtml;
@@ -8,6 +10,30 @@
in {
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml ../../lib/radio-news.html pkgs;
age.secrets = {
gemini-api-key.file = ../../secrets/gemini-api-key.age;
};
systemd.services.news-digest = {
enable = true;
wantedBy = ["multi-user.target"];
wants = ["network-online.target"];
serviceConfig.LoadCredential = [
"gemini-api-key:${config.age.secrets.gemini-api-key.path}"
];
startAt = "*:50";
script = ''
PATH=$PATH:${lib.makeBinPath [pkgs.gnused pkgs.curl pkgs.jq]}
GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")" ${niveumPackages.radio-news}/bin/radio-news | jq --arg from "$(date -u -Is | sed 's/+00:00/Z/')" --arg to "$(date -u -Is -d 'now + 30 minutes' | sed 's/+00:00/Z/')" '
{
from: $from,
to: $to,
text: .candidates[].content.parts[].text
}' | curl -s -X POST http://radio-news.r -H "Content-Type: application/json" -d @-
'';
};
niveum.passport.services = [
{
title = "Retiolum Radio News";

View File

@@ -0,0 +1,59 @@
{ pkgs, ... }:
let
port = 9090;
scrabbleDirectory = "/var/lib/xanado";
in
{
users.extraUsers.scrabble = {
isSystemUser = true;
group = "scrabble";
home = scrabbleDirectory;
createHome = true;
};
users.extraGroups.scrabble = {};
systemd.services.scrabble = {
wantedBy = ["multi-user.target"];
enable = true;
preStart = "npm install @cdot/xanado";
path = [ pkgs.nodejs ];
script = ''
${scrabbleDirectory}/node_modules/.bin/xanado --config ${(pkgs.formats.json {}).generate "config.json" {
port = port;
host = "localhost";
game_defaults = {
edition = "Deutsch_Scrabble";
dictionary = "German";
};
}}
'';
serviceConfig = {
User = "scrabble";
Group = "scrabble";
WorkingDirectory = scrabbleDirectory;
};
};
services.nginx.virtualHosts."scrabble.kmein.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:${toString port}";
};
systemd.services.scrabble-fix = {
startAt = "hourly";
wantedBy = ["multi-user.target"];
enable = false;
script = ''
${pkgs.gnused}/bin/sed -i s/encadefrit/en/ sessions/*.json passwd.json"
'';
serviceConfig = {
User = "scrabble";
Group = "scrabble";
WorkingDirectory = scrabbleDirectory;
};
};
services.restic.backups.niveum.paths = [ scrabbleDirectory ];
}

View File

@@ -7,7 +7,6 @@
}: let
inherit (import ../../lib) kieran;
weechatHome = "/var/lib/weechat";
apiPort = 8002;
weechat-declarative = pkgs.callPackage ../../packages/weechat-declarative.nix {
inherit unstablePackages;
};
@@ -64,7 +63,7 @@ in {
autoconnect = true;
addresses = "irc.hackint.org/6697";
ipv6 = true;
ssl = true;
tls = true;
autojoin = ["#eloop" "#krebs" "#the_playlist"];
sasl_mechanism = "plain";
sasl_username = nick;
@@ -73,7 +72,7 @@ in {
libera = {
autoconnect = true;
addresses = "irc.libera.chat/6697";
ssl = true;
tls = true;
autojoin = ["#haskell" "#fysi" "#binaergewitter" "#vim"];
sasl_mechanism = "plain";
sasl_username = nick;
@@ -82,6 +81,7 @@ in {
retiolum = {
autoconnect = true;
addresses = "irc.r";
tls = false;
autojoin = ["#xxx" "#brockman" "#flix"];
command = lib.concatStringsSep "\\;" [
"/oper admin aidsballs"
@@ -93,14 +93,14 @@ in {
sasl_username = nick;
sasl_password = "\${sec.data.retiolum_sasl}";
};
news = {
brockman = {
autoconnect = true;
addresses = "news.r";
autojoin = ["#cook" "#drachengame" "#oepnv" "#kmeinung" "#memes"];
command = "/oper aids balls";
sasl_mechanism = "plain";
addresses = "brockman.news";
tls = false;
autojoin = ["#cook" "#kmeinung"];
sasl_username = nick;
sasl_password = nick + nick;
sasl_password = "\${sec.data.brockman_sasl}";
sasl_mechanism = "plain";
};
};
};
@@ -122,7 +122,6 @@ in {
alias.cmd.mod = "/quote omode $channel +o $nick";
relay = {
port.weechat = 9000;
port.api = apiPort;
network.password = "\${sec.data.relay_password}";
};
filters = {
@@ -183,8 +182,6 @@ in {
};
};
networking.firewall.allowedTCPPorts = [apiPort];
users.groups.weechat = {};
users.extraUsers.weechat = {
useDefaultShell = true;

View File

@@ -0,0 +1,210 @@
{ lib, pkgs, config, unstablePackages, ... }:
let
inherit (import ../../lib) kieran;
weechatHome = "/var/lib/weechat";
weechat-declarative =
pkgs.callPackage ../../packages/weechat-declarative.nix {
inherit unstablePackages;
};
in {
systemd.services.weechat = let
tmux = pkgs.writers.writeDash "tmux" ''
exec ${pkgs.tmux}/bin/tmux -f ${
pkgs.writeText "tmux.conf" ''
set-option -g prefix `
unbind-key C-b
bind ` send-prefix
set-option -g status off
set-option -g default-terminal screen-256color
#use session instead of windows
bind-key c new-session
bind-key p switch-client -p
bind-key n switch-client -n
bind-key C-s switch-client -l
''
} "$@"
'';
weechat = weechat-declarative.override {
config = {
scripts = [
pkgs.weechatScripts.weechat-autosort
pkgs.weechatScripts.colorize_nicks
# pkgs.weechatScripts.weechat-matrix
(pkgs.callPackage ../../packages/weechatScripts/hotlist2extern.nix
{ })
];
settings = let nick = "kmein";
in {
weechat = {
look.mouse = true;
look.prefix_align_max = 15;
color.chat_nick_colors =
lib.lists.subtractLists (lib.range 52 69 ++ lib.range 231 248)
(lib.range 31 254);
};
irc = {
look = {
server_buffer = "independent";
color_nicks_in_nicklist = true;
};
server_default = {
nicks = nick;
msg_part = "tschö mit ö";
msg_quit = "ciao kakao";
msg_kick = "warum machst du diese?";
realname = lib.head (lib.strings.split " " kieran.name);
};
server = {
hackint = {
autoconnect = true;
addresses = "irc.hackint.org/6697";
ipv6 = true;
tls = true;
autojoin = [ "#eloop" "#krebs" "#the_playlist" ];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.hackint_sasl}";
};
libera = {
autoconnect = true;
addresses = "irc.libera.chat/6697";
tls = true;
autojoin = [ "#haskell" "#fysi" "#binaergewitter" "#vim" ];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.libera_sasl}";
};
retiolum = {
autoconnect = true;
addresses = "irc.r";
tls = false;
autojoin = [ "#xxx" "#brockman" "#flix" ];
command = lib.concatStringsSep "\\;" [
"/oper admin aidsballs"
"/msg nickserv always-on true"
"/msg nickserv autoreplay-missed on"
"/msg nickserv auto-away"
];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.retiolum_sasl}";
};
brockman = {
autoconnect = true;
addresses = "brockman.news/6667";
tls = false;
autojoin = [ "#cook" "#kmeinung" ];
sasl_username = nick;
sasl_password = "\${sec.data.brockman_sasl}";
sasl_mechanism = "plain";
};
};
};
logger.level.irc.news = 0;
plugins.var.perl.hotlist2extern = {
external_command_hotlist = "echo %X > ${weechatHome}/hotlist.txt";
external_command_hotlist_empty =
"echo -n %X > ${weechatHome}/hotlist.txt";
lowest_priority = "2";
use_title = "off";
delimiter = ",";
};
matrix.look.server_buffer = "merge_without_core";
matrix.server.nibbana = {
address = "nibbana.jp";
username = nick;
password = "\${sec.data.nibbana_account}";
autoconnect = true;
};
alias.cmd.mod = "/quote omode $channel +o $nick";
relay = {
port.weechat = 9000;
network.password = "\${sec.data.relay_password}";
};
filters = {
zerocovid = {
buffer = "irc.news.*";
tags = "*";
regex =
"[kc]orona|💉|🤒|😷|[kc]ovid|virus|lockdown|va[kc][sc]in|vaxx|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]t|infizi|in[cz]iden[cz]|sars-cov|drosten|virolog|lauterbach|delta|omi[ck]ron|epidemi|booster|r-wert";
};
smart = {
buffer = "*";
tags = "irc_smart_filter";
regex = "*";
};
playlist_topic = {
buffer = "irc.*.#the_playlist";
tags = "irc_topic";
regex = "*";
};
brockman_notice = {
buffer = "irc.news.*";
tags = "irc_notice";
regex = "*";
};
bots = {
buffer = "irc.retiolum.*";
tags = [ "nick_gitlab" "nick_prometheus" ];
regex = "*";
};
people = {
buffer = "irc.*.*";
tags = map (name: "nick_${name}") [ "mod_p[matrix-fli" ];
regex = "*";
};
};
};
extraCommands = ''
/save
/connect -all
'';
# /matrix connect nibbana
};
};
in {
description = "Weechat bouncer";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartIfChanged = true;
path = [ pkgs.alacritty.terminfo ];
environment.WEECHAT_HOME = weechatHome;
# preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf";
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
preStop = "${tmux} kill-session -t IM";
serviceConfig = {
User = "weechat";
Group = "weechat";
RemainAfterExit = true;
Type = "oneshot";
};
};
users.groups.weechat = { };
users.extraUsers.weechat = {
useDefaultShell = true;
openssh.authorizedKeys.keys = kieran.sshKeys ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@kibbeh"
];
createHome = true;
group = "weechat";
home = "/var/lib/weechat";
isSystemUser = true;
packages = [ pkgs.tmux ];
};
age.secrets.weechat-sec = {
file = ../../secrets/weechat-sec.conf.age;
path = "/var/lib/weechat/sec.conf";
owner = "weechat";
group = "weechat";
mode = "440";
};
niveum.passport.services = [{
title = "weechat bouncer";
description = "keeps me logged in on IRC.";
}];
}

View File

@@ -12,8 +12,8 @@ in {
./hdmi.nix
../../configs/default.nix
../../configs/tlp.nix
../../configs/wpa_supplicant.nix
../../configs/admin-essentials.nix
../../configs/networkmanager.nix
../../configs/power-action.nix
];
@@ -32,9 +32,11 @@ in {
};
syncthing-cert.file = ../../secrets/manakish-syncthing-cert.age;
syncthing-key.file = ../../secrets/manakish-syncthing-key.age;
wireguard-aether-key.file = ../../secrets/manakish-wireguard-aether-key.age;
wireguard-aether-psk.file = ../../secrets/manakish-wireguard-aether-psk.age;
};
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-medium.yaml";
networking.wg-quick.interfaces.aether.address = ["192.168.178.204/24"];
niveum = {
batteryName = "BAT0";

Some files were not shown because too many files have changed in this diff Show More