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

102 Commits

Author SHA1 Message Date
eb9e7f534d Merge pull request #17 from kmein/update_flake_lock_action
flake.lock: Update
2022-06-05 18:00:12 +02:00
github-actions[bot]
64357f4b42 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/8f3e26705178cc8c1d982d37d881fc0d5b5b1837' (2022-05-30)
  → 'github:nix-community/home-manager/684e85d01d333be91c4875baebb05b93c7d2ffaa' (2022-06-01)
• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/a634c8f6c1fbf9b9730e01764999666f3436f10a' (2022-05-30)
  → 'github:NixOS/nixpkgs/7a20c208aacf4964c19186dcad51f89165dc7ed0' (2022-06-03)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/b62ada430501de88dfbb08cea4eb98ead3a5e3e7' (2022-05-29)
  → 'github:NixOS/nixpkgs/236cc2971ac72acd90f0ae3a797f9f83098b17ec' (2022-06-03)
2022-06-05 17:24:33 +02:00
6f31509e50 fix(keyboard): start monolingually 2022-06-05 17:24:11 +02:00
db7cb8c74c chore: update to 22.05 2022-05-31 22:26:56 +02:00
fbc50a3fea feat(weechat): add #eloop 2022-05-31 22:26:17 +02:00
2a33a37d11 feat(nextcloud): update 2022-05-31 22:03:03 +02:00
d7ee9b7c1a feat(nextcloud): update 2022-05-31 19:37:25 +02:00
b142dcdcc3 feat: bye ranger, hey lf 2022-05-31 19:34:20 +02:00
adae22772b fix(avesta): say no to cantera 2022-05-31 19:34:00 +02:00
0387d5c44b fix: update 2022-05-31 14:17:13 +02:00
github-actions[bot]
72048388dc flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/e66f0ff69a6c0698b35034b842c4b68814440778' (2022-05-23)
  → 'github:nix-community/home-manager/64831f938bd413cefde0b0cf871febc494afaa4f' (2022-05-25)
• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/cbd40c72b2603ab54e7208f99f9b35fc158bc009' (2022-05-20)
  → 'github:NixOS/nixpkgs/9bc0e974545d5bc4c24e1ed047be0dc4e30e494b' (2022-05-26)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/dfd82985c273aac6eced03625f454b334daae2e8' (2022-05-20)
  → 'github:NixOS/nixpkgs/83658b28fe638a170a19b8933aa008b30640fbd1' (2022-05-26)
• Updated input 'retiolum':
    'github:krebs/retiolum/40c6e184cecaae4fe0b4973c6cb8027a66cccaae' (2022-05-25)
  → 'github:krebs/retiolum/8668bb3e768fd2ec162036937f7b6edba437be68' (2022-05-28)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=5befc5a6f260e2283863212b39749d5ed05afb63' (2022-05-19)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=4d33f2ebea49e258f833cb6eab0c71485e88397a' (2022-05-28)
2022-05-31 14:17:13 +02:00
5253b83eb5 feat: ضف المشكّل 2022-05-30 18:24:17 +02:00
4b073323da feat(alacritty): less opaque, better cursor 2022-05-25 17:05:38 +02:00
bf35fb1020 feat(radio-news): ask radio-news.r 2022-05-25 17:05:19 +02:00
3fa820a65a feat(radio-news): set sensible default 2022-05-25 13:13:40 +02:00
0ae6397878 feat(delta): bye, you don't work with light themes 2022-05-24 15:05:20 +02:00
35ce4b1689 feat: new themes for alacritty 2022-05-24 15:05:20 +02:00
5b38655575 fix(ci): use nixos-stable 2022-05-24 15:05:20 +02:00
129127f917 feat: steal theming from lassulus 2022-05-24 14:14:12 +02:00
28ee96bc22 feat: use unstable for thinkpads, only fetch used krops inputs 2022-05-24 11:11:52 +02:00
238f2126b0 fix(radio-news): add dot to keep tts from spazzing out 2022-05-24 11:10:59 +02:00
8c1350c570 chore(hedgedoc): we can use stable sqlite 2022-05-24 11:10:36 +02:00
4d8912b020 feat(pls): add neutral response 2022-05-24 11:09:25 +02:00
588c161f7b feat(ssh): get static ipv4 from lib file 2022-05-24 11:09:02 +02:00
5fb0028a9e feat: powertop 2022-05-24 11:08:00 +02:00
8d88e58726 fix(ci): add ful 2022-05-24 11:07:44 +02:00
203eecddcb feat: add configurationLimit for manakish and makanek 2022-05-22 19:52:45 +02:00
2d67488b02 Merge branch 'update_flake_lock_action' 2022-05-22 19:31:47 +02:00
44efc4dfa1 feat(passport): init for makanek 2022-05-22 11:48:04 +02:00
github-actions[bot]
e6ac020fd2 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/12806d31a381e7cd169a6bac35590e7b36dc5fe5' (2022-05-14)
  → 'github:numtide/flake-utils/04c1b180862888302ddfb2e3ad9eaa63afc60cf8' (2022-05-17)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/79385ae0aacf7e02871cc8af0623123419dd7884' (2022-05-13)
  → 'github:NixOS/nixpkgs/cbd40c72b2603ab54e7208f99f9b35fc158bc009' (2022-05-20)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/437fd89069be470fba34ef7c7f5abc55fe20e328' (2022-05-20)
  → 'github:NixOS/nixpkgs/af0bcde689ed5263e9a0df36116f7583163eb032' (2022-05-22)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=c87ba30c0c1cf344c7cc090d73a2ba44140f15d9' (2022-05-11)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=5befc5a6f260e2283863212b39749d5ed05afb63' (2022-05-19)
2022-05-22 00:50:33 +00:00
9a3499ab6c feat(ful): limit to 1 configuration
this circumvents space issues on the /boot partition
2022-05-21 23:07:19 +02:00
92442db877 feat(ful): set root password 2022-05-21 23:06:49 +02:00
d2f85ab972 chore(ful): disable monitoring for now 2022-05-21 23:06:33 +02:00
b593f45ec2 chore(ful): move IP 2022-05-21 23:06:13 +02:00
e9b09a3e67 chore: bye youtube-dl 2022-05-21 23:05:43 +02:00
8c9a44d404 feat(ssh): reach ful, makanek via http first 2022-05-20 23:16:46 +02:00
45fdbad259 chore: update 2022-05-20 23:04:28 +02:00
93b8d31a33 feat: init ful 2022-05-20 23:04:15 +02:00
abb7924fca chore: only one unstable nixpkgs 2022-05-20 23:03:57 +02:00
0c872352e3 feat(hora): auto-update git 2022-05-18 18:11:32 +02:00
31e765da41 fix(geoip-share): really start after geoipupdate 2022-05-18 18:11:13 +02:00
d655faef3e fix(retiolum-map): update 2022-05-18 18:10:57 +02:00
2f5b177158 feat(klem): add avestan 2022-05-18 18:10:37 +02:00
4bc176ea42 fix(unicodmenu): append history 2022-05-17 22:34:30 +02:00
4b63d1b671 feat(hledger): add time tracking tools 2022-05-17 22:34:18 +02:00
dd86c24506 feat(matterbridge): disable, moved to krebs ponte 2022-05-17 22:34:02 +02:00
88c73b23a1 Merge branch 'update_flake_lock_action' 2022-05-15 23:07:03 +02:00
3675ab8161 feat(scripts): remove horoscope 2022-05-15 23:02:42 +02:00
github-actions[bot]
aac1053e1d flake.lock: Update
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11)
  → 'github:numtide/flake-utils/12806d31a381e7cd169a6bac35590e7b36dc5fe5' (2022-05-14)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5656d7f92aa8264eb06ba68ad94c87ac5b5312e8' (2022-05-06)
  → 'github:NixOS/nixpkgs/79385ae0aacf7e02871cc8af0623123419dd7884' (2022-05-13)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/d707e510df39cdd8fe1d3e244371a3a9f23051d2' (2022-05-08)
  → 'github:NixOS/nixpkgs/e9132b233ec7176c121b4ecb991ce397d92275ee' (2022-05-15)
• Updated input 'retiolum':
    'github:krebs/retiolum/2bafba9621b83529b78fb2db34b351fd19411c0e' (2022-05-04)
  → 'github:krebs/retiolum/7cc2a7118e4aa9f5df0953bebad28034306329e6' (2022-05-11)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=376b92c877442ec3be476ea5f4c89f8a715426dd' (2022-05-04)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=c87ba30c0c1cf344c7cc090d73a2ba44140f15d9' (2022-05-11)
2022-05-15 01:03:59 +00:00
651f6d9319 fix(gitea): show correct SSH clone port 2022-05-11 17:38:52 +02:00
69332ec98d fix(pmount): setuid 2022-05-11 11:23:21 +02:00
6c65a48ea8 feat(matterbridge): move to new token 2022-05-11 09:23:21 +02:00
d25cfe6c9b feat(unicodmenu): add history 2022-05-10 19:29:39 +02:00
9cd5974870 feat: use newest anki 2022-05-09 07:51:00 +02:00
8c8eceb01a feat(keyboard): add modes for languages 2022-05-08 22:01:29 +02:00
9601fb9456 feat(fonts): add GFS todo list 2022-05-08 13:55:48 +02:00
dc9e84599e Merge branch 'update_flake_lock_action' 2022-05-08 10:49:26 +02:00
94bdfda91b feat(fonts): add new SIL 2022-05-08 09:15:05 +02:00
84a69f31de fix(nextcloud): start after gnome-keyring 2022-05-08 09:15:05 +02:00
dcbe8841ba feat(scripts): back to old ipa script 2022-05-08 09:15:05 +02:00
bef795e45c feat(fonts): add new SIL 2022-05-08 09:14:48 +02:00
9b7c300466 fix(nextcloud): start after gnome-keyring 2022-05-08 09:14:37 +02:00
f4fca0a971 feat(scripts): back to old ipa script 2022-05-08 09:14:20 +02:00
github-actions[bot]
23b341a314 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/d14adb99f3fb562ec74ad18c032efc154b438034' (2022-04-26)
  → 'github:nix-community/home-manager/d93d56ab8c1c6aa575854a79b9d2f69d491db7d0' (2022-05-02)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/feea25c58657fa81d16e0e51f80e1a02ef4cbd49' (2022-04-27)
  → 'github:NixOS/nixpkgs/5656d7f92aa8264eb06ba68ad94c87ac5b5312e8' (2022-05-06)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/05ced71757730406ca3eb3e58503f05334a6057d' (2022-05-01)
  → 'github:NixOS/nixpkgs/d707e510df39cdd8fe1d3e244371a3a9f23051d2' (2022-05-08)
• Updated input 'retiolum':
    'github:krebs/retiolum/de6d7dc9bd671e65f2ee3004b6807625e7553e84' (2022-03-16)
  → 'github:krebs/retiolum/2bafba9621b83529b78fb2db34b351fd19411c0e' (2022-05-04)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=92d5eacd6d9e530c4d1ea0dec2652417b0fde78a' (2022-04-15)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=376b92c877442ec3be476ea5f4c89f8a715426dd' (2022-05-04)
2022-05-08 00:50:36 +00:00
89c852c4ea feat: bye youtube-dl, hi yt-dlp 2022-05-07 11:26:51 +02:00
github-actions[bot]
3fa242b957 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/7244c6715cb8f741f3b3e1220a9279e97b2ed8f5' (2022-04-13)
  → 'github:nix-community/home-manager/d14adb99f3fb562ec74ad18c032efc154b438034' (2022-04-26)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/a318a09a96a38382fe61a7f85d03ea6e25c46c56' (2022-04-22)
  → 'github:NixOS/nixpkgs/feea25c58657fa81d16e0e51f80e1a02ef4cbd49' (2022-04-27)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/0f1f92d85be76e0bd79ebb2285be8f43683eb845' (2022-04-24)
  → 'github:NixOS/nixpkgs/05ced71757730406ca3eb3e58503f05334a6057d' (2022-05-01)
• Updated input 'scripts':
    'github:kmein/scripts/adfd4238f7a8f0f894547998cbb04327bad97884' (2022-04-19)
  → 'github:kmein/scripts/c1aaeb4339e9c41057d362667554835a0f49850f' (2022-04-26)
2022-05-02 14:07:03 +02:00
35c51b3b17 fix(ci): add dslalewa 2022-05-02 13:54:18 +02:00
f1c049ada3 fix(names): restart on failure 2022-05-02 13:28:57 +02:00
8118009acb feat(neomutt): add office documents to mailcap 2022-05-02 13:28:42 +02:00
41706bc84b feat(neomutt): add alew admin account 2022-05-02 13:28:30 +02:00
eec7be0c3b feat(moodle-dl): papyrology 2022-04-26 20:07:21 +02:00
2aac2609cb feat: yt-dlp 2022-04-26 20:07:09 +02:00
2b7db496b0 feat(keyboard): add docs 2022-04-25 11:58:54 +02:00
0feebd18cd feat(keyboard): add gxkb 2022-04-25 11:58:37 +02:00
892c758303 feat(keyboard): add arabic and russian 2022-04-25 11:58:36 +02:00
8cc3541d2d fix: do not monitor http://names.kmein.r/ 2022-04-24 17:24:58 +02:00
687aa456d1 Merge remote-tracking branch 'origin/update_flake_lock_action' 2022-04-24 13:58:19 +02:00
github-actions[bot]
fd60863f77 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2f06b87f64bc06229e05045853e0876666e1b023' (2022-04-14)
  → 'github:NixOS/nixpkgs/a318a09a96a38382fe61a7f85d03ea6e25c46c56' (2022-04-22)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/6140c314d5850406dddc78e55dcc8716ea111ee4' (2022-04-17)
  → 'github:NixOS/nixpkgs/0f1f92d85be76e0bd79ebb2285be8f43683eb845' (2022-04-24)
2022-04-24 00:45:55 +00:00
a60cbab742 feat(moodle-dl): more courses 2022-04-22 12:31:37 +02:00
54383cb1ab feat(moodle-dl): first load of courses 2022-04-19 23:29:41 +02:00
9b414d104a fix(makanek): names 2022-04-19 23:28:00 +02:00
67b7d63d9a Merge branch 'update_flake_lock_action' 2022-04-19 23:17:50 +02:00
f3116bfc12 fix(nextcloud): start after gnome keyring 2022-04-17 10:48:32 +02:00
f31baf9e56 chore(update)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/0f8662f1319ad6abf89b3380dd2722369fc51ade' (2022-03-26)
  → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11)
• Updated input 'home-manager':
    'github:nix-community/home-manager/0bdbdea2e26c984b096f4f7d10e3c88536a980b0' (2022-04-01)
  → 'github:nix-community/home-manager/7244c6715cb8f741f3b3e1220a9279e97b2ed8f5' (2022-04-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c86185d20d708013caf97a6adaa8dc6d72313c75' (2022-04-09)
  → 'github:NixOS/nixpkgs/2f06b87f64bc06229e05045853e0876666e1b023' (2022-04-14)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/c2b6e029cd1efa0efd37daab89264ef040ae5669' (2022-04-09)
  → 'github:NixOS/nixpkgs/6140c314d5850406dddc78e55dcc8716ea111ee4' (2022-04-17)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=b3833baee96d7bce2c54295110b40c646468a1ff' (2022-04-04)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=92d5eacd6d9e530c4d1ea0dec2652417b0fde78a' (2022-04-15)
2022-04-17 07:02:08 +02:00
906cc1981e fix(tuna): nix types 2022-04-15 01:17:38 +02:00
d4e82500ae feat(mpv): limit resolution 2022-04-14 13:40:11 +02:00
6aa9be6f70 feat: more fonts 2022-04-13 09:01:23 +02:00
4e362678ca feat(astrology): pause bot 2022-04-13 09:01:23 +02:00
a2081dece4 feat(weechat): block people 2022-04-11 23:02:02 +02:00
98cf188a17 feat: use more tmpfiles.d 2022-04-10 19:38:47 +02:00
4932c7c08a chore(update) 2022-04-10 09:13:34 +02:00
c8a6991f09 fix(menstruation): update to pinning version 2022-04-10 00:36:07 +02:00
5d3c9a67ab fix(monitoring): remove tahina 2022-04-04 18:35:32 +02:00
github-actions[bot]
659a888c3d flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/a8d00f5c038cf7ec54e7dac9c57b171c1217f008' (2022-03-13)
  → 'github:nix-community/home-manager/0bdbdea2e26c984b096f4f7d10e3c88536a980b0' (2022-04-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d2caa9377539e3b5ff1272ac3aa2d15f3081069f' (2022-03-22)
  → 'github:NixOS/nixpkgs/6f88260faaaa3cda8f4e478be72be6c0861c47ad' (2022-04-01)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/6de161729c81dc98e844793cc9c8fda29d5ef62a' (2022-03-26)
  → 'github:NixOS/nixpkgs/21299f3dd3ff475f19bc8933f30ebb6a135799f1' (2022-04-02)
• Updated input 'scripts':
    'github:kmein/scripts/d1d525b92a34e55b1ad886807c284106e58716b2' (2022-03-26)
  → 'github:kmein/scripts/f5df67a2416d8f05a7dbfea269c44668854c7887' (2022-03-27)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=ae9c0b12710b5361d0d45510eb401eebfc1b3fb0' (2022-03-25)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=b9e0a7ec71e0318a992ff2b275a6aaee3cef63bd' (2022-03-28)
2022-04-03 00:47:09 +00:00
26908b03a3 chore(tahina): clean 2022-03-30 18:29:16 +02:00
feccea5234 feat(streams): add soma playlist 2022-03-30 18:29:04 +02:00
8ffb0bd245 feat: jless 2022-03-30 09:17:58 +02:00
c1b777b689 feat(tor): enable 2022-03-29 20:13:29 +02:00
e85a8f7634 feat(mpd): tag stations 2022-03-29 20:13:29 +02:00
25bc6f573c chore(tahina): clean 2022-03-29 09:54:56 +02:00
4b5915354b fix(nextcloud): start with gnome-keyring 2022-03-29 09:54:37 +02:00
43ab6b3210 feat(tahina): init as guest laptop 2022-03-29 01:07:01 +02:00
72 changed files with 1494 additions and 318 deletions

12
ci.nix
View File

@@ -3,7 +3,7 @@
system,
name,
}: let
inherit (inputs) nixpkgs;
nixpkgs = inputs.nixos-stable;
pkgs = nixpkgs.legacyPackages.${system};
ensureFiles = paths:
pkgs.runCommand "directory" {} ''
@@ -23,6 +23,13 @@
"nixos-config=${toString ./.}/systems/${name}/configuration.nix"
"system-secrets=${systemSecrets}"
"secrets=${sharedSecrets}"
"nixpkgs=${
toString (
if name == "kabsa" || name == "manakish"
then inputs.nixos-unstable
else inputs.nixos-stable
)
}"
]
++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs);
# cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//'
@@ -36,6 +43,7 @@
"mail/gmail/amroplay"
"mail/gmail/kieran.meinhardt"
"mail/meinhaki"
"mail/dslalewa"
"mail/posteo"
"nextcloud-fysi/password"
"nextcloud/password"
@@ -54,6 +62,7 @@
kabsa = ensureFiles basic;
manakish = ensureFiles basic;
tahina = ensureFiles basic;
ful = ensureFiles basic;
makanek = ensureFiles ([
"irc/retiolum"
"irc/hackint"
@@ -73,6 +82,7 @@
"telegram/menstruation.token"
"telegram/cool_village.token"
"telegram/kmein.token"
"telegram/krebs.token"
"telegram/prometheus.token"
"weechat/relay"
]

View File

@@ -3,29 +3,15 @@
lib,
config,
...
}: {
environment.variables.TERMINAL = "alacritty";
environment.systemPackages = [
pkgs.alacritty
];
home-manager.users.me.xdg.configFile = let
inherit (import <niveum/lib>) colours;
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
colourPairs = lib.getAttrs colourNames colours;
in {
"alacritty/alacritty.yml".source = (pkgs.formats.yaml {}).generate "alacritty.yml" {
background_opacity = 0.9;
colors = {
primary = {inherit (colours) background foreground;};
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
}: let
alacritty-cfg = theme:
(pkgs.formats.yaml {}).generate "alacritty.yml" {
window.opacity = 0.95;
font = {
normal.family = "Monospace";
size = 6;
};
live_config_reload = true;
key_bindings = [
{
key = "Plus";
@@ -43,6 +29,34 @@
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.writeDashBin "alacritty" ''
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
'')
pkgs.alacritty
];
};
in {
environment.variables.TERMINAL = "alacritty";
environment.systemPackages = [
alacritty-pkg
];
environment.etc = {
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-dark.nix>);
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-light.nix>);
};
}

View File

@@ -8,7 +8,7 @@
acpi_call
];
boot.kernelModules = ["tp_smapi" "acpi_call"];
environment.systemPackages = [pkgs.tpacpi-bat];
environment.systemPackages = [pkgs.tpacpi-bat pkgs.powertop];
services.tlp = {
enable = true;

View File

@@ -7,6 +7,7 @@
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
"pjjgklgkfeoeiebjogplpnibpfnffkng" # undistracted
"nhdogjmejiglipccpnnnanhbledajbpd" # vuejs devtools
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
];
};

View File

@@ -3,7 +3,9 @@
lib,
pkgs,
...
}: {
}: let
inherit (import <niveum/lib>) tmpfilesConfig;
in {
imports = [
<niveum/modules/dropbox.nix>
];
@@ -12,17 +14,45 @@
dropbox.enable = false;
};
system.activationScripts.home-symlinks = ''
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
'';
systemd.tmpfiles.rules = map tmpfilesConfig [
{
type = "L+";
user = config.users.users.me.name;
group = "users";
mode = "0755";
argument = "${config.users.users.me.home}/cloud/Seafile/Wiki";
path = "${config.users.users.me.home}/notes";
}
{
type = "L+";
user = config.users.users.me.name;
group = "users";
mode = "0755";
argument = "${config.users.users.me.home}/cloud/Seafile/Uni";
path = "${config.users.users.me.home}/uni";
}
{
type = "L+";
user = config.users.users.me.name;
group = "users";
mode = "0755";
argument = "${config.users.users.me.home}/cloud/syncthing/common/mahlzeit";
path = "${config.users.users.me.home}/mahlzeit";
}
];
home-manager.users.me = {
services.gnome-keyring.enable = true;
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
systemd.user.services.nextcloud-client = {
Unit = {
Wants = ["gnome-keyring.service"];
After = ["gnome-keyring.service"];
};
};
};
environment.systemPackages = [

View File

@@ -79,7 +79,6 @@ in {
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
extraModules = [pkgs.pulseaudio-modules-bt];
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
zeroconf.discovery.enable = true;
extraConfig = ''
@@ -144,8 +143,8 @@ in {
wcd = "source ${wcd}";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
where = "source ${where}";
yt = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
yta = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
};
}
{i18n.defaultLocale = "en_DK.UTF-8";}
@@ -170,13 +169,15 @@ in {
{
security.wrappers = {
pmount = {
setuid = true;
owner = "root";
group = "users";
group = "root";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
setuid = true;
owner = "root";
group = "users";
group = "root";
source = "${pkgs.pmount}/bin/pumount";
};
};
@@ -244,7 +245,7 @@ in {
./polkit.nix
./power-action.nix
./printing.nix
./openweathermap.nix
# ./openweathermap.nix
./wallpaper.nix
./redshift.nix
./retiolum.nix
@@ -255,12 +256,13 @@ in {
./sshd.nix
./sudo.nix
./sxiv.nix
./theming.nix
./themes.nix
./tmux.nix
./traadfri.nix
./unclutter.nix
./vscode.nix
./watson.nix
./zsh.nix
./tor.nix
];
}

View File

@@ -12,5 +12,5 @@
];
};
users.users.me.extraGroups = ["docker"];
environment.systemPackages = [pkgs.docker pkgs.docker_compose];
environment.systemPackages = [pkgs.docker pkgs.docker-compose];
}

View File

@@ -1,42 +1,55 @@
{pkgs, ...}: {
nixpkgs.config.joypixels.acceptLicense = true;
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
fonts = with pkgs; [
alegreya
alegreya-sans
amiri
annapurna-sil
cantarell-fonts
charis-sil
corefonts
crimson
eb-garamond
etBook
ezra-sil
fira
font-awesome-ttf
font-awesome
galatia-sil
gentium
gfs-fonts
gyre-fonts
ia-writer-duospace
ibm-plex
inconsolata
iosevka
libertine
jetbrains-mono
joypixels
libertinus
libre-bodoni
lmodern
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
merriweather
ocr-a
roboto
roboto-mono
roboto-slab
scheherazade-new
source-code-pro
source-serif-pro
source-sans-pro
ubuntu_font_family
gfs-fonts
jetbrains-mono
twemoji-color-font
joypixels
source-serif-pro
theano
tocharian-font
];
fontconfig.defaultFonts = {
monospace = ["JetBrains Mono" "JoyPixels"];
serif = ["Roboto Slab"];
sansSerif = ["Roboto" "Noto Sans"];
emoji = ["JoyPixels"];
vistafonts
vollkorn
zilla-slab
]; # google-fonts league-of-moveable-type
fontconfig.defaultFonts = let
emojiFont = "JoyPixels";
in {
monospace = ["JetBrains Mono" emojiFont];
serif = ["Merriweather"];
sansSerif = ["Cantarell" emojiFont];
emoji = [emojiFont];
};
};
}

View File

@@ -50,12 +50,12 @@ in {
rebase.autoStash = true;
merge.autoStash = 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";
# # 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

@@ -5,6 +5,17 @@
}: {
imports = [<niveum/modules/hledger.nix>];
environment.systemPackages = let
timeLedger = "$HOME/projects/ledger/time.timeclock";
in [
(pkgs.writers.writeDashBin "hora-edit" ''
$EDITOR + "${timeLedger}" && ${pkgs.git}/bin/git -C "$(${pkgs.coreutils}/bin/dirname ${timeLedger})" commit --all --message "$(${pkgs.coreutils}/bin/date -Im)"
'')
(pkgs.writers.writeDashBin "hora" ''
${pkgs.hledger}/bin/hledger -f "${timeLedger}" "$@"
'')
];
niveum.hledger = {
enable = true;
ledgerFile = "$HOME/projects/ledger/all.journal";

View File

@@ -34,6 +34,7 @@
"devanagari" = pkgs.writers.writeDash "devanagari" ''
${pkgs.scripts.devanagari}/bin/devanagari
'';
"avesta" = pkgs.writeScript "avesta" (builtins.readFile <niveum/packages/scripts/avesta.sed>);
"curl" = pkgs.writers.writeDash "curl" ''
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
'';
@@ -247,8 +248,9 @@ in {
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
"${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu";
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
"${modifier}+F7" = "exec ${pkgs.scripts.showkeys-toggle}/bin/showkeys-toggle";
"${modifier}+F8" = "exec ${pkgs.xorg.xkill}/bin/xkill";
"${modifier}+F8" = "exec switch-theme toggle";
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";

View File

@@ -4,10 +4,20 @@
...
}: let
commaSep = builtins.concatStringsSep ",";
languages = {
de = "T3";
gr = "polytonic";
ru = "phonetic";
ara = "buckwalter";
};
defaultLanguage = "de";
in {
# man 7 xkeyboard-config
services.xserver = {
layout = commaSep ["de" "gr"];
xkbVariant = commaSep ["T3" "polytonic"];
layout = "de";
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
# buckwalter: http://www.qamus.org/transliteration.htm
xkbVariant = "T3";
xkbOptions =
commaSep ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
libinput.enable = true;
@@ -15,6 +25,25 @@ in {
console.keyMap = "de";
environment.systemPackages =
lib.mapAttrsToList
(language: variant:
pkgs.writers.writeDashBin "kb-${language}" ''
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage},${language} ${languages.${defaultLanguage}},${variant}
'')
languages;
# improve held key rate
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
systemd.user.services.gxkb = {
wantedBy = ["graphical-session.target"];
serviceConfig = {
SyslogIdentifier = "gxkb";
ExecStart = "${pkgs.gxkb}/bin/gxkb";
Restart = "always";
RestartSec = "15s";
StartLimitBurst = 0;
};
};
}

View File

@@ -18,8 +18,10 @@ in {
programs.mpv = {
enable = true;
config = {
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
ytdl-raw-options = lib.concatStringsSep "," [''sub-lang="de,en"'' "write-sub=" "write-auto-sub="];
screenshot-template = "%F-%wH%wM%wS-%#04n";
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
};
bindings = {
"Alt+RIGHT" = "add video-rotate 90";

View File

@@ -47,6 +47,20 @@
};
};
accounts.work-admin = {
user = "dslalewa";
password = lib.strings.fileContents <secrets/mail/dslalewa>;
address = "admin.alew.vglsprwi@hu-berlin.de";
imap = "mailbox.cms.hu-berlin.de";
smtp = "mailhost.cms.hu-berlin.de";
smtpSettings = smtp: "smtp://${smtp}";
folders = {
drafts = "Drafts";
sent = "Sent";
trash = "Trash";
};
};
accounts.work-fysi = rec {
user = "kieran@fysi.tech";
address = user;
@@ -131,6 +145,7 @@ in {
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput;
application/vnd.openxmlformats*; ${pkgs.libreoffice}/bin/soffice '%s';
''
}:$mailcap_path

View File

@@ -48,7 +48,7 @@ in {
networking.networkmanager = {
enable = true;
packages = [
plugins = [
pkgs.networkmanager-openvpn
pkgs.networkmanager-fortisslvpn
];

View File

@@ -5,7 +5,7 @@
}: let
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata";
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.yt-dlp}/bin/yt-dlp -f ${ytdl-format} --add-metadata";
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";

View File

@@ -8,8 +8,6 @@
menstruation = pkgs.callPackage <menstruation-backend> {};
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
nixpkgs-unstable = import <nixpkgs-unstable> {config.allowUnfree = true;};
zoteroStyle = {
name,
sha256,
@@ -23,19 +21,19 @@
cslDirectory = pkgs.linkFarm "citation-styles" [
(zoteroStyle {
name = "chicago-author-date-de";
sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s";
sha256 = "sha256-ddMYk4A9DJQhx9ldkmF7PhwKuc7wUSr26uHHGAze9Ps=";
})
(zoteroStyle {
name = "din-1505-2";
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
sha256 = "sha256-bXZbB850fek8J6wMVFL32ndI7F4wiKKr1qUC71ezreE=";
})
(zoteroStyle {
name = "apa";
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
sha256 = "sha256-yq4fW6hQknycLjaj5fPbXLrQlGBp5myXiOSHBU90jEc=";
})
];
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old:
astrolog = pkgs.astrolog.overrideAttrs (old:
old
// {
installPhase = ''
@@ -73,7 +71,7 @@ in {
whois
dnsutils
# FILE MANAGERS
ranger
lf
pcmanfm
# MEDIA
ffmpeg
@@ -102,10 +100,10 @@ in {
htmlq
xsv # csv toolkit
xmlstarlet # xml toolkit
manpages
man-pages
posix_man_pages
tree
fuse_exfat # to mount windows drives
exfat # to mount windows drives
parallel # for parallel, since moreutils shadows task spooler
ripgrep # better grep
rlwrap
@@ -117,7 +115,7 @@ in {
arandr # xrandr for noobs
libnotify # for notify-send
xclip # clipboard CLI
dragon-drop # drag and drop
xdragon # drag and drop
xorg.xkill # kill by clicking
audacity
calibre
@@ -126,8 +124,8 @@ in {
astrolog
anki # flashcards
jbofihe # lojbanic software
nixpkgs-unstable.zoom-us # video conferencing
nixpkgs-unstable.alejandra # nix formatter
zoom-us # video conferencing
alejandra # nix formatter
pdfgrep # search in pdf
pdftk # pdf toolkit
mupdf
@@ -136,7 +134,7 @@ in {
xournalpp # for annotating pdfs
pdfpc # presenter console for pdf slides
hc # print files as qr codes
youtubeDL
yt-dlp
espeak
bc # calculator
pari # gp -- better calculator
@@ -161,7 +159,7 @@ in {
scripts.vimv
scripts.swallow # window swallowing
scripts.literature-quote
scripts.nav # json navigation
jless # less(1) for json
scripts.notetags
scripts.booksplit
scripts.dmenurandr
@@ -175,7 +173,6 @@ in {
scripts.fkill
scripts.wttr
scripts.unicodmenu
scripts.horoscope
scripts.closest
scripts.trans
scripts.mpv-radio
@@ -233,7 +230,7 @@ in {
]))
python3Packages.poetry
htmlTidy
html-tidy
nodePackages.csslint
nodePackages.jsonlint
nodePackages.prettier

View File

@@ -5,6 +5,7 @@
...
}: let
inherit (import <niveum/lib>) sshPort kieran;
externalNetwork = import <niveum/lib/external-network.nix>;
in {
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
@@ -25,7 +26,12 @@ in {
port = sshPort;
};
makanek = {
hostname = "makanek.r";
hostname = externalNetwork.makanek;
user = "root";
port = sshPort;
};
ful = {
hostname = externalNetwork.ful;
user = "root";
port = sshPort;
};
@@ -39,11 +45,6 @@ in {
user = "kfm";
port = sshPort;
};
toum = {
hostname = "toum.r";
user = "root";
port = sshPort;
};
kabsa = {
hostname = "kabsa.r";
user = "kfm";
@@ -57,10 +58,6 @@ in {
hostname = "135.181.85.233";
user = "root";
};
oracle = {
hostname = "130.61.171.199";
user = "ubuntu";
};
};
};
}

View File

@@ -1,9 +1,11 @@
{
config,
pkgs,
lib,
...
}: let
nixpkgs-unstable = import <nixpkgs-unstable> {};
unstable = import <nixos-unstable> {inherit (config.nixpkgs) config;};
toSymbols = pkgs.writers.writeDash "to-symbols" ''
${pkgs.gnused}/bin/sed '
s/\bTri\b//;
@@ -42,7 +44,7 @@
'';
in {
niveum.telegramBots.transits = {
enable = true;
enable = false;
time = "*:0/1";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = ["-1001796440545"];
@@ -50,8 +52,8 @@ in {
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
{
${nixpkgs-unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
${nixpkgs-unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
${unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
'');
};

View File

@@ -20,4 +20,12 @@ in {
parseMode = "Markdown";
command = "${autorenkalender}/bin/autorenkalender";
};
niveum.passport.services = [
{
title = "Autorenkalender";
description = "sends <a href=\"https://www.projekt-gutenberg.org/\">Projekt Gutenberg</a>'s anniversary information to Telegram.";
link = "https://t.me/Autorenkalender";
}
];
}

View File

@@ -26,12 +26,30 @@ in {
inherit path;
}) [reverseDirectory proverbDirectory];
niveum.passport.services = [
{
title = "Rückwarts-Bot";
link = "https://t.me/RueckwaertsBot";
description = "reverses things on Telegram.";
}
{
title = "BetaCode-Bot";
link = "https://t.me/BetaCodeBot";
description = "converts <a href=\"https://en.wikipedia.org/wiki/Beta_Code\">beta code</a> to polytonic Greek on Telegram.";
}
{
title = "Sprichwortgenerator-Bot";
link = "https://t.me/SprichwortGeneratorBot";
description = "generates useless German proverbs with optional stock photo background on Telegram.";
}
];
systemd.services.telegram-reverse = {
wantedBy = ["multi-user.target"];
description = "Telegram reverse bot";
path = [pkgs.ffmpeg];
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/reverse.token>;
enable = true;
enable = false;
script = "${telebots}/bin/telegram-reverse";
serviceConfig.Restart = "always";
serviceConfig.WorkingDirectory = reverseDirectory;
@@ -41,7 +59,7 @@ in {
wantedBy = ["multi-user.target"];
description = "Telegram beta code bot";
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/betacode.token>;
enable = true;
enable = false;
script = "${telebots}/bin/telegram-betacode";
serviceConfig.Restart = "always";
};
@@ -50,7 +68,7 @@ in {
wantedBy = ["multi-user.target"];
description = "Telegram proverb bot";
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/proverb.token>;
enable = true;
enable = false;
script = "${telebots}/bin/telegram-proverb";
serviceConfig.Restart = "always";
serviceConfig.WorkingDirectory = proverbDirectory;

View File

@@ -14,4 +14,11 @@ in {
command = "${literature-quote}/bin/literature-quote";
parseMode = "Markdown";
};
niveum.passport.services = [
{
title = "Literature quote bot";
description = "sends me and my friends three <a href=\"https://logotheca.xn--kiern-0qa.de/\">logotheca</a> quotes a day.";
}
];
}

View File

@@ -34,4 +34,12 @@ in {
});
serviceConfig.Restart = "always";
};
niveum.passport.services = [
{
title = "Nachtischsatan-Bot";
link = "https://t.me/NachtischsatanBot";
description = "*flubberflubber*";
}
];
}

View File

@@ -17,4 +17,12 @@
'');
parseMode = "Markdown";
};
niveum.passport.services = [
{
title = "Thesaurus Linguae Graecae Word of the Day";
description = "sends <a href=\"https://stephanus.tlg.uci.edu/\">TLG</a>'s word of the day to Telegram.";
link = "https://t.me/tlgwotd";
}
];
}

82
configs/themes.nix Normal file
View File

@@ -0,0 +1,82 @@
{
config,
lib,
pkgs,
...
}: let
switch-theme = pkgs.writers.writeDashBin "switch-theme" ''
set -efux
if [ "$1" = toggle ]; then
if [ "$(${pkgs.coreutils}/bin/cat /var/theme/current_theme)" = dark ]; then
${placeholder "out"}/bin/switch-theme light
else
${placeholder "out"}/bin/switch-theme dark
fi
elif test -e "/etc/themes/$1"; then
mkdir -p /var/theme/config
${pkgs.rsync}/bin/rsync --chown=${config.users.users.me.name}:users -a --delete "/etc/themes/$1/" /var/theme/config/
echo "$1" > /var/theme/current_theme
${pkgs.coreutils}/bin/chown ${config.users.users.me.name}:users /var/theme/current_theme
${pkgs.xorg.xrdb}/bin/xrdb -merge /var/theme/config/xresources
${pkgs.procps}/bin/pkill -HUP xsettingsd
else
echo "theme $1 not found"
fi
'';
in {
systemd.services.xsettingsd = {
wantedBy = ["multi-user.target"];
after = ["display-manager.service"];
environment.DISPLAY = ":0";
serviceConfig = {
ExecStart = "${pkgs.xsettingsd}/bin/xsettingsd -c /var/theme/config/xsettings.conf";
User = config.users.users.me.name;
Restart = "always";
RestartSec = "15s";
};
};
systemd.tmpfiles.rules = [
"d /var/theme/ 755 ${config.users.users.me.name} users"
];
environment.systemPackages = [
switch-theme
pkgs.capitaine-cursors
];
home-manager.users.me = {
home.pointerCursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
size = 16;
};
};
environment.etc = {
"themes/light/xsettings.conf".text = ''
Net/ThemeName "Adwaita"
'';
"themes/light/xresources".text = ''
*background: #ffffff
*foreground: #000000
'';
"themes/dark/xsettings.conf".text = ''
Net/ThemeName "Adwaita-dark"
'';
"themes/dark/xresources".text = ''
*background: #000000
*foreground: #ffffff
'';
};
system.activationScripts.theme.text = ''
export DISPLAY=:0
if test -e /var/theme/current_theme; then
${switch-theme}/bin/switch-theme "$(cat /var/theme/current_theme)" ||
${switch-theme}/bin/switch-theme dark
else
${switch-theme}/bin/switch-theme dark
fi
'';
}

View File

@@ -23,6 +23,11 @@ in {
enable = true;
platformTheme = "gtk";
};
xsession.pointerCursor = theme.cursor // {size = 16;};
home.pointerCursor =
theme.cursor
// {
size = 16;
x11.enable = true;
};
};
}

View File

@@ -1,4 +1,4 @@
{
{pkgs, ...}: {
services.tor.enable = true;
services.tor.torsocks.enable = true;
environment.systemPackages = [pkgs.tor];
}

78
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
@@ -18,20 +18,20 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
"nixos-unstable"
]
},
"locked": {
"lastModified": 1647175256,
"narHash": "sha256-7H+veXPM7IwdN1DoZqliwb9sghlN56koV5dnCu1kpsc=",
"lastModified": 1654113406,
"narHash": "sha256-70esZvhal+FsyU89mJRcAb+cDGHKt0sgZ6MlRr9Cplg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a8d00f5c038cf7ec54e7dac9c57b171c1217f008",
"rev": "684e85d01d333be91c4875baebb05b93c7d2ffaa",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-21.11",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
@@ -42,7 +42,7 @@
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
"nixos-stable"
]
},
"locked": {
@@ -62,11 +62,11 @@
"menstruation-backend": {
"flake": false,
"locked": {
"lastModified": 1634573652,
"narHash": "sha256-FIj8oCOJO+Wqxr2o5MMqIShvzMJud4iUq3o8y4NIRvw=",
"lastModified": 1649545504,
"narHash": "sha256-TVm3246ML7gWPeGm+bdb+Qo8o/7nve7sQ2hBdCZm3z8=",
"owner": "kmein",
"repo": "menstruation.rs",
"rev": "dd405fe2acf32441e8ac56e488e689bb1c4bea82",
"rev": "d9f3c6d53542fd7c7ed191e37cf4e342d4a47bcb",
"type": "github"
},
"original": {
@@ -96,7 +96,7 @@
"locked": {
"lastModified": 1554228333,
"narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=",
"ref": "master",
"ref": "refs/heads/master",
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
"revCount": 32,
"type": "git",
@@ -107,34 +107,34 @@
"url": "https://cgit.krebsco.de/nix-writers"
}
},
"nixpkgs": {
"nixos-stable": {
"locked": {
"lastModified": 1647992509,
"narHash": "sha256-AG40Nt5OWz0LBs5p457emOuwLKOvTtcv/2fUdnEN3Ws=",
"lastModified": 1654275867,
"narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d2caa9377539e3b5ff1272ac3aa2d15f3081069f",
"rev": "7a20c208aacf4964c19186dcad51f89165dc7ed0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"nixos-unstable": {
"locked": {
"lastModified": 1648337267,
"narHash": "sha256-8DRg8UDvs63iaIaHEbWG7/lnD9ImQlMNsTZMY3PvFLc=",
"lastModified": 1654230545,
"narHash": "sha256-8Vlwf0x8ow6pPOK2a04bT+pxIeRnM1+O0Xv9/CuDzRs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6de161729c81dc98e844793cc9c8fda29d5ef62a",
"rev": "236cc2971ac72acd90f0ae3a797f9f83098b17ec",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -158,11 +158,11 @@
"retiolum": {
"flake": false,
"locked": {
"lastModified": 1647444524,
"narHash": "sha256-N4T1UXLkYJMQqk65LkTDpW70ujXXeZ9xe5k+LOpznAI=",
"lastModified": 1653896694,
"narHash": "sha256-c37fCbsOydJQoiE4l81hltJLF9BkKowrlhEjVc8e3iQ=",
"owner": "krebs",
"repo": "retiolum",
"rev": "de6d7dc9bd671e65f2ee3004b6807625e7553e84",
"rev": "ac9e1d5b02c5667ba12aa6d6ab077cc071ffc2f4",
"type": "github"
},
"original": {
@@ -179,8 +179,8 @@
"menstruation-backend": "menstruation-backend",
"menstruation-telegram": "menstruation-telegram",
"nix-writers": "nix-writers",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixos-stable": "nixos-stable",
"nixos-unstable": "nixos-unstable",
"recht": "recht",
"retiolum": "retiolum",
"scripts": "scripts",
@@ -194,11 +194,11 @@
"scripts": {
"flake": false,
"locked": {
"lastModified": 1648314795,
"narHash": "sha256-hGIXkAcGiJnVXnl8kigZpI3VFrLmAr2+yr85hi5JwP0=",
"lastModified": 1654020832,
"narHash": "sha256-05V38z3cr+qYis46nDieIliA8XFBmRp6e2VSCkoFb40=",
"owner": "kmein",
"repo": "scripts",
"rev": "d1d525b92a34e55b1ad886807c284106e58716b2",
"rev": "e6b49aefe2470245bf7c4c6aaa83c1a1ce75501a",
"type": "github"
},
"original": {
@@ -210,11 +210,11 @@
"stockholm": {
"flake": false,
"locked": {
"lastModified": 1648214990,
"narHash": "sha256-rptATGq+jcpL+P+Cr6d3OajV6zYkbHPWlt3aQNZI2TY=",
"ref": "master",
"rev": "ae9c0b12710b5361d0d45510eb401eebfc1b3fb0",
"revCount": 10497,
"lastModified": 1653851789,
"narHash": "sha256-KMw9DS40WKHdQti0nwHQguKgIQJ+yexT2wBAfYskCps=",
"ref": "refs/heads/master",
"rev": "4a9f93e8933d87ce8f04965b2772564527f1e2fd",
"revCount": 10604,
"type": "git",
"url": "https://cgit.lassul.us/stockholm"
},
@@ -242,11 +242,11 @@
"tinc-graph": {
"flake": false,
"locked": {
"lastModified": 1639820904,
"narHash": "sha256-d4s2PulBGIIQXtX7blZz+Wnmij5dK/IrBcilNGjqZC4=",
"lastModified": 1653080212,
"narHash": "sha256-BcfppAuVNp0hMcrMG/ZxE4juSrdQbJSUIA0eHS1/Wxo=",
"owner": "kmein",
"repo": "tinc-graph",
"rev": "1b9c69ffdbdab82d30a23e44f739feea63d94163",
"rev": "ea0ef2e5542684d1d8e34a626cb9295dec33e70d",
"type": "github"
},
"original": {

View File

@@ -2,16 +2,17 @@
description = "niveum: packages, modules, systems";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.05";
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager/release-21.11";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixos-unstable";
};
krops = {
url = "github:Mic92/krops";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixos-stable";
inputs.flake-utils.follows = "flake-utils";
};
@@ -70,8 +71,8 @@
menstruation-backend,
menstruation-telegram,
nix-writers,
nixpkgs,
nixpkgs-unstable,
nixos-unstable,
nixos-stable,
recht,
retiolum,
scripts,
@@ -82,8 +83,12 @@
tuna,
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
source = name:
pkgs = nixos-stable.legacyPackages.${system};
source = {
sources,
unstable,
name,
}:
{
niveum.file = toString ./.;
nixos-config.symlink = "niveum/systems/${name}/configuration.nix";
@@ -95,28 +100,32 @@
dir = toString ~/.password-store;
name = "shared";
};
nixpkgs.file = toString (
if unstable
then inputs.nixos-unstable
else inputs.nixos-stable
);
}
// nixpkgs.lib.mapAttrs' (name: value: {
// nixos-stable.lib.mapAttrs' (name: value: {
inherit name;
value.file = toString value;
}) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name ["flake-utils" "krops" "self"]) inputs);
}) (nixos-stable.lib.filterAttrs (name: _: builtins.elem name sources) inputs);
deployScriptFor = {
name,
user ? "root",
host,
}: let
inherit (import ./lib/default.nix) sshPort;
in
unstable ? false,
sshPort ? (import ./lib/default.nix).sshPort,
sources,
}:
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
source = krops.lib.evalSource [(source name)];
target = "root@${host}:${
if host == "130.61.203.118"
then "22"
else toString sshPort
}";
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
target = "${user}@${host}:${toString sshPort}";
});
in {
apps.${system} = let
forSystems = f: builtins.listToAttrs (map f (builtins.attrNames (builtins.readDir ./systems)));
externalNetwork = import ./lib/external-network.nix;
deployScripts = forSystems (name: {
name = "deploy-${name}";
value = {
@@ -124,9 +133,20 @@
program = deployScriptFor {
inherit name;
host =
if name == "tahina"
then "130.61.203.118"
if externalNetwork ? name
then externalNetwork.${name}
else "${name}.r";
unstable = name == "kabsa" || name == "manakish";
sources =
["nix-writers" "nixpkgs" "retiolum" "stockholm"]
++ {
zaatar = ["traadfri"];
ful = [];
kabsa = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
manakish = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
makanek = ["nixos-unstable" "menstruation-telegram" "menstruation-backend" "scripts" "telebots" "tinc-graph"];
}
.${name};
};
};
});

37
lib/colours/ayu-dark.nix Normal file
View File

@@ -0,0 +1,37 @@
{
black = {
dark = "#000000";
bright = "#323232";
};
red = {
dark = "#ff3333";
bright = "#ff6565";
};
green = {
dark = "#b8cc52";
bright = "#e9fe83";
};
yellow = {
dark = "#e6c446";
bright = "#fff778";
};
blue = {
dark = "#36a3d9";
bright = "#68d4ff";
};
magenta = {
dark = "#f07078";
bright = "#ffa3aa";
};
cyan = {
dark = "#95e5cb";
bright = "#c7fffc";
};
white = {
dark = "#ffffff";
bright = "#ffffff";
};
background = "#0e1419";
foreground = "#e5e1cf";
cursor = "#f19618";
}

37
lib/colours/ayu-light.nix Normal file
View File

@@ -0,0 +1,37 @@
{
black = {
dark = "#000000";
bright = "#323232";
};
red = {
dark = "#ff3333";
bright = "#ff6565";
};
green = {
dark = "#86b200";
bright = "#b8e532";
};
yellow = {
dark = "#f19618";
bright = "#ffc849";
};
blue = {
dark = "#41a6d9";
bright = "#73d7ff";
};
magenta = {
dark = "#f07078";
bright = "#ffa3aa";
};
cyan = {
dark = "#4cbe99";
bright = "#7ff0cb";
};
white = {
dark = "#ffffff";
bright = "#ffffff";
};
background = "#fafafa";
foreground = "#5b6673";
cursor = "#ff6900";
}

View File

@@ -1,5 +1,5 @@
pkgs: rec {
terminal = "${pkgs.alacritty}/bin/alacritty";
terminal = "alacritty";
browser = "${pkgs.brave}/bin/brave";
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
}

View File

@@ -28,7 +28,7 @@ rec {
serveHtml = file: pkgs: ''
default_type "text/html";
root ${
pkgs.linkFarm "fahrplan" [
pkgs.linkFarm "www" [
{
name = "index.html";
path = file;
@@ -82,6 +82,7 @@ rec {
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4";
zaatar.id = "CGHO6LK-ZJBAXBD-UWI7AH3-BXYARE6-EUIM7PE-O2FUCOM-VCCRNCM-IG34WQ7";
tahina.id = "UKJ2CBO-EQPKQL4-3QLRUSG-SSYR6AB-CCCUTKU-CLPYR7N-RUI5A6Y-JTL5NA4";
};
ignorePaths = [

4
lib/external-network.nix Normal file
View File

@@ -0,0 +1,4 @@
{
ful = "130.61.217.114";
makanek = "88.99.83.173";
}

View File

@@ -47,7 +47,7 @@
}
</style>
<script>
const newsEndpoint = "http://prism.r:7999";
const newsEndpoint = "http://radio-news.r";
function isoString(date) {
return date.toISOString().slice(0, -5) + "Z";
@@ -103,15 +103,28 @@
request.open("POST", newsEndpoint, false); // synchronous
request.send(
JSON.stringify({
from: isoString(new Date(formData.get("from"))),
to: isoString(new Date(formData.get("to"))),
from: formData.get("from") + ":00Z",
to: formData.get("to") + ":00Z",
text: formData.get("text"),
})
);
location.reload();
}
function setDate() {
let now = new Date();
document.getElementById("time-from").value = now
.toISOString()
.slice(0, 16);
now.setHours(now.getHours() + 1);
document.getElementById("time-to").value = now
.toISOString()
.slice(0, 16);
}
window.onload = () => {
setDate();
setNextNews();
fetchNews();
};
@@ -122,10 +135,10 @@
<section>
<h1>Submit news</h1>
<form onsubmit="sendNews(event)">
<label>Start date</label>
<input type="datetime-local" name="from" required />
<label>End date</label>
<input type="datetime-local" name="to" required />
<label>Start date (UTC)</label>
<input type="datetime-local" id="time-from" name="from" required />
<label>End date (UTC)</label>
<input type="datetime-local" id="time-to" name="to" required />
<label>News text</label>
<textarea name="text" rows="10" required></textarea>
<input type="submit" />

View File

@@ -4,6 +4,11 @@
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
};
ful = {
ipv4 = "10.243.2.107";
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
};
zaatar = {
ipv4 = "10.243.2.34";
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";

File diff suppressed because it is too large Load Diff

135
modules/passport.nix Normal file
View File

@@ -0,0 +1,135 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.niveum.passport;
sortOn = a: lib.sort (as1: as2: lib.lessThan (lib.getAttr a as1) (lib.getAttr a as2));
css = ''
body {
margin: 0;
font-family: "Fira Sans Condensed", sans-serif;
}
main {
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 3fr;
grid-gap: 2em;
}
@media only screen and (max-width: 768px) {
main {
grid-template-columns: 1fr;
}
}
footer, section {
padding: 1em;
}
footer {
text-align: center;
}
dl {
border: 3px double #ccc;
padding: 0.5em;
}
dt {
float: left;
clear: left;
width: 200px;
text-align: right;
font-weight: bold;
margin-right: 1em;
margin-bottom: 1em;
}
dd {
margin: 0 0 0 110px;
padding: 0 0 0.5em 0;
margin-bottom: 1em;
}
'';
in
with lib; {
options.niveum.passport = {
enable = mkEnableOption "server passport";
introductionHTML = mkOption {type = types.str;};
virtualHost = mkOption {
type = types.str;
};
services = mkOption {
type = types.listOf (types.submodule {
options = {
title = mkOption {type = types.str;};
link = mkOption {
type = types.nullOr types.str;
default = null;
};
description = mkOption {
type = types.str;
default = "";
};
};
});
default = [];
};
};
config = mkIf cfg.enable {
services.nginx.enable = true;
services.nginx.virtualHosts."${cfg.virtualHost}".locations."/passport".extraConfig = ''
default_type "text/html";
root ${
pkgs.linkFarm "www" [
{
name = "passport/index.html";
path = pkgs.writeText "index.html" ''
<!doctype html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${config.networking.hostName} passport</title>
<style>${css}</style>
</head>
<body>
<main>
<section id="server">
<h1>${config.networking.hostName}</h1>
${cfg.introductionHTML}
</section>
<section id="services">
<h2>Services</h2>
<dl>
${lib.strings.concatMapStringsSep "\n" (service: ''
<dt>
${lib.optionalString (service.link != null) "<a href=\"${service.link}\">"}
${service.title}
${lib.optionalString (service.link != null) "</a>"}
</dt>
<dd>
${service.description}
</dd>
'') (sortOn "title" cfg.services)}
</dl>
</section>
</main>
<footer>
<tt>${config.networking.hostName}</tt> is part of the <i><a href="https://github.com/kmein/niveum/tree/master/systems/${config.networking.hostName}">niveum</a></i> network.
</footer>
</body>
'';
}
]
};
index index.html;
'';
};
}

View File

@@ -39,5 +39,15 @@ in
GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j";
GFS_Solomos = "1mpx9mw566awvfjdfx5sbz3wz5gbnjjw56gz30mk1lw06vxf0dxz";
GFS_Theokritos = "0haasx819x8c8yvna6pqywgi4060av2570jm34cddnz1fgnhv1b8";
# Heraklit
# Galatea
# Georgiou
# Ambrosia
# Fleischman
# Eustace
# Nicefore
# Jackson
# Garaldus
# Ignacio
};
}

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation {
src = fetchgit {
url = "https://github.com/jgm/pandoc";
rev = pandoc.version;
sha256 = "0s4mczbql35wh6bhyi542yln24f530rlsw6akcv7lmp083rrlpy4";
sha256 = "sha256-AY9GarrU7PBFgoYxqQkE2ghoUy7+0Gu6/Mwa+fdQM2U=";
};
buildPhase = ''
mkdir -p $out/man/man1

54
packages/scripts/avesta.sed Executable file
View File

@@ -0,0 +1,54 @@
#!/usr/bin/env -S sed -f
s/ā̊/𐬃/g
s//𐬝/g
s/ṣ̌/𐬴/g
s/š́/𐬳/g
s/ą̄/𐬅/g
s/ŋᵛ/𐬤/g
s/ə̄/𐬇/g
s/ŋ́/𐬣/g
s//𐬒/g
s/xᵛ/𐬓/g
s/a/𐬀/g
s/ā/𐬁/g
s/å/𐬂/g
s/ą/𐬄/g
s/ə/𐬆/g
s/e/𐬈/g
s/ē/𐬉/g
s/o/𐬊/g
s/ō/𐬋/g
s/i/𐬌/g
s/ī/𐬍/g
s/u/𐬎/g
s/ū/𐬏/g
s/k/𐬐/g
s/x/𐬑/g
s/g/𐬔/g
s/ġ/𐬕/g
s/γ/𐬖/g
s/c/𐬗/g
s/j/𐬘/g
s/t/𐬙/g
s/θ/𐬚/g
s/d/𐬛/g
s/δ/𐬜/g
s/p/𐬞/g
s/f/𐬟/g
s/b/𐬠/g
s/β/𐬡/g
s/ŋ/𐬢/g
s/n/𐬥/g
s/ń/𐬦/g
s//𐬧/g
s/m/𐬨/g
s//𐬩/g
s//𐬫/g
s/y/𐬪/g
s/v/𐬬/g
s/r/𐬭/g
s/s/𐬯/g
s/z/𐬰/g
s/š/𐬱/g
s/ž/𐬲/g
s/h/𐬵/g

View File

@@ -117,7 +117,7 @@ in
'';
tag = wrapScript {
packages = [pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags];
packages = [pkgs.vorbis-tools pkgs.python3Packages.eyeD3 opustags];
script = "${voidrice}/.local/bin/tag";
name = "tag";
};
@@ -307,16 +307,11 @@ in
packages = [pkgs.xdo];
};
ipa =
pkgs.writers.writeHaskellBin "ipa" {
libraries = with pkgs; [haskellPackages.text haskellPackages.ipa];
} ''
import Data.Maybe (fromJust)
import Language.IPA
import qualified Data.Text as T
import qualified Data.Text.IO as T
main = T.interact (T.unwords . map (unIPA . fromJust . (xSampaToIpa =<<) . mkXSampa) . T.words)
'';
ipa = wrapScript {
script = ./ipa.py;
name = "ipa";
packages = [pkgs.python3];
};
default-gateway = pkgs.writers.writeDashBin "default-gateway" ''
${pkgs.iproute}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway'

View File

@@ -4,7 +4,7 @@
}: let
streams-tsv = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u";
sha256 = "1cw1gmb16vwh6qfw0z3wjjfgn0zg2qplnddqzva5b0xx2g2appla";
sha256 = "sha256-gbHV37Yo+D3TYfDXZyb9IX8aRsguZ3qG2SYlY8NsTL0=";
postFetch = ''
${pkgs.gnused}/bin/sed '/#EXTM3U/d;/#EXTINF/s/.*,//g' $out | ${pkgs.coreutils}/bin/paste -d'\t' - - > $out.tmp
mv $out.tmp $out

6
packages/scripts/mushakkil.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
curl -sSL 'https://diac.alsharekh.org/Diac/DiacText' \
-H "Content-Type: application/json" \
--data-raw "$(jq --raw-input '{word: ., type: 1}')" \
--compressed \
| jq -r .diacWord

View File

@@ -39,6 +39,12 @@
"make it stooop"
"noooo"
];
messages.neutral = [
"meh"
"i have no opinion about this song"
"idk man"
];
in
pkgs.writers.writeDashBin "pls" ''
case "$1" in
@@ -50,6 +56,9 @@ in
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip"
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
;;
0|meh|neutral)
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.neutral)} | shuf -n1 | ${sendIRC}
;;
say|msg)
shift
echo "$@" | ${sendIRC}

View File

@@ -75,8 +75,9 @@
in
# ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
writers.writeDashBin "unicodmenu" ''
history_file=$HOME/.cache/unicodmenu
PATH=${lib.makeBinPath [coreutils dmenu gnused libnotify xclip xdotool]}
chosen=$(cat ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | sed "s/ .*//")
chosen=$(cat "$history_file" ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//")
[ "$chosen" != "" ] || exit

View File

@@ -0,0 +1,48 @@
{
lib,
config,
pkgs,
...
}: let
inherit (import <niveum/lib>) kieran retiolumAddresses;
in {
imports = [
./hardware-configuration.nix
# <niveum/configs/monitoring.nix>
<niveum/configs/nix.nix>
<niveum/configs/save-space.nix>
<niveum/configs/spacetime.nix>
<niveum/configs/sshd.nix>
<niveum/modules/retiolum.nix>
];
nix.nixPath = ["/var/src"];
networking = {
firewall.allowedTCPPorts = [80 443];
hostName = "ful";
interfaces.enp0s3.useDHCP = true;
retiolum = retiolumAddresses.ful;
useDHCP = false;
};
system.stateVersion = "21.11";
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
};
security.acme = {
acceptTerms = true;
email = kieran.email;
};
users.users.root.passwordFile = toString <system-secrets/root.password>;
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
}

View File

@@ -0,0 +1,40 @@
{
config,
lib,
pkgs,
...
}: {
imports = [<nixpkgs/nixos/modules/profiles/qemu-guest.nix>];
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 1;
};
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = ["virtio_pci" "usbhid"];
};
kernelModules = [
"console=ttyS0"
"console=tty1"
"nvme.shutdown_timeout=10"
"libiscsi.debug_libiscsi_eh=1"
];
extraModulePackages = [];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/9bf751c7-cf32-49fb-9354-17694c7a46e0";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7817-285D";
fsType = "vfat";
};
swapDevices = [];
}

View File

@@ -31,6 +31,7 @@ in {
<niveum/configs/sshd.nix>
<niveum/configs/telegram-bots>
<niveum/modules/retiolum.nix>
<niveum/modules/passport.nix>
];
services.restic.backups.niveum = {
@@ -52,6 +53,30 @@ in {
];
};
niveum.passport = {
enable = true;
introductionHTML = ''
<p>
The machine <tt>makanek</tt> is named after a Levantine type of <a href="https://en.wikipedia.org/wiki/Makanek">sausage</a> (مقانق <i>maqāniq</i>).
</p>
<p>
It runs on <a href="https://www.hetzner.com/cloud">Hetzner cloud</a>.
</p>
<figure>
<img width="200" src="https://www.albawaba.com/sites/default/files/2019-08/makanek-BeFunky-project.jpg" alt="Makanek sausages"/>
<figcaption>Makanek</figcaption>
</figure>
'';
virtualHost = "makanek.r";
services = [
{
title = "restic backup";
description = "This machine backups its state via restic backup.";
}
];
};
nix.nixPath = ["/var/src"];
networking = {

View File

@@ -1,13 +1,25 @@
{
let
inherit (import <niveum/lib>) sshPort;
domain = "https://code.kmein.de";
in {
services.gitea = {
enable = true;
disableRegistration = true;
rootUrl = "https://code.kmein.de";
rootUrl = domain;
appName = "code.kmein.de";
ssh.clonePort = sshPort;
};
services.nginx.virtualHosts."code.kmein.de" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = "proxy_pass http://localhost:3000;";
};
niveum.passport.services = [
{
link = domain;
title = "Gitea";
description = "hosts a couple of <tt>git</tt> repos. Registration is disabled.";
}
];
}

View File

@@ -17,6 +17,7 @@
enable = true;
version = 2;
devices = ["/dev/sda"];
configurationLimit = 3;
};
};

View File

@@ -5,11 +5,9 @@
}: let
backupLocation = "/var/lib/codimd-backup";
stateLocation = "/var/lib/codimd/state.sqlite";
nixpkgs-unstable = import <nixpkgs-unstable> {};
domain = "pad.kmein.de";
inherit (import <niveum/lib>) tmpfilesConfig;
in {
imports = [<stockholm/krebs/3modules/permown.nix>];
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
@@ -49,16 +47,28 @@ in {
};
};
krebs.permown.${backupLocation} = {
owner = "codimd";
group = "codimd";
umask = "0002";
};
niveum.passport.services = [
{
title = "Hedgedoc";
link = "https://${domain}";
description = "lets you collaborate on Markdown documents.";
}
];
systemd.tmpfiles.rules = [
(tmpfilesConfig {
user = "codimd";
group = "codimd";
mode = "0755";
type = "d";
path = backupLocation;
})
];
systemd.services.hedgedoc-backup = {
description = "Hedgedoc backup service";
script = ''
${nixpkgs-unstable.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
${pkgs.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
| ${
pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} ''
import json

View File

@@ -4,16 +4,16 @@
...
}: {
services.matterbridge = {
enable = true;
enable = false;
configPath = let
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/krebs.token>;
in
toString ((pkgs.formats.toml {}).generate "config.toml" {
general = {
RemoteNickFormat = "[{NICK}] ";
Charset = "utf-8";
};
telegram.kmein.Token = bridgeBotToken;
telegram.krebs.Token = bridgeBotToken;
irc = let
Nick = "ponte";
in {
@@ -38,7 +38,7 @@
channel = "#krebs";
}
{
account = "telegram.kmein";
account = "telegram.krebs";
channel = "-330372458";
}
{

View File

@@ -11,6 +11,14 @@ in {
environment.systemPackages = [pkgs.redis];
niveum.passport.services = [
{
title = "Tischlein, deck dich!";
description = "serves you with Berlin canteen menus via Telegram.";
link = "https://t.me/TischleinDeckDichBot";
}
];
systemd.services.menstruation-telegram = {
wants = [
"network-online.target"

View File

@@ -12,5 +12,12 @@
serviceConfig.DynamicUser = true;
};
niveum.passport.services = [
{
title = "moinbot";
description = "greets #hsmr:hackint.org daily.";
}
];
systemd.timers.moinbot.timerConfig.RandomizedDelaySec = "14h";
}

View File

@@ -22,6 +22,26 @@ in {
};
};
niveum.passport.services = [
{
title = "Prometheus";
description = "collects metrics from devices in the <i>niveum</i> network, blackbox monitors some websites.";
}
{
title = "Loki";
description = "aggregates logs of the <i>niveum</i> network.";
}
{
title = "Grafana";
link = "http://${config.services.grafana.domain}";
description = "displays metrics from devices in the <i>niveum</i> network.";
}
{
title = "Alertmanager bot";
description = "notifies me when something goes wrong.";
}
];
services.prometheus.rules = let
diskFreeThreshold = 10;
in [
@@ -220,7 +240,7 @@ in {
"tarot.kmein.de"
"cloud.xn--kiern-0qa.de"
"grafana.kmein.r"
"names.kmein.r"
# "names.kmein.r"
"rrm.r"
"graph.r"
];
@@ -238,16 +258,6 @@ in {
}
];
}
{
job_name = "tahina";
static_configs = [
{
targets = [
"tahina.r:${toString config.services.prometheus.exporters.node.port}"
];
}
];
}
];
services.prometheus.exporters.blackbox = {

View File

@@ -12,6 +12,13 @@
in {
imports = [<niveum/modules/moodle-dl.nix>];
niveum.passport.services = [
{
title = "MoodleDL";
description = "notifies about changes on Moodle.";
}
];
services.moodle-dl = {
enable = true;
startAt = "hourly";

View File

@@ -4,8 +4,8 @@
...
}: let
port = 5703;
geogen-src = "${<scripts>}/onomastics";
geogen = pkgs.callPackage geogen-src {};
onomap-src = "${<scripts>}/onomastics-ng";
onomap = pkgs.haskellPackages.callCabal2nix "onomap" onomap-src {};
in {
systemd.services.names = {
wants = ["network-online.target"];
@@ -13,12 +13,11 @@ in {
description = "Better clone of geogen.stoepel.net";
serviceConfig = {
DynamicUser = true;
ExecStart = "${onomap}/bin/onomap-web";
Restart = "on-failure";
RestartSec = "15s";
};
script = ''
cd $(mktemp -d)
ln -s "${geogen-src}/wsgi.py" wsgi.py
${geogen.dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
'';
environment.PORT = toString port;
};
services.nginx = {
@@ -29,6 +28,14 @@ in {
recommendedTlsSettings = true;
};
niveum.passport.services = [
{
link = "http://names.kmein.r";
title = "Onomap";
description = "maps surnames within Germany.";
}
];
services.nginx.virtualHosts."names.kmein.r" = {
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
};

View File

@@ -1,5 +1,6 @@
{
pkgs,
config,
lib,
...
}: let
@@ -8,7 +9,7 @@
in {
services.nextcloud = {
enable = true;
package = pkgs.nextcloud22;
package = pkgs.nextcloud24;
https = true;
@@ -33,6 +34,14 @@ in {
};
};
niveum.passport.services = [
{
title = "Nextcloud";
link = "https://${config.services.nextcloud.hostName}";
description = "manages calendars, to-do lists, files, and recipes.";
}
];
services.postgresql = {
enable = true;
ensureDatabases = ["nextcloud"];

View File

@@ -8,6 +8,14 @@
in {
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml <niveum/lib/radio-news.html> pkgs;
niveum.passport.services = [
{
title = "Retiolum Radio News";
link = "http://redaktion.r";
description = "supplies git history news to radio lassulus and lets you enter your own.";
}
];
systemd.services.stockholm-history = {
startAt = "hourly";
script = ''
@@ -17,9 +25,9 @@ in {
rm -rf "$stockholm"
}
${pkgs.git}/bin/git clone ${remote} "$stockholm"
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar.' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
| ${pkgs.jq}/bin/jq -R '{text: ., from: now | todateiso8601, to: (now + (60 * 60)) | todateiso8601}' \
| ${pkgs.curl}/bin/curl -Ssfd @- http://prism.r:7999/
| ${pkgs.curl}/bin/curl -Ssfd @- http://radio-news.r/
'';
};
}

View File

@@ -126,4 +126,12 @@ in {
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.icecast.listen.port}";
};
niveum.passport.services = [
{
title = "Radio";
link = "https://radio.kmein.de";
description = "broadcasts a few little (and mostly useless) web-radio stations.";
}
];
}

View File

@@ -44,6 +44,19 @@ in {
};
};
niveum.passport.services = [
{
link = "http://graph.r";
title = "Retiolum Realtime Map";
description = "displays geographical information about the retiolum network. <a href=\"http://graph.r/graph.html\">Graph</a> info also available.";
}
{
link = "http://c.r/${geo-ip-database}";
title = "GeoIP";
description = "shares MaxMind's GeoIP database with the krebs world. Updated weekly.";
}
];
services.nginx = {
enable = true;
recommendedGzipSettings = true;
@@ -57,6 +70,7 @@ in {
systemd.services.geoip-share = {
after = ["geoipupdate.service"];
wantedBy = ["geoipupdate.service"];
script = let
cyberlocker-tools = pkgs.callPackage <stockholm/krebs/5pkgs/simple/cyberlocker-tools> {};
in "${cyberlocker-tools}/bin/cput ${geo-ip-database} < ${geo-ip-database-path}";

View File

@@ -48,6 +48,14 @@ in {
}'';
};
niveum.passport.services = [
rec {
link = "https://tarot.kmein.de";
title = "Tarot";
description = "draws Tarot cards for you. See <a href=\"${link}/files/key.pdf\">here</a> for information on how to interpret them.";
}
];
services.nginx.virtualHosts."tarot.kmein.de" = {
enableACME = true;
forceSSL = true;

View File

@@ -204,4 +204,11 @@ in {
Type = "oneshot";
};
};
niveum.passport.services = [
{
description = "keeps me up-to-date on sites that have no RSS feed (shame be upon them!).";
title = "urlwatch";
}
];
}

View File

@@ -58,7 +58,7 @@ in {
address = "irc.hackint.org/6697";
ipv6 = true;
ssl = true;
autojoin = ["#krebs" "#hsmr" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint"];
autojoin = ["#eloop" "#krebs" "#hsmr" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint"];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = lib.strings.fileContents <system-secrets/irc/hackint>;
@@ -143,6 +143,11 @@ in {
tags = ["nick_gitlab"];
regex = "*";
};
people = {
buffer = "irc.*.*";
tags = map (name: "nick_${name}") ["mod_p[matrix-fli"];
regex = "*";
};
};
};
extraCommands = ''/matrix connect nibbana'';
@@ -180,4 +185,11 @@ in {
isSystemUser = true;
packages = [pkgs.tmux];
};
niveum.passport.services = [
{
title = "weechat bouncer";
description = "keeps me logged in on IRC.";
}
];
}

View File

@@ -21,6 +21,7 @@
efiSupport = true;
efiInstallAsRemovable = true;
device = "/dev/sda";
configurationLimit = 5;
};
};

View File

@@ -1,5 +1,4 @@
{
lib,
config,
pkgs,
...
@@ -8,22 +7,62 @@
in {
imports = [
./hardware-configuration.nix
<niveum/configs/monitoring.nix>
<niveum/configs/nix.nix>
<niveum/configs/save-space.nix>
<niveum/configs/battery.nix>
<niveum/configs/spacetime.nix>
<niveum/configs/sshd.nix>
<niveum/modules/retiolum.nix>
<niveum/configs/sshd.nix>
];
nix.nixPath = ["/var/src"];
networking = {
hostName = "tahina";
retiolum = retiolumAddresses.tahina;
console.keyMap = "de";
i18n.defaultLocale = "de_DE.UTF-8";
services.xserver = {
layout = "de";
libinput.enable = true;
};
system.stateVersion = "22.05";
users.users.xenos = {
name = "xenos";
password = "xenos";
isNormalUser = true;
extraGroups = ["networkmanager"];
};
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
services.xserver = {
enable = true;
desktopManager.pantheon.enable = true;
displayManager = {
lightdm = {
enable = true;
greeters.pantheon.enable = true;
};
autoLogin = {
enable = true;
user = "xenos";
};
};
};
boot.plymouth.enable = true;
environment.systemPackages = [
pkgs.libreoffice
pkgs.gimp
pkgs.inkscape
pkgs.firefox
pkgs.audacity
pkgs.pidgin
];
networking = {
useDHCP = false;
interfaces = {
enp0s25.useDHCP = true;
wlo1.useDHCP = true;
};
retiolum = retiolumAddresses.tahina;
hostName = "tahina";
};
system.stateVersion = "21.11";
}

View File

@@ -6,27 +6,43 @@
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/d36baa44-9359-45d1-af5f-dbac52c6d75e";
fsType = "ext4";
boot = {
loader = {
systemd-boot = {
enable = true;
consoleMode = "max";
};
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci"];
kernelModules = ["dm-snapshot"];
luks.devices.luksmap.device = "/dev/disk/by-uuid/b7d66981-8cb7-4aad-a595-ee6574b312cf";
};
kernelModules = ["kvm-intel"];
extraModulePackages = [];
};
swapDevices = [];
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/e9a8bd34-61eb-4317-888d-bd7d6248a906";
fsType = "xfs";
};
"/boot" = {
device = "/dev/disk/by-uuid/9B2F-31E1";
fsType = "vfat";
};
};
networking.useDHCP = lib.mkDefault false;
networking.interfaces.ens3.useDHCP = lib.mkDefault true;
swapDevices = [
{
device = "/swapfile";
size = 2048;
}
];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -17,7 +17,6 @@ in {
./tuna.nix
./grocy.nix
./spotifyd.nix
<home-manager/nixos>
<niveum/configs/keyboard.nix>
<niveum/configs/monitoring.nix>
<niveum/configs/nix.nix>

View File

@@ -69,6 +69,16 @@ in {
108283 # Digital Classicist
109211 # Altlitauisch
109185 # Etymologie
# SS 2022
112606 # Avestisch
111761 # Griechische Wissenschaftsliteratur
111515 # H. Furens
110914 # Apostelgeschichte
112225 # Gr. Paläographie
113275 # ALEW
112783 # Akzent und Silbenstruktur
113493 # Papyrologie
];
download_submissions = true;
download_descriptions = true;

View File

@@ -1,7 +1,8 @@
{
{pkgs, ...}: {
sound.enable = true;
hardware.pulseaudio = {
package = pkgs.pulseaudioFull;
enable = true;
systemWide = true;
tcp = {

View File

@@ -5,6 +5,7 @@
...
}: let
firewall = (import <niveum/lib>).firewall lib;
inherit (import <niveum/lib>) tmpfilesConfig;
streams = import <niveum/lib/streams.nix> {
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
@@ -71,13 +72,31 @@ in {
extraStopCommands = firewall.removeRules rules;
};
system.activationScripts.mpd-playlists = let
playlistFile = pkgs.writeText "radio.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
in ''
rm -rf /var/lib/mpd/playlists
install -d /var/lib/mpd/playlists
ln -sfn "${toString playlistFile}" "/var/lib/mpd/playlists/radio.m3u"
'';
systemd.tmpfiles.rules = let
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
in
map (tag:
tmpfilesConfig {
type = "L+";
path = "/var/lib/mpd/playlists/${tag}.m3u";
mode = "0644";
user = "mpd";
group = "mpd";
argument = makePlaylist tag (tagStreams tag);
})
tags
++ [
(tmpfilesConfig {
type = "L+";
mode = "0644";
user = "mpd";
group = "mpd";
path = "/var/lib/mpd/playlist/all.m3u";
argument = makePlaylist "all" streams;
})
];
services.tuna = {
enable = true;
@@ -87,33 +106,15 @@ in {
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
stream,
station,
...
}: {inherit id desc logo stream station;})
streams;
webPort = 8080;
webPort = 7044;
};
systemd.services.tuna-stations = let
stations = lib.lists.imap0 (id: {
desc ? "",
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
stream,
station,
}: {inherit id desc logo stream station;})
streams;
stationsJson = (pkgs.formats.json {}).generate "stations.json" stations;
in {
enable = false;
wantedBy = ["tuna.service"];
startAt = "hourly";
script = ''
mkdir -p /etc/tuna
antenne_asb_url=$(
${pkgs.curl}/bin/curl -sS 'https://www.caster.fm/widgets/em_player.php?jsinit=true&uid=529295&t=blue&c=' \
| grep streamUrl \
| sed ${lib.escapeShellArg "s/^.*'\\([^']*\\)'.*/\\1/"}
)
${pkgs.jq}/bin/jq "map(if .station == \"Antenne ASB\" then .stream |= \"$antenne_asb_url\" else . end)" < ${stationsJson} > /etc/tuna/stations.json
'';
services.ympd = {
enable = true;
mpd.port = config.services.mpd.network.port;
};
services.nginx = {
@@ -125,7 +126,7 @@ in {
virtualHosts."radio.kmein.r" = {
basicAuth.dj = password;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.tuna.webPort}";
proxyPass = "http://127.0.0.1:${config.services.ympd.webPort}";
proxyWebsockets = true;
};
};