1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 11:31:09 +01:00

141 Commits

Author SHA1 Message Date
0c6ec93443 nethack container 2025-12-19 22:44:08 +01:00
15ef01268b update secrets 2025-12-19 22:38:42 +01:00
682db94aae home-assistant: allow bluetooth 2025-12-19 15:05:54 +01:00
1bba38be77 tarot: replace htgen by flask 2025-12-19 15:05:29 +01:00
f7a7e80d97 anubis: set socket paths 2025-12-19 13:11:24 +01:00
7327b3149a tlg-wotd: temporarily disable 2025-12-19 13:11:06 +01:00
9ab93d0e82 htgen: update 2025-12-19 12:51:40 +01:00
2f5ad473c6 cro: chromium.override 2025-12-19 11:56:48 +01:00
e478ae3e6e flake: update lock 2025-12-19 11:56:33 +01:00
06d3d12afa system -> stdenv.hostPlatform.system 2025-12-19 11:56:16 +01:00
1060339a93 home-assistant: auto-update container 2025-12-19 11:56:02 +01:00
af1e852228 streams: update 2025-12-19 11:18:49 +01:00
9ff500bb37 gaming: init more 2025-12-14 18:19:37 +01:00
18603a5682 jq-lsp: use upstream 2025-12-13 23:59:09 +01:00
53578ac92b command-not-found: conflicts with nix-index-database 2025-12-13 23:56:50 +01:00
14118b6a63 maakaron: remove 2025-12-13 23:53:24 +01:00
0813d2e37c moto: remove 2025-12-13 23:51:35 +01:00
8d5743119f rfc: remove unneeded arguments 2025-12-13 23:50:12 +01:00
5105ef0b1e flake: add upstream TODOs 2025-12-13 23:50:00 +01:00
d67c8a6298 ix: remove 2025-12-13 23:19:15 +01:00
64ac86b32b nix-index: use nix-index-database flake 2025-12-13 23:19:15 +01:00
ed5c8815ce flake: broadly sort packages by domain 2025-12-13 23:19:15 +01:00
5e41f04f72 iolanguage: remove 2025-12-13 23:19:15 +01:00
e8e5bb6211 heuretes: fix table display 2025-12-13 23:19:15 +01:00
e910bf6f6a cht.sh: rename command 2025-12-13 23:19:15 +01:00
bd47cef7e5 infschmv: remove 2025-12-13 23:19:15 +01:00
ad3249077b jq-lsp: remove 2025-12-13 23:19:15 +01:00
367acd05e5 git-preview: remove 2025-12-13 23:19:14 +01:00
bae1d0b0cc genius: remove 2025-12-13 23:19:14 +01:00
f58e111ce1 dns-sledgehammer: remove 2025-12-13 23:19:14 +01:00
b647b9f901 dmenu-scrot: remove 2025-12-13 23:19:14 +01:00
883655dc58 dmenu-bluetooth: remove 2025-12-13 23:19:14 +01:00
21960a2c95 dirmir: remove 2025-12-13 23:19:14 +01:00
254195b331 dic: remove 2025-12-13 23:19:14 +01:00
ce032525d2 meteo: remove 2025-12-13 23:19:14 +01:00
f9b992cce3 mahlzeit: remove 2025-12-13 23:19:14 +01:00
3f6e4755a6 flake: remove rust-overlay input 2025-12-13 23:19:14 +01:00
cc4c5b79c1 ical-ephemeris: remove 2025-12-13 23:19:14 +01:00
673edbb8b3 ful: remove openapi joke 2025-12-13 23:19:14 +01:00
89f9e09c3d update 2025-12-13 23:19:14 +01:00
f1a6b1f4f6 flake: do not use flake-utils 2025-12-13 22:37:47 +01:00
16398282ed flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/e1680d594a9281651cbf7d126941a8c8e2396183?narHash=sha256-d%2B5CGloq7Lo1u2SkzhF8oiOdUc6Z5emh22nTXUB9CFA%3D' (2025-12-03)
  → 'github:nix-community/home-manager/20561be440a11ec57a89715480717baf19fe6343?narHash=sha256-O8VTGey1xxiRW%2BFpb%2BPs9zU7ShmxUA1a7cMTcENCVNg%3D' (2025-12-08)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1aab89277eb2d87823d5b69bae631a2496cff57a?narHash=sha256-H3lC7knbXOBrHI9hITQ7modLuX20mYJVhZORL5ioms0%3D' (2025-12-02)
  → 'github:NixOS/nixpkgs/d9bc5c7dceb30d8d6fafa10aeb6aa8a48c218454?narHash=sha256-y7RPKl/jJ/KAP/VKLMghMgXTlvNIJMHKskl8/Uuar7o%3D' (2025-12-06)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/152586a6a98226db20aab6e6e1c9a37c535acfbc?narHash=sha256-p7ihpz21BB%2BNhuT3qVL3clzWz%2BUyZlt7S3RRXxZGPls%3D' (2025-12-04)
  → 'github:NixOS/nixpkgs/aaa6c85f51f9333738c170ccc55b5fe5f55938f4?narHash=sha256-VPyShT4DyGtXH2wsD8yAVvvvi9OILUHTqNxWQd/6yZA%3D' (2025-12-10)
• Updated input 'nur':
    'github:nix-community/NUR/5e8ec1167d3a375e2857fbe915b3d8658d3e6472?narHash=sha256-bp7B5alQk7nDLtFLKaOHhSPBNVCcwIxMXjcc/VzY0hg%3D' (2025-12-04)
  → 'github:nix-community/NUR/6af054d2762ef52fad9943d490708f937008cca4?narHash=sha256-JyVUlh5wINjw29Ops7ZjRrzw%2B55r5GpCHjO0TCsoowc%3D' (2025-12-10)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/418468ac9527e799809c900eda37cbff999199b6?narHash=sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y%3D' (2025-12-02)
  → 'github:nixos/nixpkgs/addf7cf5f383a3101ecfba091b98d0a1263dc9b8?narHash=sha256-hM20uyap1a0M9d344I692r%2Bik4gTMyj60cQWO%2BhAYP8%3D' (2025-12-08)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/74d9abb7c5c030469f90d97a67d127cc5d76c238?narHash=sha256-F0IQSmSj4t2ThkbWZooAhkCTO%2BYpZSd2Pqiv2uoYEHo%3D' (2025-12-04)
  → 'github:oxalica/rust-overlay/db61f666aea93b28f644861fbddd37f235cc5983?narHash=sha256-jTof2%2Bir9UPmv4lWksYO6WbaXCC0nsDExrB9KZj7Dz4%3D' (2025-12-10)
• Updated input 'stylix':
    'github:danth/stylix/6f3b50c8fa9c468fc787e211b700e46592bf9d56?narHash=sha256-J2jgYyXiXctr91MSuBQ6dwB1YaC7DpzKp%2BRkj6pqS8o%3D' (2025-12-04)
  → 'github:danth/stylix/84d9d55885d463d461234f3aac07b2389a2577d8?narHash=sha256-abrrONk8vzRtY6fHEkjZOyRJpKHjPlFqMBE0%2B/DxfAU%3D' (2025-12-06)
2025-12-10 13:26:01 +01:00
315ccf102d vm host setup 2025-12-09 12:54:50 +01:00
7d8feb0876 stw-berlin: disable 2025-12-09 12:54:35 +01:00
44f7a9d4fa fritzbox: remove 2025-12-08 14:00:30 +01:00
b070207bd5 flameshot: remove buttons 2025-12-05 11:31:07 +01:00
614f7e0f8c remove flix config 2025-12-05 11:30:59 +01:00
a1af05ff48 pls: begin download feature 2025-12-04 16:51:03 +01:00
83536372f0 stylix: remove home-manager override 2025-12-04 16:50:53 +01:00
3357121044 vim: fix lsp config 2025-12-04 16:50:32 +01:00
2a7e972256 onomap: disable 2025-12-04 16:19:46 +01:00
0d75ab146e secrets: update 2025-12-04 16:19:34 +01:00
385ae53c7e weechat-declarative: fix 2025-12-04 16:19:13 +01:00
a08c41d3db autorenkalender: get from flake 2025-12-04 16:19:02 +01:00
bd84c35138 vim: add elixir plugin 2025-12-04 15:15:46 +01:00
04722684aa update 2025-12-04 15:15:45 +01:00
025b725551 upgrade to 25.11 2025-12-02 21:37:02 +01:00
6411d8a03d update secrets 2025-12-02 19:20:11 +01:00
edce4538d8 fonts: montserrat 2025-11-01 20:38:27 +01:00
d1dd41bc6b vim: disable copilot by default or else it reads my passwords 2025-11-01 20:38:13 +01:00
5d80f6ec0f alertmanager: alert when mastodon is down 2025-10-28 19:08:54 +01:00
c8ad9d4433 gpodder 2025-10-24 10:30:04 +02:00
0f05e0467a streams: add pakistani radio and dlf nova 2025-10-21 20:30:01 +02:00
3c2abbb3b9 fix smyth bot 2025-10-21 20:00:25 +02:00
61b5e4bd6e update secrets 2025-10-21 15:42:22 +02:00
d4aca5b6f1 reinstate hu vpn, remove fu signature 2025-10-21 15:34:43 +02:00
551462f1dd dark colours for the dark half of the year 2025-10-09 07:20:34 +02:00
5d954684e1 host ical ephemeris MVP 2025-10-07 11:40:38 +02:00
b12373eb1b stag i3 tag editor 2025-10-06 12:54:43 +02:00
31e6b28b72 yta: download opus 2025-10-06 12:29:29 +02:00
4a77a20c9e aerc: add new email account 2025-10-06 10:28:49 +02:00
fe5bbbc647 update menstruation-backend 2025-10-02 23:16:57 +02:00
8699f09307 go-webring: fix module 2025-10-02 19:33:46 +02:00
d458fb333f fix nixinate call 2025-10-02 19:33:46 +02:00
e7264641a2 www.kmein.de fix backup and CORS 2025-10-02 18:34:23 +02:00
8afc04f266 scanned: fix PATH 2025-10-02 18:34:10 +02:00
427df80396 0ad: add config 2025-10-02 18:33:54 +02:00
ff3ba9047f install go tooling 2025-10-02 18:32:40 +02:00
1d14174ad5 go-webring 2025-10-02 18:32:23 +02:00
a307e2c186 remove old mpd scripts 2025-09-06 19:36:05 +02:00
1cc3a7c6e3 install amfora-wrapper (wrapped to work with overall light theme) 2025-09-06 11:57:24 +02:00
db33374dc0 host gemini 2025-09-05 08:05:02 +02:00
2c75c0d608 obsidian-vim: fix lua syntax 2025-09-04 13:48:39 +02:00
f84cd44db5 update local network 2025-09-04 13:48:01 +02:00
84cec2eb24 neovim: disable ernest 2025-08-30 17:49:58 +02:00
031b934c99 change wifi name 2025-08-30 17:49:58 +02:00
github-actions[bot]
7491396645 flake.lock: Update
Flake lock file updates:

• Updated input 'agenix':
    'github:ryantm/agenix/531beac616433bac6f9e2a19feb8e99a22a66baf?narHash=sha256-9P1FziAwl5%2B3edkfFcr5HeGtQUtrSdk/MksX39GieoA%3D' (2025-06-17)
  → 'github:ryantm/agenix/9edb1787864c4f59ae5074ad498b6272b3ec308d?narHash=sha256-NA/FT2hVhKDftbHSwVnoRTFhes62%2B7dxZbxj5Gxvghs%3D' (2025-08-05)
• Updated input 'home-manager':
    'github:nix-community/home-manager/501cfec8277f931a9c9af9f23d3105c537faeafe?narHash=sha256-tWosziZTT039x6PgEZUhzGlV8oLvdDmIgKTE8ESMaEA%3D' (2025-07-02)
  → 'github:nix-community/home-manager/4a44fb9f7555da362af9d499817084f4288a957f?narHash=sha256-OILVkfhRCm8u18IZ2DKR8gz8CVZM2ZcJmQBXmjFLIfk%3D' (2025-08-23)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/7a732ed41ca0dd64b4b71b563ab9805a80a7d693?narHash=sha256-u7ubvtxdTnFPpV27AHpgoKn7qHuE7sgWgza/1oj5nzA%3D' (2025-07-03)
  → 'github:NixOS/nixpkgs/9cb344e96d5b6918e94e1bca2d9f3ea1e9615545?narHash=sha256-gKlP0LbyJ3qX0KObfIWcp5nbuHSb5EHwIvU6UcNBg2A%3D' (2025-08-20)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/07c3e0e2be593551abdccacabe29cc57206b396f?narHash=sha256-30JXBxkJD3pxBBGQwl/DDwxxJDGQ1nvkvWwEtTsmhA8%3D' (2025-07-05)
  → 'github:NixOS/nixpkgs/42e1afa45385017e72b59ad15c3f786d09a704be?narHash=sha256-hG2eV%2B5tMHSE3XFmJTgx87GrTAD3RJz2Lj%2BzM0TShg4%3D' (2025-08-24)
• Updated input 'nur':
    'github:nix-community/NUR/a26411970baba3604e425f23e5293da492069e4a?narHash=sha256-iDjz1tBd/ibtmZZse4k1NBxfPR8g9K5W4sRgCyOnrj0%3D' (2025-07-05)
  → 'github:nix-community/NUR/20caa31dbef80914895e41b56be4cabc740b2126?narHash=sha256-/W53HyLk4qSrPJjYWdD5SK%2B3p0Ns9Bg6MKHoeqLVqi0%3D' (2025-08-23)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/3016b4b15d13f3089db8a41ef937b13a9e33a8df?narHash=sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU%2Btt4YY%3D' (2025-06-30)
  → 'github:nixos/nixpkgs/20075955deac2583bb12f07151c2df830ef346b4?narHash=sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs%2BStOp19xNsbqdOg%3D' (2025-08-19)
• Removed input 'nur/treefmt-nix'
• Removed input 'nur/treefmt-nix/nixpkgs'
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/9e5e62a33a929a67a5427fb7324a6f583dced0b2?narHash=sha256-dYO5X5jK8bpQOeRAo8R5aUt6M/%2BJi1cZgstZI7SQ2IA%3D' (2025-07-05)
  → 'github:oxalica/rust-overlay/897ecf2b25be05e6ccb7661703f9f2fdec155f42?narHash=sha256-r0WnHKwA8DQNSHDmN3LNaqu41GbWDYqLS7IQAGR%2B6Wg%3D' (2025-08-23)
• Updated input 'scripts':
    'github:kmein/scripts/f44c7a4a6caa1ef5d6b7bf7e93acea0d96f30c21?narHash=sha256-mDDxMwKFURX1K1Z8X/kmt%2BjYjswofDf0br%2BMkw2tmSE%3D' (2025-06-02)
  → 'github:kmein/scripts/cc37fa4aec70f53731b9131bb8830b4445b75b3d?narHash=sha256-TnfXFloY4Ntq%2B0hp%2Bq9GGmuhtB1oueFiB%2BpcBUNYzFs%3D' (2025-07-20)
• Updated input 'stockholm':
    'github:krebs/stockholm/d4abc837cc7b87b4f23fe48cc306df26e3de7aab?narHash=sha256-i2s6jU%2B8GLKVjhWDyvFYxmXI7A44c9p6apPPyKt0ETk%3D' (2025-05-13)
  → 'github:krebs/stockholm/fc32e4609140fffa1312a4ca1aeea550b7467448?narHash=sha256-Mo2BkJXIz6HKM8cX2S7bRdX6Q3E1UOcyVL4v10QEUzk%3D' (2025-08-09)
• Updated input 'stockholm/buildbot-nix':
    'github:Mic92/buildbot-nix/7ad9b4886eccb5eecc0686a16266ddabf6cbefe9?narHash=sha256-mRnIdJLP%2B0NSim9ao30ue0Z3ttSuxzXwQG7UN1KuKfU%3D' (2025-05-07)
  → 'github:Mic92/buildbot-nix/47ad4c7afb169df6f9d48d0df3d7e2f71d9ddd8f?narHash=sha256-vCYcc/b8WizF6vnjuRVxSiU8hy9L3vOTWDVKpWM7xRE%3D' (2025-07-03)
• Updated input 'stockholm/buildbot-nix/flake-parts':
    'github:hercules-ci/flake-parts/c621e8422220273271f52058f618c94e405bb0f5?narHash=sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY%3D' (2025-04-01)
  → 'github:hercules-ci/flake-parts/77826244401ea9de6e3bac47c2db46005e1f30b5?narHash=sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ%3D' (2025-07-01)
• Updated input 'stockholm/buildbot-nix/hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/5b6cec51c9ec095a0d3fd4c8eeb53eb5c59ae33e?narHash=sha256-1Z4WPGVky4w3lrhrgs89OKsLzPdtkbi1bPLNFWsoLfY%3D' (2025-04-15)
  → 'github:hercules-ci/hercules-ci-effects/231726642197817d20310b9d39dd4afb9e899489?narHash=sha256-EaAJhwfJGBncgIV/0NlJviid2DP93cTMc9h0q6P6xXk%3D' (2025-05-23)
• Updated input 'stockholm/buildbot-nix/treefmt-nix':
    'github:numtide/treefmt-nix/29ec5026372e0dec56f890e50dbe4f45930320fd?narHash=sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4%3D' (2025-05-02)
  → 'github:numtide/treefmt-nix/ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1?narHash=sha256-0IEdQB1nS%2BuViQw4k3VGUXntjkDp7aAlqcxdewb/hAc%3D' (2025-06-26)
• Updated input 'stockholm/nixpkgs':
    'github:NixOS/nixpkgs/d89fc19e405cb2d55ce7cc114356846a0ee5e956?narHash=sha256-3e%2BAVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ%3D' (2025-05-10)
  → 'github:NixOS/nixpkgs/1fd8bada0b6117e6c7eb54aad5813023eed37ccb?narHash=sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo%3D' (2025-07-06)
• Updated input 'stylix':
    'github:danth/stylix/5dd301b72207d4fd8d8b929abd88ba1c486d1744?narHash=sha256-jqRbWjB8aH2qzq6nMQpwkzVBR4o9lNxAHFmRgGwnJ94%3D' (2025-07-04)
  → 'github:danth/stylix/79be65b20d7b8fb7e8f39ba8121cfe41b7f46808?narHash=sha256-VmheUy4UzWDy/u0TvCCHptgF30peL7wRxkHy7EVpDrQ%3D' (2025-08-20)
• Removed input 'stylix/flake-compat'
• Removed input 'stylix/git-hooks'
• Removed input 'stylix/git-hooks/flake-compat'
• Removed input 'stylix/git-hooks/gitignore'
• Removed input 'stylix/git-hooks/gitignore/nixpkgs'
• Removed input 'stylix/git-hooks/nixpkgs'
• Removed input 'stylix/home-manager'
2025-08-24 01:09:28 +00:00
1c299cafef blake quote 2025-08-09 13:15:39 +02:00
cbce724ade reformat 2025-08-07 10:14:07 +02:00
00dfe27738 prometheus: decrease log size 2025-08-07 10:13:54 +02:00
6e0026ed5c alertmanager: alert lassulus for mastodon outtime 2025-08-07 10:13:01 +02:00
d92f382b9a wallpaper: fix for X 2025-08-07 10:12:21 +02:00
630ec3d052 stylix: autoenable for homemanager and make apply to tmux 2025-07-25 08:59:31 +02:00
bfd7195543 vim: newfangled distraction-free writing plugins 2025-07-25 08:59:00 +02:00
0d2481bd78 vim: enable copilot 2025-07-21 18:54:30 +02:00
28cd462bc6 sway: remove 2025-07-21 14:49:39 +02:00
67358560b8 update 2025-07-11 11:31:09 +02:00
675c453599 gammastep 2025-07-11 11:31:00 +02:00
e4543eeb0b sway 2025-07-08 20:56:40 +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
114 changed files with 1831 additions and 2537 deletions

View File

@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
system: [makanek,manakish,kabsa,zaatar,ful,fatteh,kibbeh] system: [makanek,manakish,kabsa,zaatar,ful,fatteh]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install QEMU (ARM) - name: Install QEMU (ARM)

View File

@@ -1,5 +1,7 @@
# niveum # niveum
> I must Create a System, or be enslav'd by another Man's. —William Blake
> [nĭvĕus](https://logeion.uchicago.edu/niveus), a, um, adj. [nix], _of_ or _from snow, snowy, snow-_ (poet.) > [nĭvĕus](https://logeion.uchicago.edu/niveus), a, um, adj. [nix], _of_ or _from snow, snowy, snow-_ (poet.)
> >
> 1. Lit.: aggeribus niveis informis, Verg. G. 3, 354: aqua, _cooled with snow_, Mart. 12, 17, 6; cf. id. 14, 104 and 117: mons, _covered with snow_, Cat. 64, 240.— > 1. Lit.: aggeribus niveis informis, Verg. G. 3, 354: aqua, _cooled with snow_, Mart. 12, 17, 6; cf. id. 14, 104 and 117: mons, _covered with snow_, Cat. 64, 240.—

View File

@@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
darwin = lib.strings.hasSuffix "-darwin" pkgs.system; darwin = lib.strings.hasSuffix "-darwin" pkgs.stdenv.hostPlatform.system;
in { in {
environment.systemPackages = environment.systemPackages =
[ [
@@ -15,6 +15,7 @@ in {
pkgs.unzip pkgs.unzip
pkgs.unrar pkgs.unrar
pkgs.p7zip pkgs.p7zip
pkgs.sshuttle
pkgs.zip pkgs.zip
# MONITORS # MONITORS
pkgs.iftop # interface bandwidth monitor pkgs.iftop # interface bandwidth monitor

View File

@@ -8,14 +8,14 @@
inherit (import ../lib/email.nix) defaults thunderbirdProfile; inherit (import ../lib/email.nix) defaults thunderbirdProfile;
in { in {
age.secrets = { age.secrets = {
email-password-cock = { email-password-ical-ephemeris = {
file = ../secrets/email-password-cock.age; file = ../secrets/email-password-ical-ephemeris.age;
owner = config.users.users.me.name; owner = config.users.users.me.name;
group = config.users.users.me.group; group = config.users.users.me.group;
mode = "400"; mode = "400";
}; };
email-password-letos = { email-password-cock = {
file = ../secrets/email-password-letos.age; file = ../secrets/email-password-cock.age;
owner = config.users.users.me.name; owner = config.users.users.me.name;
group = config.users.users.me.group; group = config.users.users.me.group;
mode = "400"; mode = "400";
@@ -92,16 +92,17 @@ in {
smtp.port = 25; smtp.port = 25;
smtp.tls.useStartTls = true; smtp.tls.useStartTls = true;
}; };
letos = ical-ephemeris =
lib.recursiveUpdate defaults lib.recursiveUpdate defaults
{ rec {
userName = "slfletos"; userName = "ical.ephemeris@web.de";
address = "letos.sprachlit@hu-berlin.de"; realName = "Kieran from iCal Ephemeris";
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}"; address = userName;
imap.host = "mailbox.cms.hu-berlin.de"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-ical-ephemeris.path}";
imap.host = "imap.web.de";
imap.port = 993; imap.port = 993;
smtp.host = "mailhost.cms.hu-berlin.de"; smtp.host = "smtp.web.de";
smtp.port = 25; smtp.port = 587;
smtp.tls.useStartTls = true; smtp.tls.useStartTls = true;
}; };
posteo = posteo =

View File

@@ -1,58 +1,8 @@
{ {
pkgs, pkgs,
lib, lib,
config,
... ...
}: let }: 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 { in {
environment.variables.TERMINAL = "alacritty"; environment.variables.TERMINAL = "alacritty";

View File

@@ -5,6 +5,6 @@
interactiveShellInit = '' interactiveShellInit = ''
set -o vi set -o vi
''; '';
enableCompletion = true; completion.enable = true;
}; };
} }

View File

@@ -1,17 +1,9 @@
{ {
pkgs,
lib,
config, config,
inputs,
... ...
}: let }: let
autorenkalender-package = pkgs.fetchFromGitHub { autorenkalender = inputs.autorenkalender.packages.x86_64-linux.default;
owner = "kmein";
repo = "autorenkalender";
rev = "cf49a7b057301332d980eb47042a626add93db66";
sha256 = "1pa7sjg33vdnjianrqldv445jdzzv3mn231ljk1j58hs0cd505gs";
};
autorenkalender =
pkgs.python3Packages.callPackage autorenkalender-package {};
in { in {
niveum.bots.autorenkalender = { niveum.bots.autorenkalender = {
enable = true; enable = true;

View File

@@ -17,11 +17,15 @@ in {
./hesychius.nix ./hesychius.nix
./smyth.nix ./smyth.nix
./nachtischsatan.nix ./nachtischsatan.nix
./tlg-wotd.nix # ./tlg-wotd.nix TODO reenable
./celan.nix ./celan.nix
./nietzsche.nix ./nietzsche.nix
]; ];
age.secrets = {
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
};
systemd.tmpfiles.rules = map (path: systemd.tmpfiles.rules = map (path:
tmpfilesConfig { tmpfilesConfig {
type = "d"; type = "d";

View File

@@ -20,15 +20,31 @@
command = toString (pkgs.writers.writeDash "random-smyth" '' command = toString (pkgs.writers.writeDash "random-smyth" ''
set -efu set -efu
good_curl() {
${pkgs.curl}/bin/curl "$@" \
--compressed \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'DNT: 1' \
-H 'Connection: keep-alive' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Sec-Fetch-Dest: document' \
-H 'Sec-Fetch-Mode: navigate' \
-H 'Sec-Fetch-Site: cross-site' \
-H 'Priority: u=0, i' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache'
}
RANDOM_SECTION=$( RANDOM_SECTION=$(
${pkgs.curl}/bin/curl -sSL http://www.perseus.tufts.edu/hopper/xmltoc?doc=Perseus%3Atext%3A1999.04.0007%3Asmythp%3D1 \ good_curl -sSL http://www.perseus.tufts.edu/hopper/xmltoc?doc=Perseus%3Atext%3A1999.04.0007%3Asmythp%3D1 \
| ${pkgs.gnugrep}/bin/grep -o 'ref="[^"]*"' \ | ${pkgs.gnugrep}/bin/grep -o 'ref="[^"]*"' \
| ${pkgs.coreutils}/bin/shuf -n1 \ | ${pkgs.coreutils}/bin/shuf -n1 \
| ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//' | ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//'
) )
url="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"\ good_curl -sSL "$url"\
| ${pkgs.htmlq}/bin/htmlq '#text_main' \ | ${pkgs.htmlq}/bin/htmlq '#text_main' \
| ${pkgs.gnused}/bin/sed 's/<\/\?hr>//g' \ | ${pkgs.gnused}/bin/sed 's/<\/\?hr>//g' \
| ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none | ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none

View File

@@ -3,11 +3,14 @@
lib, lib,
config, config,
niveumPackages, niveumPackages,
unstablePackages,
... ...
}: let }: let
mastodonEndpoint = "https://social.krebsco.de"; mastodonEndpoint = "https://social.krebsco.de";
in { in {
systemd.services.bot-tlg-wotd = { systemd.services.bot-tlg-wotd = {
# TODO reenable
# once https://github.com/NixOS/nixpkgs/pull/462893 is in stable NixOS
enable = true; enable = true;
wants = ["network-online.target"]; wants = ["network-online.target"];
startAt = "9:30"; startAt = "9:30";
@@ -42,9 +45,8 @@ in {
#ancientgreek #classics #wotd #wordoftheday #ancientgreek #classics #wotd #wordoftheday
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" { transliteration=$(${pkgs.writers.writePython3 "translit.py" {
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged libraries = py: [ py.cltk ];
libraries = [ pkgs.python311Packages.cltk ];
} '' } ''
import sys import sys
from cltk.phonology.grc.transcription import Transcriber from cltk.phonology.grc.transcription import Transcriber
@@ -149,7 +151,6 @@ in {
}; };
age.secrets = { age.secrets = {
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age; mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
}; };

View File

@@ -6,8 +6,9 @@
}: { }: {
environment.systemPackages = [ environment.systemPackages = [
niveumPackages.cro niveumPackages.cro
pkgs.tor-browser-bundle-bin pkgs.tor-browser
pkgs.firefox pkgs.firefox
pkgs.brave
]; ];
home-manager.users.me = { home-manager.users.me = {
@@ -81,5 +82,9 @@
}; };
}; };
home-manager.users.me = {
stylix.targets.firefox.profileNames = ["default"];
};
environment.variables.BROWSER = "firefox"; environment.variables.BROWSER = "firefox";
} }

View File

@@ -6,6 +6,16 @@
}: let }: let
inherit (import ../lib) tmpfilesConfig; inherit (import ../lib) tmpfilesConfig;
in { 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 [ systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
{ {
type = "d"; type = "d";

View File

@@ -3,19 +3,20 @@
lib, lib,
config, config,
niveumPackages, niveumPackages,
unstablePackages,
inputs, inputs,
... ...
}: let }:
let
inherit (lib.strings) makeBinPath; inherit (lib.strings) makeBinPath;
inherit (import ../lib) localAddresses kieran remoteDir; inherit (import ../lib) localAddresses kieran remoteDir;
defaultApplications = (import ../lib).defaultApplications {inherit pkgs;}; defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
in { in
{
imports = [ imports = [
inputs.self.nixosModules.system-dependent inputs.self.nixosModules.system-dependent
inputs.self.nixosModules.power-action inputs.self.nixosModules.power-action
{ {
boot.supportedFilesystems = ["ntfs"]; boot.supportedFilesystems = [ "ntfs" ];
} }
{ {
nixpkgs = { nixpkgs = {
@@ -25,9 +26,6 @@ in {
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
}; };
permittedInsecurePackages = [ permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
"zotero-6.0.26"
"electron-25.9.0"
]; ];
}; };
}; };
@@ -74,7 +72,10 @@ in {
hashedPasswordFile = config.age.secrets.kfm-password.path; hashedPasswordFile = config.age.secrets.kfm-password.path;
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
extraGroups = ["pipewire" "audio"]; extraGroups = [
"pipewire"
"audio"
];
}; };
nix.settings.trusted-users = [ config.users.users.me.name ]; nix.settings.trusted-users = [ config.users.users.me.name ];
@@ -87,25 +88,27 @@ in {
} }
{ {
environment.interactiveShellInit = "export PATH=$PATH"; environment.interactiveShellInit = "export PATH=$PATH";
environment.shellAliases = let environment.shellAliases =
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}"; let
in { swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
o = "${pkgs.xdg-utils}/bin/xdg-open"; in
ns = "nix-shell --run zsh"; {
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in"; o = "${pkgs.xdg-utils}/bin/xdg-open";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out"; ns = "nix-shell --run zsh";
tmux = "${pkgs.tmux}/bin/tmux -2"; pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
zathura = swallow "${pkgs.zathura}/bin/zathura"; tmux = "${pkgs.tmux}/bin/tmux -2";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link zathura = swallow "${pkgs.zathura}/bin/zathura";
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio 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 mp3 --audio-quality 0 -xic"; # Download with audio
};
} }
{ {
i18n = { i18n = {
defaultLocale = "en_DK.UTF-8"; defaultLocale = "en_DK.UTF-8";
supportedLocales = ["all"]; supportedLocales = [ "all" ];
}; };
} }
{ {
@@ -121,12 +124,17 @@ in {
enable = true; enable = true;
greeters.gtk = { greeters.gtk = {
enable = true; enable = true;
indicators = ["~spacer" "~host" "~spacer" "~session" "~power"]; indicators = [
"~spacer"
"~host"
"~spacer"
"~session"
"~power"
];
}; };
}; };
}; };
} }
{programs.command-not-found.enable = true;}
{ {
programs.gnupg = { programs.gnupg = {
agent = { agent = {
@@ -141,7 +149,11 @@ in {
environment.systemPackages = [ environment.systemPackages = [
pkgs.gnupg 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
]))
]; ];
} }
{ {
@@ -154,12 +166,10 @@ in {
}; };
} }
{ {
networking.hosts = networking.hosts = lib.mapAttrs' (name: address: {
lib.mapAttrs' (name: address: { name = address;
name = address; value = [ "${name}.local" ];
value = ["${name}.local"]; }) localAddresses;
})
localAddresses;
} }
{ {
home-manager.users.me.home.stateVersion = "22.05"; home-manager.users.me.home.stateVersion = "22.05";
@@ -167,9 +177,9 @@ in {
} }
{ {
systemd.user.services.udiskie = { systemd.user.services.udiskie = {
after = ["udisks2.service"]; after = [ "udisks2.service" ];
wants = ["udisks2.service"]; wants = [ "udisks2.service" ];
wantedBy = ["graphical-session.target"]; wantedBy = [ "graphical-session.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify"; ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify";
}; };
@@ -200,19 +210,19 @@ in {
./direnv.nix ./direnv.nix
./docker.nix ./docker.nix
./dunst.nix ./dunst.nix
./flix.nix
./fonts.nix ./fonts.nix
./fzf.nix ./fzf.nix
./git.nix ./git.nix
./hledger.nix ./hledger.nix
./htop.nix ./htop.nix
./fu-berlin.nix ./uni.nix
./i3.nix ./i3.nix
./i3status-rust.nix ./i3status-rust.nix
./keyboard.nix ./keyboard.nix
./mycelium.nix ./mycelium.nix
./kdeconnect.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 ./lb.nix
./mpv.nix ./mpv.nix
./mime.nix ./mime.nix
@@ -220,8 +230,8 @@ in {
./nix.nix ./nix.nix
./newsboat.nix ./newsboat.nix
./flameshot.nix ./flameshot.nix
./fritzbox.nix
./packages.nix ./packages.nix
./virtualization.nix
./picom.nix ./picom.nix
./stardict.nix ./stardict.nix
./polkit.nix ./polkit.nix
@@ -246,7 +256,6 @@ in {
''; '';
} }
./tor.nix ./tor.nix
./stw-berlin.nix
./mastodon-bot.nix ./mastodon-bot.nix
{ {
fileSystems."${remoteDir}/fritz" = { fileSystems."${remoteDir}/fritz" = {
@@ -276,7 +285,7 @@ in {
download = "${config.users.users.me.home}/sync/Downloads"; download = "${config.users.users.me.home}/sync/Downloads";
music = "${config.users.users.me.home}/mobile/audio"; music = "${config.users.users.me.home}/mobile/audio";
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder"; 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; videos = pictures;
}; };
}; };

View File

@@ -15,7 +15,7 @@
showHelp = false; showHelp = false;
squareMagnifier = true; squareMagnifier = true;
uploadWithoutConfirmation = true; uploadWithoutConfirmation = true;
buttons = ''@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\x2\0\0\0\x5\0\0\0\x13\0\0\0\xa\0\0\0\x1\0\0\0\xc\0\0\0\xd\0\0\0\x6\0\0\0\x8\0\0\0\0\0\0\0\xf\0\0\0\x4\0\0\0\xb\0\0\0\x3\0\0\0\x12\0\0\0\x9)''; # buttons = ''@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\x2\0\0\0\x5\0\0\0\x13\0\0\0\xa\0\0\0\x1\0\0\0\xc\0\0\0\xd\0\0\0\x6\0\0\0\x8\0\0\0\0\0\0\0\xf\0\0\0\x4\0\0\0\xb\0\0\0\x3\0\0\0\x12\0\0\0\x9)'';
}; };
}; };
}; };

View File

@@ -1,98 +0,0 @@
{
config,
pkgs,
...
}: let
flixLocation = "/media/flix";
flixLocationNew = "/media/flix-new";
cacheLocation = "/var/cache/flix";
indexFilename = "index";
indexFilenameNew = "index-new";
flixUser = "flix";
flixGroup = "users";
inherit (import ../lib) tmpfilesConfig;
in {
fileSystems.${flixLocation} = {
device = "prism.r:/export/download";
fsType = "nfs";
options = [
"noauto"
"noatime"
"nodiratime"
"x-systemd.automount"
"x-systemd.device-timeout=1"
"x-systemd.idle-timeout=1min"
"x-systemd.requires=tinc.retiolum.service"
"user"
"_netdev"
];
};
fileSystems.${flixLocationNew} = {
device = "//yellow.r/public";
fsType = "cifs";
options = [
"guest"
"nofail"
"noauto"
"ro"
"x-systemd.automount"
"x-systemd.device-timeout=1"
"x-systemd.idle-timeout=1min"
];
};
systemd.tmpfiles.rules = [
(tmpfilesConfig {
type = "d";
path = cacheLocation;
mode = "0750";
user = flixUser;
group = flixGroup;
})
];
systemd.services.flix-index = {
description = "Flix indexing service";
wants = ["network-online.target"];
script = ''
cp ${flixLocation}/index ./${indexFilename}
cp ${flixLocationNew}/index ./${indexFilenameNew}
'';
startAt = "hourly";
serviceConfig = {
Type = "oneshot";
User = flixUser;
Group = flixGroup;
WorkingDirectory = cacheLocation;
};
};
users.extraUsers.${flixUser} = {
isSystemUser = true;
createHome = true;
home = cacheLocation;
group = flixGroup;
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "mpv-simpsons" ''
set -efu
cd "${flixLocation}/download"
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
cat "${cacheLocation}/${indexFilename}" \
| ${pkgs.gnugrep}/bin/grep -i 'simpsons.*mkv' \
| shuf \
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
'')
(pkgs.writers.writeDashBin "flixmenu" ''
set -efu
(
${pkgs.gnused}/bin/sed 's#^\.#${flixLocation}#' ${cacheLocation}/${indexFilename}
${pkgs.gnused}/bin/sed 's#^\.#${flixLocationNew}#' ${cacheLocation}/${indexFilenameNew}
) | ${pkgs.dmenu}/bin/dmenu -i -p flix -l 5 "$@" \
| ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.util-linux}/bin/setsid ${pkgs.xdg-utils}/bin/xdg-open '{}'
'')
];
}

View File

@@ -24,11 +24,6 @@
url = "https://github.com/MKilani/Djehuty/archive/master.zip"; url = "https://github.com/MKilani/Djehuty/archive/master.zip";
sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c="; sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c=";
}; };
brill = zip-font "Brill" {
url = "https://brill.com/fileasset/The_Brill_Typeface_Package_v_4_0.zip";
stripRoot = false;
hash = "sha256-ugmEIkeBzD/4C9wkVfbctEtnzI8Kw+YD6KGcbk4BAf4=";
};
antinoou = zip-font "Antinoou" { antinoou = zip-font "Antinoou" {
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip"; url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw"; sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw";
@@ -92,7 +87,7 @@ in {
newGardiner newGardiner
junicode junicode
koineGreek koineGreek
brill # brill
ezra-sil ezra-sil
fira fira
font-awesome font-awesome
@@ -107,11 +102,12 @@ in {
lmodern lmodern
merriweather merriweather
ocr-a ocr-a
montserrat
roboto roboto
roboto-mono roboto-mono
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-color-emoji
roboto-slab roboto-slab
scheherazade-new scheherazade-new
source-code-pro source-code-pro
@@ -119,7 +115,7 @@ in {
source-serif-pro source-serif-pro
theano theano
niveumPackages.tocharian-font niveumPackages.tocharian-font
vistafonts vista-fonts
vollkorn vollkorn
zilla-slab zilla-slab
]; # google-fonts league-of-moveable-type ]; # google-fonts league-of-moveable-type

View File

@@ -1,19 +0,0 @@
{ 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=";
}
];
};
}

13
configs/gaming.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.zeroad
pkgs.mari0
pkgs.luanti # fka minetest
];
networking.firewall = {
# for 0ad multiplayer
allowedTCPPorts = [ 20595 ];
allowedUDPPorts = [ 20595 ];
};
}

View File

@@ -17,7 +17,6 @@ in {
pkgs.gitstats pkgs.gitstats
pkgs.patch pkgs.patch
pkgs.patchutils pkgs.patchutils
inputs.self.packages.${pkgs.system}.git-preview
]; ];
environment.shellAliases = { environment.shellAliases = {
@@ -29,9 +28,7 @@ in {
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitFull; package = pkgs.gitFull;
userName = kieran.name; settings.alias = {
userEmail = kieran.email;
aliases = {
br = "branch"; br = "branch";
co = "checkout"; co = "checkout";
ci = "commit"; ci = "commit";
@@ -45,19 +42,12 @@ in {
graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"; graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
}; };
ignores = ignorePaths; ignores = ignorePaths;
extraConfig = { settings.user.name = kieran.name;
pull.ff = "only"; settings.user.email = kieran.email;
rebase.autoStash = true; settings.pull.ff = "only";
merge.autoStash = true; settings.rebase.autoStash = true;
push.autoSetupRemote = true; settings.merge.autoStash = true;
settings.push.autoSetupRemove = true;
# # ref https://github.com/dandavison/delta
# core.pager = "${pkgs.delta}/bin/delta";
# interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
# delta.navigate = true;
# merge.conflictStyle = "diff3";
# diff.colorMoved = "default";
};
}; };
}; };
} }

View File

@@ -6,10 +6,8 @@
... ...
}: let }: let
dashboard = pkgs.writers.writeDashBin "dashboard" '' dashboard = pkgs.writers.writeDashBin "dashboard" ''
${pkgs.alacritty}/bin/alacritty --class wtf --command ${pkgs.writers.writeDash "dashboard-inner" '' ${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
export WTF_OWM_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})" exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
export WTF_MINIFLUX_API_KEY="$(cat ${config.age.secrets.miniflux-api-token.path})"
exec ${niveumPackages.dashboard}/bin/dashboard
''} ''}
''; '';
inherit (import ../lib) defaultApplications; inherit (import ../lib) defaultApplications;
@@ -96,7 +94,7 @@ in {
services.xserver = { services.xserver = {
windowManager.i3 = { windowManager.i3 = {
enable = true; enable = true;
package = pkgs.i3-gaps; package = pkgs.i3;
}; };
}; };
@@ -115,6 +113,7 @@ in {
''; '';
}; };
home-manager.users.me = let home-manager.users.me = let
modifier = "Mod4"; modifier = "Mod4";
infoWorkspace = ""; infoWorkspace = "";
@@ -133,7 +132,7 @@ in {
border = 1; border = 1;
}; };
bars = [ bars = [
(config.home-manager.users.me.lib.stylix.i3.bar (config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
// rec { // rec {
workspaceButtons = true; workspaceButtons = true;
mode = "hide"; # "dock"; mode = "hide"; # "dock";
@@ -271,32 +270,7 @@ in {
# XF86Launch1 (thinkvantage) # XF86Launch1 (thinkvantage)
}; };
in { in {
wayland.windowManager.sway = { stylix.targets.i3.enable = true;
enable = true;
config = {
menu = "rofi -modi run,ssh,window -show run";
inherit modifier modes gaps bars floating window colors keybindings;
input = {
"*" = {
xkb_layout = "de";
xkb_variant = "T3";
};
};
terminal = (defaultApplications pkgs).terminal;
up = "k";
down = "j";
left = "h";
right = "l";
seat = {
"*" = {
hide_cursor = "when-typing enable";
};
};
startup = [
{command = "echo hello";}
];
};
};
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
enable = true; enable = true;
@@ -310,22 +284,12 @@ 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 "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"}" 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 exec ${dashboard}/bin/dashboard
''; '';
config = lib.mkMerge [ config = {
{ inherit modifier gaps modes bars floating window colors;
inherit modifier gaps modes bars floating window colors keybindings; keybindings = keybindings // {
}
{
keybindings = let
new-workspace = pkgs.writers.writeDash "new-workspace" ''
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
'';
move-to-new-workspace = pkgs.writers.writeDash "new-workspace" ''
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
'';
in {
"${modifier}+ß" = "exec ${niveumPackages.menu-calc}/bin/="; "${modifier}+ß" = "exec ${niveumPackages.menu-calc}/bin/=";
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill"; "${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85"; "${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
@@ -336,8 +300,7 @@ in {
# "${modifier}+x" = "exec ${new-workspace}"; # "${modifier}+x" = "exec ${new-workspace}";
"XF86Display" = "exec ${niveumPackages.dmenu-randr}/bin/dmenu-randr"; "XF86Display" = "exec ${niveumPackages.dmenu-randr}/bin/dmenu-randr";
}; };
} };
];
}; };
}; };
} }

View File

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

View File

@@ -2,27 +2,63 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
let
commaSep = builtins.concatStringsSep ","; commaSep = builtins.concatStringsSep ",";
xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"]; xkbOptions = [
"compose:caps"
"terminate:ctrl_alt_bksp"
"grp:ctrls_toggle"
];
languages = { languages = {
deutsch = { code = "de"; variant = "T3"; }; deutsch = {
greek = { code = "gr"; variant = "polytonic"; }; code = "de";
russian = { code = "ru"; variant = "phonetic"; }; variant = "T3";
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic; };
greek = {
code = "gr";
variant = "polytonic";
};
russian = {
code = "ru";
variant = "phonetic";
};
arabic = {
code = "ara";
variant = "buckwalter";
}; # ../lib/keyboards/arabic;
coptic = ../lib/keyboards/coptic; coptic = ../lib/keyboards/coptic;
avestan = ../lib/keyboards/avestan; avestan = ../lib/keyboards/avestan;
gothic = ../lib/keyboards/gothic; gothic = ../lib/keyboards/gothic;
farsi = { code = "ir"; variant = "qwerty"; }; farsi = {
syriac = { code = "sy"; variant = "syc_phonetic"; }; code = "ir";
sanskrit = { code = "in"; variant = "san-kagapa"; }; variant = "qwerty";
gujarati = {code = "in"; variant = "guj-kagapa"; }; };
urdu = {code = "in"; variant = "urd-phonetic"; }; syriac = {
hebrew = {code = "il"; variant = "phonetic";}; code = "sy";
variant = "syc_phonetic";
};
sanskrit = {
code = "in";
variant = "san-kagapa";
};
gujarati = {
code = "in";
variant = "guj-kagapa";
};
urdu = {
code = "in";
variant = "urd-phonetic";
};
hebrew = {
code = "il";
variant = "phonetic";
};
}; };
defaultLanguage = languages.deutsch; defaultLanguage = languages.deutsch;
in { in
{
services.libinput.enable = true; services.libinput.enable = true;
# man 7 xkeyboard-config # man 7 xkeyboard-config
@@ -41,7 +77,8 @@ in {
lib.mapAttrsToList (name: value: { lib.mapAttrsToList (name: value: {
name = "symbols/${name}"; name = "symbols/${name}";
path = value; path = value;
}) (lib.filterAttrs (_: value: !(value ? "code")) languages) ++ [ }) (lib.filterAttrs (_: value: !(value ? "code")) languages)
++ [
{ {
name = "symbols/ir"; name = "symbols/ir";
path = ../lib/keyboards/farsi; path = ../lib/keyboards/farsi;
@@ -54,25 +91,40 @@ in {
environment.etc."x11-locale".source = toString pkgs.xorg.libX11 + "share/X11/locale"; environment.etc."x11-locale".source = toString pkgs.xorg.libX11 + "share/X11/locale";
home-manager.users.me = {
home.file =
lib.mapAttrs' (name: path: lib.nameValuePair ".xkb/symbols/${name}" { source = path; })
(lib.filterAttrs (_: value: !(value ? "code")) languages) // {
".xkb/symbols/ir".source = ../lib/keyboards/farsi;
};
};
console.keyMap = "de"; console.keyMap = "de";
environment.systemPackages = environment.systemPackages = lib.mapAttrsToList (
lib.mapAttrsToList language: settings:
(language: settings:
let let
code = if settings ? "code" then settings.code else language; code = if settings ? "code" then settings.code else language;
variant = if settings ? "variant" then settings.variant else ""; variant = if settings ? "variant" then settings.variant else "";
in in
pkgs.writers.writeDashBin "kb-${language}" '' pkgs.writers.writeDashBin "kb-${language}" ''
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${toString (map (option: "-option ${option}") xkbOptions)} if [ -z $SWAYSOCK ]; then
'') ${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${
languages; toString (map (option: "-option ${option}") xkbOptions)
}
else
swaymsg -s $SWAYSOCK 'input * xkb_layout "${defaultLanguage.code},${code}"'
swaymsg -s $SWAYSOCK 'input * xkb_variant "${defaultLanguage.variant},${variant}"'
swaymsg -s $SWAYSOCK 'input * xkb_options "${lib.concatStringsSep "," xkbOptions}"'
fi
''
) languages;
# improve held key rate # improve held key rate
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50"; services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
systemd.user.services.gxkb = { systemd.user.services.gxkb = {
wantedBy = ["graphical-session.target"]; wantedBy = [ "graphical-session.target" ];
serviceConfig = { serviceConfig = {
SyslogIdentifier = "gxkb"; SyslogIdentifier = "gxkb";
ExecStart = "${pkgs.gxkb}/bin/gxkb"; ExecStart = "${pkgs.gxkb}/bin/gxkb";

View File

@@ -37,7 +37,7 @@ in {
}; };
scripts = [ scripts = [
pkgs.mpvScripts.quality-menu pkgs.mpvScripts.quality-menu
niveumPackages.mpv-visualizer pkgs.mpvScripts.visualizer
]; ];
}; };
}; };

View File

@@ -37,7 +37,7 @@
environment.systemPackages = [ environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'') (pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(niveumPackages.vim.override { (niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors; # stylixColors = config.lib.stylix.colors;
colorscheme = "base16-gruvbox-dark-medium"; colorscheme = "base16-gruvbox-dark-medium";
}) })
@@ -46,13 +46,14 @@
pkgs.haskellPackages.haskell-language-server pkgs.haskellPackages.haskell-language-server
pkgs.texlab pkgs.texlab
pkgs.nil pkgs.nil
pkgs.gopls
pkgs.nixfmt-rfc-style pkgs.nixfmt-rfc-style
pkgs.rust-analyzer pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server pkgs.lua-language-server
pkgs.nodePackages.vscode-langservers-extracted pkgs.nodePackages.vscode-langservers-extracted
pkgs.lemminx pkgs.lemminx # XML LSP
niveumPackages.jq-lsp pkgs.jq-lsp
pkgs.dhall-lsp-server pkgs.dhall-lsp-server
]; ];
} }

View File

@@ -1,46 +0,0 @@
{ 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

@@ -4,7 +4,6 @@
lib, lib,
inputs, inputs,
niveumPackages, niveumPackages,
unstablePackages,
... ...
}: let }: let
worldradio = pkgs.callPackage ../packages/worldradio.nix {}; worldradio = pkgs.callPackage ../packages/worldradio.nix {};
@@ -63,9 +62,15 @@ in {
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(pkgs.writers.writeDashBin "amfora" ''
${pkgs.st}/bin/st -e ${pkgs.amfora}/bin/amfora
'')
(pkgs.writers.writeDashBin "gpodder" ''
GPODDER_DOWNLOAD_DIR=${config.users.users.me.home}/mobile/audio/Text/podcasts exec ${pkgs.gpodder}/bin/gpodder "$@"
'')
# INTERNET # INTERNET
aria2 aria2
tdesktop telegram-desktop
whois whois
dnsutils dnsutils
# FILE MANAGERS # FILE MANAGERS
@@ -73,6 +78,7 @@ in {
pcmanfm pcmanfm
# MEDIA # MEDIA
ffmpeg ffmpeg
simplescreenrecorder
imagemagick imagemagick
exiftool exiftool
nsxiv nsxiv
@@ -85,7 +91,7 @@ in {
gcc gcc
python3Packages.jsonschema # json validation python3Packages.jsonschema # json validation
pup # html toolkit pup # html toolkit
xsv # csv toolkit xan # csv toolkit
magic-wormhole-rs # file transfer magic-wormhole-rs # file transfer
man-pages man-pages
man-pages-posix man-pages-posix
@@ -93,10 +99,12 @@ in {
# HARDWARE TOOLS # HARDWARE TOOLS
gnome-disk-utility gnome-disk-utility
arandr # xrandr for noobs arandr # xrandr for noobs
wdisplays
libnotify # for notify-send libnotify # for notify-send
xclip # clipboard CLI xclip # clipboard CLI
xdragon # drag and drop dragon-drop # drag and drop
xorg.xkill # kill by clicking xorg.xkill # kill by clicking
portfolio # personal finance overview
audacity audacity
calibre calibre
electrum electrum
@@ -112,14 +120,14 @@ in {
zoom-us # video conferencing zoom-us # video conferencing
(pkgs.writers.writeDashBin "im" '' (pkgs.writers.writeDashBin "im" ''
weechat_password=$(${pkgs.pass}/bin/pass weechat) 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' exec ${weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
'') '')
alejandra # nix formatter alejandra # nix formatter
pdfgrep # search in pdf pdfgrep # search in pdf
pdftk # pdf toolkit pdftk # pdf toolkit
mupdf mupdf
poppler_utils # pdf toolkit poppler-utils # pdf toolkit
okular # the word is nucular kdePackages.okular # the word is nucular
xournalpp # for annotating pdfs xournalpp # for annotating pdfs
pdfpc # presenter console for pdf slides pdfpc # presenter console for pdf slides
niveumPackages.hc # print files as qr codes niveumPackages.hc # print files as qr codes
@@ -128,6 +136,7 @@ in {
rink # unit converter rink # unit converter
niveumPackages.auc niveumPackages.auc
niveumPackages.noise-waves niveumPackages.noise-waves
niveumPackages.stag
niveumPackages.cheat-sh niveumPackages.cheat-sh
niveumPackages.polyglot niveumPackages.polyglot
niveumPackages.qrpaste niveumPackages.qrpaste
@@ -142,19 +151,14 @@ in {
niveumPackages.pls niveumPackages.pls
niveumPackages.mpv-tv niveumPackages.mpv-tv
niveumPackages.mpv-iptv niveumPackages.mpv-iptv
jellyfin-media-player
niveumPackages.devanagari niveumPackages.devanagari
niveumPackages.betacode # ancient greek betacode to unicode converter niveumPackages.betacode # ancient greek betacode to unicode converter
niveumPackages.meteo pkgs.jq-lsp
niveumPackages.mahlzeit
niveumPackages.jq-lsp
niveumPackages.swallow # window swallowing niveumPackages.swallow # window swallowing
niveumPackages.literature-quote niveumPackages.literature-quote
niveumPackages.booksplit niveumPackages.booksplit
niveumPackages.dmenu-randr niveumPackages.dmenu-randr
niveumPackages.dmenu-bluetooth
niveumPackages.manual-sort niveumPackages.manual-sort
niveumPackages.dns-sledgehammer
niveumPackages.wttr niveumPackages.wttr
niveumPackages.unicodmenu niveumPackages.unicodmenu
niveumPackages.emailmenu niveumPackages.emailmenu
@@ -196,20 +200,13 @@ in {
${pkgs.openssh}/bin/ssh makanek "cd /var/lib/weechat/logs && grep --ignore-case --color=always --recursive $@" | ${pkgs.less}/bin/less --raw-control-chars ${pkgs.openssh}/bin/ssh makanek "cd /var/lib/weechat/logs && grep --ignore-case --color=always --recursive $@" | ${pkgs.less}/bin/less --raw-control-chars
'') '')
(pkgs.writers.writeDashBin "ncmpcpp-zaatar" ''MPD_HOST=${(import ../lib/local-network.nix).zaatar} exec ${pkgs.ncmpcpp}/bin/ncmpcpp "$@"'')
(pkgs.writers.writeDashBin "mpc-zaatar" ''MPD_HOST=${(import ../lib/local-network.nix).zaatar} exec ${pkgs.mpc_cli}/bin/mpc "$@"'')
inputs.scripts.packages.x86_64-linux.alarm inputs.scripts.packages.x86_64-linux.alarm
spotify spotify
ncspot ncspot
playerctl playerctl
nix-index
niveumPackages.nix-index-update
#krebs #krebs
niveumPackages.dic
pkgs.nur.repos.mic92.ircsink pkgs.nur.repos.mic92.ircsink
(haskellPackages.ghcWithHoogle (hs: [ (haskellPackages.ghcWithHoogle (hs: [
@@ -236,9 +233,8 @@ in {
dhall dhall
html-tidy html-tidy
nodePackages.csslint deno # better node.js
nodePackages.jsonlint go
unstablePackages.deno # better node.js
texlive.combined.scheme-full texlive.combined.scheme-full
latexrun latexrun
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers])) (aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
@@ -250,6 +246,7 @@ in {
# gnumeric # gnumeric
dia dia
pandoc pandoc
librsvg # pandoc depends on this to include SVG in documents
# niveumPackages.man-pandoc # niveumPackages.man-pandoc
typst typst
# proselint # proselint
@@ -261,6 +258,10 @@ in {
# nightly.rust # nightly.rust
shellcheck shellcheck
# photography
gphoto2
darktable
(pkgs.writers.writeDashBin "hass-cli" '' (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 "$@" 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

@@ -3,5 +3,6 @@
location = { location = {
latitude = 52.517; latitude = 52.517;
longitude = 13.3872; longitude = 13.3872;
provider = "geoclue2";
}; };
} }

View File

@@ -3,8 +3,8 @@
externalNetwork = import ../lib/external-network.nix; externalNetwork = import ../lib/external-network.nix;
in { in {
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys; users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
services.gnome.gcr-ssh-agent.enable = false;
home-manager.users.me = { home-manager.users.me = {
# https://discourse.nixos.org/t/gnome-keyring-and-ssh-agent-without-gnome/11663 # https://discourse.nixos.org/t/gnome-keyring-and-ssh-agent-without-gnome/11663
@@ -41,6 +41,7 @@ in {
home-manager.users.me.programs.ssh = { home-manager.users.me.programs.ssh = {
enable = true; enable = true;
enableDefaultConfig = false;
matchBlocks = { matchBlocks = {
"github.com" = { "github.com" = {
hostname = "ssh.github.com"; hostname = "ssh.github.com";

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

@@ -1,52 +0,0 @@
{
pkgs,
config,
...
}: {
age.secrets.stw-berlin-card-code.file = ../secrets/stw-berlin-card-code.age;
systemd.services.stw-berlin = {
enable = true;
wants = ["network-online.target"];
startAt = "weekly";
serviceConfig = {
User = config.users.users.me.name;
Group = config.users.users.me.group;
WorkingDirectory = "/home/kfm/cloud/nextcloud/Uni/Meta/Mensa";
LoadCredential = [
"password:${config.age.secrets.stw-berlin-card-code.path}"
];
};
script = ''
KARTEN_ID=8071859
PASSWORT=$(cat "$CREDENTIALS_DIRECTORY"/password)
endpoint=https://ks.stw.berlin:4433/TL1/TLM/KASVC
authorization_header='Authorization: Basic S0FTVkM6ekt2NXlFMUxaVW12VzI5SQ=='
get_auth_token() {
${pkgs.curl}/bin/curl -sSL "$endpoint/LOGIN?karteNr=$KARTEN_ID&format=JSON&datenformat=JSON" \
-X POST \
-H "$authorization_header" \
--data-raw '{"BenutzerID":"'$KARTEN_ID'","Passwort":"'$PASSWORT'"}' \
| ${pkgs.jq}/bin/jq -r '.[0].authToken|@uri'
}
get_transactions() {
${pkgs.curl}/bin/curl -sSL "$endpoint/TRANS?format=JSON&authToken=$(get_auth_token)&karteNr=$KARTEN_ID&datumVon=12.02.2018&datumBis=$(date -d tomorrow +%d.%m.%Y)" \
-H "$authorization_header" \
| ${pkgs.jq}/bin/jq
}
get_items() {
${pkgs.curl}/bin/curl -sSL "$endpoint/TRANSPOS?format=JSON&authToken=$(get_auth_token)&karteNr=$KARTEN_ID&datumVon=12.02.2018&datumBis=$(date -d tomorrow +%d.%m.%Y)" \
-H "$authorization_header" \
| ${pkgs.jq}/bin/jq
}
get_transactions > transactions-$(date -I).json
get_items > items-$(date -I).json
'';
};
}

View File

@@ -26,6 +26,9 @@ in {
size = 12; size = 12;
}; };
home-manager.users.me = {
stylix.autoEnable = true;
};
# environment.etc."stylix/wallpaper.png".source = generatedWallpaper; # environment.etc."stylix/wallpaper.png".source = generatedWallpaper;
@@ -67,7 +70,7 @@ in {
}; };
emoji = { emoji = {
package = pkgs.noto-fonts-emoji; package = pkgs.noto-fonts-color-emoji;
name = "Noto Color Emoji"; name = "Noto Color Emoji";
}; };

View File

@@ -13,7 +13,7 @@
aggressiveResize = true; aggressiveResize = true;
escapeTime = 50; escapeTime = 50;
historyLimit = 7000; historyLimit = 7000;
shortcut = "a"; shortcut = "b";
extraConfig = '' extraConfig = ''
set -g mouse on set -g mouse on
@@ -37,15 +37,6 @@
set -g status-left-length 32 set -g status-left-length 32
set -g status-right-length 150 set -g status-right-length 150
set -g status-bg colour242
setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W "
setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W "
set -g status-left ""
set -g status-right "#[fg=colour255,bg=colour237,bold] #(hostname -I) #[default]#[fg=colour12,bg=colour233] %FT%R "
set -g status-justify left
set -g status-position bottom set -g status-position bottom
''; '';
}; };

View File

@@ -30,7 +30,19 @@ in {
}; };
}; };
accounts.email.accounts = { accounts.email.accounts = {
fu-student = 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;
};
fu =
lib.recursiveUpdate defaults lib.recursiveUpdate defaults
(lib.recursiveUpdate fu-defaults (lib.recursiveUpdate fu-defaults
rec { rec {
@@ -38,21 +50,6 @@ in {
address = "kieran.meinhardt@fu-berlin.de"; address = "kieran.meinhardt@fu-berlin.de";
aliases = ["${userName}@fu-berlin.de"]; aliases = ["${userName}@fu-berlin.de"];
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhak99.path}"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhak99.path}";
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text);
signature = {
showSignature = "append";
text = ''
${defaults.realName}
${pronouns}
---
Studentische Hilfskraft / ZODIAC
Freie Universität Berlin
Telefon: +49 30 838 58118
Arnimallee 10, Raum 106, 14195 Berlin
'';
};
himalaya = { himalaya = {
enable = true; enable = true;
settings.backend = "imap"; settings.backend = "imap";
@@ -68,6 +65,12 @@ in {
group = config.users.users.me.group; group = config.users.users.me.group;
mode = "400"; 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";
};
fu-sftp-key = { fu-sftp-key = {
file = ../secrets/fu-sftp-key.age; file = ../secrets/fu-sftp-key.age;
owner = "root"; owner = "root";
@@ -110,41 +113,39 @@ in {
]; ];
}; };
}; };
in { in home-directory-mount "meinhak99";
"${remoteDir}/fu/zodiac" = {
device = "//trove.storage.fu-berlin.de/GESCHKULT";
fsType = "cifs";
options =
fu-berlin-cifs-options
++ [
"credentials=${config.age.secrets.cifs-credentials-zodiac.path}"
];
};
} // home-directory-mount "meinhak99"
// home-directory-mount "xm7234fu";
age.secrets = {
cifs-credentials-zodiac.file = ../secrets/cifs-credentials-zodiac.age;
};
environment.systemPackages = [ environment.systemPackages = [
(pkgs.writers.writeDashBin "hu-vpn-split" ''
${pkgs.openfortivpn}/bin/openfortivpn \
--password="$(cat "${config.age.secrets.email-password-letos.path}")" \
--config=${
pkgs.writeText "hu-berlin-split.config" ''
host = forti-ssl.vpn.hu-berlin.de
port = 443
username = slfletos@split_tunnel
''
}
'')
(pkgs.writers.writeDashBin "hu-vpn-full" ''
${pkgs.openfortivpn}/bin/openfortivpn \
--password="$(cat "${config.age.secrets.email-password-letos.path}")" \
--config=${
pkgs.writeText "hu-berlin-full.config" ''
host = forti-ssl.vpn.hu-berlin.de
port = 443
username = slfletos@tunnel_all
''
}
'')
(pkgs.writers.writeDashBin "fu-vpn" '' (pkgs.writers.writeDashBin "fu-vpn" ''
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
then then
${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect # 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 fi
'') '')
]; ];
systemd.services.fu-vpn = {
enable = false;
wants = ["network-online.target"];
serviceConfig.LoadCredential = "password:${config.age.secrets.email-password-meinhak99.path}";
script = ''
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
then
cat "$CREDENTIALS_DIRECTORY/password" | ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --user ${username} --passwd-on-stdin
fi
'';
};
} }

View File

@@ -0,0 +1,14 @@
{ pkgs, ... }:
{
users.users.me.extraGroups = [ "libvirtd" ];
virtualisation.libvirtd.enable = true;
# Enable TPM support for VMs
virtualisation.libvirtd.qemu = {
# swtpm.enable = true;
};
environment.systemPackages = with pkgs; [
virt-manager
];
}

View File

@@ -1,6 +1,9 @@
{ config, ... }:
{ {
networking.wireless = { networking.wireless = {
enable = true; enable = true;
networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; secretsFile = config.age.secrets.wifi.path;
# networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
networks.Schilfpalast.pskRaw = "ext:schilfpalast";
}; };
} }

653
flake.lock generated

File diff suppressed because it is too large Load Diff

363
flake.nix
View File

@@ -2,25 +2,25 @@
description = "niveum: packages, modules, systems"; description = "niveum: packages, modules, systems";
inputs = { inputs = {
self.submodules = true;
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master"; autorenkalender.url = "github:kmein/autorenkalender";
coptic-dictionary.url = "github:kmein/coptic-dictionary"; coptic-dictionary.url = "github:kmein/coptic-dictionary";
flake-utils.url = "github:numtide/flake-utils"; home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.url = "github:nix-community/home-manager/release-24.11";
menstruation-backend.url = "github:kmein/menstruation.rs"; menstruation-backend.url = "github:kmein/menstruation.rs";
menstruation-telegram.url = "github:kmein/menstruation-telegram"; menstruation-telegram.url = "github:kmein/menstruation-telegram";
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05"; nix-index-database.url = "github:nix-community/nix-index-database";
nixinate.url = "github:matthewcroughan/nixinate"; nixinate.url = "github:matthewcroughan/nixinate";
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0"; nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
recht.url = "github:kmein/recht"; recht.url = "github:kmein/recht";
retiolum.url = "github:krebs/retiolum"; retiolum.url = "github:krebs/retiolum";
rust-overlay.url = "github:oxalica/rust-overlay";
scripts.url = "github:kmein/scripts"; scripts.url = "github:kmein/scripts";
stockholm.url = "github:krebs/stockholm"; stockholm.url = "github:krebs/stockholm";
stylix.url = "github:danth/stylix/release-24.11"; stylix.url = "github:danth/stylix/release-25.11";
telebots.url = "github:kmein/telebots"; telebots.url = "github:kmein/telebots";
tinc-graph.url = "github:kmein/tinc-graph"; tinc-graph.url = "github:kmein/tinc-graph";
voidrice.url = "github:Lukesmithxyz/voidrice"; voidrice.url = "github:Lukesmithxyz/voidrice";
@@ -29,116 +29,107 @@
agenix.inputs.home-manager.follows = "home-manager"; agenix.inputs.home-manager.follows = "home-manager";
agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.inputs.nixpkgs.follows = "nixpkgs";
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs"; coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
# menstruation-backend.inputs.flake-utils.follows = "flake-utils";
# menstruation-backend.inputs.nixpkgs.follows = "nixpkgs";
# menstruation-backend.inputs.rust-overlay.follows = "rust-overlay";
menstruation-telegram.inputs.flake-utils.follows = "flake-utils";
menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend"; menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend";
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old"; menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
nix-on-droid.inputs.home-manager.follows = "home-manager"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
recht.inputs.flake-utils.follows = "flake-utils";
recht.inputs.nixpkgs.follows = "nixpkgs"; recht.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.flake-utils.follows = "flake-utils";
scripts.inputs.nixpkgs.follows = "nixpkgs"; scripts.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.rust-overlay.follows = "rust-overlay";
stylix.inputs.home-manager.follows = "home-manager";
stylix.inputs.nixpkgs.follows = "nixpkgs"; stylix.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.flake-utils.follows = "flake-utils";
tinc-graph.inputs.nixpkgs.follows = "nixpkgs"; tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
voidrice.flake = false; voidrice.flake = false;
wallpaper-generator.inputs.flake-utils.follows = "flake-utils";
wallpapers.flake = false; wallpapers.flake = false;
}; };
nixConfig = { outputs =
extra-substituters = [ "https://kmein.cachix.org" ]; inputs@{
extra-trusted-public-keys = [ "kmein.cachix.org-1:rsJ2b6++VQHJ1W6rGuDUYsK/qUkFA3bNpO6PyEyJ9Ls=" ]; self,
}; nixpkgs,
nixpkgs-unstable,
outputs = inputs @ { nur,
self, home-manager,
nixpkgs, agenix,
nixpkgs-unstable, retiolum,
nur, nixinate,
home-manager, flake-utils,
agenix, nix-index-database,
retiolum, stylix,
nixinate, ...
flake-utils, }:
nix-on-droid, let
stylix, lib = nixpkgs.lib;
... eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed;
}: in
{ {
apps = { apps = {
x86_64-darwin = let x86_64-linux =
pkgs = nixpkgs.legacyPackages.x86_64-darwin; let
in { pkgs = nixpkgs.legacyPackages.x86_64-linux;
deploy-maakaron = { lib = nixpkgs.lib;
type = "app"; in
program = toString (pkgs.writers.writeDash "deploy-maakaron" ''
exec $(nix build .#homeConfigurations.maakaron.activationPackage --no-link --print-out-paths)/activate
'');
};
};
x86_64-linux = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
lib = nixpkgs.lib;
in
nixinate.nixinate.x86_64-linux self nixinate.nixinate.x86_64-linux self
// { // {
mock-secrets = { mock-secrets = {
type = "app"; type = "app";
program = toString (pkgs.writers.writeDash "mock-secrets" '' program = toString (
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt pkgs.writers.writeDash "mock-secrets" ''
''); ${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
''
);
}; };
} }
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873 # the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
// builtins.listToAttrs (map (hostname: let // builtins.listToAttrs (
externalNetwork = import ./lib/external-network.nix; map (
targets = { hostname:
ful = "root@ful"; let
zaatar = "root@zaatar"; targets = {
makanek = "root@makanek"; ful = "root@ful";
manakish = "root@manakish"; zaatar = "root@zaatar";
tahina = "root@tahina"; makanek = "root@makanek";
tabula = "root@tabula"; manakish = "root@manakish";
kabsa = "root@kabsa"; tahina = "root@tahina";
fatteh = "root@fatteh"; tabula = "root@tabula";
kibbeh = "root@kibbeh"; kabsa = "root@kabsa";
}; fatteh = "root@fatteh";
in kibbeh = "root@kibbeh";
lib.attrsets.nameValuePair "deploy-${hostname}" { };
type = "app"; in
program = toString (pkgs.writers.writeDash "deploy-${hostname}" '' lib.attrsets.nameValuePair "deploy-${hostname}" {
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \ type = "app";
--max-jobs 2 \ program = toString (
--log-format internal-json \ pkgs.writers.writeDash "deploy-${hostname}" ''
--flake .?submodules=1#${hostname} \ exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
--target-host ${targets.${hostname}} 2>&1 \ --max-jobs 2 \
| ${pkgs.nix-output-monitor}/bin/nom --json --log-format internal-json \
''); --flake .#${hostname} \
}) (builtins.attrNames self.nixosConfigurations)) --target-host ${targets.${hostname}} 2>&1 \
| ${pkgs.nix-output-monitor}/bin/nom --json
''
);
}
) (builtins.attrNames self.nixosConfigurations)
)
// { // {
deploy-ful = { deploy-ful = {
type = "app"; type = "app";
program = toString (pkgs.writers.writeDash "deploy-ful" '' program = toString (
exec ${pkgs.nix}/bin/nix run .?submodules=1#nixinate.ful \ pkgs.writers.writeDash "deploy-ful" ''
--log-format internal-json 2>&1 \ exec ${pkgs.nix}/bin/nix run .#nixinate.ful \
| ${pkgs.nix-output-monitor}/bin/nom --json --log-format internal-json 2>&1 \
''); | ${pkgs.nix-output-monitor}/bin/nom --json
''
);
}; };
}; };
}; };
# TODO overlay for packages
# TODO remove flake-utils dependency from my own repos
nixosModules = { nixosModules = {
htgen = import modules/htgen.nix;
moodle-dl = import modules/moodle-dl.nix; moodle-dl = import modules/moodle-dl.nix;
networkmanager-declarative = import modules/networkmanager-declarative.nix; networkmanager-declarative = import modules/networkmanager-declarative.nix;
passport = import modules/passport.nix; passport = import modules/passport.nix;
@@ -146,43 +137,13 @@
power-action = import modules/power-action.nix; power-action = import modules/power-action.nix;
system-dependent = import modules/system-dependent.nix; system-dependent = import modules/system-dependent.nix;
telegram-bot = import modules/telegram-bot.nix; telegram-bot = import modules/telegram-bot.nix;
go-webring = import modules/go-webring.nix;
}; };
lib = { lib = {
panoptikon = import lib/panoptikon.nix; panoptikon = import lib/panoptikon.nix;
}; };
nixOnDroidConfigurations = {
moto = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [systems/moto/configuration.nix];
pkgs = import nixpkgs {
system = "aarch64-linux";
overlays = [nix-on-droid.overlays.default];
};
extraSpecialArgs = {
niveumPackages = inputs.self.packages.aarch64-linux;
niveumLib = inputs.self.lib;
inherit inputs;
};
home-manager-path = home-manager.outPath;
};
};
homeConfigurations = {
maakaron = let
system = "x86_64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [./systems/maakaron/home.nix];
extraSpecialArgs = {
inherit inputs;
niveumPackages = inputs.self.packages.${system};
};
};
};
nixosConfigurations = let nixosConfigurations = let
niveumSpecialArgs = system: { niveumSpecialArgs = system: {
unstablePackages = import nixpkgs-unstable { unstablePackages = import nixpkgs-unstable {
@@ -207,7 +168,7 @@
agenix.nixosModules.default agenix.nixosModules.default
inputs.self.nixosModules.passport inputs.self.nixosModules.passport
inputs.self.nixosModules.panoptikon inputs.self.nixosModules.panoptikon
inputs.self.nixosModules.htgen inputs.self.nixosModules.go-webring
inputs.stockholm.nixosModules.reaktor2 inputs.stockholm.nixosModules.reaktor2
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
nur.modules.nixos.default nur.modules.nixos.default
@@ -239,6 +200,7 @@
systems/kibbeh/configuration.nix systems/kibbeh/configuration.nix
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager
]; ];
}; };
makanek = nixpkgs.lib.nixosSystem rec { makanek = nixpkgs.lib.nixosSystem rec {
@@ -248,7 +210,6 @@
modules = [ modules = [
systems/makanek/configuration.nix systems/makanek/configuration.nix
inputs.self.nixosModules.telegram-bot inputs.self.nixosModules.telegram-bot
inputs.self.nixosModules.htgen
inputs.self.nixosModules.passport inputs.self.nixosModules.passport
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
@@ -281,6 +242,7 @@
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nix-index-database.nixosModules.default
nur.modules.nixos.default nur.modules.nixos.default
stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
@@ -294,6 +256,7 @@
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nur.modules.nixos.default nur.modules.nixos.default
nix-index-database.nixosModules.default
stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
}; };
@@ -306,140 +269,134 @@
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nur.modules.nixos.default nur.modules.nixos.default
nix-index-database.nixosModules.default
stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
}; };
}; };
}
// flake-utils.lib.eachSystem [flake-utils.lib.system.x86_64-linux flake-utils.lib.system.x86_64-darwin flake-utils.lib.system.aarch64-linux] (system: let packages = eachSupportedSystem (system: let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ config.allowUnfree = true;
nur.overlays.default overlays = [
(self: super: { nur.overlays.default
mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];}; (self: super: {
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; mpv = super.mpv.override {scripts = [super.mpvScripts.visualizer super.mpvScripts.mpris];};
}) dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
]; })
}; ];
unstablePackages = import nixpkgs-unstable { };
inherit system; wrapScript = {
}; packages ? [],
wrapScript = { name,
packages ? [], script,
name, }:
script, pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
}: in {
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"''; # linguistics and ancient world
in {
packages = rec {
auc = pkgs.callPackage packages/auc.nix {}; auc = pkgs.callPackage packages/auc.nix {};
betacode = pkgs.callPackage packages/betacode.nix {}; betacode = pkgs.callPackage packages/betacode.nix {};
brassica = pkgs.callPackage packages/brassica.nix {}; brassica = pkgs.callPackage packages/brassica.nix {}; # TODO upstream
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {}; devanagari = pkgs.callPackage packages/devanagari {};
stardict-tools = pkgs.callPackage packages/stardict-tools.nix {};
heuretes = pkgs.callPackage packages/heuretes.nix {};
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
jsesh = pkgs.callPackage packages/jsesh.nix {}; # TODO upstream
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix {};
polyglot = pkgs.callPackage packages/polyglot.nix {};
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix {};
closest = pkgs.callPackage packages/closest {}; closest = pkgs.callPackage packages/closest {};
cro = pkgs.callPackage packages/cro.nix {};
# lit
random-zeno = pkgs.callPackage packages/random-zeno.nix {};
literature-quote = pkgs.callPackage packages/literature-quote.nix {};
# krebs
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {}; cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
hc = pkgs.callPackage packages/hc.nix {};
kpaste = pkgs.callPackage packages/kpaste.nix {};
pls = pkgs.callPackage packages/pls.nix {};
untilport = pkgs.callPackage packages/untilport.nix {};
radio-news = pkgs.callPackage packages/radio-news.nix {};
# window manager
swallow = pkgs.callPackage packages/swallow.nix {};
devour = pkgs.callPackage packages/devour.nix {};
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {}; # TODO upstream
cro = pkgs.callPackage packages/cro.nix {};
default-gateway = pkgs.callPackage packages/default-gateway.nix {}; default-gateway = pkgs.callPackage packages/default-gateway.nix {};
depp = pkgs.callPackage packages/depp.nix {}; depp = pkgs.callPackage packages/depp.nix {};
dashboard = pkgs.callPackage packages/dashboard {}; dashboard = pkgs.callPackage packages/dashboard {};
devanagari = pkgs.callPackage packages/devanagari {};
devour = pkgs.callPackage packages/devour.nix {};
dic = pkgs.callPackage packages/dic.nix {};
dirmir = pkgs.callPackage packages/dirmir.nix {};
dmenu-bluetooth = pkgs.callPackage packages/dmenu-bluetooth.nix {};
dmenu-scrot = pkgs.callPackage packages/dmenu-scrot.nix {};
dns-sledgehammer = pkgs.callPackage packages/dns-sledgehammer.nix {};
fkill = pkgs.callPackage packages/fkill.nix {}; fkill = pkgs.callPackage packages/fkill.nix {};
fzfmenu = pkgs.callPackage packages/fzfmenu.nix {}; fzfmenu = pkgs.callPackage packages/fzfmenu.nix {};
genius = pkgs.callPackage packages/genius.nix {};
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix {};
git-preview = pkgs.callPackage packages/git-preview.nix {};
gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";}; gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";};
gpt4 = pkgs.callPackage packages/gpt.nix {model = "gpt-4";}; gpt4 = pkgs.callPackage packages/gpt.nix {model = "gpt-4";};
hc = pkgs.callPackage packages/hc.nix {};
jq-lsp = pkgs.callPackage packages/jq-lsp.nix {};
stardict-tools = pkgs.callPackage packages/stardict-tools.nix {};
heuretes = pkgs.callPackage packages/heuretes.nix {};
htgen = pkgs.callPackage packages/htgen.nix {};
image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix {}; image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix {};
image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix {}; image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix {};
infschmv = pkgs.callPackage packages/infschmv.nix {};
iolanguage = pkgs.callPackage packages/iolanguage.nix {};
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
ix = pkgs.callPackage packages/ix.nix {};
jsesh = pkgs.callPackage packages/jsesh.nix {};
k-lock = pkgs.callPackage packages/k-lock.nix {}; k-lock = pkgs.callPackage packages/k-lock.nix {};
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix {};
klem = pkgs.callPackage packages/klem.nix {}; klem = pkgs.callPackage packages/klem.nix {};
kpaste = pkgs.callPackage packages/kpaste.nix {}; man-pandoc = pkgs.callPackage packages/man/pandoc.nix {}; # TODO upstream
literature-quote = pkgs.callPackage packages/literature-quote.nix {};
mahlzeit = pkgs.haskellPackages.callPackage packages/mahlzeit.nix {};
man-pandoc = pkgs.callPackage packages/man/pandoc.nix {};
man-pdf = pkgs.callPackage packages/man-pdf.nix {}; man-pdf = pkgs.callPackage packages/man-pdf.nix {};
mansplain = pkgs.callPackage packages/mansplain.nix {}; mansplain = pkgs.callPackage packages/mansplain.nix {};
manual-sort = pkgs.callPackage packages/manual-sort.nix {}; manual-sort = pkgs.callPackage packages/manual-sort.nix {};
menu-calc = pkgs.callPackage packages/menu-calc.nix {}; menu-calc = pkgs.callPackage packages/menu-calc.nix {};
meteo = pkgs.callPackage packages/meteo.nix {};
noise-waves = pkgs.callPackage packages/noise-waves.nix {}; noise-waves = pkgs.callPackage packages/noise-waves.nix {};
mpv-radio = pkgs.callPackage packages/mpv-radio.nix {di-fm-key-file = "/dev/null";}; 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-tuner = pkgs.callPackage packages/mpv-tuner.nix {di-fm-key-file = "/dev/null";};
mpv-tv = pkgs.callPackage packages/mpv-tv.nix {}; mpv-tv = pkgs.callPackage packages/mpv-tv.nix {};
mpv-iptv = pkgs.callPackage packages/mpv-iptv.nix {}; mpv-iptv = pkgs.callPackage packages/mpv-iptv.nix {};
mpv-visualizer = unstablePackages.mpvScripts.visualizer;
new-mac = pkgs.callPackage packages/new-mac.nix {}; new-mac = pkgs.callPackage packages/new-mac.nix {};
nix-git = pkgs.callPackage packages/nix-git.nix {}; nix-git = pkgs.callPackage packages/nix-git.nix {};
nix-index-update = pkgs.callPackage packages/nix-index-update.nix {inherit system;};
notemenu = pkgs.callPackage packages/notemenu.nix {niveumPackages = self.packages.${system};}; notemenu = pkgs.callPackage packages/notemenu.nix {niveumPackages = self.packages.${system};};
opustags = pkgs.callPackage packages/opustags.nix {}; opustags = pkgs.callPackage packages/opustags.nix {}; # TODO upstream
pls = pkgs.callPackage packages/pls.nix {}; q = pkgs.callPackage packages/q.nix {};
polyglot = pkgs.callPackage packages/polyglot.nix {};
qrpaste = pkgs.callPackage packages/qrpaste.nix {}; qrpaste = pkgs.callPackage packages/qrpaste.nix {};
random-zeno = pkgs.callPackage packages/random-zeno.nix {}; go-webring = pkgs.callPackage packages/go-webring.nix {}; # TODO upstream
rfc = pkgs.callPackage packages/rfc.nix {}; rfc = pkgs.callPackage packages/rfc.nix {};
gimp = pkgs.callPackage packages/gimp.nix {}; gimp = pkgs.callPackage packages/gimp.nix {};
scanned = pkgs.callPackage packages/scanned.nix {}; scanned = pkgs.callPackage packages/scanned.nix {};
swallow = pkgs.callPackage packages/swallow.nix {}; text2pdf = pkgs.callPackage packages/text2pdf.nix {}; # TODO upstream
text2pdf = pkgs.callPackage packages/text2pdf.nix {};
timer = pkgs.callPackage packages/timer.nix {}; timer = pkgs.callPackage packages/timer.nix {};
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {}; trans = pkgs.callPackage packages/trans.nix {}; # TODO upstream
trans = pkgs.callPackage packages/trans.nix {};
ttspaste = pkgs.callPackage packages/ttspaste.nix {}; ttspaste = pkgs.callPackage packages/ttspaste.nix {};
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {}; unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
emailmenu = pkgs.callPackage packages/emailmenu.nix {}; emailmenu = pkgs.callPackage packages/emailmenu.nix {};
untilport = pkgs.callPackage packages/untilport.nix {}; stag = pkgs.callPackage packages/stag.nix {}; # TODO upstream
vg = pkgs.callPackage packages/vg.nix {}; vg = pkgs.callPackage packages/vg.nix {};
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};}; vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {}; obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {}; vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {}; # TODO upstream
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {}; vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {}; # TODO upstream
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {}; vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {}; # TODO upstream
vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {}; vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix {}; # TODO upstream
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {}; vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix {}; # TODO upstream
vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {}; vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {}; # TODO upstream
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {}; vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {}; # TODO upstream
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {}; vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {}; # TODO upstream
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {}; vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {}; # TODO upstream
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {}; vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {}; # TODO upstream
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {}; # TODO upstream
vimv = pkgs.callPackage packages/vimv.nix {}; vimv = pkgs.callPackage packages/vimv.nix {};
weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {}; weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {}; # TODO upstream
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {}; weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {}; # TODO upstream
wttr = pkgs.callPackage packages/wttr.nix {}; dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {};
wttr = pkgs.callPackage packages/wttr.nix {}; # TODO upstream
itl = pkgs.callPackage packages/itl.nix {};
itools = pkgs.callPackage packages/itools.nix {itl = itl;};
booksplit = wrapScript { booksplit = wrapScript {
script = inputs.voidrice.outPath + "/.local/bin/booksplit"; script = inputs.voidrice.outPath + "/.local/bin/booksplit";
name = "booksplit"; name = "booksplit";
packages = [pkgs.ffmpeg pkgs.glibc.bin]; packages = [pkgs.ffmpeg pkgs.glibc.bin];
}; };
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {};
tag = wrapScript { tag = wrapScript {
script = inputs.voidrice.outPath + "/.local/bin/tag"; script = inputs.voidrice.outPath + "/.local/bin/tag";
name = "tag"; name = "tag";
packages = [pkgs.ffmpeg]; packages = [pkgs.ffmpeg];
}; };
}; });
}); };
} }

View File

@@ -1,10 +1,4 @@
{ {
toum = "192.168.178.24"; officejet = "192.168.0.251";
zaatar = "192.168.178.21"; router = "192.168.0.1";
kabsa = "192.168.178.32";
android = "192.168.178.35";
manakish = "192.168.178.29";
officejet = "192.168.178.27";
fritzbox = "192.168.178.1";
} }

View File

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

View File

@@ -85,9 +85,6 @@ let
big-fm-name = name: "${name} | bigFM"; big-fm-name = name: "${name} | bigFM";
big-fm = name: "https://streams.bigfm.de/bigfm-${name}-128-aac"; big-fm = name: "https://streams.bigfm.de/bigfm-${name}-128-aac";
rautemusik-name = name: "${name} | rm.fm";
rautemusik = name: "http://${name}-high.rautemusik.fm/";
rte-name = name: "RTÉ ${name}"; rte-name = name: "RTÉ ${name}";
rte = name: "https://www.rte.ie/manifests/${name}.m3u8"; rte = name: "https://www.rte.ie/manifests/${name}.m3u8";
@@ -1207,198 +1204,6 @@ in
logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg"; logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg";
tags = [tags.schlager]; tags = [tags.schlager];
} }
{
station = rautemusik-name "Volksmusik";
desc = "Volksmusik, Blasmusik, Schlager";
stream = rautemusik "volksmusik";
tags = [tags.schlager];
}
{
station = rautemusik-name "Study";
stream = rautemusik "study";
desc = "Lo-Fi, Chillout, Easy Listening";
tags = [tags.lofi tags.chill];
}
{
station = rautemusik-name "TechHouse";
stream = rautemusik "techhouse";
desc = "Techhouse, Deephouse, Techno, Minimal";
tags = [tags.party];
}
{
station = rautemusik-name "Goldies";
stream = rautemusik "goldies";
desc = "Oldies, 60s, 70s, 80s";
tags = [tags.vintage];
}
{
station = rautemusik-name "90s";
stream = rautemusik "90s";
desc = "90s, Eurodance, Pop, HipHop";
tags = [tags.vintage];
}
{
station = rautemusik-name "Schlager";
stream = rautemusik "schlager";
desc = "Schlager, Discofox, Deutsch, Pop";
tags = [tags.schlager];
}
{
station = rautemusik-name "Country";
stream = rautemusik "country";
desc = "Country, Western, Americana";
tags = [tags.trad tags.american];
}
{
station = rautemusik-name "Sex";
stream = rautemusik "sex";
desc = "RnB, Pop, Easy Listening";
tags = [tags.chill];
}
{
station = rautemusik-name "LoveHits";
stream = rautemusik "lovehits";
desc = "Lovesongs, Balladen, RnB, Pop";
tags = [tags.pop];
}
{
station = rautemusik-name "Klassik";
stream = rautemusik "klassik";
desc = "Symphonie, Orchester, Klassik";
tags = [tags.classical];
}
{
station = rautemusik-name "Traurig";
stream = rautemusik "traurig";
desc = "Balladen, Pop, Easy Listening";
tags = [tags.pop];
}
{
station = rautemusik-name "Happy";
stream = rautemusik "happy";
desc = "Pop, Dance, Charts";
tags = [tags.pop];
}
{
station = rautemusik-name "Solo Piano";
stream = rautemusik "solopiano";
desc = "Klavier, Instrumental, Easy Listening";
tags = [tags.classical];
}
{
station = rautemusik-name "HappyHardcore";
stream = rautemusik "happyhardcore";
desc = "UK Core, Happy Hardcore, Dance";
tags = [tags.party];
}
{
station = rautemusik-name "HardeR";
stream = rautemusik "harder";
desc = "Hardstyle, Hardcore, Jumpstyle";
tags = [tags.party];
}
{
station = rautemusik-name "BigCityBeats";
stream = rautemusik "bigcitybeats";
desc = "EDM, Dance, House, Electro, Star DJs";
tags = [tags.pop tags.party];
}
{
station = rautemusik-name "Lounge";
stream = rautemusik "lounge";
desc = "Ambient, Jazz, Chillout, Easy Listening";
tags = [tags.chill];
}
{
station = rautemusik-name "Oriental";
stream = rautemusik "oriental";
desc = "Arabisch, Oriental, HipHop";
tags = [tags.arabic];
}
{
station = rautemusik-name "Salsa";
stream = rautemusik "salsa";
desc = "Salsa, Latina, Tropical";
tags = [tags.groovy];
}
{
station = rautemusik-name "Christmas";
stream = rautemusik "christmas";
desc = "Weihnachtslieder, Balladen, Schlager";
tags = [tags.xmas];
}
{
station = rautemusik-name "Christmas Chor";
stream = rautemusik "christmas-chor";
desc = "Chor, Weihnachtslieder, Gesang";
tags = [tags.xmas];
}
{
station = rautemusik-name "Christmas Schlager";
stream = rautemusik "christmas-schlager";
desc = "Schlager, Weihnachtslieder";
tags = [tags.xmas tags.schlager];
}
{
station = rautemusik-name "Weihnachten.FM";
stream = rautemusik "weihnachten";
desc = "Weihnachtslieder, Pop";
tags = [tags.xmas];
}
{
station = rautemusik-name "Top40";
stream = rautemusik "top40";
desc = "Charts, Top40, Dance, Hiphop";
tags = [tags.top40];
}
{
station = rautemusik-name "Rock";
desc = "Rock, Alternative, Punk";
stream = rautemusik "rock";
tags = [tags.rock];
}
{
station = rautemusik-name "PartyHits";
desc = "Karneval, Mallorca, Après Ski, Schlager";
stream = rautemusik "partyhits";
tags = [tags.schlager];
}
{
station = rautemusik-name "Deutschrap Charts";
stream = rautemusik "deutschrap-charts";
desc = "Deutschrap, HipHop, Rap, Charts";
tags = [tags.rap];
}
{
station = rautemusik-name "Deutschrap Classic";
stream = rautemusik "deutschrap-classic";
desc = "Oldschool, Rap, HipHop, Deutschrap";
tags = [tags.rap];
}
{
station = rautemusik-name "ChartHits";
stream = rautemusik "ChartHits";
desc = "House, RnB, Dance, Electro";
tags = [tags.top40];
}
{
station = rautemusik-name "BreakZ.FM";
stream = rautemusik "breakz";
desc = "RnB, House, HipHop, Dance, Mixtapes";
tags = [tags.top40];
}
{
station = rautemusik-name "Bass";
stream = rautemusik "bass";
desc = "DnB, Dubstep, Trap & Bass House";
tags = [tags.party];
}
{
station = rautemusik-name "12punks";
stream = rautemusik "12punks";
desc = "Punk, Punk Rock, Ska, Hardcore";
tags = [tags.rock];
}
{ {
logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png"; logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png";
station = "Raidió Rírá"; station = "Raidió Rírá";
@@ -1406,12 +1211,6 @@ in
desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!"; desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!";
tags = [tags.top40]; tags = [tags.top40];
} }
{
stream = "http://188.247.86.67:8008";
station = "Rotana Tarab";
logo = "https://liveonlineradio.net/wp-content/uploads/2017/11/Rotana-Tarab-100x47.jpg";
tags = [tags.trad tags.arabic];
}
{ {
stream = "http://asima.out.airtime.pro:8000/asima_a"; stream = "http://asima.out.airtime.pro:8000/asima_a";
station = "Asima"; station = "Asima";
@@ -1554,6 +1353,11 @@ in
desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen."; desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen.";
tags = [tags.text]; tags = [tags.text];
} }
{
station = "NIUS";
stream = "https://nius.stream25.radiohost.de/live_mp3-192";
tags = [tags.text];
}
{ {
station = "Kontrafunk"; station = "Kontrafunk";
stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3"; stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3";
@@ -1649,21 +1453,6 @@ in
station = "ERTU Al Quran Al Kareem"; station = "ERTU Al Quran Al Kareem";
tags = [tags.arabic tags.text tags.holy]; tags = [tags.arabic tags.text tags.holy];
} }
{
stream = "http://149.28.52.216:3344/listen.mp3";
station = "Verse 24/7 Holy Quran";
tags = [tags.arabic tags.text tags.holy];
}
{
stream = "https://s6.voscast.com:9355/stream";
station = "Kilid Herat";
tags = [tags.arabic tags.holy]; # nasheeds
}
{
stream = "https://s6.voscast.com:9355/stream";
station = "Radio Salam Watandar";
tags = [tags.arabic tags.holy];
}
{ {
stream = "http://onair15.xdevel.com:7064/1/"; stream = "http://onair15.xdevel.com:7064/1/";
station = "Radio Mozart Italia"; station = "Radio Mozart Italia";
@@ -1671,12 +1460,6 @@ in
desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo"; desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo";
tags = [tags.classical]; tags = [tags.classical];
} }
{
stream = "http://onair7.xdevel.com:7126/1/";
station = "Opera Radio Budapest";
logo = "https://www.opera.hu/static/default/asset/img/common/opera-logo.svg";
tags = [tags.classical];
}
{ {
stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3"; stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3";
station = "Peaceful Piano"; station = "Peaceful Piano";
@@ -1846,11 +1629,6 @@ in
stream = "https://playerservices.streamtheworld.com/api/livestream-redirect/KAN_88.mp3"; stream = "https://playerservices.streamtheworld.com/api/livestream-redirect/KAN_88.mp3";
tags = [tags.hebrew]; tags = [tags.hebrew];
} }
{
station = "Digital Impulse Classical Channel";
stream = "http://orion.shoutca.st:8978/stream";
tags = [tags.classical];
}
{ {
station = "Старое радио (детское)"; station = "Старое радио (детское)";
stream = "http://195.91.237.50:8000/detskoe128"; stream = "http://195.91.237.50:8000/detskoe128";
@@ -1921,18 +1699,23 @@ in
stream = "http://cw.dimebank.com:8080/CNNfast"; stream = "http://cw.dimebank.com:8080/CNNfast";
tags = [tags.text]; tags = [tags.text];
} }
{
station = "80s80s | Dark Wave";
stream = "https://streams.80s80s.de/darkwave/mp3-192/homepage/";
tags = [tags.wave];
}
{
station = "80s80s | Wave";
stream = "https://streams.80s80s.de/wave/mp3-192/homepage/";
tags = [tags.wave];
}
{ {
station = "XXX orchestral"; station = "XXX orchestral";
stream = "http://orion.shoutca.st:8978/stream"; stream = "http://orion.shoutca.st:8978/stream";
tags = [tags.classical]; tags = [tags.classical];
} }
{ {
station = "XXX greek"; station = "Kral FM Xanthi";
stream = "http://radio.hostchefs.net:8046/stream?1520818130148";
tags = [tags.greek];
}
{
station = "XXX turkish or greek";
stream = "https://onairmediagroup.live24.gr/kralfm100xanthi"; stream = "https://onairmediagroup.live24.gr/kralfm100xanthi";
tags = [tags.greek tags.turkish]; tags = [tags.greek tags.turkish];
} }
@@ -1986,11 +1769,6 @@ in
stream = "http://s2.voscast.com:12312/;"; stream = "http://s2.voscast.com:12312/;";
station = "Bahrain Quran Radio"; station = "Bahrain Quran Radio";
} }
{
tags = [tags.arabic tags.text tags.holy];
stream = "http://162.244.81.30:8224/;";
station = "Quran Radio Lebanon";
}
{ {
tags = [tags.arabic tags.text tags.holy]; tags = [tags.arabic tags.text tags.holy];
stream = "http://tijaniyyah.asuscomm.com:8000/stream/2/"; stream = "http://tijaniyyah.asuscomm.com:8000/stream/2/";
@@ -2001,16 +1779,6 @@ in
station = "Coptic for God"; station = "Coptic for God";
stream = "http://66.70.249.70:5832/stream"; stream = "http://66.70.249.70:5832/stream";
} }
{
stream = "http://stream-025.zeno.fm/5y95pu36sm0uv?";
station = "Hayat FM";
tags = [tags.arabic tags.text tags.holy];
}
{
stream = "http://uk2.internet-radio.com:8151/stream";
station = "The Quran Radio";
tags = [tags.arabic tags.text tags.holy];
}
{ {
stream = "http://www.radioeins.de/livemp3"; stream = "http://www.radioeins.de/livemp3";
station = "radioeins | RBB"; station = "radioeins | RBB";
@@ -2025,9 +1793,25 @@ in
stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3"; stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3";
station = "Hitradio FFH"; station = "Hitradio FFH";
} }
{
stream = "https://mp3.planetradio.de/planetradio/hqlivestream.aac";
station = "planet radio";
}
{ # Lex Fridman's favourite { # Lex Fridman's favourite
stream = "av://lavfi:anoisesrc=color=brown"; stream = "av://lavfi:anoisesrc=color=brown";
station = "Brownian noise"; station = "Brown noise";
}
{
stream = "av://lavfi:anoisesrc=color=pink";
station = "Pink noise";
}
{
stream = "https://st03.sslstream.dlf.de/dlf/03/high/aac/stream.aac";
station = "Deutschlandfunk Nova";
}
{
stream = "https://samaaisb107-itelservices.radioca.st/stream";
station = "Samaa FM 107.4 Pakistan";
} }
] ]
++ map (name: { ++ map (name: {

View File

@@ -91,6 +91,7 @@ local language_servers = {
-- tsserver = {}, -- typescript-language-server -- tsserver = {}, -- typescript-language-server
cssls = {}, cssls = {},
elmls = {}, -- elm-language-server elmls = {}, -- elm-language-server
gopls = {}, -- gopls
denols = {}, -- deno built in denols = {}, -- deno built in
bashls = {}, -- bash-language-server bashls = {}, -- bash-language-server
lua_ls = { lua_ls = {
@@ -154,10 +155,11 @@ local language_servers = {
} }
for server, settings in pairs(language_servers) do for server, settings in pairs(language_servers) do
require('lspconfig')[server].setup{ vim.lsp.config(server, {
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, flags = lsp_flags,
settings = settings, settings = settings,
capabilities = capabilities capabilities = capabilities
} })
vim.lsp.enable(server)
end end

View File

@@ -40,8 +40,6 @@ let g:netrw_banner=0
let g:netrw_browse_split=4 let g:netrw_browse_split=4
let g:netrw_altv=1 " open splits to the right let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view 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 let g:netrw_winsize = 25
call matchadd('colorcolumn', '\%101v', 100) call matchadd('colorcolumn', '\%101v', 100)
@@ -104,6 +102,7 @@ augroup filetypes
autocmd bufnewfile,bufread urls,config set filetype=conf autocmd bufnewfile,bufread urls,config set filetype=conf
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4 autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
autocmd bufnewfile,bufread *.md packadd vim-pandoc | packadd vim-pandoc-syntax | set filetype=pandoc autocmd bufnewfile,bufread *.md packadd vim-pandoc | packadd vim-pandoc-syntax | set filetype=pandoc
autocmd bufnewfile,bufread *.ex,*.exs packadd vim-elixir | set filetype=elixir
autocmd filetype haskell packadd haskell-vim | set keywordprg=hoogle\ -i autocmd filetype haskell packadd haskell-vim | set keywordprg=hoogle\ -i
autocmd filetype javascript packadd vim-javascript autocmd filetype javascript packadd vim-javascript
autocmd filetype make setlocal noexpandtab autocmd filetype make setlocal noexpandtab
@@ -126,3 +125,12 @@ set complete+=kspell
let g:pandoc#syntax#conceal#use = 0 let g:pandoc#syntax#conceal#use = 0
let g:pandoc#modules#disabled = [] let g:pandoc#modules#disabled = []
let g:pandoc#spell#default_langs = ['en', 'de'] let g:pandoc#spell#default_langs = ['en', 'de']
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
" Disable Copilot by default
let b:copilot_enabled = v:false
" keymap to toggle it enabled
nnoremap <leader>gc :let b:copilot_enabled = !b:copilot_enabled<CR>

140
modules/go-webring.nix Normal file
View File

@@ -0,0 +1,140 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib)
mkEnableOption
mkPackageOption
mkOption
types
literalExpression
mkIf
;
cfg = config.services.go-webring;
defaultAddress = "127.0.0.1:2857";
in
{
options = {
services.go-webring = {
enable = mkEnableOption "go-webring";
package = mkPackageOption pkgs "go-webring" { };
contactInstructions = mkOption {
type = types.nullOr types.str;
default = null;
description = "Contact instructions for errors";
example = "contact the admin and let them know what's up";
};
host = mkOption {
type = types.str;
description = "Host this webring runs on, primarily used for validation";
example = "my-webri.ng";
};
homePageTemplate = mkOption {
type = types.str;
description = ''
This should be any HTML file with the string "{{ . }}" placed
wherever you want the table of members inserted. This table is
plain HTML so you can style it with CSS.
'';
};
listenAddress = mkOption {
type = types.str;
default = defaultAddress;
description = "Host and port go-webring will listen on";
};
members = mkOption {
type = types.listOf (
types.submodule {
options = {
username = mkOption {
type = types.str;
description = "Member's name";
};
site = mkOption {
type = types.str;
description = "Member's site URL";
};
};
}
);
description = "List of members in the webring";
};
};
};
config = mkIf cfg.enable {
systemd.services.go-webring = {
description = "go-webring service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
requires = [ "network.target" ];
serviceConfig = {
Type = "simple";
ExecStart = ''
${lib.getExe cfg.package} \
${lib.optionalString (cfg.contactInstructions != null) ("--contact " + lib.escapeShellArg cfg.contactInstructions)} \
--host ${cfg.host} \
--index ${pkgs.writeText "index.html" cfg.homePageTemplate} \
--listen ${cfg.listenAddress} \
--members ${
pkgs.writeText "list.txt" (
lib.concatMapStrings (member: member.username + " " + member.site + "\n") cfg.members
)
}
'';
User = "go-webring";
DynamicUser = true;
RuntimeDirectory = "go-webring";
WorkingDirectory = "/var/lib/go-webring";
StateDirectory = "go-webring";
RuntimeDirectoryMode = "0750";
Restart = "always";
RestartSec = 5;
# Hardening
CapabilityBoundingSet = [ "" ];
DeviceAllow = [ "" ];
LockPersonality = true;
MemoryDenyWriteExecute = true;
PrivateDevices = true;
PrivateUsers = true;
ProcSubset = "pid";
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"~@privileged"
];
UMask = "0077";
};
};
environment.systemPackages = [ cfg.package ];
};
}

View File

@@ -1,47 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
htgen = pkgs.callPackage ../packages/htgen.nix {};
in {
options.services.htgen = lib.mkOption {
default = {};
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
options = {
enable = lib.mkEnableOption "htgen-${config._module.args.name}";
port = lib.mkOption {
type = lib.types.int;
};
script = lib.mkOption {
type = lib.types.str;
};
};
}));
};
config = {
systemd.services =
lib.mapAttrs' (
name: cfg:
lib.nameValuePair "htgen-${name}" {
wantedBy = ["multi-user.target"];
after = ["network.target"];
environment = {
HOME = "/var/lib/htgen-${name}";
HTGEN_PORT = toString cfg.port;
HTGEN_SCRIPT = cfg.script;
};
serviceConfig = {
SyslogIdentifier = "htgen-${name}";
DynamicUser = true;
StateDirectory = "htgen-${name}";
PrivateTmp = true;
Restart = "always";
ExecStart = "${htgen}/bin/htgen --serve";
};
}
)
config.services.htgen;
};
}

View File

@@ -29,7 +29,7 @@
default = "daily"; default = "daily";
}; };
loadCredential = lib.mkOption { loadCredential = lib.mkOption {
type = lib.types.listOf lib.types.string; type = lib.types.listOf lib.types.str;
description = '' description = ''
This can be used to pass secrets to the systemd service without adding them to the nix store. This can be used to pass secrets to the systemd service without adding them to the nix store.
''; '';

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
''

View File

@@ -3,7 +3,7 @@
writers, writers,
curl, curl,
}: }:
writers.writeDashBin "so" '' writers.writeDashBin "cht.sh" ''
IFS=+ IFS=+
${curl}/bin/curl -sSL http://cht.sh/"$*" ${curl}/bin/curl -sSL http://cht.sh/"$*"
'' ''

View File

@@ -1,10 +1,10 @@
{ writers, chromium }: { coreutils, chromium }:
writers.writeDashBin "cro" '' chromium.override {
${chromium}/bin/chromium \ commandLineArgs = [
--disable-sync \ "--disable-sync"
--no-default-browser-check \ "--no-default-browser-check"
--no-first-run \ "--no-first-run"
--user-data-dir="$(mktemp -d)" \ "--user-data-dir=$(${coreutils}/bin/mktemp -d)"
--incognito \ "--incognito"
"$@" ];
'' }

View File

@@ -1,43 +0,0 @@
{
fetchgit,
lib,
stdenv,
coreutils,
curl,
gnugrep,
gnused,
util-linux,
}:
stdenv.mkDerivation {
name = "dic";
src = fetchgit {
url = https://cgit.ni.krebsco.de/dic;
rev = "refs/tags/v1.1.1";
sha256 = "1gbj967a5hj53fdkkxijqgwnl9hb8kskz0cmpjq7v65ffz3v6vag";
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase = let
path = lib.makeBinPath [
coreutils
curl
gnused
gnugrep
util-linux
];
in ''
mkdir -p $out/bin
sed \
's,^main() {$,&\n PATH=${path}; export PATH,' \
< ./dic \
> $out/bin/dic
chmod +x $out/bin/dic
'';
}

View File

@@ -1,24 +0,0 @@
{writers}:
writers.writeDashBin "dirmir" ''
SOURCE="$1"
TARGET="$2"
if [ ! -d "$SOURCE" ] || [ $# -ne 2 ]; then
echo >/dev/stderr "Usage: dirmir SOURCE TARGET"
exit 1
fi
if [ -e "$TARGET" ]; then
echo >/dev/stderr "$TARGET" already exists. Please use a different name.
exit 1
fi
find "$SOURCE" | while read -r entry; do
if [ -d "$entry" ]; then
mkdir -p "$TARGET/$entry"
else
# create a file with the same permissions as $entry
install -m "$(stat -c %a "$entry")" /dev/null "$TARGET/$entry"
fi
done
''

View File

@@ -1,64 +0,0 @@
{
writers,
libnotify,
dmenu,
bluez5,
lib,
}:
writers.writeDashBin "dmenu-bluetooth" ''
# UI for connecting to bluetooth devices
set -efu
PATH=$PATH=${lib.makeBinPath [libnotify dmenu bluez5]}
bluetooth_notify() {
notify-send --app-name=" Bluetooth" "$@"
}
chose_device() {
# the output from `bluetoothctl {paired-,}devices` has a first column which always contains `Device` followed by a MAC address and the device name
cut -d ' ' -f2- | dmenu -i -l 5 -p "Bluetooth device"
}
bluetoothctl scan on &
case "$(printf "pair\nconnect\ndisconnect" | dmenu -i)" in
pair)
chosen="$(bluetoothctl devices | chose_device)"
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
bluetooth_notify "$chosen_name" "Pairing ..."
if bluetoothctl pair "$(echo "$chosen" | cut -d ' ' -f1)"; then
bluetooth_notify " $chosen_name" "Paired with device."
else
test "$chosen" && bluetooth_notify " $chosen_name" "Failed to pair with device."
fi
;;
connect)
chosen="$(bluetoothctl paired-devices | chose_device)"
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
bluetooth_notify "$chosen_name" "Trying to connect ..."
if bluetoothctl connect "$(echo "$chosen" | cut -d ' ' -f1)"; then
bluetooth_notify " $chosen_name" "Connected to device."
else # something was selected but it didn't work
test "$chosen" && bluetooth_notify " $chosen_name" "Failed to connect to device."
fi
;;
disconnect)
chosen="$(bluetoothctl paired-devices | chose_device)"
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
bluetooth_notify "$chosen_name" "Disconnecting ..."
if bluetoothctl disconnect "$(echo "$chosen" | cut -d ' ' -f1)"; then
bluetooth_notify " $chosen_name" "Disconnected from device."
else # something was selected but it didn't work
test "$chosen" && bluetooth_notify " $chosen_name" "Failed to disconnect from device."
fi
;;
esac
''

View File

@@ -1,42 +0,0 @@
{
writers,
lib,
dmenu,
scrot,
libnotify,
xclip,
screenshotsDirectory ? "/tmp",
}:
writers.writeDashBin "dmenu-scrot" ''
# ref https://gitlab.com/dwt1/dotfiles/-/blob/master/.dmenu/dmenu-scrot.sh
PATH=$PATH:${lib.makeBinPath [dmenu scrot libnotify xclip]}
APP_NAME="📸 Scrot"
IMG_PATH="${screenshotsDirectory}"
TIME=3000 #Miliseconds notification should remain visible
cmd=$(printf "fullscreen\nsection\nupload_fullscreen\nupload_section\n" | dmenu -p 'Screenshot')
cd "$IMG_PATH" || exit
case ''${cmd%% *} in
fullscreen)
scrot -d 1 \
&& notify-send -u low -t $TIME -a "$APP_NAME" 'Screenshot (full screen) saved.'
;;
section)
scrot -s \
&& notify-send -u low -t $TIME -a "$APP_NAME" 'Screenshot (section) saved.'
;;
upload_fullscreen)
scrot -d 1 -e "kpaste < \$f" | tail --lines=1 | xclip -selection clipboard -in \
&& notify-send -u low -t $TIME -a "$APP_NAME" "Screenshot (full screen) uploaded: $(xclip -selection clipboard -out)"
;;
upload_section)
scrot -s -e "kpaste < \$f" | tail --lines=1 | xclip -selection clipboard -in \
&& notify-send -u low -t $TIME -a "$APP_NAME" "Screenshot (section) uploaded: $(xclip -selection clipboard -out)"
;;
esac
''

View File

@@ -1,7 +0,0 @@
{
writers,
coreutils,
}:
writers.writeDashBin "dns-sledgehammer" ''
${coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf
''

View File

@@ -1,28 +0,0 @@
{
writers,
curl,
coreutils,
gnused,
pandoc,
}:
writers.writeDashBin "genius" ''
${coreutils}/bin/test "$#" -eq 2 || (
echo "usage: $0 <artist> <song>"
exit 1
)
normalize() {
${coreutils}/bin/tr -d -c '0-9A-Za-z ' | ${coreutils}/bin/tr ' ' - | ${coreutils}/bin/tr '[:upper:]' '[:lower:]'
}
ARTIST=$(echo "$1" | normalize | ${gnused}/bin/sed 's/./\U&/')
TITLE=$(echo "$2" | normalize)
GENIUS_URL="https://genius.com/$ARTIST-$TITLE-lyrics"
${curl}/bin/curl -s "$GENIUS_URL" \
| ${gnused}/bin/sed -ne '/class="lyrics"/,/<\/p>/p' \
| ${pandoc}/bin/pandoc -f html -s -t plain \
| ${gnused}/bin/sed 's/^_/\x1b[3m/g;s/_$/\x1b[0m/g;s/^\[/\n\x1b\[1m\[/g;s/\]$/\]\x1b[0m/g'
printf "\n%s\n" "$GENIUS_URL" >/dev/stderr
''

View File

@@ -1,23 +0,0 @@
{
coreutils,
git,
writers,
}:
writers.writeDashBin "git-preview" ''
set -efu
head_commit=$(${git}/bin/git log -1 --format=%H)
merge_commit=$1; shift
merge_message='Merge for git-preview'
preview_dir=$(${coreutils}/bin/mktemp --tmpdir -d git-preview.XXXXXXXX)
preview_name=$(${coreutils}/bin/basename "$preview_dir")
${git}/bin/git worktree add --detach -f "$preview_dir" 2>/dev/null
${git}/bin/git -C "$preview_dir" checkout -q "$head_commit"
${git}/bin/git -C "$preview_dir" merge \
''${GIT_PREVIEW_MERGE_STRATEGY+-s "$GIT_PREVIEW_MERGE_STRATEGY"} \
-m "$merge_message" \
-q \
"$merge_commit"
${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@"
${coreutils}/bin/rm -fR "$preview_dir"
${coreutils}/bin/rm -R .git/worktrees/"$preview_name"
''

21
packages/go-webring.nix Normal file
View File

@@ -0,0 +1,21 @@
{ buildGoModule, fetchgit, lib }:
buildGoModule {
pname = "go-webring";
version = "2024-12-18";
src = fetchgit {
url = "https://git.sr.ht/~amolith/go-webring";
rev = "0b5b1bf21ff91119ea2dd042ee9fe94e9d1cd8d4";
hash = "sha256-az6vBOGiZmzfsMjYUacXMHhDeRDmVI/arCKCpHeTcns=";
};
vendorHash = "sha256-3PnXB8AfZtgmYEPJuh0fwvG38dtngoS/lxyx3H+rvFs=";
meta = {
mainProgram = "go-webring";
description = "Simple webring implementation";
homepage = "https://git.sr.ht/~amolith/go-webring";
license = lib.licenses.bsd2; # cc0 as well
maintainers = [ lib.maintainers.kmein ];
};
}

View File

@@ -9,7 +9,7 @@
gnugrep, gnugrep,
qrencode, qrencode,
texlive, texlive,
utillinux, util-linux,
zbar, zbar,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
gnugrep gnugrep
qrencode qrencode
texlive.combined.scheme-full texlive.combined.scheme-full
utillinux util-linux
zbar zbar
]} ]}
''; '';

View File

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

View File

@@ -1,31 +0,0 @@
{
fetchgit,
lib,
pkgs,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "htgen";
version = "1.3.1";
src = fetchgit {
url = "http://cgit.krebsco.de/htgen";
rev = "refs/tags/${version}";
sha256 = "0ml8kp89bwkrwy6iqclzyhxgv2qn9dcpwaafbmsr4mgcl70zx22r";
};
installPhase = ''
mkdir -p $out/bin
{
echo '#! ${pkgs.dash}/bin/dash'
echo 'export PATH=${lib.makeBinPath [
pkgs.coreutils
pkgs.jq
pkgs.ucspi-tcp
]}''${PATH+":$PATH"}'
sed 's:^Server=htgen$:&/${version}:' htgen
} > $out/bin/htgen
chmod +x $out/bin/htgen
cp -r examples $out
'';
}

View File

@@ -1,13 +0,0 @@
{
writers,
pup,
curl,
pandoc,
man,
}:
writers.writeDashBin "InfSchMV" ''
${curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \
| ${pup}/bin/pup .textile \
| ${pandoc}/bin/pandoc -f html -t man -s \
| ${man}/bin/man -l -
''

View File

@@ -1,29 +0,0 @@
{
lib,
stdenv,
cmake,
python3,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
version = "2017.09.06";
name = "iolanguage-${version}";
src = fetchFromGitHub {
owner = "IoLanguage";
repo = "io";
rev = "${version}";
sha256 = "07rg1zrz6i6ghp11cm14w7bbaaa1s8sb0y5i7gr2sds0ijlpq223";
fetchSubmodules = true;
};
buildInputs = [cmake python3];
preBuild = "mkdir -p build && cd build";
buildPhase = ''
cmake -DCMAKE_INSTALL_PREFIX=$out/ ..
make all
'';
meta = with lib; {
homepage = "https://iolanguage.org/";
description = "Io programming language. Inspired by Self, Smalltalk and LISP.";
license = licenses.bsd3;
};
}

View File

@@ -1,16 +0,0 @@
{
stdenv,
fetchurl,
}:
stdenv.mkDerivation {
name = "ix";
src = fetchurl {
url = "https://ix.io/client";
sha256 = "0xc2s4s1aq143zz8lgkq5k25dpf049dw253qxiav5k7d7qvzzy57";
};
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/bin
install $src $out/bin/ix
'';
}

View File

@@ -1,16 +0,0 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule {
name = "jq-lsp";
version = "unstable-2023-09-08";
src = fetchFromGitHub {
owner = "wader";
repo = "jq-lsp";
rev = "85edf1adbe5e6c91b37c67b6a4bf85eda1e49f2f";
hash = "sha256-ItLKRSbGZ8UqFEHCoh96KwhSpuKZ3l+2ZXnBkHEZL0M=";
};
vendorHash = "sha256-ppQ81uERHBgOr/bm/CoDSWcK+IqHwvcL6RFi0DgoLuw=";
}

View File

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

View File

@@ -1,63 +0,0 @@
{
lib,
fetchFromGitHub,
mkDerivation,
ansi-terminal,
base,
directory,
doctest,
filepath,
megaparsec,
optparse-applicative,
prettyprinter,
process,
raw-strings-qq,
stdenv,
tasty,
tasty-hunit,
text,
yaml,
}:
mkDerivation {
pname = "mahlzeit";
version = "0.1.0";
src = fetchFromGitHub {
owner = "kmein";
repo = "mahlzeit";
rev = "954c0fb3f45815999bc65d003794af6a850b069c";
sha256 = "046yrr40hjmxkjmwzcvmwb39fxx2v2i6hgdxrjfiwilzvhikarrg";
};
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
ansi-terminal
base
directory
filepath
megaparsec
prettyprinter
text
yaml
];
executableHaskellDepends = [
ansi-terminal
base
directory
filepath
optparse-applicative
process
text
yaml
];
testHaskellDepends = [
base
doctest
megaparsec
raw-strings-qq
tasty
tasty-hunit
];
homepage = "https://github.com/kmein/mahlzeit";
description = "Recipe toolkit";
license = lib.licenses.mit;
}

View File

@@ -1,89 +0,0 @@
{
writers,
lib,
jq,
curl,
xdotool,
nsxiv,
gnused,
defaultStation ? 103840,
}:
writers.writeDashBin "meteo" ''
# usage: meteo --list
# usage: meteo --update
# usage: meteo STATION
set -efu
PATH=$PATH:${lib.makeBinPath [jq curl xdotool nsxiv gnused]}
# TODO XDG
CONFIG_DIR=$HOME/.config/wetter
STATIONS_FILE=$CONFIG_DIR/stations.json
case ''${1-} in
--list)
sed -n 's/^\s*\(--[^)]\+\))$/\1/p' "$0"
jq -r -n \
--slurpfile stations_file "$STATIONS_FILE" \
'
$stations_file[0] as $known_stations |
$known_stations | keys[]
'
exit
;;
--update)
mkdir -p "$(dirname "$STATIONS_FILE")"
exec >"$STATIONS_FILE"
curl -fsSL http://wetterstationen.meteomedia.de/ |
jq -Rrs '
def decodeHTML:
gsub("&auml;";"ä") |
gsub("&ouml;";"ö") |
gsub("&uuml;";"ü") |
gsub("&Auml;";"Ä") |
gsub("&Ouml;";"Ö") |
gsub("&Uuml;";"Ü") |
gsub("&szlig;";"ß")
;
[
match(".*<option value=\"/\\?map=Deutschland&station=(?<station>[0-9]+)\">(?<name>[^<]+)</option>";"g")
.captures |
map({"\(.name)":(.string)}) |
add |
{"\(.name|decodeHTML)":(.station|tonumber)}
] |
add
'
exit
;;
esac
# set -x
station=''${1-${toString defaultStation}}
station=$(jq -e -n \
--arg station "$station" \
--slurpfile stations_file "$STATIONS_FILE" \
'
$stations_file[0] as $known_stations |
$station |
if test("^[0-9]+$") then
tonumber
else
$known_stations[.]
end
')
cache="/tmp/''${LOGNAME}_wetter_$station.png"
curl -sSL \
"http://wetterstationen.meteomedia.de/messnetz/vorhersagegrafik/$station.png" \
-o "$cache"
if window_id=$(xdotool search --name "^nsxiv - $cache$"); then
xdotool key --window "$window_id" r
else
nsxiv "$cache" &
fi
''

View File

@@ -1,13 +0,0 @@
{
writers,
wget,
system,
}:
writers.writeDashBin "nix-index-update" ''
filename="index-${system}"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
# -N will only download a new version if there is an update.
${wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
ln -f $filename files
''

View File

@@ -22,7 +22,7 @@ neovim.override {
\ 'path': '${obsidiantVaultDirectory}', \ 'path': '${obsidiantVaultDirectory}',
\ 'syntax': 'markdown', \ 'syntax': 'markdown',
\ 'ext': '.md', \ 'ext': '.md',
\ 'diary_rel_path' '.', \ 'diary_rel_path': '.',
\}] \}]
let NERDTreeSortOrder = ['[[-timestamp]]'] let NERDTreeSortOrder = ['[[-timestamp]]']

View File

@@ -1,6 +1,7 @@
{ {
lib, lib,
writers, writers,
yt-dlp,
miller, miller,
gnused, gnused,
curl, curl,
@@ -30,10 +31,27 @@
"that's a good song!" "that's a good song!"
"👍" "👍"
"vibin'" "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 = [ messages.bad = [
"how can anyone listen to this?" "how can anyone listen to this?"
"(°° " "(°° "
"skip this!" "skip this!"
"next, please! i'm suffering!" "next, please! i'm suffering!"
"that's just bad music" "that's just bad music"
@@ -43,13 +61,45 @@
"turn that down" "turn that down"
"make it stooop" "make it stooop"
"noooo" "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 = [ messages.neutral = [
"meh" "meh"
"i have no opinion about this song" "i have no opinion about this song"
"idk man" "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"
]; ];
download = writers.writeDash "download" ''
${yt-dlp}/bin/yt-dlp --add-metadata --audio-format mp3 --audio-quality 0 -xic "$@"
'';
in in
writers.writeDashBin "pls" '' writers.writeDashBin "pls" ''
case "$1" in case "$1" in

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
''

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 @-
''

View File

@@ -1,10 +1,8 @@
{ {
writers, writers,
curl, curl,
pup,
gawk, gawk,
gnused, gnused,
gnugrep,
less, less,
fzf, fzf,
}: }:

View File

@@ -2,8 +2,12 @@
{ {
writers, writers,
imagemagick, imagemagick,
ghostscript,
lib
}: }:
writers.writeDashBin "scanned" '' writers.writeDashBin "scanned" ''
export PATH=${lib.makeBinPath [ imagemagick ghostscript ]}:$PATH
[ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1 [ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1
${imagemagick}/bin/convert \ ${imagemagick}/bin/convert \

45
packages/stag.nix Normal file
View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
ncurses,
taglib,
zlib,
}:
stdenv.mkDerivation rec {
pname = "stag";
version = "1.0";
src = fetchFromGitHub {
owner = "smabie";
repo = "stag";
rev = "v${version}";
hash = "sha256-IWb6ZbPlFfEvZogPh8nMqXatrg206BTV2DYg7BMm7R4=";
};
buildInputs = [
ncurses
taglib
zlib
];
buildPhase = ''
make all
'';
installPhase = ''
mkdir -p $out/bin
cp stag $out/bin/
mkdir -p $out/man/man1
mv stag.1 $out/man/man1/
'';
meta = {
description = "public domain utf8 curses based audio file tagger";
homepage = "https://github.com/smabie/stag";
license = lib.licenses.publicDomain;
maintainers = [ lib.maintainers.kmein ];
platforms = lib.platforms.unix;
source = src;
};
}

View File

@@ -40,6 +40,13 @@
editorconfig-vim editorconfig-vim
copilot-vim
goyo
limelight-vim
niveumPackages.vimPlugins-mdwa-nvim
niveumPackages.vimPlugins-vim-ernest
fzf-vim fzf-vim
fzfWrapper fzfWrapper
supertab supertab
@@ -74,6 +81,7 @@
dhall-vim dhall-vim
elm-vim elm-vim
emmet-vim emmet-vim
vim-elixir
haskell-vim haskell-vim
niveumPackages.vimPlugins-icalendar-vim niveumPackages.vimPlugins-icalendar-vim
niveumPackages.vimPlugins-jq-vim niveumPackages.vimPlugins-jq-vim

View File

@@ -1,7 +1,7 @@
{ {
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix { }: (vimUtils.buildVimPlugin {
pname = "cheat.sh-vim"; pname = "cheat.sh-vim";
version = "826219d1"; version = "826219d1";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -1,7 +1,7 @@
{ {
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix { }: (vimUtils.buildVimPlugin {
pname = "icalendar.vim"; pname = "icalendar.vim";
version = "542fff45"; version = "542fff45";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -2,7 +2,7 @@
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: }:
vimUtils.buildVimPluginFrom2Nix { vimUtils.buildVimPlugin {
pname = "jq.vim"; pname = "jq.vim";
version = "5baf8ed1"; version = "5baf8ed1";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -0,0 +1,13 @@
{
vimUtils,
fetchFromGitHub,
}: (vimUtils.buildVimPlugin {
pname = "mdwa.nvim";
version = "9f37270";
src = fetchFromGitHub {
owner = "tihawk";
repo = "mdwa.nvim";
rev = "9f3727037e0d85fd0930334b91b9687a5a880192";
hash = "sha256-h2jy2E+pN2Ma/5n9Eq2oXr9xHma2OxxVvx9EJ+bIYxA=";
};
})

View File

@@ -2,7 +2,7 @@
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: }:
vimUtils.buildVimPluginFrom2Nix { vimUtils.buildVimPlugin {
pname = "typst.vim"; pname = "typst.vim";
version = "2882f21"; version = "2882f21";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -2,7 +2,7 @@
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: }:
vimUtils.buildVimPluginFrom2Nix { vimUtils.buildVimPlugin {
pname = "vim-256noir"; pname = "vim-256noir";
version = "e8668a18"; version = "e8668a18";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -2,7 +2,7 @@
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: }:
vimUtils.buildVimPluginFrom2Nix rec { vimUtils.buildVimPlugin {
pname = "vim-colors-paramount"; pname = "vim-colors-paramount";
version = "a5601d36"; version = "a5601d36";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -0,0 +1,14 @@
{
vimUtils,
fetchFromGitHub,
lib,
}: (vimUtils.buildVimPlugin {
pname = "vim-ernest";
version = "4b99bc3";
src = fetchFromGitHub {
owner = "lgalke";
repo = "vim-ernest";
rev = "4b99bc3fe3deb7bb958ad2f64cad93569eeb50d7";
hash = "sha256-AUuRnnZU39XUerBxNelEqVyDAalRm3VGNUQb15fjXjM=";
};
})

View File

@@ -1,7 +1,7 @@
{ {
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix rec { }: (vimUtils.buildVimPlugin {
pname = "vim-fetch"; pname = "vim-fetch";
version = "76c08586"; version = "76c08586";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -2,7 +2,7 @@
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: }:
vimUtils.buildVimPluginFrom2Nix { vimUtils.buildVimPlugin {
pname = "vim-fsharp"; pname = "vim-fsharp";
version = "627db7d7"; version = "627db7d7";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -2,7 +2,7 @@
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: }:
vimUtils.buildVimPluginFrom2Nix { vimUtils.buildVimPlugin {
pname = "vim-mail"; pname = "vim-mail";
version = "acdbb5bd"; version = "acdbb5bd";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -1,7 +1,7 @@
{ {
vimUtils, vimUtils,
fetchFromGitHub, fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix { }: (vimUtils.buildVimPlugin {
pname = "vim-reason-plus"; pname = "vim-reason-plus";
version = "c11a2940"; version = "c11a2940";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
lib, lib,
unstablePackages,
... ...
} @ args: let } @ args: let
# config cannot be declared in the input attribute set because that would # config cannot be declared in the input attribute set because that would
@@ -137,7 +136,7 @@
)) ))
); );
weechat = unstablePackages.weechat.override { weechatPkg = pkgs.weechat.override {
configure = _: { configure = _: {
init = "/exec -oc cat ${setFile}"; init = "/exec -oc cat ${setFile}";
@@ -163,14 +162,14 @@
cfg.files cfg.files
) )
} }
exec ${weechat}/bin/weechat "$@" exec ${weechatPkg}/bin/weechat "$@"
''; '';
in in
pkgs.symlinkJoin { pkgs.symlinkJoin {
name = "weechat-configured"; name = "weechat-configured";
paths = [ paths = [
wrapper wrapper
unstablePackages.weechat weechatPkg
]; ];
postBuild = '' postBuild = ''
ln -s ${setFile} $out/weechat.set ln -s ${setFile} $out/weechat.set

Submodule secrets updated: 04f66a7296...3f3a8d1334

View File

@@ -1,8 +1,11 @@
secrets/alertmanager-token-reporters.age secrets/alertmanager-token-reporters.age
secrets/brevo-key.age
secrets/cifs-credentials-zodiac.age secrets/cifs-credentials-zodiac.age
secrets/copecart-ipn.age
secrets/di-fm-key.age secrets/di-fm-key.age
secrets/email-password-cock.age secrets/email-password-cock.age
secrets/email-password-fysi.age secrets/email-password-fysi.age
secrets/email-password-ical-ephemeris.age
secrets/email-password-letos.age secrets/email-password-letos.age
secrets/email-password-meinhak99.age secrets/email-password-meinhak99.age
secrets/email-password-posteo.age secrets/email-password-posteo.age
@@ -16,6 +19,7 @@ secrets/ful-retiolum-privateKey-ed25519.age
secrets/ful-retiolum-privateKey-rsa.age secrets/ful-retiolum-privateKey-rsa.age
secrets/ful-root.age secrets/ful-root.age
secrets/fu-sftp-key.age secrets/fu-sftp-key.age
secrets/gemini-api-key.age
secrets/github-token-i3status-rust.age secrets/github-token-i3status-rust.age
secrets/grafana-password-admin.age secrets/grafana-password-admin.age
secrets/hetzner-storagebox-credentials.age secrets/hetzner-storagebox-credentials.age
@@ -75,6 +79,7 @@ secrets/telegram-token-proverb.age
secrets/telegram-token-reverse.age secrets/telegram-token-reverse.age
secrets/telegram-token-streaming-link.age secrets/telegram-token-streaming-link.age
secrets/weechat-sec.conf.age secrets/weechat-sec.conf.age
secrets/wifi.age
secrets/zaatar-moodle-dl-basicAuth.age secrets/zaatar-moodle-dl-basicAuth.age
secrets/zaatar-moodle-dl-tokens.json.age secrets/zaatar-moodle-dl-tokens.json.age
secrets/zaatar-retiolum-privateKey-ed25519.age secrets/zaatar-retiolum-privateKey-ed25519.age

View File

@@ -9,6 +9,7 @@ in {
./hardware-configuration.nix ./hardware-configuration.nix
../../configs/networkmanager.nix ../../configs/networkmanager.nix
../../configs/default.nix ../../configs/default.nix
../../configs/gaming.nix
# ../../configs/gnome.nix # ../../configs/gnome.nix
]; ];
@@ -40,8 +41,6 @@ in {
wireguard-aether-psk.file = ../../secrets/fatteh-wireguard-aether-psk.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.hostName = "fatteh";
networking.retiolum = retiolumAddresses.fatteh; networking.retiolum = retiolumAddresses.fatteh;

View File

@@ -12,7 +12,10 @@ in {
./radio.nix ./radio.nix
./panoptikon.nix ./panoptikon.nix
./hledger.nix ./hledger.nix
./alew.nix ./go-webring.nix
./gemini.nix
./wallabag.nix
./nethack.nix
../../configs/monitoring.nix ../../configs/monitoring.nix
../../configs/mycelium.nix ../../configs/mycelium.nix
../../configs/tor.nix ../../configs/tor.nix
@@ -68,65 +71,6 @@ in {
]; ];
}; };
users.users.servant = {
isSystemUser = true;
group = "servant";
};
users.groups.servant = {};
systemd.services.servant = {
enable = true;
environment.PORT = toString 18987;
environment.VIRTUAL_HOST = "https://openapiaiapi.kmein.de";
serviceConfig.ExecStart = pkgs.writers.writeHaskell "server" {
libraries = with pkgs.haskellPackages; [
servant
servant-server
servant-openapi3
servant-swagger-ui
servant-client
aeson
text
warp
uuid
lens
];
ghcArgs = ["-O3" "-threaded"];
} ./servant-openapi.hs;
serviceConfig.User = "servant";
serviceConfig.Group = "servant";
};
services.htgen.openapi-conversion = {
port = 18988;
script = ''. ${pkgs.writers.writeDash "openapi-conversion" ''
case "$Method $Request_URI" in
"GET /openapi-3.1.json")
schema=$(mktemp -d)
trap 'rm -rf $schema' EXIT
${pkgs.wget}/bin/wget http://127.0.0.1:${toString 18987}/openapi.json -O "$schema"/openapi.json
cat "$schema"/openapi.json >&2
PATH=${lib.makeBinPath [pkgs.bashInteractive pkgs.nodejs]} ${pkgs.nodejs}/bin/npx --yes openapi-format "$schema"/openapi.json --convertTo "3.1" -o "$schema"/openapi-new.json
printf 'HTTP/1.1 200 OK\r\n'
printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$schema"/openapi-new.json)"
printf 'Server: %s\r\n' "$Server"
printf 'Connection: close\r\n'
printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$schema"/openapi-new.json)
printf '\r\n'
cat "$schema"/openapi-new.json
exit
;;
esac
''}'';
};
services.nginx.virtualHosts."openapiaiapi.kmein.de" = {
enableACME = true;
forceSSL = true;
locations."/openapi-3.1.json".proxyPass = "http://127.0.0.1:${toString 18988}";
locations."/".proxyPass = "http://127.0.0.1:${toString 18987}";
};
networking = { networking = {
firewall.allowedTCPPorts = [80 443]; firewall.allowedTCPPorts = [80 443];
hostName = "ful"; hostName = "ful";

15
systems/ful/gemini.nix Normal file
View File

@@ -0,0 +1,15 @@
{ config, ... }:
{
networking.firewall.allowedTCPPorts = [ 1965 ];
services.agate = {
enable = true;
addresses = [ "0.0.0.0:1965" ];
hostnames = [ "kmein.de" ];
language = "de";
};
services.restic.backups.niveum.paths = [
config.services.agate.contentDir
config.services.agate.certificatesDir
];
}

View File

@@ -0,0 +1,39 @@
{ config, niveumPackages ,... }:
let
port = 2857;
in
{
services.go-webring = {
enable = true;
host = "dichtungsring.kmein.de";
listenAddress = "127.0.0.1:${toString port}";
package = niveumPackages.go-webring;
members = [
{ username = "meteora"; site = "meteora.xn--kiern-0qa.de"; }
{ username = "huldra"; site = "huldras-halbtraum.com"; }
];
homePageTemplate = ''
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dichtungsring</title>
</head>
<body>
<h1>Willkommen beim Dichtungs-Ring</h1>
<p>Ein <a href="https://de.wikipedia.org/wiki/Webring">Webring</a> für die Dichtung.</p>
<section id="members">
<table><tbody>{{ . }}</tbody></table>
</section>
</body>
</html>
'';
};
services.nginx.virtualHosts."dichtungsring.kmein.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://${config.services.go-webring.listenAddress}";
};
}

View File

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

View File

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

60
systems/ful/nethack.nix Normal file
View File

@@ -0,0 +1,60 @@
{
networking.firewall.allowedTCPPorts = [ 22 ];
containers.nethack = {
autoStart = true;
forwardPorts = [
{
containerPort = 22;
hostPort = 22;
}
];
config =
{ pkgs, ... }:
{
system.stateVersion = "25.11";
networking.hostName = "nethack";
services.openssh.enable = true;
environment.systemPackages = [ pkgs.nethack ];
programs.tmux.enable = true;
programs.tmux.extraConfig = ''
set -g mouse on
set -g allow-rename off
set -g detach-on-destroy off
unbind-key C-b
set -g prefix None
'';
users.users.nethack = {
isNormalUser = true;
home = "/home/nethack";
createHome = true;
shell = pkgs.bash;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAA...yourkey"
"ssh-ed25519 AAAA...friendkey"
];
};
services.openssh.settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
services.openssh.extraConfig = ''
Match User nethack
ForceCommand ${pkgs.tmux}/bin/tmux attach -t nethack || \
${pkgs.tmux}/bin/tmux new -s nethack ${pkgs.nethack}/bin/nethack
AllowTcpForwarding no
X11Forwarding no
PermitTTY yes
'';
};
};
}

View File

@@ -1,119 +0,0 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Aeson (ToJSON, FromJSON)
import GHC.Generics (Generic)
import Data.String (IsString(..))
import Network.Wai (Application)
import Network.Wai.Handler.Warp (run)
import Servant
import Servant.Client (HasClient (..))
import Servant.OpenApi (HasOpenApi(..), toOpenApi)
import qualified Data.Version as Version
import Servant.Swagger.UI (SwaggerSchemaUI, swaggerSchemaUIServer)
import Data.OpenApi (ToSchema, servers, license, info, description, version, title)
import qualified Data.OpenApi as OpenApi
import Control.Concurrent.MVar (MVar, newMVar, modifyMVar, readMVar)
import System.Environment (getEnv)
import Control.Monad.IO.Class (liftIO)
import Control.Lens
import qualified Data.Text as T
import GHC.Generics
import GHC.TypeLits
import Data.UUID (UUID)
import Data.UUID.V4 (nextRandom)
import qualified Data.UUID as UUID
-- Define a simple data type
data User = User
{ userId :: UUID
, name :: String
, age :: Int
} deriving (Generic, Show)
instance ToJSON User
instance FromJSON User
instance ToSchema User
-- Define the API type
type API = "users" :> OperationId "getUsers" :> Get '[JSON] [User]
:<|> "users" :> OperationId "insertUser" :> ReqBody '[JSON] User :> Post '[JSON] User
:<|> "users" :> OperationId "updateUser" :> Capture "id" UUID :> ReqBody '[JSON] User :> Put '[JSON] User
:<|> "users" :> OperationId "deleteUser" :> Capture "id" UUID :> Delete '[JSON] NoContent
-- Define the API with Swagger endpoints
type APIWithSwagger = API
:<|> SwaggerSchemaUI "swagger-ui" "openapi.json"
data OperationId (name :: Symbol)
instance HasServer subApi ctx => HasServer (OperationId name :> subApi) ctx where
type ServerT (OperationId name :> subApi) m = ServerT subApi m
route _ = route (Proxy @subApi)
hoistServerWithContext _ = hoistServerWithContext (Proxy @subApi)
instance (HasOpenApi subApi, KnownSymbol name) => HasOpenApi (OperationId name :> subApi) where
toOpenApi _ = toOpenApi (Proxy @subApi) & OpenApi.allOperations . OpenApi.operationId ?~ apiName
where
apiName = T.pack $ symbolVal (Proxy @name)
instance HasClient m api => HasClient m (OperationId name :> api) where
type Client m (OperationId name :> api) = Client m api
clientWithRoute pm Proxy = clientWithRoute pm (Proxy :: Proxy api)
hoistClientMonad pm _ = hoistClientMonad pm (Proxy :: Proxy api)
-- Handlers for the API
getUsers :: MVar [User] -> Handler [User]
getUsers usersVar = liftIO $ readMVar usersVar
addUser :: MVar [User] -> User -> Handler User
addUser usersVar newUser = liftIO $ do
newId <- nextRandom
let userWithId = newUser { userId = newId }
modifyMVar usersVar $ \users -> return (userWithId : users, userWithId)
updateUser :: MVar [User] -> UUID -> User -> Handler User
updateUser usersVar uid updatedUser = liftIO $ do
modifyMVar usersVar $ \users ->
let newUsers = map (\user -> if userId user == uid then updatedUser { userId = uid } else user) users
in return (newUsers, updatedUser { userId = uid })
deleteUser :: MVar [User] -> UUID -> Handler NoContent
deleteUser usersVar uid = liftIO $ do
modifyMVar usersVar $ \users ->
let newUsers = filter (\user -> userId user /= uid) users
in return (newUsers, NoContent)
-- Implement the server
server :: OpenApi.Server -> MVar [User] -> Server APIWithSwagger
server virtualHost usersVar = (getUsers usersVar
:<|> addUser usersVar
:<|> updateUser usersVar
:<|> deleteUser usersVar)
:<|> swaggerSchemaUIServer (toOpenApi (Proxy :: Proxy API)
& info.title .~ "OpenAPI AI API"
& info.version .~ "1.0"
& info.description ?~ "This is an API for AI with OpenAPI"
& info.license ?~ "MIT"
& servers .~ [virtualHost])
-- Create the application
app :: OpenApi.Server -> MVar [User] -> Application
app virtualHost usersVar = serve (Proxy :: Proxy APIWithSwagger) (server virtualHost usersVar)
-- Main entry point
main :: IO ()
main = do
initialUsers <- mapM (\(name, age) -> nextRandom >>= \uid -> return (User uid name age)) [("Alice", 30), ("Bob", 25)]
usersVar <- newMVar initialUsers
virtualHost <- getEnv "VIRTUAL_HOST"
port <- read <$> getEnv "PORT" -- Assuming PORT is a number
run port (app (fromString virtualHost) usersVar)

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

@@ -7,7 +7,7 @@
inherit (import ../../lib) retiolumAddresses; inherit (import ../../lib) retiolumAddresses;
in { in {
imports = [ imports = [
./hardware-configuration.nix ../kibbeh/hardware-configuration.nix
../../configs/tlp.nix ../../configs/tlp.nix
../../configs/default.nix ../../configs/default.nix
../../configs/networkmanager.nix ../../configs/networkmanager.nix
@@ -45,8 +45,6 @@ in {
wireguard-aether-psk.file = ../../secrets/kabsa-wireguard-aether-psk.age; wireguard-aether-psk.file = ../../secrets/kabsa-wireguard-aether-psk.age;
}; };
networking.wg-quick.interfaces.aether.address = ["192.168.178.203/24"];
environment.systemPackages = [pkgs.zeroad]; environment.systemPackages = [pkgs.zeroad];
networking = { networking = {
@@ -55,5 +53,5 @@ in {
retiolum = retiolumAddresses.kabsa; retiolum = retiolumAddresses.kabsa;
}; };
system.stateVersion = "19.03"; system.stateVersion = "23.11";
} }

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