Compare commits

...

482 Commits

Author SHA1 Message Date
371fc689f5 WIP: mootube: init at 2022-08-28 2023-11-29 07:36:01 +00:00
12daa9830e pkgs/default.nix: fix sorting 2023-11-29 04:29:40 +00:00
3e5e1477b9 pipeline: init at 1.14.1
note that this doesn't cross compile, because of stupid fucking rust build.rs scripts

thanks, openssl-sys
2023-11-29 04:28:19 +00:00
c100f55f1c mpv: associate with opus mimetype 2023-11-29 01:14:15 +00:00
5a0c0dff41 nixpkgs: 2023-11-27 -> 2023-11-28, sops-nix -> 2023-11-27
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/927a9655a267b2b92ece7363efc4f74bf7b2612d' (2023-11-27)
  → 'github:nixos/nixpkgs/c9702bf40b036c0f1d3d5b0aaf3eee2bf920124c' (2023-11-28)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4be58d802693d7def8622ff34d36714f8db40371' (2023-11-26)
  → 'github:Mic92/sops-nix/b1edbf5c0464b4cced90a3ba6f999e671f0af631' (2023-11-27)
```
2023-11-28 14:16:22 +00:00
8fc5e3611e slskd: fix that the nixos module unconditionall enables nginx 2023-11-28 14:08:08 +00:00
3c3fe16569 servo: enable Soulseek 2023-11-28 11:46:47 +00:00
8eb83bb283 sane-ssl-dump: remove
i never used it
2023-11-28 09:12:39 +00:00
e559f1b960 docs: comment nixpkgs.config options 2023-11-28 08:05:19 +00:00
24a485c213 ripgrep: send cross compilation patch upstream 2023-11-28 00:33:13 +00:00
413669d118 cross: avoid building samba
i was already trying to avoid it, just missed some spots
2023-11-28 00:33:13 +00:00
1729f29374 cross: fix ripgrep 2023-11-28 00:33:13 +00:00
e58833da3b nixpkgs: 2023-11-27 -> 2023-11-27
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/494d8bcc83c99f1c5668cfd5f042b11a0d753749' (2023-11-27)
  → 'github:nixos/nixpkgs/927a9655a267b2b92ece7363efc4f74bf7b2612d' (2023-11-27)
```
2023-11-28 00:33:13 +00:00
e5d4b57d9e overlays/cross: remove dead commented out code 2023-11-28 00:33:13 +00:00
1d61834a95 cross: remove upstreamed mpv patch 2023-11-28 00:33:13 +00:00
b74f55cf54 nixpkgs: 2023-11-26 -> 2023-11-27
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/013f0a99e56eeb1cfb44764fc0d419306b84bbe4' (2023-11-26)
  → 'github:nixos/nixpkgs/494d8bcc83c99f1c5668cfd5f042b11a0d753749' (2023-11-27)
```
2023-11-28 00:33:13 +00:00
eb07a416b4 nixcache: disable big-parallel for servo 2023-11-28 00:33:13 +00:00
ca277567f4 snippets.txt: remove double-spaces 2023-11-27 11:31:52 +00:00
68c2f8f333 fetchFromGitLab: passthru owner and repo 2023-11-27 10:26:44 +00:00
ae5dee394c sane-clone: simplify to not use jq 2023-11-27 10:22:45 +00:00
a94c460a95 sane-clone: note that fetchFromGitLab doesnt pass attrs through in quite the same way 2023-11-27 09:48:59 +00:00
78bf5caf00 cross: fix iotas
i don't know if it's actually runnable. it complains about aspell/gtkspellcheck not finding any dictionary, when i emulate it. but if this is a problem on non-emulated host, i expect it's not specific to cross compilation
2023-11-27 09:48:37 +00:00
c5dbda67ad bonsai: fix cross compilation 2023-11-27 09:19:13 +00:00
2260fbaec5 bonsai/hare-ev/hare-json: sync with nixpkgs PR 2023-11-27 09:19:13 +00:00
4d2fecec13 geary: add my other email account 2023-11-27 07:56:26 +00:00
101677688e trust-dns: note that --debug doesnt act as expected 2023-11-27 06:53:48 +00:00
ca8fefe0c6 sxmo: persist SMS messages 2023-11-27 06:46:57 +00:00
3e8d7ef8e3 sane-wipe-browser: also wipe Brave 2023-11-27 06:45:41 +00:00
71aed74e20 nixcache: disable supercap 2023-11-27 01:48:19 +00:00
712e2c2d12 monero: forward port 18080 2023-11-27 01:48:19 +00:00
892ba7d63e sxmo: disable sway-autoscaler
1: gnome-maps 45 scales way better. 2: the autoscaler seems to not be working anymore (app_id changed?)
2023-11-26 22:03:57 +00:00
96ca2a6585 sxmo-utils: 2023-11-07 -> 2023-11-26 2023-11-26 22:02:47 +00:00
3ebf6470c1 nixpkgs: 2023-11-26 -> 2023-11-26
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/c6c20c63b4c1f715f602ecc46e21521e7825c2fb' (2023-11-26)
  → 'github:nixos/nixpkgs/013f0a99e56eeb1cfb44764fc0d419306b84bbe4' (2023-11-26)
```
2023-11-26 21:58:03 +00:00
f8db994129 nixpkgs: 2023-11-25 -> 2023-11-26; sops-nix -> 2023-11-26
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e6e261526ebe0762e1fb7a80cd320d09602ade5a' (2023-11-25)
  → 'github:nixos/nixpkgs/c6c20c63b4c1f715f602ecc46e21521e7825c2fb' (2023-11-26)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/49a87c6c827ccd21c225531e30745a9a6464775c' (2023-11-19)
  → 'github:Mic92/sops-nix/4be58d802693d7def8622ff34d36714f8db40371' (2023-11-26)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/decdf666c833a325cb4417041a90681499e06a41' (2023-11-18)
  → 'github:NixOS/nixpkgs/dfb95385d21475da10b63da74ae96d89ab352431' (2023-11-25)
```
2023-11-26 12:33:32 +00:00
dcb74234a6 wine: persist pb powerbomber 2023-11-26 12:18:08 +00:00
ac7c0709e8 monero: enable i2p/tor 2023-11-26 10:11:52 +00:00
7d8595233c servo: enable monero service 2023-11-26 10:11:52 +00:00
5452286493 games: ship hitori 2023-11-26 09:22:40 +00:00
5528b6d87d games: ship wine
launch games with `wine some-game.exe`
2023-11-26 09:20:48 +00:00
6ae3e61d1d sxmo: doc: dedupe_lisgd 2023-11-26 07:01:13 +00:00
a9093a6a69 snippets: fix comment formatting 2023-11-26 06:35:49 +00:00
3dcf7a1204 snippets: add link 2023-11-26 06:35:31 +00:00
c2c63d400f sxmo: bonsai: dont ship service file if sxmo isnt enabled 2023-11-26 02:31:59 +00:00
8f9c9efca1 feeds: econlib: update feed URL 2023-11-26 02:17:36 +00:00
1cb83032a1 feeds: postmarketOS: update feed url 2023-11-26 02:17:23 +00:00
eba9253efe firefox-extensions: bump 2023-11-26 02:16:55 +00:00
9bd0537854 flake: fix "update" for my newer overlay schema 2023-11-26 02:16:25 +00:00
9491190ce4 bonsai: 1.0.0 -> 1.0.2; hare-json/hare-ev deps also updated
nixpkgs has a new version of hare which supports these
2023-11-26 01:21:02 +00:00
9b70d8884d refactor: expose "pkgs.sane.*" even for pkgs which wouldnt be visible in the toplevel scope 2023-11-26 01:20:17 +00:00
9824094fdc nixpkgs: 2023-11-24 -> 2023-11-25
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/869da636fea368dccc4331355894778f64c4a9bb' (2023-11-24)
  → 'github:nixos/nixpkgs/e6e261526ebe0762e1fb7a80cd320d09602ade5a' (2023-11-25)
```
2023-11-25 10:41:25 +00:00
361be1e5d1 fractal-latest: 2023-09-14 -> 2023-11-24 2023-11-25 09:01:41 +00:00
1d38aa62de fractal: persist the new(est) state dir
hope it stops moving around soon lol
2023-11-25 08:57:50 +00:00
d8a4702f1e bonsai: disable auto-updater 2023-11-25 08:57:50 +00:00
75124f18c0 firefox-extensions: update 2023-11-25 08:57:50 +00:00
f54df71d2a fractal-nixified: unstable-2023-09-14 (350a65cb0) -> 5 (2023-11-24)
this gets me the libadwaita/gtk4 updates from gnome 45.
2023-11-25 08:57:50 +00:00
b40b29350a linux-megous: orange-pi-6.5-20230914-1327 -> orange-pi-6.6-20231103-1422 2023-11-25 08:57:42 +00:00
6a9b8b558a cross: mark tangram, gnome-online-accounts as needs binfmt 2023-11-25 06:27:20 +00:00
58f17eac2d cross: mark calls as needs binfmt 2023-11-25 05:55:17 +00:00
41709b6eac cross: mark fractal-nixified as needs binfmt 2023-11-25 05:54:06 +00:00
f9f247df39 cross: annotate which packages require binfmt 2023-11-25 05:05:05 +00:00
4c4a8a0897 neovim: port to wrapNeovimUnstable 2023-11-25 05:02:48 +00:00
10aea555dd neovim: simplify implementation 2023-11-25 04:46:24 +00:00
43f7f07d0e cross: mark argyllcms, jbig2dec as needsBinfmt 2023-11-25 00:13:49 +00:00
3bde4a70ca docs: nix store ping when user doesnt have perms 2023-11-24 22:38:58 +00:00
b9fefdab80 nixcache: fix so supercap can be used as a remote builder w/o any of the others 2023-11-24 22:21:08 +00:00
2ac2aa4e6c tuba: 0.4.1 -> 0.5.0 2023-11-24 21:57:29 +00:00
8f526cd2b5 tuba: remove workaround (fixed via gnome 45 update) 2023-11-24 21:41:07 +00:00
6382ac22cb zsh: new alias to aid cloning an OS package 2023-11-24 21:40:16 +00:00
e1845d37da zsh: order aliases alphabetically 2023-11-24 21:39:52 +00:00
9ccbfd8bf0 sane-clone: init
script to "git clone" a nix packages source code
2023-11-24 21:29:15 +00:00
37a95b97f6 nixpkgs: 2023-11-21 -> 2023-11-24
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/72edcc748a92377d0568c9536ece114dbabb948c' (2023-11-21)
  → 'github:nixos/nixpkgs/869da636fea368dccc4331355894778f64c4a9bb' (2023-11-24)
```
2023-11-24 09:17:21 +00:00
4e0845eb9c cross: koreader-from-src: mark as needsBinfmt 2023-11-24 09:17:17 +00:00
dc8b79b721 sync todo.md 2023-11-24 08:20:03 +00:00
dd0ab41396 refactor: move builders-user-substitutes to be near the other nix extraOptions 2023-11-24 08:13:37 +00:00
c3c3cff6ca enable supercap as remote builder 2023-11-24 08:06:17 +00:00
1f26b36fb8 hosts/modules/hostnames.nix -> hosts/common/hostnames.nix 2023-11-24 07:37:14 +00:00
e990d5a645 hosts: add supercap 2023-11-24 07:35:58 +00:00
121e86013e feeds: add Hard Fork podcast 2023-11-23 05:57:23 +00:00
e0a1dcd51f refactor: remove modules/data/keys.nix 2023-11-23 03:56:00 +00:00
758281f772 modules/feeds: remove unused parameter 2023-11-23 03:37:18 +00:00
fe19065a6a rename working -> .working 2023-11-23 03:29:04 +00:00
a9ba9b77ad enable servo as a remote builder 2023-11-23 02:21:01 +00:00
23f4b2e2e4 nixserve: dependency-inject the pubkey
this is in modules/ dir; shouldn't have that kind of data in it
2023-11-23 02:14:18 +00:00
2d65282643 nixremote: define the user as part of the nixserve module 2023-11-23 02:08:45 +00:00
0bd9125484 remote builder: simplify auth 2023-11-23 02:06:54 +00:00
175144663d desko: dont use ourself as remote substituter/builder 2023-11-23 02:02:19 +00:00
77a0a36bb8 enable remote-building for lappy/moby 2023-11-23 01:59:37 +00:00
f26b64c660 nixremote: fix up perms 2023-11-23 01:44:27 +00:00
3ff9c0ad0c add a "nixremote" user for remote bulding (experimental; builds arent actually enabled yet) 2023-11-23 01:27:28 +00:00
3eb6ce6ff6 cross: apply vala targetOffset fix 2023-11-22 22:11:27 +00:00
845b4b219d cross: update upstreaming status 2023-11-22 22:03:34 +00:00
ffe53086fb cross: update upstreaming notes 2023-11-22 10:22:11 +00:00
5c34c807c5 cross: remove unused networkmanager-fortisslvpn 2023-11-22 09:52:30 +00:00
de2a33580a cross: update upstreaming/blocker notes 2023-11-22 08:33:09 +00:00
08a875d862 cross: remove workaround for obex_data_server, which cross compiles cleanly now 2023-11-22 08:05:14 +00:00
7eeebd632d cross: libpanel: annotate with upstreaming status 2023-11-22 05:02:43 +00:00
a72e9b1a3e cross: remove fixes for packages i dont use 2023-11-22 05:01:34 +00:00
56808821da overlays/cross: disable the unused qt5 stuff; it's not clear it even still works 2023-11-22 03:53:27 +00:00
b53eca6323 cross: annotate xdg-desktop-portal upstreaming status 2023-11-22 03:52:36 +00:00
5a1edb51ef preferences: re-enable pipewire patch. it's still needed 2023-11-22 03:52:15 +00:00
b03328b54f chatty-latest: fix build
evolution-data-server no longer propagates libsecret: upstream nixpkgs applied this patch as well
2023-11-22 03:50:39 +00:00
4e2615f321 xdg-desktop-portal: fix cross compilation 2023-11-22 03:36:50 +00:00
1e14654d95 libpanel: fix cross compilation 2023-11-22 03:36:36 +00:00
0519db4d2c overlays/preferences: disable python stuff no longer needed by komikku 2023-11-22 02:21:23 +00:00
5b9e4df03b overlays/cross: remove upstreamed dead-code 2023-11-22 02:21:00 +00:00
2dbde57f46 overlays/disable-flakey-tests: remove unneeded libwacom patch 2023-11-22 01:42:33 +00:00
d51b7eb124 overlays/disable-flakey-tests: remove unneeded gupnp patch 2023-11-22 01:30:06 +00:00
bfcc071d94 overlays/disable-flakey-tests: remove unnecessary visidata patch 2023-11-22 01:26:38 +00:00
72e1ab6ad6 nixpatches: remove dead mepo patch (merged upstream) 2023-11-22 01:11:49 +00:00
d54efbaacf overlays/preferences: remove unneeded pipewire specialization 2023-11-22 00:54:05 +00:00
7d2f166d67 prefs: remove unnecessary electrum patch 2023-11-22 00:36:48 +00:00
aff3e1aee8 disable gtkcord4 2023-11-22 00:25:14 +00:00
9343447c03 nixpkgs: 2023-11-19 -> 2023-11-21
switch to `master` branch for the GNOME changes

```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e4ad989506ec7d71f7302cc3067abd82730a4beb' (2023-11-19)
  → 'github:nixos/nixpkgs/72edcc748a92377d0568c9536ece114dbabb948c' (2023-11-21)
```
2023-11-22 00:00:52 +00:00
beb13b8f84 gnome 44 -> 45 2023-11-21 23:12:19 +00:00
70b273a0d2 sxmo: include WM menu in the system menu 2023-11-21 22:39:31 +00:00
fc2bf35588 sway-autoscaler: tune gnome-maps scale 2023-11-21 08:59:34 +00:00
05893ad661 moby: auto-start Signal 2023-11-21 08:28:15 +00:00
fdc9df6b91 sway-autoscaler: cleanup 2023-11-21 08:25:01 +00:00
c6d68e1450 sway: reposition displays 2023-11-21 08:18:35 +00:00
d294be9f35 sxmo: auto-scale the environment to accomodate non-mobile-friendly apps
this is hacky, but it hopefully makes gnome-maps usable, quickly.
an alternative fix would be to theme gnome-maps.
it's likely also that it becomes more mobile-friendly in the gnome 45
release.
2023-11-21 08:14:52 +00:00
98ea4d2dfe abaddon: depend on gnome-keyring 2023-11-21 06:05:52 +00:00
6a950b4e97 abaddon: integrate with swaync services buttons 2023-11-21 03:32:59 +00:00
70292e4f8e abaddon: dont show the "view members" pane, by default 2023-11-21 03:06:58 +00:00
67f8b82740 gitea: track upstream auth fix PR 2023-11-21 02:44:42 +00:00
e9eb139b80 gitea: fix database permissions 2023-11-21 02:27:00 +00:00
61d5b9f048 abaddon: disable platform override (upstream has merged support for aarch64) 2023-11-21 00:37:02 +00:00
c5c86c3964 abaddon: configure for autoconnect 2023-11-21 00:36:43 +00:00
0f233f3a22 gitea: fix database creation error (from latest nixpkgs update) 2023-11-20 10:48:27 +00:00
166bd70a1f nixpkgs: 2023-11-17 -> 2023-11-19; sops-nix -> 2023-11-19
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad' (2023-11-17)
  → 'github:nixos/nixpkgs/e4ad989506ec7d71f7302cc3067abd82730a4beb' (2023-11-19)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/0e3a94167dcd10a47b89141f35b2ff9e04b34c46' (2023-11-14)
  → 'github:Mic92/sops-nix/49a87c6c827ccd21c225531e30745a9a6464775c' (2023-11-19)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/9502d0245983bb233da8083b55d60d96fd3c29ff' (2023-11-12)
  → 'github:NixOS/nixpkgs/decdf666c833a325cb4417041a90681499e06a41' (2023-11-18)
```
2023-11-20 10:02:56 +00:00
776b4a6c02 doc: consider ideal input mapping a bit more 2023-11-20 09:21:44 +00:00
75dcc60be5 sxmo/bonsai: simplify bindings: remove power x 3 in favor of powerhold 2023-11-20 09:12:43 +00:00
53034a6ff4 bonsai: simplify the nix code for volume handling 2023-11-20 09:07:51 +00:00
1ea6df9e6c sxmo/bonsai: rework mappings so vol-up/vol-down (app menu/keyboard) trigger instantly w/o timeout 2023-11-20 08:44:10 +00:00
a98a14da3d sxmo: map power hold to just a single power press
less risky than accidentally killing a window (power x3)
2023-11-20 07:36:46 +00:00
629cb8776e sxmo: map volup_three/voldown_three to seek controls when screenoff 2023-11-20 07:35:23 +00:00
96a63d0e89 sxmo: friendly format with which to define bonsai map 2023-11-20 07:25:21 +00:00
c7b065eed9 sxmo_hook_inputhandler: set volume directly
now that i'm using SXMO_NO_AUDIO, i can't use sxmo_audio.sh
2023-11-20 06:57:51 +00:00
89b0b8884b sxmo: set SXMO_STATES=unlock screenoff 2023-11-20 06:53:59 +00:00
644983d27a bonsaid: configure via nix 2023-11-20 06:46:44 +00:00
04d3ea97f3 flake: add a hostConfigs output 2023-11-20 06:29:51 +00:00
11baf471a4 desko: open firewall for nix-serve 2023-11-20 04:58:13 +00:00
505c2d83f2 sxmo-utils: add missing upower dependency 2023-11-20 04:49:38 +00:00
f84ab9a4d1 sxmo: fix that sxmo_state_switch.sh was renamed upstream 2023-11-20 02:36:42 +00:00
0127b61901 sxmo: fix that upstream renamed sxmo_dameons.sh -> sxmo_jobs.sh 2023-11-20 02:31:55 +00:00
b7247f6082 sxmo.bonsaid: make it a proper nix module 2023-11-20 02:31:23 +00:00
9cc72c09dc sxmo: split bonsai out to own file 2023-11-20 01:55:15 +00:00
d763f3b912 nix.extraOptions: tune 2023-11-20 01:37:26 +00:00
f8899aada0 sane.programs.animatch: move to own file 2023-11-19 23:58:00 +00:00
2e983267d4 sxmo-utils: 2023-10-10 -> 2023-11-07 2023-11-19 23:55:41 +00:00
df0c63b300 sxmo-utils: obtain via fetchFromSourcehut 2023-11-19 23:53:37 +00:00
1db2031b76 sxmo-utils: rename from sxmo-utils-latest 2023-11-19 23:44:48 +00:00
2720ccc1fc sxmo-utils.stable: remove
i don't use this. upstream doesn't tag releases enough for it to be useful.
2023-11-19 23:40:56 +00:00
f2aea2c201 phog: 0.1.5 -> 0.1.6 2023-11-19 23:35:00 +00:00
6b9c5f518e koreader-from-src: 2023-10-18 -> 2023.10 (i.e. end-of-month commit) 2023-11-19 23:04:39 +00:00
6d6d2320bd cross: fix mutter build 2023-11-19 11:06:51 +00:00
a1298d6cda nixpkgs 2023-11-14 -> 2023-11-17
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/bf744fe90419885eefced41b3e5ae442d732712d' (2023-11-14)
  → 'github:nixos/nixpkgs/c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad' (2023-11-17)
```
2023-11-19 10:57:50 +00:00
52b59bcde8 feeds: add Mic92 (nix dev) 2023-11-19 10:55:51 +00:00
256c85ba5c abaddon: refer to upstream PR for platforms fix 2023-11-19 03:24:46 +00:00
5e484719c2 swaync: sound alerts for abaddon (discord) 2023-11-19 03:14:22 +00:00
6b88379b01 abaddon: 0.1.12 -> 0.1.13
this resolves the warning on launch about the build id not being found
2023-11-19 03:13:44 +00:00
7b29624776 abaddon: force to workspace 1 2023-11-19 03:02:14 +00:00
18f8825cd5 flake: fix deploy so the -light and -test variants work 2023-11-19 02:53:38 +00:00
3d94d02960 flake: fix deploy script map 2023-11-19 02:41:00 +00:00
1f8886684f ship abaddon discord client 2023-11-19 02:37:51 +00:00
29f1da873b sane-weather: enable alternate NWS provider (metar API has changed) 2023-11-19 02:07:07 +00:00
97ec517a1e conky: battery_estimate: fix formatting 2023-11-19 01:51:15 +00:00
2fccaf684c conky: show battery on lappy, and not on desko 2023-11-19 01:50:14 +00:00
008063e645 flake: check target builds hosts in a specific order 2023-11-19 01:36:34 +00:00
867c949604 todo: removed x86GuiApps 2023-11-19 01:36:29 +00:00
7a1af6ee5c firefox: mark as *not* slow to build
this ensures it's always in the base desktop build. otherwise, i never build any browser for desko-light
2023-11-18 23:00:40 +00:00
0893c90c51 refactor how i decide which programs go on which machine (leverage "roles" like pc and handheld) 2023-11-18 22:56:53 +00:00
3c7ebb5385 hosts/modules/gui: refactor package sets 2023-11-18 22:20:38 +00:00
91c2f6fc95 implement sane.programs.slowToBuild and {moby,desko,lappy}-light targets
i'm not sure this is the exact right abstraction, but it's a starting point
2023-11-18 22:06:42 +00:00
ead08fbb5d disable nheko 2023-11-18 22:06:37 +00:00
3ad6a15f56 firefox: reduce scrollbar size :-( 2023-11-18 22:06:34 +00:00
12adb9f10a element-desktop: use electron-bin instead of from-source electron 2023-11-18 22:06:30 +00:00
7b2932b02b firefox-extensions: update to latest 2023-11-18 22:06:26 +00:00
57a47da12c swaync: audibly notify on gtkcord4 notification 2023-11-18 19:19:33 +00:00
84a51faa70 todo.md: document some nix-related bugs 2023-11-18 00:24:16 +00:00
ad495301c0 feeds: add Jeff Geerling 2023-11-18 00:23:58 +00:00
43bd745228 sway: fix broken brightness_down_cmd 2023-11-17 22:46:44 +00:00
fea056d9be todo.md: fix swaync mpris art 2023-11-17 09:36:07 +00:00
2f320db5e2 gtkcord4: add swaync icon and user service 2023-11-17 09:18:14 +00:00
130268491c ship gtkcord4 2023-11-17 08:27:19 +00:00
caf95675d6 packages: persist data for unofficial discord clients 2023-11-17 08:26:36 +00:00
b23281e9dc swaync: make the service buttons more compact 2023-11-17 04:06:26 +00:00
850354b7d7 integrate Signal into swaync and sway/autostart 2023-11-17 04:05:59 +00:00
5c7851e4d9 signal-desktop-from-src: fix SOURCE_EPOCH_DATE to prevent "build to old" runtime error 2023-11-17 03:22:27 +00:00
d85dbf1d33 animatch: correctly persist progress (?) 2023-11-17 01:24:04 +00:00
93ea668db3 install more desktop games 2023-11-17 00:13:34 +00:00
5f426b3efd ship vvvvvv game 2023-11-16 20:50:40 +00:00
4b6a18e4e7 programs: split games into own category; re-enable shattered-pixel-dungeon 2023-11-16 20:26:37 +00:00
35629a2a07 nixpkgs: 2023-11-12 -> 2023-11-14
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e44462d6021bfe23dfb24b775cc7c390844f773d' (2023-11-12)
  → 'github:nixos/nixpkgs/bf744fe90419885eefced41b3e5ae442d732712d' (2023-11-14)
```
2023-11-16 20:17:30 +00:00
50651d1c03 animatch: provide via upstream 2023-11-16 20:17:20 +00:00
412667dd0e nixpatches: remove gnustep patch (invalid ref) 2023-11-16 20:12:53 +00:00
c46a5089a6 animatch: simplify build 2023-11-16 07:39:49 +00:00
1b3f902dc2 signal-desktop-from-src: use non-builtins fetchurl to fix purity (and NUR build) 2023-11-16 07:24:39 +00:00
bfcb4f92e8 add todo item: remove x86GuiApps 2023-11-16 00:38:06 +00:00
13dda2e533 programs: ship animatch 2023-11-16 00:36:31 +00:00
29c5811b68 animatch: init at 1.0.3 2023-11-16 00:32:02 +00:00
8111757357 firefox-extensions: update (bypass-paywalls-clean, ublacklist, ether-metamask) 2023-11-15 23:20:40 +00:00
93ff8f25a1 signal-desktop-from-src: 6.36.0 -> 6.38.0
apparently after pairing, both versions give the message that they're 'too old'
2023-11-15 23:12:55 +00:00
bb810ac75a signal-desktop: fix directory persistence 2023-11-15 23:07:25 +00:00
87b78d1c89 signal-desktop-from-src: remove unused package.json 2023-11-15 22:41:05 +00:00
bc56f78fd2 signal-desktop-from-src: clean up the package 2023-11-15 22:40:13 +00:00
41ac63f445 signal-desktop-from-src: remove lockfile from repo 2023-11-15 21:41:29 +00:00
b538044d9a nvme-cli: dont ship on moby 2023-11-15 20:41:41 +00:00
02882dd781 nixpkgs: 2023-10-29 -> 2023-11-12; sops-nix -> 2023-11-14; uninsane-dot-org
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735' (2023-10-29)
  → 'github:nixos/nixpkgs/e44462d6021bfe23dfb24b775cc7c390844f773d' (2023-11-12)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/632c3161a6cc24142c8e3f5529f5d81042571165' (2023-10-29)
  → 'github:Mic92/sops-nix/0e3a94167dcd10a47b89141f35b2ff9e04b34c46' (2023-11-14)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/d87c5d8c41c9b3b39592563242f3a448b5cc4bc9' (2023-10-29)
  → 'github:NixOS/nixpkgs/9502d0245983bb233da8083b55d60d96fd3c29ff' (2023-11-12)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=2419750ca98fc04af42c91e50c49a29c68d465d2' (2023-10-30)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=8a4273489d945f21d7e0ca6aac952460c7d4c391' (2023-11-09)
• Updated input 'uninsane-dot-org/flake-utils':
    'github:numtide/flake-utils/dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7' (2023-06-25)
  → 'github:numtide/flake-utils/ff7b65b44d01cf9ba6a71320833626af21126384' (2023-09-12)
```
2023-11-15 07:16:20 +00:00
a24d5581f1 nixpatches: build latest zcash 2023-11-15 07:13:33 +00:00
3125acc95c nixpatches: assorted minor updates 2023-11-15 07:12:46 +00:00
d4c7cfcdf8 ship signal-desktop-from-src 2023-11-15 07:07:58 +00:00
6ff01649d6 signal-desktop-from-src: build with electron_27-bin 2023-11-15 07:07:44 +00:00
dfe724ff52 shattered-pixel-dungeon: persist save file 2023-11-15 05:53:14 +00:00
6c759c226a cross: docs: mention that libgnome-games-support has been merged 2023-11-15 05:52:46 +00:00
d22c2ea56a sxmo: re-enable xwayland
this fixes signal-desktop :)
2023-11-15 05:51:32 +00:00
319bfe205d signal-desktop-from-src: support cross compilation 2023-11-15 05:50:23 +00:00
c4367644dd sane-vpn: add usage/help 2023-11-14 23:29:34 +00:00
69464c2405 snippets: update dead links 2023-11-14 22:43:09 +00:00
1da78d093f ship gnome-2048 game 2023-11-14 03:36:15 +00:00
70ccbb3f59 signal-desktop-from-src: working build 2023-11-14 02:18:28 +00:00
214f24805e swaync: disable vpn::hn action 2023-11-14 01:31:30 +00:00
37f6c9c3bf swaync: improve service icons slightly more 2023-11-14 00:46:39 +00:00
c0ba6dc9f5 swaync: change GPS icon to an actual icon 2023-11-14 00:39:24 +00:00
92159f2a3d dino: simplify service description 2023-11-14 00:39:24 +00:00
3855fb5eb6 geary: integrate with swaync and auto-start 2023-11-14 00:39:24 +00:00
5b3a716819 todo.md: add more apps to install 2023-11-14 00:39:24 +00:00
48b6045ba3 gui: ship superTux, superTuxKart 2023-11-14 00:39:24 +00:00
fd965177ff gui: ship gnome-calendar 2023-11-14 00:39:24 +00:00
b34d332a32 gui: ship gnome-clocks 2023-11-14 00:39:24 +00:00
23db2bf1bf gui: ship gnome-calculator 2023-11-14 00:39:24 +00:00
5996e1f301 servo: fix sane.persist ext store 2023-11-13 05:27:14 +00:00
70a61386b8 add todo for biblioteca doc viewer 2023-11-13 00:14:21 +00:00
53df000ba6 zsh: increase history size 2023-11-12 22:16:33 +00:00
802294ec9c moby: disable dialect program 2023-11-11 02:07:36 +00:00
ed4e289209 moby: fix cross-compilation of dialect/wike 2023-11-10 23:05:12 +00:00
796977713d cross compilation: fix spot build 2023-11-10 22:12:00 +00:00
1f0f84f2f0 programs: add dialect, spot, wike, xq 2023-11-10 19:29:43 +00:00
4e328ae0a3 todo: fix fractal link opener 2023-11-10 18:52:03 +00:00
b572d6d27b new todo: RSS paywall bypass 2023-11-10 17:34:15 +00:00
cd79be5414 feeds: remove unused fields 2023-11-10 17:27:51 +00:00
28dbf10a30 todo.md: remove completed items 2023-11-10 16:25:51 +00:00
96cabc30bc move /etc/nix/source -> /etc/nixos 2023-11-09 17:29:41 +00:00
f5376f2dbb desko: update disk UUIDs 2023-11-09 16:10:11 +00:00
8b25bc96a4 rescue: enable root-on-tmpfs, and consolidate those definitions 2023-11-09 00:15:30 +00:00
6acd363f55 sane.persist.root-on-tmpfs -> sane.root-on-tmpfs 2023-11-09 00:15:04 +00:00
539ee010ab hosts: ship a copy of this repo in /etc/nix/source 2023-11-08 23:56:31 +00:00
5202c572fb firefox-extensions: update to latest 2023-11-08 23:44:27 +00:00
5630b6d8d7 swaync: fix build (github patch changed) 2023-11-08 21:56:46 +00:00
23c46079a9 image: allow configuring the sector size 2023-11-08 16:42:25 +00:00
df9ffcb7b1 zsh: auto-detect guiIntegrations feature 2023-11-08 15:33:15 +00:00
f4f1917ed6 rescue: remove extraneous generic-extlinux-compatible option 2023-11-08 15:33:15 +00:00
851b2cec88 rescue: disable persistence 2023-11-08 15:33:15 +00:00
28d4a4b065 persistence: move stores behind a byStore attr to support disabling persistence altogether (for e.g. rescue image) 2023-11-08 15:33:15 +00:00
7c5f5bd604 programs: add nvme, e2fsprogs to sysadminTools 2023-11-08 14:36:27 +00:00
7e4899832d wg-home: fix type error 2023-11-08 13:24:10 +00:00
226c4ba818 rescue: auto-login user 2023-11-08 13:18:30 +00:00
76b6b71879 mobile-nixos: pin to 2023-09-15 2023-11-08 12:13:50 +00:00
4951520584 flake: integrate rescue image building into the "check" target 2023-11-08 11:39:45 +00:00
e30d452254 flake: add help for building the rescue image 2023-11-08 11:35:32 +00:00
18a7598f62 programs: xdg-terminal-exec: move to gui programs 2023-11-08 11:31:49 +00:00
4d3e482174 zsh: remove vteIntegration from rescue image 2023-11-08 11:26:55 +00:00
68556222e2 fix rescue host build 2023-11-08 11:16:56 +00:00
2275fc20cd nixpatches: update hashes 2023-11-08 10:56:18 +00:00
7c247a6d39 initrd: add more helper (debugging) tools 2023-11-08 10:55:47 +00:00
1483dac941 cross: explain the webkitgtk situation better 2023-11-08 10:55:13 +00:00
e1a8c94ab9 programs: ship ddrescue 2023-11-06 23:57:48 +00:00
b0e66056ec WIP: signal-desktop-from-src: use node headers from electron.bin 2023-11-05 20:03:38 +00:00
08dd4ca641 sane-bt-add: leave a TODO for fixing InvalidSchema exceptions 2023-11-05 20:03:03 +00:00
f6eadd3696 devPkgs: add requests to python 2023-11-05 20:02:40 +00:00
b59685cc9d signal-desktop-from-src: get more working
no longer complains about ABI mismatches
2023-11-05 14:49:40 +00:00
c30e131aa7 signal-desktop-from-src: closer to working 2023-11-04 14:52:09 +00:00
5adf6c0194 snippets.txt: add billshare 2023-11-03 12:26:57 +00:00
6b7507384c sftpo: restart on failure (e.g. when it fails to bind address 2023-11-03 07:21:21 +00:00
e97d844380 signal-desktop-from-src: link in ringrtc, better-sqlite3
now it launches, but hangs at splashscreen
2023-11-02 15:52:23 +00:00
0628bd7880 ublock-origin: 1.52.3b17 -> 1.53.1b1 2023-11-02 10:35:54 +00:00
bee3b664c9 signal-desktop-from-src: remove comments which are no longer helpful 2023-11-02 10:25:49 +00:00
15cade99e7 signal-desktop-from-src: clean up a bit
still doesn't run, but the build process is cleaner
2023-11-02 10:24:23 +00:00
4150fab10b signal-desktop-from-src: get building (but it crashes at launch) 2023-11-02 09:10:08 +00:00
25e314c02e blogs: follow artemis.sh 2023-11-01 04:38:04 +00:00
ed0528fafa firefox: enable oversized scrollbars 2023-11-01 04:32:59 +00:00
c5ad11a243 nixpkgs: 2023-10-26 -> 2023-10-29; sops-nix; uninsane-dot-org
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/63678e9f3d3afecfeafa0acead6239cdb447574c' (2023-10-26)
  → 'github:nixos/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735' (2023-10-29)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/014e44d334a39481223a5d163530d4c4ca2e75cb' (2023-10-25)
  → 'github:Mic92/sops-nix/632c3161a6cc24142c8e3f5529f5d81042571165' (2023-10-29)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/fb000224952bf7749a9e8b3779104ef7ea4465c8' (2023-10-21)
  → 'github:NixOS/nixpkgs/d87c5d8c41c9b3b39592563242f3a448b5cc4bc9' (2023-10-29)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=dea3e5cdd747ac321447ef00fa1e51423676aeda' (2023-10-08)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=2419750ca98fc04af42c91e50c49a29c68d465d2' (2023-10-30)
```
2023-10-31 14:24:39 +00:00
68de71084b flare-signal: leave more notes; disable 2023-10-31 07:57:30 +00:00
713bbffd7d new script: sane-wipe-flare 2023-10-31 06:54:53 +00:00
028689cf86 flakey tests: dont check gjs or tracker when emulating 2023-10-31 06:30:45 +00:00
5d34139da6 sane-deadlines: ceil the day countdown 2023-10-31 04:22:54 +00:00
626fe1946d flare-signal: get a better cross-compiled build (via emulation) 2023-10-31 01:33:42 +00:00
6d8f9edfd0 flare-signal: document problems 2023-10-30 14:02:24 +00:00
745362e05e ship flare-signal on all GUI platforms 2023-10-30 11:02:51 +00:00
000bae364e flare-signal: support cross compilation 2023-10-30 11:02:01 +00:00
3667484e80 fractal-nixified: doc: explain postPatch purpose 2023-10-30 10:48:22 +00:00
c459eb0118 flare-signal-nixified: working build 2023-10-30 10:47:58 +00:00
1c483992da flare-signal-nixified: init at 0.10.0 (deps build; flare itself does not) 2023-10-30 08:04:07 +00:00
55680b68b2 configure new program: flare (Signal GTK4 client) 2023-10-30 04:40:55 +00:00
b3f5bf4e80 koreader: disable isConnected patch 2023-10-30 01:52:47 +00:00
51995a7d95 update firefox-extension 2023-10-28 21:19:08 +00:00
462f9d3ab3 swaync: tune style and add 5g toggle to moby 2023-10-28 11:43:26 +00:00
fd00eaede8 net: add LTE connection details 2023-10-28 10:34:36 +00:00
85421f82c1 koreader: add a symlink for easier RSS browsing 2023-10-28 01:49:16 +00:00
e86d6934fd nixpkgs: 2023-10-24 -> 2023-10-26
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8efd5d1e283604f75a808a20e6cde0ef313d07d4' (2023-10-24)
  → 'github:nixos/nixpkgs/63678e9f3d3afecfeafa0acead6239cdb447574c' (2023-10-26)
```
2023-10-28 00:14:39 +00:00
db028dcfe2 fix servo build (IFD in iproute2) 2023-10-27 13:50:11 +00:00
ad2fef5b48 fix build from earlier nixpkgs update 2023-10-27 13:29:26 +00:00
66524685a9 koreader-from-src: build without emulation 2023-10-27 11:37:40 +00:00
1d7c54b20e todo.md: remove obsolete sxmo PATH task 2023-10-27 08:42:00 +00:00
d68cc761cc koreader-from-src: don't interrupt RSS sync on image DL failure 2023-10-27 08:41:02 +00:00
25c13705cd sane-bt-add: trim trailing space from the input URL 2023-10-26 10:38:28 +00:00
55e2aaf3a1 nixpkgs: 2023-10-19 -> 2023-10-24; sops-nix -> 2023-10-25; mobile-nixos
```
• Updated input 'mobile-nixos':
    'github:nixos/mobile-nixos/7cee346c3f8e73b25b1cfbf7a086a7652c11e0f3' (2023-10-01)
  → 'github:nixos/mobile-nixos/0251d0ae920a9882fd8527dc3fd9e3e54f122b2e' (2023-10-25)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/7c9cc5a6e5d38010801741ac830a3f8fd667a7a0' (2023-10-19)
  → 'github:nixos/nixpkgs/8efd5d1e283604f75a808a20e6cde0ef313d07d4' (2023-10-24)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/51186b8012068c417dac7c31fb12861726577898' (2023-10-15)
  → 'github:Mic92/sops-nix/014e44d334a39481223a5d163530d4c4ca2e75cb' (2023-10-25)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/0e1cff585c1a85aeab059d3109f66134a8f76935' (2023-10-15)
  → 'github:NixOS/nixpkgs/fb000224952bf7749a9e8b3779104ef7ea4465c8' (2023-10-21)
```
2023-10-25 23:41:46 +00:00
94f2096219 remove outdated overlays which fixed tests which are no longer flakey 2023-10-25 14:44:20 +00:00
8f5f3933c1 cross: gvfs: update patch 2023-10-25 08:25:38 +00:00
e2d72f9e54 cross: snapper: push patches upstream 2023-10-24 17:01:08 +00:00
fc84aa88ee cross: remove upstreamed spdlog; add notes for upstream status of more packages 2023-10-24 16:53:55 +00:00
841fb4bf7a cross: hspell: push upstream 2023-10-24 16:53:24 +00:00
5f789b3db2 cross: gvfs: push upstream 2023-10-24 16:17:31 +00:00
49fbe5f4fa cross: gcr: push upstream 2023-10-24 15:28:48 +00:00
ec4b974f3d matrix-synapse: auto-register the ntfy-sh push gateway at launch 2023-10-24 14:47:59 +00:00
84ad85a81e mpv: types.string -> types.str 2023-10-24 13:07:16 +00:00
1af7450610 cross: gspell: push upstream 2023-10-24 13:06:52 +00:00
21912f0c4f overlays: gupnp: re-enable tests on x86 2023-10-24 12:32:05 +00:00
05513da298 rename host-pkgs -> hostPkgs 2023-10-24 12:25:39 +00:00
30486f4b4e geary: fix a typo 2023-10-24 10:29:40 +00:00
974ca87983 cross: remove upstreamed overlays 2023-10-24 10:28:01 +00:00
bb217ecd7b gsound: push cross compilation patch upstream 2023-10-24 10:27:33 +00:00
ed92fafdf6 todo.md: dont sleep when phone is ringing 2023-10-24 09:53:09 +00:00
228fd2353a cross compilation: support gnome.geary 2023-10-24 09:47:10 +00:00
69ac75131c apps: add geary 2023-10-24 04:50:31 +00:00
275f1ba49f trust-dns: 0.23.0 -> 0.24.0 2023-10-24 02:36:08 +00:00
501e79006c new script: sane-wipe-fractal 2023-10-24 00:41:05 +00:00
1ced3db806 moby: document more DRM_IOCTL_MODE_CREATE_DUMB 2023-10-24 00:15:13 +00:00
d1513b5816 moby: try out a scale of 1.6 2023-10-23 10:21:04 +00:00
a225b7e5f5 mpv: switch to wlshm vo backend on moby; default for desko 2023-10-23 08:36:43 +00:00
e7768572e5 fractal: update docs for fixing broken cache 2023-10-22 23:21:35 +00:00
a26a398181 todo.md: matrix/ntfy integrations 2023-10-22 23:21:20 +00:00
c59e9b09fc matrix: document push notification configuration 2023-10-22 14:47:52 +00:00
81c8af54a1 sxmo_suspend: deploy with verbose until i know its all working well 2023-10-22 13:01:33 +00:00
2d9ac4ca1e todo.md: remove stale items 2023-10-22 13:00:36 +00:00
a9f56d9216 sxmo_suspend.sh: be precise about which IP address we listen to for notifications 2023-10-22 12:53:32 +00:00
fb33ac6d1b sxmo_suspend: fix reversed getpeername -> getsockname 2023-10-22 12:36:57 +00:00
eaed914c8b sxmo_suspend: fix typo in getpeername 2023-10-22 12:14:57 +00:00
b10425f6b6 ntfy-waiter: never drop notifications, but rather sleep until client is ready to receive them 2023-10-22 12:10:52 +00:00
7541d5466e ntfy-waiter: add a todo for not dropping notifications (!) 2023-10-22 11:48:01 +00:00
644084f176 moby: disable ntfy-sh now that i've got a less racy notification method 2023-10-22 11:46:58 +00:00
baca7931ad static-nix-shell: add extraMakeWrapperArgs option 2023-10-22 11:45:44 +00:00
2ee7af064d sxmo_suspend.sh: be more precise in the wake condition 2023-10-22 11:28:10 +00:00
e1a80d6752 ntfy-waiter: forbid duplicate connections from the same IP
this is sort of a bandaid; it's still a bit iffy
2023-10-22 11:18:54 +00:00
523e859ee4 ntfy-waiter: more verbosity/debugging 2023-10-22 11:08:48 +00:00
230ca20017 sxmo_suspend.sh: explicitly shutdown the socket 2023-10-22 11:00:21 +00:00
30529182b0 sxmo_suspend.sh: allow mocking enough at runtime to run on desko 2023-10-22 10:28:17 +00:00
2947e6635d ntfy-waiter: move target from network -> default 2023-10-22 10:11:45 +00:00
3e1e7d49f8 sxmo_suspend.sh: open a ntfy socket 2023-10-22 10:08:59 +00:00
4894a68c62 sxmo_suspend: refactor 2023-10-22 09:45:38 +00:00
bd2775ded2 sxmo_suspend.sh: make the suspend time configurable 2023-10-22 09:41:36 +00:00
88ea557cd5 sxmo_suspend.sh: port to Python 2023-10-22 09:36:08 +00:00
3e8ad5b899 ntfy: implement a wrapper which converts ntfy subscriptions into a more specific wakeup signal 2023-10-22 06:11:49 +00:00
fafe7242f7 ntfy: refactor into multiple files 2023-10-22 04:16:24 +00:00
1a01a40e85 ntfy: move to own directory 2023-10-22 04:13:37 +00:00
f2f721234d nginx: link to docs 2023-10-22 04:12:34 +00:00
ea19eac1c9 update firefox-extensions: ether-metamask 11.2.0 -> 11.3.0; i2p 1.52.3b16 -> 1.52.3b17 2023-10-21 21:49:21 +00:00
ed1d4398a1 nixpkgs: 2023-10-16 -> 2023-10-19
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/ca012a02bf8327be9e488546faecae5e05d7d749' (2023-10-16)
  → 'github:nixos/nixpkgs/7c9cc5a6e5d38010801741ac830a3f8fd667a7a0' (2023-10-19)
```
2023-10-21 11:50:37 +00:00
12e106ee2a moby: test a lima GPU timeout bugfix 2023-10-21 11:49:43 +00:00
d13007fc12 moby: migrate boot args from default.nix -> kernel.nix 2023-10-21 11:49:43 +00:00
2fa00b4c73 postfix: fix connectivity issues 2023-10-21 11:48:45 +00:00
c1e17a0693 nixpatches: try & abandon trust-dns updates 2023-10-21 10:15:03 +00:00
cd617cc034 coturn: document routability concerns 2023-10-20 23:22:34 +00:00
5607bae49b devPkgs: add lua 2023-10-20 23:07:02 +00:00
f70c467971 prosody: push to ntfy on incoming call 2023-10-20 23:06:44 +00:00
6cb5edbfff prosody: mod_sane_ntfy: hook to detect jingle calls 2023-10-20 10:39:57 +00:00
5a844762c2 prosody: ship a proof-of-concept hello world module 2023-10-20 10:25:42 +00:00
de9b1e6197 prosody: docs: not about watch:stanzas 2023-10-20 10:17:20 +00:00
f43bb446c8 prosody: move to own directory 2023-10-20 10:16:23 +00:00
fa8e014eae nixcache: fix typo 2023-10-20 06:22:59 +00:00
6191542805 nix-serve: port 5000 -> 5001; prosody: enable proxy65 on port 5000 2023-10-20 04:48:30 +00:00
b8f13cd965 prosody/coturn: debugging (this config works with JMP.chat) 2023-10-20 03:14:36 +00:00
ee2b1f245e koreader-from-src: 2023.06 -> unstable-2023-10-18 2023-10-20 00:44:03 +00:00
f11f91b9fc sane-bt-search: increase default result count 5 -> 12 2023-10-19 00:35:55 +00:00
296a48caf1 podcasts: unsub Trash Future (sorry, Cory) 2023-10-19 00:26:54 +00:00
f58bfb3c42 fractal: document a state corruption bug/fix 2023-10-18 22:16:28 +00:00
cbaaa984b6 phog: 0.1.4 -> 0.1.5 2023-10-18 22:11:26 +00:00
6e4f0af012 gpodder-adaptive: 3.11.3+1 -> 3.11.4+1 2023-10-18 22:11:07 +00:00
3942ae0f1b feeds: subscribe to Benjamin Mako 2023-10-18 21:57:56 +00:00
fa65b0b92e feeds: add Samana Harihareswara 2023-10-18 21:53:51 +00:00
ca998dc2be firefox-extensions: update (bypass-paywalls-clean, ether-metamask, sponsorblock, ublacklist 2023-10-18 21:46:48 +00:00
b6a2107b1c sane-bt-search: support filtering for books, in general 2023-10-18 21:46:11 +00:00
697ae02797 podcasts: The Daily: port to db 2023-10-18 21:37:12 +00:00
ab35a46e5f podcasts: sub Tech Wont Save Us, Trash Future 2023-10-18 21:35:36 +00:00
a6179b8234 feeds: unsub Emerge, Lateral, Witch Trials 2023-10-18 21:18:52 +00:00
d90aa693f9 podcasts: sort 2023-10-18 21:17:35 +00:00
b23c3cbf61 podcasts: move comments to the same line as the definition
this will facilitate sorting
2023-10-18 21:17:11 +00:00
55ad5dcc01 flake: check.host-configs: be more verbose 2023-10-18 06:00:07 +00:00
90b1215a89 s/types.string/types.str/ 2023-10-17 22:46:02 +00:00
a218ddb202 nixpkgs: 2023-10-11 -> 2023-10-16; sops-nix -> 2023-10-15
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/5e4c2ada4fcd54b99d56d7bd62f384511a7e2593' (2023-10-11)
  → 'github:nixos/nixpkgs/ca012a02bf8327be9e488546faecae5e05d7d749' (2023-10-16)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f995ea159252a53b25fa99824f2891e3b479d511' (2023-10-11)
  → 'github:Mic92/sops-nix/51186b8012068c417dac7c31fb12861726577898' (2023-10-15)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/2f3b6b3fcd9fa0a4e6b544180c058a70890a7cc1' (2023-10-07)
  → 'github:NixOS/nixpkgs/0e1cff585c1a85aeab059d3109f66134a8f76935' (2023-10-15)
```
2023-10-17 22:43:07 +00:00
8dc7eff545 epiphany: mention WEBKIT_USE_SINGLE_WEB_PROCESS envvar 2023-10-17 22:42:15 +00:00
77b4e7ff09 slightly better prosody + coturn integration
still not able to receive incoming calls, but i pass more prosody self-checks
2023-10-17 09:43:55 +00:00
827d9626d6 ports: actually forward ovpns ports into the root namespace 2023-10-17 09:42:13 +00:00
cdfcf1a46d sftpgo: dont activate until we have network 2023-10-17 09:41:07 +00:00
e8c4555be7 prosody: partial integration with coturn
still missing something, which breaks inbound calls
2023-10-17 01:16:59 +00:00
0092ccacbe ejabberd: ensure coturn isnt running 2023-10-17 01:16:36 +00:00
184e37e2dc derived-secrets: make the mode configurable
this should probably be moved into sane.fs proper at some point
2023-10-17 01:16:08 +00:00
8859b4cf8a programs: persist data better for spotify, brave, tor 2023-10-16 19:18:47 +00:00
5a2382f61c prosody: remove dead code 2023-10-16 08:05:00 +00:00
f6c56969bc xmpp: switch from ejabberd to prosody 2023-10-16 07:56:47 +00:00
1f0fad62a7 fractal-nixified: add missing "gst-plugins-good" dependency
this is necessary to play mp4. should be sent to upstream nixpkgs fractal-next package too
2023-10-16 00:40:14 +00:00
5b633d20bc fractal-nixified: add convenient "optimized" and "unoptimized" passthru attributes
override isn't exposed to 'nix build ...', so this gives a way to build the variants from CLI
2023-10-16 00:21:18 +00:00
a918aa0c2f sxmo: suspend: dont wake on ARP unless absolutely necessary
it *should* be handled by the WiFi chip's ARP offload
2023-10-15 06:52:41 +00:00
93a265f34a sxmo: fix typo: avoid wakelock if wowlan_bits are 0x0 2023-10-14 21:54:44 +00:00
b818972597 sxmo: decrease the LED blink frequency further, to 8s 2023-10-14 10:24:35 +00:00
476b481fd7 moby: dont ship the rtl8723cs *bluetooth* firmware
it seems to conflict with Wake on Lan
2023-10-14 10:20:47 +00:00
631235e56b moby: sxmo_suspend: comment for future work to wake on Dino activity 2023-10-14 10:19:57 +00:00
ea4063340d moby: prioritize headset audio out 2023-10-14 10:19:31 +00:00
f2ad69af1f linux-megous: disable keep-power-in-suspend patch 2023-10-14 09:44:57 +00:00
e34ca0fec9 rtl8723cs-wowlan: support wake on UDP 2023-10-14 02:59:22 +00:00
43464e658f rtl8723cs-wowlan: factor the Ip frame out of Tcp frame
that'll make it easier to support UDP in future
2023-10-14 02:56:02 +00:00
56070547b1 nixpkgs: 2023-10-09 -> 2023-10-11
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/f99e5f03cc0aa231ab5950a15ed02afec45ed51a' (2023-10-09)
  → 'github:nixos/nixpkgs/5e4c2ada4fcd54b99d56d7bd62f384511a7e2593' (2023-10-11)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/6b32358c22d2718a5407d39a8236c7bd9608f447' (2023-10-09)
  → 'github:Mic92/sops-nix/f995ea159252a53b25fa99824f2891e3b479d511' (2023-10-11)
```
2023-10-13 19:10:44 +00:00
0593971917 linux-megous: test some wowlan patches 2023-10-13 10:29:16 +00:00
b77650219a sxmo_suspend: wake on a broadcast ARP query 2023-10-13 06:15:51 +00:00
ad1ebc0ed3 rtl8723cs-wowlan: implement --dest-mac flag 2023-10-13 06:13:19 +00:00
ae64493564 sxmo_suspend: match packet destination IP for TCP packets 2023-10-13 05:56:26 +00:00
1272b941c2 rtl8723cs-wowlan: tcp: add dest-ip option 2023-10-13 05:55:10 +00:00
3d63c33669 rtl8723cs-wowlan: fix get_ipaddrs to handle multiple "hostname" binaries on PATH 2023-10-13 05:45:40 +00:00
fcbc558de9 sxmo_suspend.sh: fix "time_start" typo 2023-10-13 05:43:30 +00:00
b180adcf48 RealtimeKit: disable 2023-10-13 03:35:00 +00:00
342c9bbbef sxmo_suspend: track wifi IRQ count 2023-10-13 02:28:29 +00:00
233faaadac zsh: better l/ll aliases with eza 2023-10-12 22:11:05 +00:00
aaf9dbac1e ship gdb, mercurial 2023-10-12 01:59:28 +00:00
b7d90c3b6d cross: graphicsmagick: remove reference to build coreutils 2023-10-12 01:11:27 +00:00
a4b54cd9c1 rpm: 4.18.1 -> 4.19.0 2023-10-12 00:00:54 +00:00
d6c5580fc3 rtl8723cs-wowlan: remove dependency on moreutils 2023-10-11 22:36:47 +00:00
7d63960e6f cross: doc: clarify that moreutils isnt ever going to cross 2023-10-11 22:32:01 +00:00
8dc1cbbbd2 programs: ship binutils-unwrapped instead of binutils
it has better cross compilation properties
2023-10-11 22:15:28 +00:00
6253995f6c moby: cross: avoid runtime dependency on binutils wrapper via dtrx 2023-10-11 22:06:59 +00:00
835397ad29 hspell: remove references to build perl from the output 2023-10-11 20:58:09 +00:00
042e6ae3f9 sxmo-utils-latest: 2023-10-10 -> 2023-10-11 2023-10-11 20:31:43 +00:00
5b5cfc40a8 cross: fix broken refs in snapper build 2023-10-11 20:24:49 +00:00
3cf636f681 cross: remove dated libavif hack
it builds upstream now
2023-10-11 19:44:44 +00:00
a5281c7f98 cross: document more runtime closure problems 2023-10-11 19:41:49 +00:00
30c7fd8b09 nixpatches: assign a version so that "nixpatches-patched-uninsane" package formats friendlier 2023-10-11 19:12:29 +00:00
710e4cc066 nixpkgs: 2023-10-06 -> 2023-10-09
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/87828a0e03d1418e848d3dd3f3014a632e4a4f64' (2023-10-06)
  → 'github:nixos/nixpkgs/f99e5f03cc0aa231ab5950a15ed02afec45ed51a' (2023-10-09)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/d7380c38d407eaf06d111832f4368ba3486b800e' (2023-10-08)
  → 'github:Mic92/sops-nix/6b32358c22d2718a5407d39a8236c7bd9608f447' (2023-10-09)
```
2023-10-11 10:08:11 +00:00
8b4a0a916b noop: test but dont actually enable pre-emption 2023-10-11 10:08:11 +00:00
5cfde63d5d wowlan: document theory on wake failure 2023-10-11 10:01:15 +00:00
1cf442dffd sway: build without wrapperFeatures.gtk 2023-10-11 09:59:10 +00:00
6cda5cf49b moby: remove some build artifacts from the host/runtime closure 2023-10-11 09:58:44 +00:00
0a3e6b34c7 sxmo_hook_postwake.sh: prevent rapid re-entry into sleep 2023-10-11 07:53:41 +00:00
322ef2c333 mpv: fix cross compilation to have no build deps in closure 2023-10-11 06:46:32 +00:00
6ff72c83ae patch: mesa: dont depend on build python 2023-10-11 06:19:06 +00:00
dc40395136 linux-megous: build with SCHED_DEBUG=y 2023-10-11 05:39:47 +00:00
28a2042664 gPodder: store data in ~/.local/share/gPodder, not ~/gPodder 2023-10-11 05:14:20 +00:00
7aa3f1f989 cross: fix moreutils build 2023-10-11 02:55:33 +00:00
08c92151eb rtl8723cs-wowlan: automatically derive the IP address to watch for ARP packets on 2023-10-11 02:44:34 +00:00
5a753583bf sxmo: reduce the screenoff LED frequency 2s -> 5s
this should hopefully allow entering sleep more reliably
2023-10-11 02:41:12 +00:00
c3d0b6b486 sxmo-utils-latest: 2023-10-05 -> 2023-10-10 2023-10-11 01:30:43 +00:00
ff89819940 sxmo_suspend.sh: notes about wowlan and blocking suspend here 2023-10-11 00:58:49 +00:00
9a69d8bd0d ship eza (ls substitute) 2023-10-10 22:08:58 +00:00
091e525846 enable rtkit/RealtimeKit 2023-10-10 21:45:19 +00:00
6dd1d5759b wowlan: document a new failure mode/workaround 2023-10-10 21:33:34 +00:00
f3162544f7 firefox-extensions: update 2023-10-10 20:51:06 +00:00
1bf829dcf0 sxmo_suspend: rework time accounting to be more similar to upstream 2023-10-10 10:05:09 +00:00
760326b38b sxmo_suspend.sh: switch from sudo -> doas
idk, some path problem with sudo ending up in /etc/profiles/per-user/colin/bin/sudo
2023-10-10 09:50:13 +00:00
0293773e64 sxmo_suspend.sh: output formatting improvements 2023-10-10 09:47:41 +00:00
6b6a9504e4 sxmo_suspend.sh: invoke rtl8723cs-wowlan with expected permissions 2023-10-10 09:39:38 +00:00
2de947d96e wowlan: move the implementation into sxmo_suspend.sh instead of a systemd service 2023-10-10 09:26:48 +00:00
c493fcfd7f rtl8723cs-wowlan: iwprv -> iwpriv typo fix 2023-10-10 08:38:40 +00:00
85e5d30b0f wowlan module: port to rtl8723cs-wowlan python script 2023-10-10 08:34:02 +00:00
330864c866 moby: ship rtl8723cs-wowlan script 2023-10-10 08:03:45 +00:00
29dde0240b wowlan: define a script which can set the patterns at runtime
this will be a little easier to debug on the device itself
2023-10-10 08:03:45 +00:00
114df5efab wowlan: enable CONFIG_ARP_KEEP_ALIVE (experimental) 2023-10-10 05:24:57 +00:00
e28e60769a sxmo: postwake: show the human-readable wakeup reason 2023-10-10 03:21:23 +00:00
bc8cf58b5a sxmo: inputhandler: map powerx3 from screenoff state 2023-10-10 00:02:31 +00:00
d740dbe049 sxmo-utils: fix some forgotten superd users to systemd 2023-10-09 22:18:07 +00:00
0eb8244897 sxmo: doc: link to Aren's SXMO fork 2023-10-09 22:05:37 +00:00
69fe55961f sxmo: link poweroff/reboot hooks into user hooks dir 2023-10-09 20:37:51 +00:00
aa18af8635 sxmo-utils: apply documentation-related patches 2023-10-09 20:25:48 +00:00
d47ed3dec9 nixpkgs: 2023-10-03 -> 2023-10-06; sops-nix -> 2023-10-08; uninsane-dot-org
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/81e8f48ebdecf07aab321182011b067aafc78896' (2023-10-03)
  → 'github:nixos/nixpkgs/87828a0e03d1418e848d3dd3f3014a632e4a4f64' (2023-10-06)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/746c7fa1a64c1671a4bf287737c27fdc7101c4c2' (2023-10-03)
  → 'github:Mic92/sops-nix/d7380c38d407eaf06d111832f4368ba3486b800e' (2023-10-08)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/dbe90e63a36762f1fbde546e26a84af774a32455' (2023-10-01)
  → 'github:NixOS/nixpkgs/2f3b6b3fcd9fa0a4e6b544180c058a70890a7cc1' (2023-10-07)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=1f588493031168d92a1e60705f26aaf4b2cdc07e' (2023-10-03)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=dea3e5cdd747ac321447ef00fa1e51423676aeda' (2023-10-08)
```
2023-10-09 08:21:41 +00:00
045b5f0294 sxmo: finish porting to systemd (everything tested works now) 2023-10-09 00:25:03 +00:00
45e5752a05 journald: dont compress the journal 2023-10-09 00:25:03 +00:00
2b39cfb57e sxmo-utils: add deps via PATH suffix, not prefix
that makes them overridable by the user, more easily
2023-10-09 00:25:03 +00:00
1ffaa232d8 sxmo: bemenu: configure via package override, not profile
this is just easier to integrate, rather than ensuring everywhere gets
the env var
2023-10-09 00:25:03 +00:00
a9ddfb2752 WIP: sxmo: port to systemd 2023-10-09 00:25:03 +00:00
4682ca32e2 wowlan: document another failure 2023-10-09 00:25:03 +00:00
b8ae4a284d linux-megous: revert LPS patch until i know its really an improvement 2023-10-09 00:25:03 +00:00
f3c60ad136 sxmo: revert the sxmo_log patch: tee is good enough 2023-10-09 00:25:03 +00:00
3c6c70ba9f sxmo: suspend: dump wowlan_last_wake_reason on wakeup 2023-10-09 00:25:03 +00:00
c0feffef1e sxmo: simplify suspend hook and cap suspend time to just 5min 2023-10-09 00:25:03 +00:00
6e80d4dfdf sxmo: inline the sxmo_suspend.sh script
this is exactly how it presently appears upstream (less shebang/comment changes)
2023-10-09 00:25:03 +00:00
1f73573fe3 stepmania: include link to nix definition in the game dir 2023-10-08 02:41:00 +00:00
344 changed files with 32852 additions and 7496 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,4 @@
/keep
.working
result
result-*
/secrets/local.nix
/working

View File

@@ -11,7 +11,7 @@ the only hard dependency for my exported pkgs/modules should be [nixpkgs][nixpkg
building <./hosts/> will require [sops][sops].
you might specifically be interested in these files (elaborated further in #key-points-of-interest):
- [`sxmo-utils-latest`](./pkgs/additional/sxmo-utils/default.nix)
- [`sxmo-utils`](./pkgs/additional/sxmo-utils/default.nix)
- [example SXMO deployment](./hosts/modules/gui/sxmo/default.nix)
- [my implementation of impermanence](./modules/persist/default.nix)
- my way of deploying dotfiles/configuring programs per-user:

49
TODO.md
View File

@@ -1,10 +1,14 @@
## BUGS
- why i need to manually restart `wireguard-wg-ovpns` on servo periodically
- else DNS fails
- fix epiphany URL bar input on moby
- ringer (i.e. dino incoming call) doesn't prevent moby from sleeping
- Fractal opens links with non-preferred web browser
- `nix` operations from lappy hang when `desko` is unreachable
- could at least direct the cache to `http://desko-hn:5001`
- waybar isn't visible on moby until after `swaymsg reload`
## REFACTORING:
- fold hosts/common/home/ssh.nix -> hosts/common/users/colin.nix
### sops/secrets
- attach secrets to the thing they're used by (sane.programs)
- rework secrets to leverage `sane.fs`
@@ -21,7 +25,6 @@
- fix lightdm-mobile-greeter for newer libhandy
- port zecwallet-lite to a from-source build
- REVIEW/integrate jellyfin dataDir config: <https://github.com/NixOS/nixpkgs/pull/233617>
- remove `libsForQt5.callPackage` broadly: <https://github.com/NixOS/nixpkgs/issues/180841>
#### upstreaming to non-nixpkgs repos
- gtk: build schemas even on cross compilation: <https://github.com/NixOS/nixpkgs/pull/247844>
@@ -47,16 +50,34 @@
- e.g. daily email checks; daily backup checks
- integrate `nix check` into Gitea actions?
### faster/better deployments
- remove audacity's dependency on webkitgtk (via wxwidgets)
### user experience
#### moby
- fix cpuidle (gets better power consumption): <https://xnux.eu/log/077.html>
- install apps:
- display QR codes for WiFi endpoints: <https://linuxphoneapps.org/apps/noappid.wisperwind.wifi2qr/>
- shopping list: <https://linuxphoneapps.org/apps/ro.hume.cosmin.shoppinglist/>
- offline Wikipedia
- shopping list (not in nixpkgs): <https://linuxphoneapps.org/apps/ro.hume.cosmin.shoppinglist/>
- offline Wikipedia (or, add to `wike`)
- offline docs viewer (gtk): <https://github.com/workbenchdev/Biblioteca>
- some type of games manager/launcher
- Gnome Highscore (retro games)?: <https://gitlab.gnome.org/World/highscore>
- better maps for mobile (Osmin (QtQuick)? Pure Maps (Qt/Kirigami)? Gnome Maps is improved in 45)
- note-taking app: <https://linuxphoneapps.org/categories/note-taking/>
- OSK overlay specifically for mobile gaming
- i.e. mock joysticks, for use with SuperTux and SuperTuxKart
- install mobile-friendly games:
- Shattered Pixel Dungeon (nixpkgs `shattered-pixel-dungeon`; doesn't cross-compile b/c openjdk/libIDL) <https://github.com/ebolalex/shattered-pixel-dungeon>
- UnCiv (Civ V clone; nixpkgs `unciv`; doesn't cross-compile): <https://github.com/yairm210/UnCiv>
- Simon Tatham's Puzzle Collection (not in nixpkgs) <https://git.tartarus.org/?p=simon/puzzles.git>
- Shootin Stars (Godot; not in nixpkgs) <https://gitlab.com/greenbeast/shootin-stars>
#### moby
- fix cpuidle (gets better power consumption): <https://xnux.eu/log/077.html>
- SwayNC:
- don't show MPRIS if no players detected
- this is a problem of playerctld, i guess
- also, the album icon when "Not playing" doesn't follow the size we give in the config
- that means mpris always takes up excessive space on moby
- add option to change audio output
- fix colors (red alert) to match overall theme
- moby: tune GPS
@@ -70,12 +91,6 @@
- sxmo: port to swaybar like i use on desktop
- users in #sxmo claim it's way better perf
- sxmo: fix youtube scripts (package youtube-cli)
- sxmo: don't put all deps on PATH
- maybe: use resholve to hard-code them
- this is the most "correct", but least patchable
- maybe: express each invocation as a function in sxmo_common.sh
- this will require some patching to handle `exec <foo>` style
- maybe: save original PATH and reset it before invoking user files
- moby: theme GTK apps (i.e. non-adwaita styles)
- combine multiple icon themes to get one which has the full icon set?
- get adwaita-icon-theme to ship everything even when cross-compiled?
@@ -84,6 +99,8 @@
- phog: remove the gnome-shell runtime dependency to save hella closure size
#### non-moby
- RSS: integrate a paywall bypass
- e.g. self-hosted [ladder](https://github.com/everywall/ladder) (like 12ft.io)
- neovim: set up language server (lsp; rnix-lsp; nvim-lspconfig)
- Helix: make copy-to-system clipboard be the default
- firefox/librewolf: persist history
@@ -104,10 +121,6 @@
- add `pkgs.impure-cached.<foo>` package set to build things with ccache enabled
- every package here can be auto-generated, and marked with some env var so that it doesn't pollute the pure package set
- would be super handy for package prototyping!
- why does nixos-rebuild switch take 5 minutes when net is flakey?
- trying to auto-mount servo?
- something to do with systemd services restarting/stalling
- maybe wireguard & its refresh operation, specifically?
- get moby to build without binfmt emulation (i.e. make all emulation explicit)
- then i can distribute builds across servo + desko, and also allow servo to pull packages from desko w/o worrying about purity

41
flake.lock generated
View File

@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
@@ -21,26 +21,27 @@
"mobile-nixos": {
"flake": false,
"locked": {
"lastModified": 1696124168,
"narHash": "sha256-EzGHYAR7rozQQLZEHbKEcb5VpUFGoxwEsM0OWfW4wqU=",
"lastModified": 1694749521,
"narHash": "sha256-MiVokKlpcJmfoGuWAMeW1En7gZ5hk0rCQArYm6P9XCc=",
"owner": "nixos",
"repo": "mobile-nixos",
"rev": "7cee346c3f8e73b25b1cfbf7a086a7652c11e0f3",
"rev": "d25d3b87e7f300d8066e31d792337d9cd7ecd23b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "d25d3b87e7f300d8066e31d792337d9cd7ecd23b",
"repo": "mobile-nixos",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1696123266,
"narHash": "sha256-S6MZEneQeE4M/E/C8SMnr7B7oBnjH/hbm96Kak5hAAI=",
"lastModified": 1700905716,
"narHash": "sha256-w1vHn2MbGfdC+CrP3xLZ3scsI06N0iQLU7eTHIVEFGw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dbe90e63a36762f1fbde546e26a84af774a32455",
"rev": "dfb95385d21475da10b63da74ae96d89ab352431",
"type": "github"
},
"original": {
@@ -52,16 +53,16 @@
},
"nixpkgs-unpatched": {
"locked": {
"lastModified": 1696375444,
"narHash": "sha256-Sv0ICt/pXfpnFhTGYTsX6lUr1SljnuXWejYTI2ZqHa4=",
"lastModified": 1701180790,
"narHash": "sha256-kYWcHsk2A1VUpiOvSo7Pq175WnSVeltspTGM2q+Cr3U=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "81e8f48ebdecf07aab321182011b067aafc78896",
"rev": "c9702bf40b036c0f1d3d5b0aaf3eee2bf920124c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
@@ -82,11 +83,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1696320910,
"narHash": "sha256-fbuEc6wylH+0VxG48lhPBK+SQJHfo2lusUwWHZNipIM=",
"lastModified": 1701127353,
"narHash": "sha256-qVNX0wOl0b7+I35aRu78xUphOyELh+mtUp1KBx89K1Q=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "746c7fa1a64c1671a4bf287737c27fdc7101c4c2",
"rev": "b1edbf5c0464b4cced90a3ba6f999e671f0af631",
"type": "github"
},
"original": {
@@ -118,11 +119,11 @@
]
},
"locked": {
"lastModified": 1696306988,
"narHash": "sha256-I/OyJxIxu0n5h1eFqwVw0C6wTN3ewBXp2lGAdo1ur70=",
"lastModified": 1699515935,
"narHash": "sha256-cJIuVrYorhIzG5pRFZb+ZtaKhTFD92ThC42SaxvSe/E=",
"ref": "refs/heads/master",
"rev": "1f588493031168d92a1e60705f26aaf4b2cdc07e",
"revCount": 208,
"rev": "8a4273489d945f21d7e0ca6aac952460c7d4c391",
"revCount": 216,
"type": "git",
"url": "https://git.uninsane.org/colin/uninsane"
},

114
flake.nix
View File

@@ -36,20 +36,24 @@
# - staging-next merged into master.
#
# which branch to source from?
# - for everyday development, prefer `nixos-unstable` branch, as it provides good caching.
# - if need to test bleeding updates (e.g. if submitting code into staging):
# - use `staging-next` if it's been cut (i.e. if there's an active staging-next -> master PR)
# - use `staging` if no staging-next branch has been cut.
# - nixos-unstable: for everyday development; it provides good caching
# - master: temporarily if i'm otherwise cherry-picking lots of already-applied patches
# - staging-next: if testing stuff that's been PR'd into staging, i.e. base library updates.
# - staging: maybe if no staging-next -> master PR has been cut yet?
#
# <https://github.com/nixos/nixpkgs/tree/nixos-unstable>
nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-unstable";
# nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=master";
# nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=staging-next";
# nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=staging";
mobile-nixos = {
# <https://github.com/nixos/mobile-nixos>
# only used for building disk images, not relevant after deployment
url = "github:nixos/mobile-nixos";
# TODO: replace with something else. commit `0f3ac0bef1aea70254a3bae35e3cc2561623f4c1`
# replaces the imageBuilder with a "new implementation from celun" and wildly breaks my use.
# pinning to d25d3b... is equivalent to holding at 2023-09-15
url = "github:nixos/mobile-nixos?ref=d25d3b87e7f300d8066e31d792337d9cd7ecd23b";
flake = false;
};
sops-nix = {
@@ -108,7 +112,7 @@
nixpkgsCompiledBy = system: nixpkgs.legacyPackages."${system}";
evalHost = { name, local, target }: nixpkgs.lib.nixosSystem {
evalHost = { name, local, target, light ? false }: nixpkgs.lib.nixosSystem {
system = target;
modules = [
{
@@ -121,6 +125,9 @@
# nixpkgs.buildPlatform = local; # set by instantiate.nix instead
# nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
}
(optionalAttrs light {
sane.enableSlowPrograms = false;
})
(import ./hosts/instantiate.nix { hostName = name; })
self.nixosModules.default
self.nixosModules.passthru
@@ -138,8 +145,11 @@
hosts = {
servo = { name = "servo"; local = "x86_64-linux"; target = "x86_64-linux"; };
desko = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; };
desko-light = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; light = true; };
lappy = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; };
lappy-light = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; light = true; };
moby = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; };
moby-light = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; light = true; };
rescue = { name = "rescue"; local = "x86_64-linux"; target = "x86_64-linux"; };
};
# cross-compiled builds: instead of emulating the host, build using a cross-compiler.
@@ -147,10 +157,7 @@
# - but fewer of their packages can be found in upstream caches.
cross = mapAttrValues evalHost hosts;
emulated = mapAttrValues
({name, local, target}: evalHost {
inherit name target;
local = null;
})
(args: evalHost (args // { local = null; }))
hosts;
prefixAttrs = prefix: attrs: mapAttrs'
(name: value: {
@@ -162,9 +169,9 @@
(prefixAttrs "cross-" cross) //
(prefixAttrs "emulated-" emulated) // {
# prefer native builds for these machines:
inherit (emulated) servo desko lappy rescue;
inherit (emulated) servo desko desko-light lappy lappy-light rescue;
# prefer cross-compiled builds for these machines:
inherit (cross) moby;
inherit (cross) moby moby-light;
};
# unofficial output
@@ -184,8 +191,9 @@
imgs = mapAttrValues (host: host.config.system.build.img) self.nixosConfigurations;
# unofficial output
host-pkgs = mapAttrValues (host: host.config.system.build.pkgs) self.nixosConfigurations;
host-programs = mapAttrValues (host: mapAttrValues (p: p.package) host.config.sane.programs) self.nixosConfigurations;
hostConfigs = mapAttrValues (host: host.config) self.nixosConfigurations;
hostPkgs = mapAttrValues (host: host.config.system.build.pkgs) self.nixosConfigurations;
hostPrograms = mapAttrValues (host: mapAttrValues (p: p.package) host.config.sane.programs) self.nixosConfigurations;
overlays = {
# N.B.: `nix flake check` requires every overlay to take `final: prev:` at defn site,
@@ -263,9 +271,14 @@
# let the user handle that edge case by re-running this whole command
nixos-rebuild --flake '.#${host}' ${action} --target-host colin@${addr} --use-remote-sudo $@
'';
deployApp = host: addr: action: {
type = "app";
program = ''${deployScript host addr action}'';
};
# pkg updating.
# a cleaner alternative lives here: <https://discourse.nixos.org/t/how-can-i-run-the-updatescript-of-personal-packages/25274/2>
# mkUpdater :: [ String ] -> { type = "app"; program = path; }
mkUpdater = attrPath: {
type = "app";
program = let
@@ -290,7 +303,7 @@
} else {}
)
(pkgs.lib.getAttrFromPath basePath sanePkgs);
mkUpdaters = { ignore ? [] }@opts: basePath:
mkUpdaters = { ignore ? [], flakePrefix ? [] }@opts: basePath:
let
updaters = mkUpdatersNoAliases opts basePath;
invokeUpdater = name: pkg:
@@ -300,7 +313,7 @@
# in case `name` has a `.` in it, we have to quote it
escapedPath = builtins.map (p: ''"${p}"'') fullPath;
updatePath = builtins.concatStringsSep "." ([ "update" "pkgs" ] ++ escapedPath);
updatePath = builtins.concatStringsSep "." (flakePrefix ++ escapedPath);
in pkgs.lib.optionalString doUpdateByDefault (
pkgs.lib.escapeShellArgs [
"nix" "run" ".#${updatePath}"
@@ -308,8 +321,9 @@
);
in {
type = "app";
# top-level app just invokes the updater of everything one layer below it
program = builtins.toString (pkgs.writeShellScript
(builtins.concatStringsSep "-" (["update"] ++ basePath))
(builtins.concatStringsSep "-" (flakePrefix ++ basePath))
(builtins.concatStringsSep
"\n"
(pkgs.lib.mapAttrsToList invokeUpdater updaters)
@@ -329,9 +343,12 @@
- `nix run '.#update.feeds'`
- updates metadata for all feeds
- `nix run '.#init-feed' <url>`
- `nix run '.#deploy-{lappy,moby,moby-test,servo}' [nixos-rebuild args ...]`
- `nix run '.#deploy.{desko,lappy,moby,servo}[-light][.test]' [nixos-rebuild args ...]`
- `nix run '.#check'`
- make sure all systems build; NUR evaluates
specific build targets of interest:
- `nix build '.#imgs.rescue'`
'';
in builtins.toString (pkgs.writeShellScript "nixos-config-help" ''
cat ${helpMsg}
@@ -340,29 +357,27 @@
nix flake show --option allow-import-from-derivation true
'');
};
update.pkgs = mkUpdaters { ignore = [ ["feeds"] ]; } [];
update.feeds = mkUpdaters {} [ "feeds" ];
# wrangle some names to get package updaters which refer back into the flake, but also conditionally ignore certain paths (e.g. sane.feeds).
# TODO: better design
update = rec {
_impl.pkgs.sane = mkUpdaters { flakePrefix = [ "update" "_impl" "pkgs" ]; ignore = [ [ "sane" "feeds" ] ]; } [ "sane" ];
pkgs = _impl.pkgs.sane;
_impl.feeds.sane.feeds = mkUpdaters { flakePrefix = [ "update" "_impl" "feeds" ]; } [ "sane" "feeds" ];
feeds = _impl.feeds.sane.feeds;
};
init-feed = {
type = "app";
program = "${pkgs.feeds.init-feed}";
};
deploy-lappy = {
type = "app";
program = ''${deployScript "lappy" "lappy" "switch"}'';
};
deploy-moby-test = {
type = "app";
program = ''${deployScript "moby" "moby-hn" "test"}'';
};
deploy-moby = {
type = "app";
program = ''${deployScript "moby" "moby-hn" "switch"}'';
};
deploy-servo = {
type = "app";
program = ''${deployScript "servo" "servo" "switch"}'';
deploy = {
lappy = deployApp "lappy" "lappy" "switch";
lappy-light = deployApp "lappy-light" "lappy" "switch";
moby = deployApp "moby" "moby" "switch";
moby-light = deployApp "moby-light" "moby" "switch";
moby-test = deployApp "moby" "moby" "test";
servo = deployApp "servo" "servo" "switch";
};
sync-moby = {
@@ -392,9 +407,12 @@
RC0=$?
nix run '.#check.host-configs'
RC1=$?
nix run '.#check.rescue'
RC2=$?
echo "nur: $RC0"
echo "host-configs: $RC1"
exit $(($RC0 | $RC1))
echo "rescue: $RC2"
exit $(($RC0 | $RC1 | $RC2))
'');
};
@@ -418,18 +436,27 @@
check.host-configs = {
type = "app";
program = let
checkHost = host: ''
nix build '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} -j2 $@
RC_${host}=$?
checkHost = host: let
shellHost = pkgs.lib.replaceStrings [ "-" ] [ "_" ] host;
in ''
nix build -v '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} -j2 $@
RC_${shellHost}=$?
'';
in builtins.toString (pkgs.writeShellScript
"check-host-configs"
''
# build minimally-usable hosts first, then their full image.
# this gives me a minimal image i can deploy or copy over, early.
${checkHost "desko-light"}
${checkHost "moby-light"}
${checkHost "lappy-light"}
${checkHost "desko"}
${checkHost "lappy"}
${checkHost "servo"}
${checkHost "moby"}
${checkHost "rescue"}
echo "desko: $RC_desko"
echo "lappy: $RC_lappy"
echo "servo: $RC_servo"
@@ -439,6 +466,13 @@
''
);
};
check.rescue = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "check-rescue" ''
nix build -v '.#imgs.rescue' --out-link ./result-rescue-img -j2
'');
};
};
templates = {

View File

@@ -11,23 +11,29 @@
sops.secrets.colin-passwd.neededForUsers = true;
sane.ports.openFirewall = true; # for e.g. nix-serve
sane.roles.build-machine.enable = true;
sane.roles.ac = true;
sane.roles.client = true;
sane.roles.dev-machine = true;
sane.roles.pc = true;
sane.services.wg-home.enable = true;
sane.services.wg-home.ip = config.sane.hosts.by-name."desko".wg-home.ip;
sane.services.duplicity.enable = true;
sane.services.nixserve.secretKeyFile = config.sops.secrets.nix_serve_privkey.path;
sane.nixcache.substituters.desko = false;
sane.nixcache.remote-builders.desko = false;
sane.gui.sway.enable = true;
sane.programs.iphoneUtils.enableFor.user.colin = true;
sane.programs.steam.enableFor.user.colin = true;
sane.programs.guiApps.suggestedPrograms = [ "desktopGuiApps" ];
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
# sane.programs.devPkgs.enableFor.user.colin = true;
sane.programs.signal-desktop.config.autostart = true;
sane.programs."gnome.geary".config.autostart = true;
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];

View File

@@ -1,14 +1,13 @@
{ ... }:
{
sane.persist.root-on-tmpfs = true;
# increase /tmp space (defaults to 50% of RAM) for building large nix things.
# a cross-compiled kernel, particularly, will easily use 30+GB of tmp
fileSystems."/tmp".options = [ "size=64G" ];
fileSystems."/nix" = {
# device = "/dev/disk/by-uuid/985a0a32-da52-4043-9df7-615adec2e4ff";
device = "/dev/disk/by-uuid/0ab0770b-7734-4167-88d9-6e4e20bb2a56";
# device = "/dev/disk/by-uuid/0ab0770b-7734-4167-88d9-6e4e20bb2a56";
device = "/dev/disk/by-uuid/845d85bf-761d-431b-a406-e6f20909154f";
fsType = "btrfs";
options = [
"compress=zstd"
@@ -17,8 +16,8 @@
};
fileSystems."/boot" = {
# device = "/dev/disk/by-uuid/CAA7-E7D2";
device = "/dev/disk/by-uuid/41B6-BAEF";
# device = "/dev/disk/by-uuid/41B6-BAEF";
device = "/dev/disk/by-uuid/5049-9AFD";
fsType = "vfat";
};
}

View File

@@ -7,6 +7,7 @@
sane.roles.client = true;
sane.roles.dev-machine = true;
sane.roles.pc = true;
sane.services.wg-home.enable = true;
sane.services.wg-home.ip = config.sane.hosts.by-name."lappy".wg-home.ip;
@@ -15,11 +16,7 @@
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
sane.programs.guiApps.suggestedPrograms = [
"desktopGuiApps"
"stepmania"
];
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
sane.programs.stepmania.enableFor.user.colin = true;
sops.secrets.colin-passwd.neededForUsers = true;

View File

@@ -1,8 +1,6 @@
{ ... }:
{
sane.persist.root-on-tmpfs = true;
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/75230e56-2c69-4e41-b03e-68475f119980";
fsType = "btrfs";

View File

@@ -33,7 +33,7 @@
# and so it just wouldn't handle any button inputs (sxmo_hook_inputhandler.sh not on path)
SXMO_DEVICE_NAME = "three_button_touchscreen";
};
package = pkgs.sxmo-utils-latest.overrideAttrs (base: {
package = (pkgs.sxmo-utils.override { preferSystemd = true; }).overrideAttrs (base: {
postPatch = (base.postPatch or "") + ''
# after volume-button navigation mode, restore full keyboard functionality
cp ${./xkb_mobile_normal_buttons} ./configs/xkb/xkb_mobile_normal_buttons

View File

@@ -20,15 +20,10 @@
];
sane.roles.client = true;
sane.roles.handheld = true;
sane.zsh.showDeadlines = false; # unlikely to act on them when in shell
sane.services.wg-home.enable = true;
sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip;
sane.wowlan.enable = true;
sane.wowlan.patterns = [
{ ipv4.destPort = 22; } # wake on SSH
{ ipv4.srcPort = 2587; } # wake on `ntfy-sh` push from servo
{ arp.queryIp = [ 10 78 79 54 ]; } # wake when somebody is doing an ARP query against us
];
# XXX colin: phosh doesn't work well with passwordless login,
# so set this more reliable default password should anything go wrong
@@ -38,25 +33,28 @@
sops.secrets.colin-passwd.neededForUsers = true;
sane.gui.sxmo.enable = true;
sane.programs.guiApps.suggestedPrograms = [ "handheldGuiApps" ];
# sane.programs.consoleUtils.enableFor.user.colin = false;
# sane.programs.guiApps.enableFor.user.colin = false;
sane.programs.blueberry.enableFor.user.colin = false; # bluetooth manager: doesn't cross compile!
sane.programs.sequoia.enableFor.user.colin = false;
sane.programs.tuiApps.enableFor.user.colin = false; # visidata, others, don't compile well
# disabled for faster deploys
sane.programs.soundconverter.enableFor.user.colin = false;
sane.programs.eg25-control.enableFor.user.colin = true;
sane.programs.dialect.enableFor.user.colin = false; # drags in 700MB of x86 dependencies (e.g. gtk4)
sane.programs.mercurial.enableFor.user.colin = false; # does not cross compile
sane.programs.nvme-cli.enableFor.system = false; # does not cross compile (libhugetlbfs)
sane.programs.ntfy-sh.config.autostart = true;
# enabled for easier debugging
sane.programs.eg25-control.enableFor.user.colin = true;
sane.programs.rtl8723cs-wowlan.enableFor.user.colin = true;
# sane.programs.ntfy-sh.config.autostart = true;
sane.programs.dino.config.autostart = true;
sane.programs.signal-desktop.config.autostart = true;
# sane.programs."gnome.geary".config.autostart = true;
# sane.programs.calls.config.autostart = true;
sane.programs.mpv.config.vo = "wlshm"; #< see hosts/common/programs/mpv.nix for details
sane.programs.firefox.mime.priority = 300; # prefer other browsers when possible
# HACK/TODO: make `programs.P.env.VAR` behave according to `mime.priority`
sane.programs.firefox.env = lib.mkForce {};
sane.programs.epiphany.env.BROWSER = "epiphany";
sane.programs.firefox.enableFor.user.colin = false; # use epiphany instead
# note the .conf.d approach: using ~/.config/pipewire/pipewire.conf directly breaks all audio,
# presumably because that deletes the defaults entirely whereas the .conf.d approach selectively overrides defaults
@@ -85,8 +83,6 @@
}
'';
# sane.programs.mpv.enableFor.user.colin = true;
boot.loader.efi.canTouchEfiVariables = false;
# /boot space is at a premium. default was 20.
# even 10 can be too much
@@ -95,16 +91,6 @@
# mobile.boot.stage-1.enable = false;
# boot.initrd.systemd.enable = false;
# boot.initrd.services.swraid.enable = false; # attempt to fix dm_mod stuff
# disable proximity sensor.
# the filtering/calibration is bad that it causes the screen to go fully dark at times.
boot.blacklistedKernelModules = [ "stk3310" ];
# without this some GUI apps fail: `DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory`
# this is because they can't allocate enough video ram.
# the default CMA seems to be 32M.
# i was running fine with 256MB from 2022/07-ish through 2022/12-ish, but then the phone quit reliably coming back from sleep: maybe a memory leak?
# `cat /proc/meminfo` to see CmaTotal/CmaFree if interested in tuning this.
boot.kernelParams = [ "cma=512M" ];
# hardware.firmware makes the referenced files visible to the kernel, for whenever a driver explicitly asks for them.
# these files are visible from userspace by following `/sys/module/firmware_class/parameters/path`
@@ -115,7 +101,14 @@
# ov5640_af.bin (camera module)
# hardware.firmware = [ config.mobile.device.firmware ];
# hardware.firmware = [ pkgs.rtl8723cs-firmware ];
hardware.firmware = [ pkgs.linux-firmware-megous ];
hardware.firmware = [
(pkgs.linux-firmware-megous.override {
# rtl_bt = false probably means no bluetooth connectivity.
# N.B.: DON'T RE-ENABLE without first confirming that wake-on-lan works during suspend (rtcwake).
# it seems the rtl_bt stuff ("bluetooth coexist") might make wake-on-LAN radically more flaky.
rtl_bt = false;
})
];
system.stateVersion = "21.11";
@@ -133,7 +126,12 @@
# see pkgs/patched/alsa-ucm-conf for more info.
environment.variables.ALSA_CONFIG_UCM2 = "/run/current-system/sw/share/alsa/ucm2";
environment.pathsToLink = [ "/share/alsa/ucm2" ];
environment.systemPackages = [ pkgs.alsa-ucm-conf-sane ];
environment.systemPackages = [
(pkgs.alsa-ucm-conf-sane.override {
# internal speaker has a tendency to break :(
preferEarpiece = true;
})
];
systemd = let
ucm-env = config.environment.variables.ALSA_CONFIG_UCM2;
in {

View File

@@ -1,7 +1,6 @@
{ ... }:
{
sane.persist.root-on-tmpfs = true;
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/1f1271f8-53ce-4081-8a29-60a4a6b5d6f9";
fsType = "btrfs";

View File

@@ -66,6 +66,24 @@ in
# target = "zImage"; # <-- confuses other parts of nixos :-(
};
# disable proximity sensor.
# the filtering/calibration is bad that it causes the screen to go fully dark at times.
boot.blacklistedKernelModules = [ "stk3310" ];
boot.kernelParams = [
# without this some GUI apps fail: `DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory`
# this is because they can't allocate enough video ram.
# see related nixpkgs issue: <https://github.com/NixOS/nixpkgs/issues/260222>
#
# the default CMA seems to be 32M.
# i was running fine with 256MB from 2022/07-ish through 2022/12-ish, but then the phone quit reliably coming back from sleep (phosh): maybe a memory leak?
# `cat /proc/meminfo` to see CmaTotal/CmaFree if interested in tuning this.
"cma=512M"
# 2023/10/20: potential fix for the lima (GPU) timeout bugs:
# - <https://gitlab.com/postmarketOS/pmaports/-/issues/805#note_890467824>
"lima.sched_timeout_ms=2000"
];
services.xserver.displayManager.job.preStart = ensureHWReady;
systemd.services.greetd.preStart = ensureHWReady;
}

View File

@@ -31,92 +31,7 @@
SXMO_LISGD_INPUT_DEVICE = "/dev/input/by-path/platform-1c2ac00.i2c-event";
# vol and power are detected correctly by upstream
### preferences
# notable bemenu options:
# - see `bemenu --help` for all
# -P, --prefix text to show before highlighted item.
# --scrollbar display scrollbar. (none (default), always, autohide)
# -H, --line-height defines the height to make each menu line (0 = default height). (wx)
# -M, --margin defines the empty space on either side of the menu. (wx)
# -W, --width-factor defines the relative width factor of the menu (from 0 to 1). (wx)
# -B, --border defines the width of the border in pixels around the menu. (wx)
# -R --border-radius defines the radius of the border around the menu (0 = no curved borders).
# --ch defines the height of the cursor (0 = scales with line height). (wx)
# --cw defines the width of the cursor. (wx)
# --hp defines the horizontal padding for the entries in single line mode. (wx)
# --fn defines the font to be used ('name [size]'). (wx)
# --tb defines the title background color. (wx)
# --tf defines the title foreground color. (wx)
# --fb defines the filter background color. (wx)
# --ff defines the filter foreground color. (wx)
# --nb defines the normal background color. (wx)
# --nf defines the normal foreground color. (wx)
# --hb defines the highlighted background color. (wx)
# --hf defines the highlighted foreground color. (wx)
# --fbb defines the feedback background color. (wx)
# --fbf defines the feedback foreground color. (wx)
# --sb defines the selected background color. (wx)
# --sf defines the selected foreground color. (wx)
# --ab defines the alternating background color. (wx)
# --af defines the alternating foreground color. (wx)
# --scb defines the scrollbar background color. (wx)
# --scf defines the scrollbar foreground color. (wx)
# --bdr defines the border color. (wx)
#
# colors are specified as `#RRGGBB`
# defaults:
# --ab "#222222"
# --af "#bbbbbb"
# --bdr "#005577"
# --border 3
# --cb "#222222"
# --center
# --cf "#bbbbbb"
# --fb "#222222"
# --fbb "#eeeeee"
# --fbf "#222222"
# --ff "#bbbbbb"
# --fixed-height
# --fn 'Sxmo 14'
# --hb "#005577"
# --hf "#eeeeee"
# --line-height 20
# --list 16
# --margin 40
# --nb "#222222"
# --nf "#bbbbbb"
# --no-overlap
# --no-spacing
# --sb "#323232"
# --scb "#005577"
# --scf "#eeeeee"
# --scrollbar autohide
# --tb "#005577"
# --tf "#eeeeee"
# --wrap
BEMENU_OPTS = let
bg = "#1d1721"; # slight purple
fg0 = "#d8d8d8"; # inactive text (light grey)
fg1 = "#ffffff"; # active text (white)
accent0 = "#1f5e54"; # darker but saturated teal
accent1 = "#418379"; # teal (matches nixos-bg)
accent2 = "#5b938a"; # brighter but muted teal
in lib.concatStringsSep " " [
"--wrap --scrollbar autohide --fixed-height"
"--center --margin 45"
"--no-spacing"
# XXX: font size doesn't seem to take effect (would prefer larger)
"--fn 'monospace 14' --line-height 22 --border 3"
"--bdr '${accent0}'" # border
"--scf '${accent2}' --scb '${accent0}'" # scrollbar
"--tb '${accent0}' --tf '${fg0}'" # title
"--fb '${accent0}' --ff '${fg1}'" # filter (i.e. text that's been entered)
"--hb '${accent1}' --hf '${fg1}'" # selected item
"--nb '${bg}' --nf '${fg0}'" # normal lines (even)
"--ab '${bg}' --af '${fg0}'" # alternated lines (odd)
"--cf '${accent0}' --cb '${accent0}'" # cursor (not very useful)
];
DEFAULT_COUNTRY = "US";
SXMO_AUTOROTATE = "1"; # enable auto-rotation at launch. has no meaning in stock/upstream sxmo-utils
@@ -141,9 +56,22 @@
# SXMO_ROTATION_GRAVITY = "12500"; # kinda uncomfortable when walking
SXMO_ROTATION_GRAVITY = "12000";
SXMO_SCREENSHOT_DIR = "/home/colin/Pictures"; # default: "$HOME"
# test new scales by running `swaymsg -- output DSI-1 scale x.y`
# sway/wayland scaling:
# - conflicting info out there on how scaling actually works
# at the least, for things where it matters (mpv), it seems like scale settings have 0 effect on perf
# ways to enforce scaling:
# - <https://wiki.archlinux.org/title/HiDPI>
# - `swaymsg -- output DSI-1 scale 2.0` (scales everything)
# - `dconf write /org/gnome/desktop/interface/text-scaling-factor 2.0` (scales ONLY TEXT)
# - `GDK_DPI_SCALE=2.0` (scales ONLY TEXT)
#
# application notes:
# - cozy: in landscape, playback position is not visible unless scale <= 1.7
# - if in a tab, then scale 1.6 is the max
# SXMO_SWAY_SCALE = "1.5"; # hard to press gPodder icons
SXMO_SWAY_SCALE = "1.8";
SXMO_SWAY_SCALE = "1.6";
# SXMO_SWAY_SCALE = "1.8";
# SXMO_SWAY_SCALE = "2";
SXMO_WORKSPACE_WRAPPING = "5"; # how many workspaces. default: 4

View File

@@ -4,12 +4,15 @@
./fs.nix
];
boot.loader.generic-extlinux-compatible.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
# sane.persist.enable = false; # TODO: disable (but run `nix flake check` to ensure it works!)
sane.persist.enable = false;
sane.nixcache.enable = false; # don't want to be calling out to dead machines that we're *trying* to rescue
# auto-login at shell
services.getty.autologinUser = "colin";
# users.users.colin.initialPassword = "colin";
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
system.stateVersion = "21.05";
}

View File

@@ -1,7 +1,7 @@
{ ... }:
{
fileSystems."/" = {
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/44445555-6666-7777-8888-999900001111";
fsType = "ext4";
};

View File

@@ -14,12 +14,11 @@
signaldctl.enableFor.user.colin = true;
};
sane.roles.ac = true;
sane.roles.build-machine.enable = true;
sane.roles.build-machine.emulation = false;
sane.zsh.showDeadlines = false; # ~/knowledge doesn't always exist
sane.programs.consoleUtils.suggestedPrograms = [
"desktopConsoleUtils"
"pcConsoleUtils"
"sane-scripts.stop-all-servo"
];
sane.services.dyn-dns.enable = true;
@@ -30,6 +29,8 @@
sane.services.wg-home.ip = config.sane.hosts.by-name."servo".wg-home.ip;
sane.nixcache.substituters.servo = false;
sane.nixcache.substituters.desko = false;
sane.nixcache.remote-builders.desko = false;
sane.nixcache.remote-builders.servo = false;
# sane.services.duplicity.enable = true; # TODO: re-enable after HW upgrade
# automatically log in at the virtual consoles.

View File

@@ -1,7 +1,6 @@
{ ... }:
{
sane.persist.root-on-tmpfs = true;
# increase /tmp space (defaults to 50% of RAM) for building large nix things.
# even the stock `nixpkgs.linux` consumes > 16 GB of tmp
fileSystems."/tmp".options = [ "size=32G" ];
@@ -36,7 +35,7 @@
};
sane.fs."/mnt/persist/ext".mount = {};
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: this is overly broad; only need media and share directories to be persisted
{ user = "colin"; group = "users"; path = "/var/lib/uninsane"; }
];
@@ -69,7 +68,7 @@
the contents should be a subset of what's in ../media/datasets.
'';
# make sure large media is stored to the HDD
sane.persist.sys.ext = [
sane.persist.sys.byStore.ext = [
{
user = "colin";
group = "users";

View File

@@ -1,6 +1,24 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
portOpts = with lib; types.submodule {
options = {
visibleTo.ovpn = mkOption {
type = types.bool;
default = false;
};
};
};
in
{
options = with lib; {
sane.ports.ports = mkOption {
# add the `visibleTo.ovpn` option
type = types.attrsOf portOpts;
};
};
config = {
networking.domain = "uninsane.org";
sane.ports.openFirewall = true;
@@ -83,6 +101,14 @@
vpn-ip = "185.157.162.178";
# DNS = 46.227.67.134, 192.165.9.158, 2a07:a880:4601:10f0:cd45::1, 2001:67c:750:1:cafe:cd45::1
vpn-dns = "46.227.67.134";
bridgePort = port: proto: ''
${in-ns} ${iptables} -A PREROUTING -t nat -p ${proto} --dport ${port} -m iprange --dst-range ${vpn-ip} \
-j DNAT --to-destination ${veth-host-ip}
'';
bridgeStatements = lib.foldlAttrs
(acc: port: portCfg: acc ++ (builtins.map (bridgePort port) portCfg.protocol))
[]
config.sane.ports.ports;
in {
privateKeyFile = config.sops.secrets.wg_ovpns_privkey.path;
# wg is active only in this namespace.
@@ -109,10 +135,10 @@
# dynamicEndpointRefreshRestartSeconds = 5;
}
];
preSetup = "" + ''
preSetup = ''
${ip} netns add ovpns || echo "ovpns already exists"
'';
postShutdown = "" + ''
postShutdown = ''
${in-ns} ip link del ovpns-veth-b || echo "couldn't delete ovpns-veth-b"
${ip} link del ovpns-veth-a || echo "couldn't delete ovpns-veth-a"
${ip} netns delete ovpns || echo "couldn't delete ovpns"
@@ -122,7 +148,7 @@
${ip} rule add from all lookup local pref 0
${ip} rule del from all lookup local pref 100
'';
postSetup = "" + ''
postSetup = ''
# DOCS:
# - some of this approach is described here: <https://josephmuia.ca/2018-05-16-net-namespaces-veth-nat/>
# - iptables primer: <https://danielmiessler.com/study/iptables/>
@@ -146,25 +172,11 @@
${ip} rule add from all lookup local pref 100
${ip} rule del from all lookup local pref 0
# bridge HTTP traffic:
# any external port-80 request sent to the VPN addr will be forwarded to the rootns.
# this exists so LetsEncrypt can procure a cert for the MX over http.
# TODO: we could use _acme_challence.mx.uninsane.org CNAME to avoid this forwarding
# - <https://community.letsencrypt.org/t/where-does-letsencrypt-resolve-dns-from/37607/8>
${in-ns} ${iptables} -A PREROUTING -t nat -p tcp --dport 80 -m iprange --dst-range ${vpn-ip} \
-j DNAT --to-destination ${veth-host-ip}:80
# we also bridge DNS traffic
${in-ns} ${iptables} -A PREROUTING -t nat -p udp --dport 53 -m iprange --dst-range ${vpn-ip} \
-j DNAT --to-destination ${veth-host-ip}
${in-ns} ${iptables} -A PREROUTING -t nat -p tcp --dport 53 -m iprange --dst-range ${vpn-ip} \
-j DNAT --to-destination ${veth-host-ip}
# in order to access DNS in this netns, we need to route it to the VPN's nameservers
# - alternatively, we could fix DNS servers like 1.1.1.1.
${in-ns} ${iptables} -A OUTPUT -t nat -p udp --dport 53 -m iprange --dst-range 127.0.0.53 \
-j DNAT --to-destination ${vpn-dns}:53
'';
'' + (lib.concatStringsSep "\n" bridgeStatements);
};
# create a new routing table that we can use to proxy traffic out of the root namespace
@@ -217,4 +229,5 @@
# # test with:
# # curl --interface hurricane http://[2607:f8b0:400a:80b::2004]
# # ping 2607:f8b0:400a:80b::2004
};
}

View File

@@ -12,7 +12,7 @@ in
# > AttributeError: 'NoneType' object has no attribute 'query'
lib.mkIf false
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ inherit user group; mode = "0700"; path = svc-dir; }
];

View File

@@ -0,0 +1,124 @@
# TURN/STUN NAT traversal service
# commonly used to establish realtime calls with prosody, or possibly matrix/synapse
#
# - <https://github.com/coturn/coturn/>
# - `man turnserver`
# - config docs: <https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf>
#
# N.B. during operation it's NORMAL to see "error 401".
# during session creation:
# - client sends Allocate request
# - server replies error 401, providing a realm and nonce
# - client uses realm + nonce + shared secret to construct an auth key & call Allocate again
# - server replies Allocate Success Response
# - source: <https://stackoverflow.com/a/66643135>
#
# N.B. this safest implementation routes all traffic THROUGH A VPN
# - that adds a lot of latency, but in practice turns out to be inconsequential.
# i guess ICE allows clients to prefer the other party's lower-latency server, in practice?
# - still, this is the "safe" implementation because STUN works with IP addresses instead of domain names:
# 1. client A queries the STUN server to determine its own IP address/port.
# 2. client A tells client B which IP address/port client A is visible on.
# 3. client B contacts that IP address/port
# this only works so long as the IP address/port which STUN server sees client A on is publicly routable.
# that is NOT the case when the STUN server and client A are on the same LAN
# even if client A contacts the STUN server via its WAN address with port reflection enabled.
# hence, there's no obvious way to put the STUN server on the same LAN as either client and expect the rest to work.
{ lib, ... }:
let
# TODO: this range could be larger, but right now that's costly because each element is its own UPnP forward
# TURN port range (inclusive)
turnPortLow = 49152;
turnPortHigh = 49167;
turnPortRange = lib.range turnPortLow turnPortHigh;
in
{
sane.ports.ports = lib.mkMerge ([
{
"3478" = {
# this is the "control" port.
# i.e. no client data is forwarded through it, but it's where clients request tunnels.
protocol = [ "tcp" "udp" ];
# visibleTo.lan = true;
# visibleTo.wan = true;
visibleTo.ovpn = true;
description = "colin-stun-turn";
};
"5349" = {
# the other port 3478 also supports TLS/DTLS, but presumably clients wanting TLS will default 5349
protocol = [ "tcp" ];
# visibleTo.lan = true;
# visibleTo.wan = true;
visibleTo.ovpn = true;
description = "colin-stun-turn-over-tls";
};
}
] ++ (builtins.map
(port: {
"${builtins.toString port}" = let
count = port - turnPortLow + 1;
numPorts = turnPortHigh - turnPortLow + 1;
in {
protocol = [ "tcp" "udp" ];
# visibleTo.lan = true;
# visibleTo.wan = true;
visibleTo.ovpn = true;
description = "colin-turn-${builtins.toString count}-of-${builtins.toString numPorts}";
};
})
turnPortRange
));
services.nginx.virtualHosts."turn.uninsane.org" = {
# allow ACME to procure a cert via nginx for this domain
enableACME = true;
};
sane.dns.zones."uninsane.org".inet = {
# CNAME."turn" = "servo.wan";
# CNAME."turn" = "ovpns";
# CNAME."turn" = "native";
# XXX: SRV records have to point to something with a A/AAAA record; no CNAMEs
A."turn" = "%AOVPNS%";
# A."turn" = "%AWAN%";
SRV."_stun._udp" = "5 50 3478 turn";
SRV."_stun._tcp" = "5 50 3478 turn";
SRV."_stuns._tcp" = "5 50 5349 turn";
SRV."_turn._udp" = "5 50 3478 turn";
SRV."_turn._tcp" = "5 50 3478 turn";
SRV."_turns._tcp" = "5 50 5349 turn";
};
sane.derived-secrets."/var/lib/coturn/shared_secret.bin" = {
encoding = "base64";
# TODO: make this not globally readable
acl.mode = "0644";
};
sane.fs."/var/lib/coturn/shared_secret.bin".wantedBeforeBy = [ "coturn.service" ];
# provide access to certs
users.users.turnserver.extraGroups = [ "nginx" ];
services.coturn.enable = true;
services.coturn.realm = "turn.uninsane.org";
services.coturn.cert = "/var/lib/acme/turn.uninsane.org/fullchain.pem";
services.coturn.pkey = "/var/lib/acme/turn.uninsane.org/key.pem";
services.coturn.use-auth-secret = true;
services.coturn.static-auth-secret-file = "/var/lib/coturn/shared_secret.bin";
services.coturn.lt-cred-mech = true;
services.coturn.min-port = turnPortLow;
services.coturn.max-port = turnPortHigh;
# services.coturn.secure-stun = true;
services.coturn.extraConfig = lib.concatStringsSep "\n" [
"verbose"
# "Verbose" #< even MORE verbosity than "verbose"
# "no-multicast-peers" # disables sending to IPv4 broadcast addresses (e.g. 224.0.0.0/3)
"listening-ip=10.0.1.5"
# "external-ip=185.157.162.178/10.0.1.5"
"external-ip=185.157.162.178"
# "listening-ip=10.78.79.51" # can be specified multiple times; omit for *
# "external-ip=97.113.128.229/10.78.79.51"
# "external-ip=97.113.128.229"
# "mobility" # "mobility with ICE (MICE) specs support" (?)
];
}

View File

@@ -2,6 +2,7 @@
{
imports = [
./calibre.nix
./coturn.nix
./ddns-afraid.nix
./ddns-he.nix
./email
@@ -17,14 +18,16 @@
./komga.nix
./lemmy.nix
./matrix
./monero.nix
./navidrome.nix
./nginx.nix
./nixserve.nix
./ntfy.nix
./ntfy
./pict-rs.nix
./pleroma.nix
./postgres.nix
./prosody.nix
./prosody
./slskd.nix
./transmission.nix
./trust-dns.nix
./wikipedia.nix

View File

@@ -40,8 +40,11 @@ let
turnPortHigh = 49167;
turnPortRange = lib.range turnPortLow turnPortHigh;
in
# XXX(2023/10/15): disabled in favor of Prosody.
# everything configured below was fine: used ejabberd for several months.
lib.mkIf false
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "ejabberd"; group = "ejabberd"; path = "/var/lib/ejabberd"; }
];
sane.ports.ports = lib.mkMerge ([
@@ -114,6 +117,9 @@ in
turnPortRange
));
# this ejabberd config uses builtin STUN/TURN server, so hack to ensure no other implementation fights for ports
services.coturn.enable = false;
# provide access to certs
# TODO: this should just be `acme`. then we also add nginx to the `acme` group.
# why is /var/lib/acme/* owned by `nginx` group??

View File

@@ -22,6 +22,13 @@
# - but postfix delegates authorization of that outgoing mail to dovecot, on the server side
#
# - local clients (i.e. sendmail) interact only with postfix
#
# debugging: general connectivity issues
# - test that inbound port 25 is unblocked:
# - `curl https://canyouseeme.org/ --data 'port=25&IP=185.157.162.178' | grep 'see your service'`
# - and retry with port 465, 587
# - i think this API requires the queried IP match the source IP
# - if necessary, `systemctl stop postfix` and `sudo nc -l 185.157.162.178 25`, then try https://canyouseeme.org
{ ... }:
{

View File

@@ -18,7 +18,7 @@ let
};
in
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode? could be more granular
{ user = "opendkim"; group = "opendkim"; path = "/var/lib/opendkim"; }
{ user = "root"; group = "root"; path = "/var/lib/postfix"; }
@@ -28,21 +28,25 @@ in
# "/var/lib/dovecot"
];
sane.ports.ports."25" = {
protocol = [ "tcp" ];
visibleTo.ovpn = true;
description = "colin-smtp-mx.uninsane.org";
};
sane.ports.ports."465" = {
protocol = [ "tcp" ];
visibleTo.ovpn = true;
description = "colin-smtps-mx.uninsane.org";
};
sane.ports.ports."587" = {
protocol = [ "tcp" ];
visibleTo.ovpn = true;
description = "colin-smtps-submission-mx.uninsane.org";
};
# XXX(2023/10/20): opening these ports in the firewall has the OPPOSITE effect as intended.
# these ports are only routable so long as they AREN'T opened.
# probably some cursed interaction with network namespaces introduced after 2023/10/10.
# sane.ports.ports."25" = {
# protocol = [ "tcp" ];
# # XXX visibleTo.lan effectively means "open firewall, but don't configure any NAT/forwarding"
# visibleTo.lan = true;
# description = "colin-smtp-mx.uninsane.org";
# };
# sane.ports.ports."465" = {
# protocol = [ "tcp" ];
# visibleTo.lan = true;
# description = "colin-smtps-mx.uninsane.org";
# };
# sane.ports.ports."587" = {
# protocol = [ "tcp" ];
# visibleTo.lan = true;
# description = "colin-smtps-submission-mx.uninsane.org";
# };
# exists only to manage certs for Postfix
services.nginx.virtualHosts."mx.uninsane.org" = {

View File

@@ -29,7 +29,7 @@
# - `sudo btrfs qgroup limit 20G /mnt/persist/ext/persist/var/export/playground`
# to query the quota/status:
# - `sudo btrfs qgroup show -re /var/export/playground`
sane.persist.sys.ext = [
sane.persist.sys.byStore.ext = [
{ user = "root"; group = "export"; mode = "0775"; path = "/var/export/playground"; }
];

View File

@@ -175,5 +175,10 @@ in
systemd.services.sftpgo.serviceConfig = {
ReadOnlyPaths = [ "/var/export" ];
ReadWritePaths = [ "/var/export/playground" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
Restart = "always";
RestartSec = "20s";
};
}

View File

@@ -15,7 +15,7 @@
owner = config.users.users.freshrss.name;
mode = "0400";
};
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "freshrss"; group = "freshrss"; path = "/var/lib/freshrss"; }
];

View File

@@ -2,7 +2,7 @@
{ config, pkgs, lib, ... }:
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode? could be more granular
{ user = "git"; group = "gitea"; path = "/var/lib/gitea"; }
];
@@ -13,6 +13,10 @@
services.gitea.appName = "Perfectly Sane Git";
# services.gitea.disableRegistration = true;
services.gitea.database.createDatabase = false; #< silence warning which wants db user and name to be equal
# TODO: remove this after merge: <https://github.com/NixOS/nixpkgs/pull/268849>
services.gitea.database.socket = "/run/postgresql"; #< would have been set if createDatabase = true
# gitea doesn't create the git user
users.users.git = {
description = "Gitea Service";

View File

@@ -10,7 +10,7 @@
lib.mkIf false # i don't actively use ipfs anymore
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode? could be more granular
{ user = "261"; group = "261"; path = "/var/lib/ipfs"; }
];

View File

@@ -1,7 +1,7 @@
{ ... }:
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode? we only need this to save Indexer creds ==> migrate to config?
{ user = "root"; group = "root"; path = "/var/lib/jackett"; }
];

View File

@@ -40,7 +40,7 @@
description = "colin-jellyfin-https-lan";
};
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "jellyfin"; group = "jellyfin"; mode = "0700"; path = "/var/lib/jellyfin"; }
];
sane.fs."/var/lib/jellyfin/config/logging.json" = {

View File

@@ -4,7 +4,7 @@ let
inherit (svc-cfg) user group port stateDir;
in
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ inherit user group; mode = "0700"; path = stateDir; }
];

View File

@@ -1,6 +1,16 @@
# docs: <https://nixos.wiki/wiki/Matrix>
# docs: <https://nixos.org/manual/nixos/stable/index.html#module-services-matrix-synapse>
# example config: <https://github.com/matrix-org/synapse/blob/develop/docs/sample_config.yaml>
#
# ENABLING PUSH NOTIFICATIONS (with UnifiedPush/ntfy):
# - Matrix "pushers" API spec: <https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3pushersset>
# - first, view notification settings:
# - obtain your client's auth token. e.g. Element -> profile -> help/about -> access token.
# - `curl --header 'Authorization: Bearer <your_access_token>' localhost:8008/_matrix/client/v3/pushers | jq .`
# - enable a new notification destination:
# - `curl --header "Authorization: Bearer <your_access_token>" --data '{ "app_display_name": "<topic>", "app_id": "ntfy.uninsane.org", "data": { "url": "https://ntfy.uninsane.org/_matrix/push/v1/notify", "format": "event_id_only" }, "device_display_name": "<topic>", "kind": "http", "lang": "en-US", "profile_tag": "", "pushkey": "<topic>" }' localhost:8008/_matrix/client/v3/pushers/set`
# - delete a notification destination by setting `kind` to `null` (otherwise, request is identical to above)
#
{ config, lib, pkgs, ... }:
{
@@ -10,7 +20,7 @@
./signal.nix
];
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/matrix-synapse"; }
];
services.matrix-synapse.enable = true;
@@ -60,25 +70,23 @@
config.sops.secrets."matrix_synapse_secrets.yaml".path
];
# services.matrix-synapse.extraConfigFiles = [builtins.toFile "matrix-synapse-extra-config" ''
# admin_contact: "admin.matrix@uninsane.org"
# registrations_require_3pid:
# - email
# email:
# smtp_host: "mx.uninsane.org"
# smtp_port: 587
# smtp_user: "matrix-synapse"
# smtp_pass: "${secrets.matrix-synapse.smtp_pass}"
# require_transport_security: true
# enable_tls: true
# notif_from: "%(app)s <notify.matrix@uninsane.org>"
# app_name: "Uninsane Matrix"
# enable_notifs: true
# validation_token_lifetime: 96h
# invite_client_location: "https://web.matrix.uninsane.org"
# subjects:
# email_validation: "[%(server_name)s] Validate your email"
# ''];
systemd.services.matrix-synapse.postStart = ''
ACCESS_TOKEN=$(${pkgs.coreutils}/bin/cat ${config.sops.secrets.matrix_access_token.path})
TOPIC=$(${pkgs.coreutils}/bin/cat ${config.sops.secrets.ntfy-sh-topic.path})
echo "ensuring ntfy push gateway"
${pkgs.curl}/bin/curl \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--data "{ \"app_display_name\": \"ntfy-adapter\", \"app_id\": \"ntfy.uninsane.org\", \"data\": { \"url\": \"https://ntfy.uninsane.org/_matrix/push/v1/notify\", \"format\": \"event_id_only\" }, \"device_display_name\": \"ntfy-adapter\", \"kind\": \"http\", \"lang\": \"en-US\", \"profile_tag\": \"\", \"pushkey\": \"$TOPIC\" }" \
localhost:8008/_matrix/client/v3/pushers/set
echo "registered push gateways:"
${pkgs.curl}/bin/curl \
--header "Authorization: Bearer $ACCESS_TOKEN" \
localhost:8008/_matrix/client/v3/pushers \
| ${pkgs.jq}/bin/jq .
'';
# new users may be registered on the CLI:
# register_new_matrix_user -c /nix/store/8n6kcka37jhmi4qpd2r03aj71pkyh21s-homeserver.yaml http://localhost:8008
@@ -149,4 +157,9 @@
sops.secrets."matrix_synapse_secrets.yaml" = {
owner = config.users.users.matrix-synapse.name;
};
sops.secrets."matrix_access_token" = {
owner = config.users.users.matrix-synapse.name;
};
# provide access to ntfy-sh-topic secret
users.users.matrix-synapse.extraGroups = [ "ntfy-sh" ];
}

View File

@@ -5,7 +5,7 @@
# - recommended to use mautrix-discord: <https://github.com/NixOS/nixpkgs/pull/200462>
lib.mkIf false
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/mx-puppet-discord"; }
];

View File

@@ -101,7 +101,7 @@ in
})
];
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode?
{ user = "matrix-appservice-irc"; group = "matrix-appservice-irc"; path = "/var/lib/matrix-appservice-irc"; }
];

View File

@@ -2,7 +2,7 @@
# - <https://github.com/mautrix/signal/blob/master/mautrix_signal/example-config.yaml>
{ config, pkgs, ... }:
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "mautrix-signal"; group = "mautrix-signal"; path = "/var/lib/mautrix-signal"; }
{ user = "signald"; group = "signald"; path = "/var/lib/signald"; }
];

View File

@@ -0,0 +1,37 @@
# as of 2023/11/26: complete downloaded blockchain should be 200GiB on disk, give or take.
{ ... }:
{
sane.persist.sys.byStore.ext = [
# /var/lib/monero/lmdb is what consumes most of the space
{ user = "monero"; group = "monero"; path = "/var/lib/monero"; }
];
services.monero.enable = true;
services.monero.limits.upload = 5000; # in kB/s
services.monero.extraConfig = ''
# see: monero doc/ANONYMITY_NETWORKS.md
#
# "If any anonymity network is enabled, transactions being broadcast that lack a valid 'context'
# (i.e. the transaction did not come from a P2P connection) will only be sent to peers on anonymity networks."
#
# i think this means that setting tx-proxy here ensures any transactions sent locally to my node (via RPC)
# will be sent over an anonymity network.
tx-proxy=i2p,127.0.0.1:9000
tx-proxy=tor,127.0.0.1:9050
'';
services.i2p.enable = true;
# tor: `tor.enable` doesn't start a relay, exit node, proxy, etc. it's minimal.
# tor.client.enable configures a torsocks proxy, accessible *only* to localhost.
services.tor.enable = true;
services.tor.client.enable = true;
# monero ports: <https://monero.stackexchange.com/questions/604/what-ports-does-monero-use-rpc-p2p-etc>
# - 18080 = "P2P" monero node <-> monero node connections
# - 18081 = "RPC" monero client -> monero node connections
sane.ports.ports."18080" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
description = "colin-monero-p2p";
};
}

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "navidrome"; group = "navidrome"; path = "/var/lib/navidrome"; }
];
services.navidrome.enable = true;

View File

@@ -1,4 +1,5 @@
# docs: https://nixos.wiki/wiki/Nginx
# docs: <https://nixos.wiki/wiki/Nginx>
# docs: <https://nginx.org/en/docs/>
{ config, lib, pkgs, ... }:
let
@@ -133,7 +134,7 @@ in
security.acme.acceptTerms = true;
security.acme.defaults.email = "admin.acme@uninsane.org";
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode?
{ user = "acme"; group = "acme"; path = "/var/lib/acme"; }
{ user = "colin"; group = "users"; path = "/var/www/sites"; }

View File

@@ -0,0 +1,14 @@
# ntfy: UnifiedPush notification delivery system
# - used to get push notifications out of Matrix and onto a Phone (iOS, Android, or a custom client)
{ config, ... }:
{
imports = [
./ntfy-waiter.nix
./ntfy-sh.nix
];
sops.secrets."ntfy-sh-topic" = {
mode = "0440";
owner = config.users.users.ntfy-sh.name;
group = config.users.users.ntfy-sh.name;
};
}

View File

@@ -30,7 +30,7 @@ let
altPort = 2587;
in
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# not 100% necessary to persist this, but ntfy does keep a 12hr (by default) cache
# for pushing notifications to users who become offline.
# ACLs also live here.
@@ -61,12 +61,6 @@ in
${pkgs.ntfy-sh}/bin/ntfy access everyone "$topic" read-write
'';
sops.secrets."ntfy-sh-topic" = {
mode = "0440";
owner = config.users.users.ntfy-sh.name;
group = config.users.users.ntfy-sh.name;
};
services.nginx.virtualHosts."ntfy.uninsane.org" = {
forceSSL = true;

View File

@@ -0,0 +1,151 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ])" -p ntfy-sh
import argparse
import logging
import os
import socket
import subprocess
import sys
import threading
import time
logger = logging.getLogger(__name__)
LISTEN_QUEUE = 3
WAKE_MESSAGE = b'notification\n'
class Client:
def __init__(self, sock, addr_info, live_after: float):
self.live_after = live_after
self.sock = sock
self.addr_info = addr_info
def __cmp__(self, other: 'Client'):
return cmp(self.addr_info, other.addr_info)
def try_notify(self, message: bytes) -> bool:
"""
returns true if we send a packet to notify client.
fals otherwise (e.g. the socket is dead).
"""
ttl = self.live_after - time.time()
if ttl > 0:
logger.debug(f"sleeping {ttl:.2f}s until client {self.addr_info} is ready to receive notification")
time.sleep(ttl)
try:
self.sock.sendall(message)
except Exception as e:
logger.warning(f"failed to notify client {self.addr_info} {e}")
return False
else:
logger.info(f"successfully notified {self.addr_info}: {message}")
return True
class Adapter:
def __init__(self, host: str, port: int, silence: int, topic: str):
self.host = host
self.port = port
self.silence = silence
self.topic = topic
self.clients = set()
def log_clients(self):
clients_str = '\n'.join(f' {c.addr_info}' for c in self.clients)
logger.debug(f"clients alive ({len(self.clients)}):\n{clients_str}")
def add_client(self, client: Client):
# it's a little bit risky to keep more than one client at the same IP address,
# because it's possible a notification comes in and we ring the old connection,
# even when the new connection says "don't ring yet".
for c in set(self.clients):
if c.addr_info[0] == client.addr_info[0]:
logger.info(f"purging old client before adding new one at same address: {c.addr_info} -> {client.addr_info}")
self.clients.remove(c)
logger.info(f"accepted client at {client.addr_info}")
self.clients.add(client)
def listener_loop(self):
logger.info(f"listening for connections on {self.host}:{self.port}")
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((self.host, self.port))
s.listen(LISTEN_QUEUE)
while True:
conn, addr_info = s.accept()
self.add_client(Client(conn, addr_info, live_after = time.time() + self.silence))
def notify_clients(self, message: bytes = WAKE_MESSAGE):
# notify every client, and drop any which have disconnected.
# note that we notify based on age (oldest -> youngest)
# because notifying young clients might entail sleeping until they're ready.
clients = sorted(self.clients, key=lambda c: (c.live_after, c.addr_info))
dead_clients = [
c for c in clients if not c.try_notify(message)
]
for c in dead_clients:
self.clients.remove(c)
self.log_clients()
def notify_loop(self):
logger.info("waiting for notification events")
ntfy_proc = subprocess.Popen(
[
"ntfy",
"sub",
f"https://ntfy.uninsane.org/{self.topic}"
],
stdout=subprocess.PIPE
)
for line in iter(ntfy_proc.stdout.readline, b''):
logger.debug(f"received notification: {line}")
self.notify_clients()
def get_topic() -> str:
return open('/run/secrets/ntfy-sh-topic', 'rt').read().strip()
def run_forever(callable):
try:
callable()
except Exception as e:
logger.error(f"{callable} failed: {e}")
else:
logger.error(f"{callable} unexpectedly returned")
# sys.exit(1)
os._exit(1) # sometimes `sys.exit()` doesn't actually exit...
def main():
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
parser = argparse.ArgumentParser(description="accept connections and notify the other end upon ntfy activity, with a guaranteed amount of silence")
parser.add_argument('--verbose', action='store_true')
parser.add_argument('--host', type=str, default='')
parser.add_argument('--port', type=int)
parser.add_argument('--silence', type=int, help="number of seconds to remain silent upon accepting a connection")
args = parser.parse_args()
if args.verbose:
logging.getLogger().setLevel(logging.DEBUG)
else:
logging.getLogger().setLevel(logging.INFO)
adapter = Adapter(args.host, args.port, args.silence, get_topic())
listener_loop = threading.Thread(target=run_forever, name="listener_loop", args=(adapter.listener_loop,))
notify_loop = threading.Thread(target=run_forever, name="notify_loop", args=(adapter.notify_loop,))
# TODO: this method of exiting seems to sometimes leave the listener behind (?)
# preventing anyone else from re-binding the port.
listener_loop.start()
notify_loop.start()
listener_loop.join()
notify_loop.join()
if __name__ == '__main__':
main()

View File

@@ -0,0 +1,72 @@
# service which adapts ntfy-sh into something suitable specifically for the Pinephone's
# wake-on-lan (WoL) feature.
# notably, it provides a mechanism by which the caller can be confident of an interval in which
# zero traffic will occur on the TCP connection, thus allowing it to enter sleep w/o fear of hitting
# race conditions in the Pinephone WoL feature.
{ config, lib, pkgs, ... }:
let
cfg = config.sane.ntfy-waiter;
portLow = 5550;
portHigh = 5559;
portRange = lib.range portLow portHigh;
numPorts = portHigh - portLow + 1;
mkService = port: let
silence = port - portLow;
flags = lib.optional cfg.verbose "--verbose";
cli = [
"${cfg.package}/bin/ntfy-waiter"
"--port"
"${builtins.toString port}"
"--silence"
"${builtins.toString silence}"
] ++ flags;
in {
"ntfy-waiter-${builtins.toString silence}" = {
# TODO: run not as root (e.g. as ntfy-sh)
description = "wait for notification, with ${builtins.toString silence} seconds of guaranteed silence";
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = "5s";
ExecStart = lib.concatStringsSep " " cli;
};
after = [ "network.target" ];
wantedBy = [ "default.target" ];
};
};
in
{
options = with lib; {
sane.ntfy-waiter.enable = mkOption {
type = types.bool;
default = true;
};
sane.ntfy-waiter.verbose = mkOption {
type = types.bool;
default = true;
};
sane.ntfy-waiter.package = mkOption {
type = types.package;
default = pkgs.static-nix-shell.mkPython3Bin {
pname = "ntfy-waiter";
src = ./.;
pkgs = [ "ntfy-sh" ];
};
description = ''
exposed to provide an attr-path by which one may build the package for manual testing.
'';
};
};
config = lib.mkIf cfg.enable {
sane.ports.ports = lib.mkMerge (lib.forEach portRange (port: {
"${builtins.toString port}" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-notification-waiter-${builtins.toString (port+1)}-of-${builtins.toString numPorts}";
};
}));
systemd.services = lib.mkMerge (builtins.map mkService portRange);
};
}

View File

@@ -5,7 +5,7 @@ let
cfg = config.services.pict-rs;
in
{
sane.persist.sys.plaintext = lib.mkIf cfg.enable [
sane.persist.sys.byStore.plaintext = lib.mkIf cfg.enable [
{ user = "pict-rs"; group = "pict-rs"; path = cfg.dataDir; }
];

View File

@@ -14,7 +14,7 @@ let
# logLevel = "debug";
in
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
{ user = "pleroma"; group = "pleroma"; path = "/var/lib/pleroma"; }
];
services.pleroma.enable = true;

View File

@@ -6,7 +6,7 @@ let
KiB = n: 1024*n;
in
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode?
{ user = "postgres"; group = "postgres"; path = "/var/lib/postgresql"; }
];

View File

@@ -1,81 +0,0 @@
# example configs:
# - <https://github.com/kittywitch/nixfiles/blob/main/services/prosody.nix>
# create users with:
# - `sudo -u prosody prosodyctl adduser colin@uninsane.org`
{ lib, ... }:
# XXX disabled: doesn't send messages to nixnet.social (only receives them).
# nixnet runs ejabberd, so revisiting that.
lib.mkIf false
{
sane.persist.sys.plaintext = [
{ user = "prosody"; group = "prosody"; path = "/var/lib/prosody"; }
];
sane.ports.ports."5222" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-client-to-server";
};
sane.ports.ports."5269" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
description = "colin-xmpp-server-to-server";
};
sane.ports.ports."5280" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-bosh";
};
sane.ports.ports."5281" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-prosody-https"; # necessary?
};
# provide access to certs
users.users.prosody.extraGroups = [ "nginx" ];
security.acme.certs."uninsane.org".extraDomainNames = [
"conference.xmpp.uninsane.org"
"upload.xmpp.uninsane.org"
];
services.prosody = {
enable = true;
admins = [ "colin@uninsane.org" ];
# allowRegistration = false;
# extraConfig = ''
# s2s_require_encryption = true
# c2s_require_encryption = true
# '';
extraModules = [ "private" "vcard" "privacy" "compression" "component" "muc" "pep" "adhoc" "lastactivity" "admin_adhoc" "blocklist"];
ssl.cert = "/var/lib/acme/uninsane.org/fullchain.pem";
ssl.key = "/var/lib/acme/uninsane.org/key.pem";
muc = [
{
domain = "conference.xmpp.uninsane.org";
}
];
uploadHttp.domain = "upload.xmpp.uninsane.org";
virtualHosts = {
localhost = {
domain = "localhost";
enabled = true;
};
"xmpp.uninsane.org" = {
domain = "uninsane.org";
enabled = true;
ssl.cert = "/var/lib/acme/uninsane.org/fullchain.pem";
ssl.key = "/var/lib/acme/uninsane.org/key.pem";
};
};
};
}

View File

@@ -0,0 +1,289 @@
# example configs:
# - official: <https://prosody.im/doc/example_config>
# - nixos: <https://github.com/kittywitch/nixfiles/blob/main/services/prosody.nix>
# config options:
# - <https://prosody.im/doc/configure>
#
# modules:
# - main: <https://prosody.im/doc/modules>
# - community: <https://modules.prosody.im/index.html>
#
# debugging:
# - logging:
# - enable `stanza_debug` module
# - enable `log.debug = "*syslog"` in extraConfig
# - interactive:
# - `telnet localhost 5582` (this is equal to `prosodyctl shell` -- but doesn't hang)
# - `watch:stanzas(target_spec, filter)` -> to log stanzas, for version > 0.12
# - console docs: <https://prosody.im/doc/console>
# - can modify/inspect arbitrary internals (lua) by prefixing line with `> `
# - e.g. `> _G` to print all globals
#
# sanity checks:
# - `sudo -u prosody -g prosody prosodyctl check connectivity`
# - `sudo -u prosody -g prosody prosodyctl check turn`
# - `sudo -u prosody -g prosody prosodyctl check turn -v --ping=stun.conversations.im`
# - checks that my stun/turn server is usable by clients of conversations.im (?)
# - `sudo -u prosody -g prosody prosodyctl check` (dns, config, certs)
#
#
# create users with:
# - `sudo -u prosody prosodyctl adduser colin@uninsane.org`
#
#
# federation/support matrix:
# - nixnet.services (runs ejabberd):
# - WORKS: sending and receiving PMs and calls (2023/10/15)
# - N.B.: it didn't originally work; was solved by disabling the lua-unbound DNS option & forcing the system/local resolver
# - cheogram (XMPP <-> SMS gateway):
# - WORKS: sending and receiving PMs, images (2023/10/15)
# - PARTIAL: calls (xmpp -> tel works; tel -> xmpp fails)
# - maybe i need to setup stun/turn
#
# TODO:
# - enable push notifications (mod_cloud_notify)
# - optimize coturn (e.g. move off of the VPN!)
# - ensure muc is working
# - enable file uploads
# - "upload.xmpp.uninsane.org:http_upload: URL: <https://upload.xmpp.uninsane.org:5281/upload> - Ensure this can be reached by users"
# - disable or fix bosh (jabber over http):
# - "certmanager: No certificate/key found for client_https port 0"
{ lib, pkgs, ... }:
let
# enables very verbose logging
enableDebug = false;
in
{
sane.persist.sys.byStore.plaintext = [
{ user = "prosody"; group = "prosody"; path = "/var/lib/prosody"; }
];
sane.ports.ports."5000" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-prosody-fileshare-proxy65";
};
sane.ports.ports."5222" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-client-to-server";
};
sane.ports.ports."5223" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpps-client-to-server"; # XMPP over TLS
};
sane.ports.ports."5269" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
description = "colin-xmpp-server-to-server";
};
sane.ports.ports."5270" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
description = "colin-xmpps-server-to-server"; # XMPP over TLS
};
sane.ports.ports."5280" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-bosh";
};
sane.ports.ports."5281" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-prosody-https"; # necessary?
};
users.users.prosody.extraGroups = [
"nginx" # provide access to certs
"ntfy-sh" # access to secret ntfy topic
];
security.acme.certs."uninsane.org".extraDomainNames = [
"xmpp.uninsane.org"
"conference.xmpp.uninsane.org"
"upload.xmpp.uninsane.org"
];
# exists so the XMPP server's cert can obtain altNames for all its resources
services.nginx.virtualHosts."xmpp.uninsane.org" = {
useACMEHost = "uninsane.org";
};
services.nginx.virtualHosts."conference.xmpp.uninsane.org" = {
useACMEHost = "uninsane.org";
};
services.nginx.virtualHosts."upload.xmpp.uninsane.org" = {
useACMEHost = "uninsane.org";
};
sane.dns.zones."uninsane.org".inet = {
# XXX: SRV records have to point to something with a A/AAAA record; no CNAMEs
A."xmpp" = "%ANATIVE%";
CNAME."conference.xmpp" = "xmpp";
CNAME."upload.xmpp" = "xmpp";
# _Service._Proto.Name TTL Class SRV Priority Weight Port Target
# - <https://xmpp.org/extensions/xep-0368.html>
# something's requesting the SRV records for conference.xmpp, so let's include it
# nothing seems to request XMPP SRVs for the other records (except @)
# lower numerical priority field tells clients to prefer this method
SRV."_xmpps-client._tcp.conference.xmpp" = "3 50 5223 xmpp";
SRV."_xmpps-server._tcp.conference.xmpp" = "3 50 5270 xmpp";
SRV."_xmpp-client._tcp.conference.xmpp" = "5 50 5222 xmpp";
SRV."_xmpp-server._tcp.conference.xmpp" = "5 50 5269 xmpp";
SRV."_xmpps-client._tcp" = "3 50 5223 xmpp";
SRV."_xmpps-server._tcp" = "3 50 5270 xmpp";
SRV."_xmpp-client._tcp" = "5 50 5222 xmpp";
SRV."_xmpp-server._tcp" = "5 50 5269 xmpp";
};
# help Prosody find its certificates.
# pointing it to /var/lib/acme doesn't quite work because it expects the private key
# to be named `privkey.pem` instead of acme's `key.pem`
# <https://prosody.im/doc/certificates#automatic_location>
sane.fs."/etc/prosody/certs/uninsane.org/fullchain.pem" = {
symlink.target = "/var/lib/acme/uninsane.org/fullchain.pem";
wantedBeforeBy = [ "prosody.service" ];
};
sane.fs."/etc/prosody/certs/uninsane.org/privkey.pem" = {
symlink.target = "/var/lib/acme/uninsane.org/key.pem";
wantedBeforeBy = [ "prosody.service" ];
};
services.prosody = {
enable = true;
package = pkgs.prosody.override {
# XXX(2023/10/15): build without lua-unbound support.
# this forces Prosody to fall back to the default Lua DNS resolver, which seems more reliable.
# fixes errors like "unbound.queryXYZUV: Resolver error: out of memory"
# related: <https://issues.prosody.im/1737#comment-11>
lua.withPackages = selector: pkgs.lua.withPackages (p:
selector (p // { luaunbound = null; })
);
# withCommunityModules = [ "turncredentials" ];
};
admins = [ "colin@uninsane.org" ];
# allowRegistration = false; # defaults to false
muc = [
{
domain = "conference.xmpp.uninsane.org";
}
];
uploadHttp.domain = "upload.xmpp.uninsane.org";
virtualHosts = {
# "Prosody requires at least one enabled VirtualHost to function. You can
# safely remove or disable 'localhost' once you have added another."
# localhost = {
# domain = "localhost";
# enabled = true;
# };
"xmpp.uninsane.org" = {
domain = "uninsane.org";
enabled = true;
};
};
## modules:
# these are enabled by default, via <repo:nixos/nixpkgs:/pkgs/servers/xmpp/prosody/default.nix>
# - cloud_notify
# - http_upload
# - vcard_muc
# these are enabled by the module defaults (services.prosody.modules.<foo>)
# - admin_adhoc
# - blocklist
# - bookmarks
# - carbons
# - cloud_notify
# - csi
# - dialback
# - disco
# - http_files
# - mam
# - pep
# - ping
# - private
# - XEP-0049: let clients store arbitrary (private) data on the server
# - proxy65
# - XEP-0065: allow server to proxy file transfers between two clients who are behind NAT
# - register
# - roster
# - saslauth
# - smacks
# - time
# - tls
# - uptime
# - vcard_legacy
# - version
extraPluginPaths = [ ./modules ];
extraModules = [
# admin_shell: allows `prosodyctl shell` to work
# see: <https://prosody.im/doc/modules/mod_admin_shell>
# see: <https://prosody.im/doc/console>
"admin_shell"
"admin_telnet" #< needed by admin_shell
# lastactivity: XEP-0012: allow users to query how long another user has been idle for
# - not sure why i enabled this; think it was in someone's config i referenced
"lastactivity"
# allows prosody to share TURN/STUN secrets with XMPP clients to provide them access to the coturn server.
# see: <https://prosody.im/doc/coturn>
"turn_external"
# legacy coturn integration
# see: <https://modules.prosody.im/mod_turncredentials.html>
# "turncredentials"
"sane_ntfy"
] ++ lib.optionals enableDebug [
"stanza_debug" #< logs EVERY stanza as debug: <https://prosody.im/doc/modules/mod_stanza_debug>
];
extraConfig = ''
local function readAll(file)
local f = assert(io.open(file, "rb"))
local content = f:read("*all")
f:close()
-- remove trailing newline
return string.gsub(content, "%s+", "")
end
-- logging docs:
-- - <https://prosody.im/doc/logging>
-- - <https://prosody.im/doc/advanced_logging>
-- levels: debug, info, warn, error
log = {
${if enableDebug then "debug" else "info"} = "*syslog";
}
-- see: <https://prosody.im/doc/certificates#automatic_location>
-- try to solve: "certmanager: Error indexing certificate directory /etc/prosody/certs: cannot open /etc/prosody/certs: No such file or directory"
-- only, this doesn't work because prosody doesn't like acme's naming scheme
-- certificates = "/var/lib/acme"
c2s_direct_tls_ports = { 5223 }
s2s_direct_tls_ports = { 5270 }
turn_external_host = "turn.uninsane.org"
turn_external_secret = readAll("/var/lib/coturn/shared_secret.bin")
-- turn_external_user = "prosody"
-- legacy mod_turncredentials integration
-- turncredentials_host = "turn.uninsane.org"
-- turncredentials_secret = readAll("/var/lib/coturn/shared_secret.bin")
ntfy_binary = "${pkgs.ntfy-sh}/bin/ntfy"
ntfy_topic = readAll("/run/secrets/ntfy-sh-topic")
-- s2s_require_encryption = true
-- c2s_require_encryption = true
'';
};
}

View File

@@ -0,0 +1,52 @@
-- simple proof-of-concept Prosody module
-- module development guide: <https://prosody.im/doc/developers/modules>
-- module API docs: <https://prosody.im/doc/developers/moduleapi>
--
-- much of this code is lifted from Prosody's own `mod_cloud_notify`
local jid = require"util.jid";
local ntfy = module:get_option_string("ntfy_binary", "ntfy");
local ntfy_topic = module:get_option_string("ntfy_topic", "xmpp");
module:log("info", "initialized");
local function is_urgent(stanza)
if stanza.name == "message" then
if stanza:get_child("propose", "urn:xmpp:jingle-message:0") then
return true, "jingle call";
end
end
end
local function publish_ntfy(message)
-- message should be the message to publish
local ntfy_url = string.format("https://ntfy.uninsane.org/%s", ntfy_topic)
local cmd = string.format("%s pub %q %q", ntfy, ntfy_url, message)
module.log("debug", "invoking ntfy: %s", cmd)
local success, reason, code = os.execute(cmd)
if not success then
module:log("warn", "ntfy failed: %s => %s %d", cmd, reason, code)
end
end
local function archive_message_added(event)
-- event is: { origin = origin, stanza = stanza, for_user = store_user, id = id }
local stanza = event.stanza;
local to = stanza.attr.to;
to = to and jid.split(to) or event.origin.username;
-- only notify if the stanza destination is the mam user we store it for
if event.for_user == to then
local is_urgent_stanza, urgent_reason = is_urgent(event.stanza);
if is_urgent_stanza then
module:log("info", "urgent push for %s (%s)", to, urgent_reason);
publish_ntfy(urgent_reason)
end
end
end
module:hook("archive-message-added", archive_message_added);

View File

@@ -0,0 +1,74 @@
# Soulseek daemon (p2p file sharing with an emphasis on Music)
# docs: <https://github.com/slskd/slskd/blob/master/docs/config.md>
#
# config precedence (higher precedence overrules lower precedence):
# - Default Values < Environment Variables < YAML Configuraiton File < Command Line Arguments
{ config, lib, ... }:
{
sane.persist.sys.byStore.plaintext = [
{ user = "slskd"; group = "slskd"; path = "/var/lib/slskd"; }
];
sops.secrets."slskd_env" = {
owner = config.users.users.slskd.name;
mode = "0400";
};
users.users.slskd.extraGroups = [ "media" ];
sane.ports.ports."50000" = {
protocol = [ "tcp" ];
# not visible to WAN: i run this in a separate netns
visibleTo.ovpn = true;
description = "colin-soulseek";
};
sane.dns.zones."uninsane.org".inet.CNAME."soulseek" = "native";
services.nginx.virtualHosts."soulseek.uninsane.org" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://10.0.1.6:5001";
proxyWebsockets = true;
};
};
services.slskd.enable = true;
# env file, for auth (SLSKD_SLSK_PASSWORD, SLSKD_SLSK_USERNAME)
services.slskd.environmentFile = config.sops.secrets.slskd_env.path;
services.slskd.settings = {
soulseek.diagnostic_level = "Debug"; # one of "None"|"Warning"|"Info"|"Debug"
shares.directories = [
# folders to share
# syntax: <https://github.com/slskd/slskd/blob/master/docs/config.md#directories>
# [Alias]/path/on/disk
# NOTE: Music library is quick to scan; videos take a solid 10min to scan.
# TODO: re-enable the other libraries
# "[Audioooks]/var/lib/uninsane/media/Books/Audiobooks"
# "[Books]/var/lib/uninsane/media/Books/Books"
# "[Manga]/var/lib/uninsane/media/Books/Visual"
# "[games]/var/lib/uninsane/media/games"
"[Music]/var/lib/uninsane/media/Music"
# "[Film]/var/lib/uninsane/media/Videos/Film"
# "[Shows]/var/lib/uninsane/media/Videos/Shows"
];
# directories.downloads = "..." # TODO
# directories.incomplete = "..." # TODO
# what unit is this? kbps??
global.upload.speed_limit = 32000;
web.logging = true;
debug = true;
flags.no_logo = true; # don't show logo at start
# flags.volatile = true; # store searches and active transfers in RAM (completed transfers still go to disk). rec for btrfs/zfs
};
systemd.services.slskd = {
serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
Restart = "on-failure";
RestartSec = "30s";
Group = "media";
};
};
}

View File

@@ -1,7 +1,7 @@
{ config, pkgs, ... }:
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode? we need this specifically for the stats tracking in .config/
{ user = "transmission"; group = config.users.users.transmission.group; path = "/var/lib/transmission"; }
];
@@ -91,5 +91,10 @@
};
sane.dns.zones."uninsane.org".inet.CNAME."bt" = "native";
sane.ports.ports."51413" = {
protocol = [ "tcp" "udp" ];
visibleTo.ovpn = true;
description = "colin-bittorrent";
};
}

View File

@@ -11,12 +11,15 @@ in lib.mkMerge [
# don't bind to IPv6 until i explicitly test that stack
services.trust-dns.settings.listen_addrs_ipv6 = [];
services.trust-dns.quiet = true;
# FIXME(2023/11/26): services.trust-dns.debug doesn't log requests: use RUST_LOG=debug env for that.
# - see: <https://github.com/hickory-dns/hickory-dns/issues/2082>
# services.trust-dns.debug = true;
sane.ports.ports."53" = {
protocol = [ "udp" "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
visibleTo.ovpn = true;
description = "colin-dns-hosting";
};
@@ -145,11 +148,12 @@ in lib.mkMerge [
-e s/%CNAMENATIVE%/servo.${flavor}/ \
-e s/%ANATIVE%/${anative}/ \
-e s/%AWAN%/$wan/ \
-e s/%AOVPNS%/185.157.162.178/ \
${zoneTemplate} > ${zoneFor flavor}
'';
serviceConfig = config.systemd.services.trust-dns.serviceConfig // {
ExecStart = ''
${pkgs.trust-dns}/bin/trust-dns \
${pkgs.trust-dns}/bin/${pkgs.trust-dns.meta.mainProgram} \
--port ${builtins.toString port} \
--zonedir ${zoneDirFor flavor}/ \
--config ${configFile} ${flagsStr}

View File

@@ -5,6 +5,7 @@
./fs.nix
./hardware
./home
./hostnames.nix
./hosts.nix
./ids.nix
./machine-id.nix
@@ -21,25 +22,54 @@
sane.nixcache.enable-trusted-keys = true;
sane.nixcache.enable = lib.mkDefault true;
sane.persist.enable = lib.mkDefault true;
sane.root-on-tmpfs = lib.mkDefault true;
sane.programs.sysadminUtils.enableFor.system = lib.mkDefault true;
sane.programs.consoleUtils.enableFor.user.colin = lib.mkDefault true;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowBroken = true; # NIXPKGS_ALLOW_BROKEN
nixpkgs.config.allowUnfree = true; # NIXPKGS_ALLOW_UNFREE=1
nixpkgs.config.allowBroken = true; # NIXPKGS_ALLOW_BROKEN=1
# time.timeZone = "America/Los_Angeles";
time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone
# allow `nix flake ...` command
# TODO: is this still required?
nix.extraOptions = ''
# see: `man nix.conf`
# useful when a remote builder has a faster internet connection than me
builders-use-substitutes = true # default: false
# maximum seconds to wait when connecting to binary substituter
connect-timeout = 3 # default: 0
# download-attempts = 5 # default: 5
# allow `nix flake ...` command
experimental-features = nix-command flakes
# whether to build from source when binary substitution fails
fallback = true # default: false
# whether to keep building dependencies if any other one fails
keep-going = true # default: false
# whether to keep build-only dependencies of GC roots (e.g. C compiler) when doing GC
keep-outputs = true # default: false
# how many lines to show from failed build
log-lines = 30 # default: 10
# narinfo-cache-negative-ttl = 3600 # default: 3600
# whether to use ~/.local/state/nix/profile instead of ~/.nix-profile, etc
use-xdg-base-directories = true # default: false
# whether to warn if repository has uncommited changes
warn-dirty = false # default: true
'';
# hardlinks identical files in the nix store to save 25-35% disk space.
# unclear _when_ this occurs. it's not a service.
# does the daemon continually scan the nix store?
# does the builder use some content-addressed db to efficiently dedupe?
nix.settings.auto-optimise-store = true;
# TODO: see if i can remove this?
nix.settings.trusted-users = [ "root" ];
services.journald.extraConfig = ''
# docs: `man journald.conf`
# merged journald config is deployed to /etc/systemd/journald.conf
[Journal]
# disable journal compression because the underlying fs is compressed
Compress=no
'';
systemd.services.nix-daemon.serviceConfig = {
# the nix-daemon manages nix builders

View File

@@ -57,84 +57,57 @@ let
};
podcasts = [
(fromDb "lexfridman.com/podcast" // rat)
## Astral Codex Ten
(fromDb "sscpodcast.libsyn.com" // rat)
## Less Wrong Curated
(fromDb "feeds.libsyn.com/421877" // rat)
## Econ Talk
(fromDb "feeds.simplecast.com/wgl4xEgL" // rat)
## Cory Doctorow -- both podcast & text entries
(fromDb "craphound.com" // pol)
## Maggie Killjoy -- referenced by Cory Doctorow
(fromDb "omny.fm/shows/cool-people-who-did-cool-stuff" // pol)
## also Maggie Killjoy
(fromDb "feeds.megaphone.fm/behindthebastards" // pol)
## Jennifer Briney
(fromDb "congressionaldish.libsyn.com" // pol)
(fromDb "werenotwrong.fireside.fm" // pol)
(fromDb "politicalorphanage.libsyn.com" // pol)
# (mkPod "https://podcasts.la.utexas.edu/this-is-democracy/feed/podcast/" // pol // weekly)
## Civboot -- https://anchor.fm/civboot
(fromDb "anchor.fm/s/34c7232c/podcast/rss" // tech)
## Emerge: making sense of what's next -- <https://www.whatisemerging.com/emergepodcast>
(mkPod "https://anchor.fm/s/21bc734/podcast/rss" // pol // infrequent)
(fromDb "feeds.feedburner.com/80000HoursPodcast" // rat)
## Daniel Huberman on sleep
(fromDb "feeds.megaphone.fm/hubermanlab" // uncat)
## Multidisciplinary Association for Psychedelic Studies
(fromDb "mapspodcast.libsyn.com" // uncat)
(fromDb "acquiredlpbonussecretsecret.libsyn.com" // tech) # ACQ2 - more "Acquired" episodes
(fromDb "allinchamathjason.libsyn.com" // pol)
(fromDb "feeds.transistor.fm/acquired" // tech)
## ACQ2 - more "Acquired" episodes
(fromDb "acquiredlpbonussecretsecret.libsyn.com" // tech)
# The Intercept - Deconstructed
(fromDb "rss.acast.com/deconstructed")
# (fromDb "rss.prod.firstlook.media/deconstructed/podcast.rss" // pol) #< possible URL rot
## The Daily
(mkPod "https://feeds.simplecast.com/54nAGcIl" // pol // daily)
# The Intercept - Intercepted
(fromDb "rss.acast.com/intercepted-with-jeremy-scahill")
# (fromDb "rss.prod.firstlook.media/intercepted/podcast.rss" // pol) #< possible URL rot
(fromDb "podcast.posttv.com/itunes/post-reports.xml" // pol)
## Eric Weinstein
(fromDb "rss.art19.com/the-portal" // rat)
(fromDb "darknetdiaries.com" // tech)
## Radiolab -- also available here, but ONLY OVER HTTP: <http://feeds.wnyc.org/radiolab>
(fromDb "feeds.feedburner.com/radiolab" // pol)
## Sam Harris
(fromDb "wakingup.libsyn.com" // pol)
## 99% Invisible -- also available here: <https://feeds.simplecast.com/BqbsxVfO>
(fromDb "feeds.99percentinvisible.org/99percentinvisible" // pol)
(fromDb "rss.acast.com/ft-tech-tonic" // tech)
(fromDb "feeds.feedburner.com/dancarlin/history" // rat)
(fromDb "rss.art19.com/60-minutes" // pol)
## The Verge - Decoder
(fromDb "feeds.megaphone.fm/recodedecode" // tech)
## Matrix (chat) Live
(fromDb "feed.podbean.com/matrixlive/feed.xml" // tech)
(fromDb "anchor.fm/s/34c7232c/podcast/rss" // tech) # Civboot -- https://anchor.fm/civboot
(fromDb "cast.postmarketos.org" // tech)
(fromDb "congressionaldish.libsyn.com" // pol) # Jennifer Briney
(fromDb "craphound.com" // pol) # Cory Doctorow -- both podcast & text entries
(fromDb "darknetdiaries.com" // tech)
(fromDb "feed.podbean.com/matrixlive/feed.xml" // tech) # Matrix (chat) Live
(fromDb "feeds.99percentinvisible.org/99percentinvisible" // pol) # 99% Invisible -- also available here: <https://feeds.simplecast.com/BqbsxVfO>
(fromDb "feeds.feedburner.com/80000HoursPodcast" // rat)
(fromDb "feeds.feedburner.com/dancarlin/history" // rat)
(fromDb "feeds.feedburner.com/radiolab" // pol) # Radiolab -- also available here, but ONLY OVER HTTP: <http://feeds.wnyc.org/radiolab>
(fromDb "feeds.libsyn.com/421877" // rat) # Less Wrong Curated
(fromDb "feeds.megaphone.fm/behindthebastards" // pol) # also Maggie Killjoy
(fromDb "feeds.megaphone.fm/hubermanlab" // uncat) # Daniel Huberman on sleep
(fromDb "feeds.megaphone.fm/recodedecode" // tech) # The Verge - Decoder
(fromDb "feeds.simplecast.com/54nAGcIl" // pol) # The Daily
(fromDb "feeds.simplecast.com/82FI35Px" // pol) # Ezra Klein Show
(fromDb "feeds.simplecast.com/wgl4xEgL" // rat) # Econ Talk
(fromDb "feeds.simplecast.com/xKJ93w_w" // uncat) # Atlas Obscura
(fromDb "feeds.simplecast.com/l2i9YnTd" // tech // pol) # Hard Fork (NYtimes tech)
(fromDb "feeds.transistor.fm/acquired" // tech)
(fromDb "lexfridman.com/podcast" // rat)
(fromDb "mapspodcast.libsyn.com" // uncat) # Multidisciplinary Association for Psychedelic Studies
(fromDb "omegataupodcast.net" // tech) # 3/4 German; 1/4 eps are English
(fromDb "omny.fm/shows/cool-people-who-did-cool-stuff" // pol) # Maggie Killjoy -- referenced by Cory Doctorow
(fromDb "podcast.posttv.com/itunes/post-reports.xml" // pol)
(fromDb "podcast.thelinuxexp.com" // tech)
## Michael Malice - Your Welcome -- also available here: <https://origin.podcastone.com/podcast?categoryID2=2232>
# (fromDb "rss.art19.com/your-welcome" // pol)
(fromDb "politicalorphanage.libsyn.com" // pol)
(fromDb "reverseengineering.libsyn.com/rss" // tech) # UnNamed Reverse Engineering Podcast
(fromDb "rss.acast.com/deconstructed") # The Intercept - Deconstructed
(fromDb "rss.acast.com/ft-tech-tonic" // tech)
(fromDb "rss.acast.com/intercepted-with-jeremy-scahill") # The Intercept - Intercepted
(fromDb "rss.art19.com/60-minutes" // pol)
(fromDb "rss.art19.com/the-portal" // rat) # Eric Weinstein
(fromDb "seattlenice.buzzsprout.com" // pol)
## Sci-Fi? has Peter Watts; author of No Moods, Ads or Cutesy Fucking Icons (rifters.com)
(fromDb "talesfromthebridge.buzzsprout.com" // tech)
## UnNamed Reverse Engineering Podcast
(fromDb "reverseengineering.libsyn.com/rss" // tech)
## The Witch Trials of J.K. Rowling
## - <https://www.thefp.com/witchtrials>
(mkPod "https://feeds.megaphone.fm/RUNMED9919162779" // pol // infrequent)
## Atlas Obscura
(fromDb "feeds.simplecast.com/xKJ93w_w" // uncat)
## Ezra Klein Show
(fromDb "feeds.simplecast.com/82FI35Px" // pol)
## Wireshark Podcast o_0
(fromDb "sharkbytes.transistor.fm" // tech)
## 3/4 German; 1/4 eps are English
(fromDb "omegataupodcast.net" // tech)
## Lateral with Tom Scott
(mkPod "https://audioboom.com/channels/5097784.rss" // tech)
(fromDb "sharkbytes.transistor.fm" // tech) # Wireshark Podcast o_0
(fromDb "sscpodcast.libsyn.com" // rat) # Astral Codex Ten
(fromDb "talesfromthebridge.buzzsprout.com" // tech) # Sci-Fi? has Peter Watts; author of No Moods, Ads or Cutesy Fucking Icons (rifters.com)
(fromDb "techwontsave.us" // pol) # rec by Cory Doctorow
# (fromDb "trashfuturepodcast.podbean.com" // pol) # rec by Cory Doctorow, but way rambly
(fromDb "wakingup.libsyn.com" // pol) # Sam Harris
(fromDb "werenotwrong.fireside.fm" // pol)
# (fromDb "rss.art19.com/your-welcome" // pol) # Michael Malice - Your Welcome -- also available here: <https://origin.podcastone.com/podcast?categoryID2=2232>
# (fromDb "rss.prod.firstlook.media/deconstructed/podcast.rss" // pol) #< possible URL rot
# (fromDb "rss.prod.firstlook.media/intercepted/podcast.rss" // pol) #< possible URL rot
# (mkPod "https://anchor.fm/s/21bc734/podcast/rss" // pol // infrequent) # Emerge: making sense of what's next -- <https://www.whatisemerging.com/emergepodcast>
# (mkPod "https://audioboom.com/channels/5097784.rss" // tech) # Lateral with Tom Scott
# (mkPod "https://feeds.megaphone.fm/RUNMED9919162779" // pol // infrequent) # The Witch Trials of J.K. Rowling: <https://www.thefp.com/witchtrials>
# (mkPod "https://podcasts.la.utexas.edu/this-is-democracy/feed/podcast/" // pol // weekly)
];
texts = [
@@ -164,10 +137,12 @@ let
# DEVELOPERS
(fromDb "blog.jmp.chat" // tech)
(fromDb "uninsane.org" // tech)
(fromDb "blog.thalheim.io" // tech) # Mic92
(fromDb "ascii.textfiles.com" // tech) # Jason Scott
(fromDb "xn--gckvb8fzb.com" // tech)
(fromDb "amosbbatto.wordpress.com" // tech)
(fromDb "fasterthanli.me" // tech)
(fromDb "jeffgeerling.com" // tech)
(fromDb "mg.lol" // tech)
# (fromDb "drewdevault.com" // tech)
## Ken Shirriff
@@ -178,6 +153,7 @@ let
(fromDb "vitalik.ca" // tech)
## ian (Sanctuary)
(fromDb "sagacioussuricata.com" // tech)
(fromDb "artemis.sh" // tech)
## Bunnie Juang
(fromDb "bunniestudios.com" // tech)
(fromDb "blog.danieljanus.pl" // tech)
@@ -188,6 +164,8 @@ let
(mkText "https://anish.lakhwara.com/home.html" // tech // weekly)
(fromDb "jefftk.com" // tech)
(fromDb "pomeroyb.com" // tech)
(fromDb "harihareswara.net" // tech // pol) # rec by Cory Doctorow
(fromDb "mako.cc/copyrighteous" // tech // pol) # rec by Cory Doctorow
# (mkText "https://til.simonwillison.net/tils/feed.atom" // tech // weekly)
# TECH PROJECTS

View File

@@ -9,8 +9,20 @@
# useful emergency utils
boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.btrfs-progs}/bin/btrfstune
copy_bin_and_libs ${pkgs.util-linux}/bin/{cfdisk,lsblk,lscpu}
copy_bin_and_libs ${pkgs.gptfdisk}/bin/{cgdisk,gdisk}
copy_bin_and_libs ${pkgs.smartmontools}/bin/smartctl
copy_bin_and_libs ${pkgs.e2fsprogs}/bin/resize2fs
'' + lib.optionalString pkgs.stdenv.hostPlatform.isx86_64 ''
copy_bin_and_libs ${pkgs.nvme-cli}/bin/nvme # doesn't cross compile
'';
boot.kernelParams = [ "boot.shell_on_fail" ];
boot.kernelParams = [
"boot.shell_on_fail"
#v experimental full pre-emption for hopefully better call/audio latency on moby.
# also toggleable at runtime via /sys/kernel/debug/sched/preempt
# defaults to preempt=voluntary
# "preempt=full"
];
# other kernelParams:
# "boot.trace"
# "systemd.log_level=debug"

View File

@@ -7,7 +7,7 @@ let
};
in
{
sane.user.persist.private = [ ".local/share/keyrings" ];
sane.user.persist.byStore.private = [ ".local/share/keyrings" ];
sane.user.fs."private/.local/share/keyrings/default" = {
generated.command = [ "${init-keyring}/bin/init-keyring" ];

View File

@@ -13,7 +13,7 @@ let
in
{
# ssh key is stored in private storage
sane.user.persist.private = [
sane.user.persist.byStore.private = [
{ type = "file"; path = ".ssh/id_ed25519"; }
];
sane.user.fs.".ssh/id_ed25519.pub" = lib.mkIf (user-pubkey != null) {

View File

@@ -0,0 +1,16 @@
# TODO: move to hosts/common/
{ config, lib, ... }:
{
# give each host a shortname that all the other hosts know, to allow easy comms.
networking.hosts = lib.mkMerge (builtins.map
(host: let
cfg = config.sane.hosts.by-name."${host}";
in {
"${cfg.lan-ip}" = [ host ];
} // lib.optionalAttrs (cfg.wg-home.ip != null) {
"${cfg.wg-home.ip}" = [ "${host}-hn" ];
})
(builtins.attrNames config.sane.hosts.by-name)
);
}

View File

@@ -36,4 +36,10 @@
wg-home.endpoint = "uninsane.org:51820";
lan-ip = "10.78.79.51";
};
sane.hosts.by-name."supercap" = {
ssh.authorized = false;
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHf/mqqkX45EWAcquV04MC3SUljTApdclH1gjI19F+PA";
lan-ip = "10.78.79.232";
};
}

View File

@@ -49,6 +49,10 @@
sane.ids.media.gid = 2414;
sane.ids.ntfy-sh.uid = 2415;
sane.ids.ntfy-sh.gid = 2415;
sane.ids.monero.uid = 2416;
sane.ids.monero.gid = 2416;
sane.ids.slskd.uid = 2417;
sane.ids.slskd.gid = 2417;
sane.ids.colin.uid = 1000;
sane.ids.guest.uid = 1100;
@@ -63,6 +67,8 @@
sane.ids.systemd-oom.uid = 2005;
sane.ids.systemd-oom.gid = 2005;
sane.ids.wireshark.gid = 2006;
sane.ids.nixremote.uid = 2007;
sane.ids.nixremote.gid = 2007;
# found on graphical hosts
sane.ids.nm-iodine.uid = 2101; # desko/moby/lappy

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, sane-lib, ... }:
{
# allow `nix-shell` (and probably nix-index?) to locate our patched and custom packages
@@ -10,4 +10,7 @@
# to avoid switching so much during development
"nixpkgs-overlays=/home/colin/dev/nixos/hosts/common/nix-path/overlay"
];
# ensure new deployments have a source of this repo with which they can bootstrap.
environment.etc."nixos".source = ../../..;
}

View File

@@ -5,12 +5,12 @@
# store /home/colin/a/b in /home/private/a/b instead of /home/private/home/colin/a/b
sane.persist.stores.private.prefix = "/home/colin";
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: these should be private.. somehow
"/var/log"
"/var/backup" # for e.g. postgres dumps
];
sane.persist.sys.cryptClearOnBoot = [
sane.persist.sys.byStore.cryptClearOnBoot = [
"/var/lib/systemd/coredump"
];
}

View File

@@ -0,0 +1,107 @@
# discord gtk3 client
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.abaddon;
in
{
sane.programs.abaddon = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = true;
};
};
};
package = pkgs.abaddon.overrideAttrs (upstream: {
patches = (upstream.patches or []) ++ [
(pkgs.fetchpatch {
url = "https://git.uninsane.org/colin/abaddon/commit/eb551f188d34679f75adcbc83cb8d5beb4d19fd6.patch";
name = ''"view members" default to false'';
hash = "sha256-9BX8iO86CU1lNrKS1G2BjDR+3IlV9bmhRNTsLrxChwQ=";
})
(pkgs.fetchpatch {
# this makes it so Abaddon reports its app_name in notifications.
# not 100% necessary; just a nice-to-have. maybe don't rely on it until it's merged upstream.
# upstream PR: <https://github.com/uowuo/abaddon/pull/247>
url = "https://git.uninsane.org/colin/abaddon/commit/18cd863fdbb5e6b1e9aaf9394dbd673d51839f30.patch";
name = "set glib application name";
hash = "sha256-IFYxf1D8hIsxgZehGd6hL3zJiBkPZfWGm+Faaa5ZFl4=";
})
];
});
suggestedPrograms = [ "gnome-keyring" ];
fs.".config/abaddon/abaddon.ini".symlink.text = ''
# see abaddon README.md for options.
# at time of writing:
# | Setting | Type | Default | Description |
# |[discord]------|---------|---------|--------------------------------------------------------------------------------------------------|
# | `gateway` | string | | override url for Discord gateway. must be json format and use zlib stream compression |
# | `api_base` | string | | override base url for Discord API |
# | `memory_db` | boolean | false | if true, Discord data will be kept in memory as opposed to on disk |
# | `token` | string | | Discord token used to login, this can be set from the menu |
# | `prefetch` | boolean | false | if true, new messages will cause the avatar and image attachments to be automatically downloaded |
# | `autoconnect` | boolean | false | autoconnect to discord |
# |[http]--------|--------|---------|---------------------------------------------------------------------------------------------|
# | `user_agent` | string | | sets the user-agent to use in HTTP requests to the Discord API (not including media/images) |
# | `concurrent` | int | 20 | how many images can be concurrently retrieved |
# |[gui}------------------------|---------|---------|----------------------------------------------------------------------------------------------------------------------------|
# | `member_list_discriminator` | boolean | true | show user discriminators in the member list |
# | `stock_emojis` | boolean | true | allow abaddon to substitute unicode emojis with images from emojis.bin, must be false to allow GTK to render emojis itself |
# | `custom_emojis` | boolean | true | download and use custom Discord emojis |
# | `css` | string | | path to the main CSS file |
# | `animations` | boolean | true | use animated images where available (e.g. server icons, emojis, avatars). false means static images will be used |
# | `animated_guild_hover_only` | boolean | true | only animate guild icons when the guild is being hovered over |
# | `owner_crown` | boolean | true | show a crown next to the owner |
# | `unreads` | boolean | true | show unread indicators and mention badges |
# | `save_state` | boolean | true | save the state of the gui (active channels, tabs, expanded channels) |
# | `alt_menu` | boolean | false | keep the menu hidden unless revealed with alt key |
# | `hide_to_tray` | boolean | false | hide abaddon to the system tray on window close |
# | `show_deleted_indicator` | boolean | true | show \[deleted\] indicator next to deleted messages instead of actually deleting the message |
# | `font_scale` | double | | scale font rendering. 1 is unchanged |
# |[style]------------------|--------|-----------------------------------------------------|
# | `linkcolor` | string | color to use for links in messages |
# | `expandercolor` | string | color to use for the expander in the channel list |
# | `nsfwchannelcolor` | string | color to use for NSFW channels in the channel list |
# | `channelcolor` | string | color to use for SFW channels in the channel list |
# | `mentionbadgecolor` | string | background color for mention badges |
# | `mentionbadgetextcolor` | string | color to use for number displayed on mention badges |
# | `unreadcolor` | string | color to use for the unread indicator |
# |[notifications]|---------|--------------------------|-------------------------------------------------------------------------------|
# | `enabled` | boolean | true (if not on Windows) | Enable desktop notifications |
# | `playsound` | boolean | true | Enable notification sounds. Requires ENABLE_NOTIFICATION_SOUNDS=TRUE in CMake |
# |[voice]--|--------|------------------------------------|------------------------------------------------------------|
# | `vad` | string | rnnoise if enabled, gate otherwise | Method used for voice activity detection. Changeable in UI |
# |[windows]|---------|---------|-------------------------|
# | `hideconsole` | boolean | true | Hide console on startup |
# N.B.: abaddon writes this file itself (and even when i don't change anything internally).
# it prefers no spaces around the equal sign.
[discord]
autoconnect=true
[notifications]
# playsound: i manage sounds via swaync
playsound=false
'';
persist.byStore.private = [
".cache/abaddon"
];
services.abaddon = {
description = "unofficial Discord chat client";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/abaddon";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
};
};
}

View File

@@ -0,0 +1,10 @@
{ ... }:
{
sane.programs.animatch = {
persist.byStore.plaintext = [
# game progress
".config/Holy Pangolin/Animatch"
".local/share/Holy Pangolin/Animatch" # i think this one might be wrong
];
};
}

View File

@@ -20,6 +20,7 @@ in
"sane-scripts.bt-show"
];
"sane-scripts.dev" = declPackageSet [
"sane-scripts.clone"
"sane-scripts.dev-cargo-loop"
"sane-scripts.git-init"
];
@@ -41,12 +42,13 @@ in
"sane-scripts.secrets-unlock"
"sane-scripts.secrets-update-keys"
"sane-scripts.shutdown"
"sane-scripts.ssl-dump"
"sane-scripts.sudo-redirect"
"sane-scripts.sync-from-servo"
"sane-scripts.vpn"
"sane-scripts.which"
"sane-scripts.wipe-browser"
"sane-scripts.wipe-flare"
"sane-scripts.wipe-fractal"
];
"sane-scripts.sys-utils" = declPackageSet [
"sane-scripts.ip-port-forward"
@@ -58,8 +60,10 @@ in
"btrfs-progs"
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
"cryptsetup"
"ddrescue"
"dig"
"dtc" # device tree [de]compiler
"e2fsprogs" # resize2fs
"efibootmgr"
"ethtool"
"fatresize"
@@ -67,8 +71,9 @@ in
"file"
# "fwupd"
"gawk"
"gdb" # to debug segfaults
"git"
"gptfdisk"
"gptfdisk" # gdisk
"hdparm"
"htop"
"iftop"
@@ -86,6 +91,7 @@ in
"netcat"
"nethogs"
"nmap"
"nvme-cli" # nvme
"openssl"
"parted"
"pciutils"
@@ -93,15 +99,17 @@ in
"pstree"
"ripgrep"
"screen"
"smartmontools"
"smartmontools" # smartctl
"socat"
"strace"
"subversion"
"tcpdump"
"tree"
"usbutils"
"util-linux" # lsblk, lscpu, etc
"wget"
"wirelesstools" # iwlist
"xq" # jq for XML
];
sysadminExtraUtils = declPackageSet [
"backblaze-b2"
@@ -117,12 +125,13 @@ in
# - debugging?
consoleUtils = declPackageSet [
"alsaUtils" # for aplay, speaker-test
"binutils" # for strings; though this brings 80MB of unrelated baggage too
"binutils-unwrapped" # for strings; though this brings 80MB of unrelated baggage too
# "cdrtools"
"clinfo"
"dmidecode"
"dtrx" # `unar` alternative, "Do The Right eXtraction"
"efivar"
"eza" # a better 'ls'
# "flashrom"
"git" # needed as a user package, for config.
# "gnupg"
@@ -134,6 +143,7 @@ in
"lm_sensors" # for sensors-detect. TODO: what needs this? lift into the consumer
"lshw"
# "memtester"
"mercurial" # hg
"neovim" # needed as a user package, for swap persistence
# "nettools"
# "networkmanager"
@@ -143,7 +153,7 @@ in
# "oathToolkit" # for oathtool
# "ponymix"
"pulsemixer"
"python3"
"python3-repl"
# "python3Packages.eyeD3" # music tagging
"ripgrep" # needed as a user package so that its user-level config file can be installed
"rsync"
@@ -158,13 +168,12 @@ in
# "unar"
"unzip"
"wireguard-tools"
"xdg-terminal-exec"
"xdg-utils" # for xdg-open
# "yarn"
"zsh"
];
desktopConsoleUtils = declPackageSet [
pcConsoleUtils = declPackageSet [
"gh" # MS GitHub cli
"nix-index"
"nixpkgs-review"
@@ -179,11 +188,11 @@ in
"yt-dlp"
];
tuiApps = declPackageSet [
pcTuiApps = declPackageSet [
"aerc" # email client
"msmtp" # sendmail
"offlineimap" # email mailbox sync
"sfeed" # RSS fetcher
# "sfeed" # RSS fetcher
"visidata" # TUI spreadsheet viewer/editor
"w3m" # web browser
];
@@ -198,7 +207,9 @@ in
devPkgs = declPackageSet [
"cargo"
"clang"
"lua"
"nodejs"
"patchelf"
"rustc"
"tree-sitter"
];
@@ -206,17 +217,19 @@ in
# INDIVIDUAL PACKAGE DEFINITIONS
cargo.persist.plaintext = [ ".cargo" ];
cargo.persist.byStore.plaintext = [ ".cargo" ];
# creds, but also 200 MB of node modules, etc
discord.persist.private = [ ".config/discord" ];
discord.persist.byStore.private = [ ".config/discord" ];
endless-sky.persist.byStore.plaintext = [ ".local/share/endless-sky" ];
# `emote` will show a first-run dialog based on what's in this directory.
# mostly, it just keeps a LRU of previously-used emotes to optimize display order.
# TODO: package [smile](https://github.com/mijorus/smile) for probably a better mobile experience.
emote.persist.plaintext = [ ".local/share/Emote" ];
emote.persist.byStore.plaintext = [ ".local/share/Emote" ];
fluffychat-moby.persist.plaintext = [ ".local/share/chat.fluffy.fluffychat" ];
fluffychat-moby.persist.byStore.plaintext = [ ".local/share/chat.fluffy.fluffychat" ];
font-manager.package = pkgs.font-manager.override {
# build without the "Google Fonts" integration feature, to save closure / avoid webkitgtk_4_0
@@ -225,45 +238,47 @@ in
# MS GitHub stores auth token in .config
# TODO: we can populate gh's stuff statically; it even lets us use the same oauth across machines
gh.persist.private = [ ".config/gh" ];
gh.persist.byStore.private = [ ".config/gh" ];
"gnome.gnome-maps".persist.plaintext = [ ".cache/shumate" ];
"gnome.gnome-maps".persist.private = [ ".local/share/maps-places.json" ];
gnome-2048.persist.byStore.plaintext = [ ".local/share/gnome-2048/scores" ];
"gnome.gnome-maps".persist.byStore.plaintext = [ ".cache/shumate" ];
"gnome.gnome-maps".persist.byStore.private = [ ".local/share/maps-places.json" ];
# actual monero blockchain (not wallet/etc; safe to delete, just slow to regenerate)
# XXX: is it really safe to persist this? it doesn't have info that could de-anonymize if captured?
monero-gui.persist.plaintext = [ ".bitmonero" ];
monero-gui.persist.byStore.plaintext = [ ".bitmonero" ];
mumble.persist.private = [ ".local/share/Mumble" ];
mumble.persist.byStore.private = [ ".local/share/Mumble" ];
# settings (electron app)
obsidian.persist.plaintext = [ ".config/obsidian" ];
obsidian.persist.byStore.plaintext = [ ".config/obsidian" ];
# creds, media
signal-desktop.persist.private = [ ".config/Signal" ];
python3-repl.package = pkgs.python3.withPackages (ps: with ps; [
requests
]);
shattered-pixel-dungeon.persist.byStore.plaintext = [ ".local/share/.shatteredpixel/shattered-pixel-dungeon" ];
# printer/filament settings
slic3r.persist.plaintext = [ ".Slic3r" ];
slic3r.persist.byStore.plaintext = [ ".Slic3r" ];
# creds, widevine .so download. TODO: could easily manage these statically.
spotify.persist.plaintext = [ ".config/spotify" ];
space-cadet-pinball.persist.byStore.plaintext = [ ".local/share/SpaceCadetPinball" ];
tdesktop.persist.private = [ ".local/share/TelegramDesktop" ];
superTux.persist.byStore.plaintext = [ ".local/share/supertux2" ];
tokodon.persist.private = [ ".cache/KDE/tokodon" ];
tdesktop.persist.byStore.private = [ ".local/share/TelegramDesktop" ];
# hardenedMalloc solves an "unable to connect to Tor" error when pressing the "connect" button
# - still required as of 2023/07/14
tor-browser-bundle-bin.package = pkgs.tor-browser-bundle-bin.override {
useHardenedMalloc = false;
};
tokodon.persist.byStore.private = [ ".cache/KDE/tokodon" ];
whalebird.persist.private = [ ".config/Whalebird" ];
vvvvvv.persist.byStore.plaintext = [ ".local/share/VVVVVV" ];
yarn.persist.plaintext = [ ".cache/yarn" ];
whalebird.persist.byStore.private = [ ".config/Whalebird" ];
yarn.persist.byStore.plaintext = [ ".cache/yarn" ];
# zcash coins. safe to delete, just slow to regenerate (10-60 minutes)
zecwallet-lite.persist.private = [ ".zcash" ];
zecwallet-lite.persist.byStore.private = [ ".zcash" ];
};
programs.feedbackd = lib.mkIf config.sane.programs.feedbackd.enabled {

View File

@@ -0,0 +1,103 @@
{ lib, pkgs, ... }:
# notable bemenu options:
# - see `bemenu --help` for all
# -P, --prefix text to show before highlighted item.
# --scrollbar display scrollbar. (none (default), always, autohide)
# -H, --line-height defines the height to make each menu line (0 = default height). (wx)
# -M, --margin defines the empty space on either side of the menu. (wx)
# -W, --width-factor defines the relative width factor of the menu (from 0 to 1). (wx)
# -B, --border defines the width of the border in pixels around the menu. (wx)
# -R --border-radius defines the radius of the border around the menu (0 = no curved borders).
# --ch defines the height of the cursor (0 = scales with line height). (wx)
# --cw defines the width of the cursor. (wx)
# --hp defines the horizontal padding for the entries in single line mode. (wx)
# --fn defines the font to be used ('name [size]'). (wx)
# --tb defines the title background color. (wx)
# --tf defines the title foreground color. (wx)
# --fb defines the filter background color. (wx)
# --ff defines the filter foreground color. (wx)
# --nb defines the normal background color. (wx)
# --nf defines the normal foreground color. (wx)
# --hb defines the highlighted background color. (wx)
# --hf defines the highlighted foreground color. (wx)
# --fbb defines the feedback background color. (wx)
# --fbf defines the feedback foreground color. (wx)
# --sb defines the selected background color. (wx)
# --sf defines the selected foreground color. (wx)
# --ab defines the alternating background color. (wx)
# --af defines the alternating foreground color. (wx)
# --scb defines the scrollbar background color. (wx)
# --scf defines the scrollbar foreground color. (wx)
# --bdr defines the border color. (wx)
#
# colors are specified as `#RRGGBB`
# defaults:
# --ab "#222222"
# --af "#bbbbbb"
# --bdr "#005577"
# --border 3
# --cb "#222222"
# --center
# --cf "#bbbbbb"
# --fb "#222222"
# --fbb "#eeeeee"
# --fbf "#222222"
# --ff "#bbbbbb"
# --fixed-height
# --fn 'Sxmo 14'
# --hb "#005577"
# --hf "#eeeeee"
# --line-height 20
# --list 16
# --margin 40
# --nb "#222222"
# --nf "#bbbbbb"
# --no-overlap
# --no-spacing
# --sb "#323232"
# --scb "#005577"
# --scf "#eeeeee"
# --scrollbar autohide
# --tb "#005577"
# --tf "#eeeeee"
# --wrap
let
bg = "#1d1721"; # slight purple
fg0 = "#d8d8d8"; # inactive text (light grey)
fg1 = "#ffffff"; # active text (white)
accent0 = "#1f5e54"; # darker but saturated teal
accent1 = "#418379"; # teal (matches nixos-bg)
accent2 = "#5b938a"; # brighter but muted teal
bemenuArgs = [
"--wrap --scrollbar autohide --fixed-height"
"--center --margin 45"
"--no-spacing"
# XXX: font size doesn't seem to take effect (would prefer larger)
"--fn 'monospace 14' --line-height 22 --border 3"
"--bdr '${accent0}'" # border
"--scf '${accent2}' --scb '${accent0}'" # scrollbar
"--tb '${accent0}' --tf '${fg0}'" # title
"--fb '${accent0}' --ff '${fg1}'" # filter (i.e. text that's been entered)
"--hb '${accent1}' --hf '${fg1}'" # selected item
"--nb '${bg}' --nf '${fg0}'" # normal lines (even)
"--ab '${bg}' --af '${fg0}'" # alternated lines (odd)
"--cf '${accent0}' --cb '${accent0}'" # cursor (not very useful)
];
bemenuOpts = lib.concatStringsSep " " bemenuArgs;
in
{
sane.programs.bemenu = {
package = pkgs.bemenu.overrideAttrs (upstream: {
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
pkgs.makeWrapper
];
# can alternatively be specified as CLI flags
postInstall = (upstream.postInstall or "") + ''
wrapProgram $out/bin/bemenu \
--set BEMENU_OPTS "${bemenuOpts}"
wrapProgram $out/bin/bemenu-run \
--set BEMENU_OPTS "${bemenuOpts}"
'';
});
};
}

View File

@@ -0,0 +1,9 @@
{ ... }:
{
sane.programs.brave = {
persist.byStore.cryptClearOnBoot = [
".cache/BraveSoftware"
".config/BraveSoftware"
];
};
}

View File

@@ -30,7 +30,7 @@ in
};
};
persist.private = [
persist.byStore.private = [
# ".cache/folks" # contact avatars?
# ".config/calls"
".local/share/calls" # call "records"

View File

@@ -4,7 +4,7 @@
{ ... }:
{
sane.programs.cantata = {
persist.plaintext = [
persist.byStore.plaintext = [
".cache/cantata" # album art
".local/share/cantata/library" # library index (?)
];

View File

@@ -36,7 +36,7 @@ in
# package = chattyNoOauth;
package = chatty-latest;
suggestedPrograms = [ "gnome-keyring" ];
persist.private = [
persist.byStore.private = [
".local/share/chatty" # matrix avatars and files
# not just XMPP; without this Chatty will regenerate its device-id every boot.
# .purple/ contains XMPP *and* Matrix auth, logs, avatar cache, and a bit more

View File

@@ -1,14 +1,34 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash
full=$(cat /sys/class/power_supply/axp20x-battery/charge_full_design)
rate=$(cat /sys/class/power_supply/axp20x-battery/current_now)
perc=$(cat /sys/class/power_supply/axp20x-battery/capacity)
perc_left=$((100 - $perc))
# these icons come from sxmo; they only render in nerdfonts
bat_dis="󱊢"
bat_chg="󱊥"
try_path() {
# returns:
# - perc, perc_left (0-100)
# - full, rate (pos means charging)
if [ -f "$1/capacity" ]; then
perc=$(cat "$1/capacity")
perc_left=$((100 - $perc))
fi
if [ -f "$1/charge_full_design" ] && [ -f "$1/current_now" ]; then
# current is positive when charging
full=$(cat "$1/charge_full_design")
rate=$(cat "$1/current_now")
fi
if [ -f "$1/energy_full" ] && [ -f "$1/energy_now" ]; then
# energy is positive when discharging
full=$(cat "$1/energy_full")
rate=-$(cat "$1/energy_now")
fi
}
try_path "/sys/class/power_supply/axp20x-battery" # Pinephone
try_path "/sys/class/power_supply/BAT0" # Thinkpad
fmt_minutes() {
# args: <battery symbol> <text if ludicrous estimate> <estimated minutes to full/empty>
if [[ $3 -gt 1440 ]]; then
@@ -27,6 +47,6 @@ if [[ $rate -lt 0 ]]; then
elif [[ $rate -gt 0 ]]; then
# charging
fmt_minutes "$bat_chg" '100%' "$(($full * 60 * $perc_left / (100 * $rate)))"
else
elif [[ "$perc" != "" ]]; then
echo "$bat_dis $perc%"
fi

View File

@@ -3,7 +3,7 @@
{
sane.programs.cozy = {
# cozy uses a sqlite db for its config and exposes no CLI options other than --help and --debug
persist.plaintext = [
persist.byStore.plaintext = [
".local/share/cozy" # sqlite db (config & index?)
".cache/cozy" # offline cache
];

View File

@@ -2,31 +2,39 @@
{
imports = [
./abaddon.nix
./aerc.nix
./alacritty.nix
./animatch.nix
./assorted.nix
./bemenu.nix
./brave.nix
./calls.nix
./cantata.nix
./chatty.nix
./conky
./cozy.nix
./dialect.nix
./dino.nix
./element-desktop.nix
./epiphany.nix
./evince.nix
./feedbackd.nix
./firefox.nix
./flare-signal.nix
./fontconfig.nix
./fractal.nix
./fwupd.nix
./g4music.nix
./gajim.nix
./geary.nix
./git.nix
./gnome-feeds.nix
./gnome-keyring.nix
./gnome-weather.nix
./gpodder.nix
./gthumb.nix
./gtkcord4.nix
./helix.nix
./imagemagick.nix
./jellyfin-media-player.nix
@@ -51,14 +59,22 @@
./rhythmbox.nix
./ripgrep.nix
./sfeed.nix
./signal-desktop.nix
./splatmoji.nix
./spot.nix
./spotify.nix
./steam.nix
./stepmania.nix
./sublime-music.nix
./supertuxkart.nix
./sway-autoscaler
./swaynotificationcenter.nix
./tangram.nix
./tor-browser-bundle-bin.nix
./tuba.nix
./vlc.nix
./wike.nix
./wine.nix
./wireshark.nix
./xarchiver.nix
./zeal.nix

View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
sane.programs.dialect = {
package = pkgs.dialect.overrideAttrs (upstream: {
# TODO: send upstream
# TODO: figure out how to get audio working
# TODO: move to runtimeDependencies?
buildInputs = upstream.buildInputs ++ [
pkgs.glib-networking # for TLS
];
});
};
}

View File

@@ -18,6 +18,8 @@
# - fix is to toggle it off -> on in the Dino UI
# - default mic gain is WAY TOO MUCH (heavily distorted)
# - TODO: dino should have more optimal niceness/priority to ensure it can process its buffers
# - possibly this is solved by enabling RealtimeKit (rtkit)
# - TODO: see if Dino calls work better with `echo full > /sys/kernel/debug/sched/preempt`
#
# probably fixed:
# - once per 1-2 minutes dino will temporarily drop mic input:
@@ -43,10 +45,10 @@ in
};
};
persist.private = [ ".local/share/dino" ];
persist.byStore.private = [ ".local/share/dino" ];
services.dino = {
description = "auto-start and maintain dino XMPP connection";
description = "dino XMPP client";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/dino";

View File

@@ -4,11 +4,16 @@
# - <https://github.com/vector-im/element-desktop/issues/1029#issuecomment-1632688224>
# - `rm -rf ~/.config/Element/GPUCache`
# - <https://github.com/NixOS/nixpkgs/issues/244486>
{ ... }:
{ pkgs, ... }:
{
sane.programs.element-desktop = {
package = pkgs.element-desktop.override {
# use pre-build electron because otherwise it takes 4 hrs to build from source.
electron = pkgs.electron-bin;
};
# creds/session keys, etc
persist.private = [ ".config/Element" ];
persist.byStore.private = [ ".config/Element" ];
suggestedPrograms = [ "gnome-keyring" ];
};

View File

@@ -8,7 +8,7 @@
{ pkgs, ... }:
{
sane.programs.epiphany = {
# XXX(2023/07/08): running on moby without this hack fails, with:
# XXX(2023/07/08): running on moby without `WEBKIT_DISABLE_SANDBOX...` fails, with:
# - `bwrap: Can't make symlink at /var/run: File exists`
# this could be due to:
# - epiphany is somewhere following a symlink into /var/run instead of /run
@@ -19,6 +19,9 @@
# - <https://gitlab.gnome.org/GNOME/gnome-builder/-/issues/1164>
# - <https://github.com/flatpak/flatpak/issues/3477>
# - <https://github.com/NixOS/nixpkgs/issues/197085>
#
# TODO: consider `WEBKIT_USE_SINGLE_WEB_PROCESS=1` for better perf
# - this runs all tabs in 1 process. which is fine, if i'm not a heavy multi-tabber
package = pkgs.epiphany.overrideAttrs (upstream: {
preFixup = ''
gappsWrapperArgs+=(
@@ -26,7 +29,7 @@
);
'' + (upstream.preFixup or "");
});
persist.private = [
persist.byStore.private = [
".cache/epiphany"
".local/share/epiphany"
# also .config/epiphany, but appears empty

View File

@@ -13,7 +13,14 @@ let
mobile-prefs = lib.optionals false pkgs.librewolf-pmos-mobile.extraPrefsFiles;
# allow easy switching between firefox and librewolf with `defaultSettings`, below
librewolfSettings = {
browser = pkgs.librewolf-unwrapped;
browser = pkgs.librewolf-unwrapped.overrideAttrs (upstream: {
# TEMP(2023/11/21): fix eval bug in wrapFirefox
# see: <https://github.com/NixOS/nixpkgs/pull/244591>
passthru = upstream.passthru // {
requireSigning = false;
allowAddonSideload = true;
};
});
extraPrefsFiles = pkgs.librewolf-unwrapped.extraPrefsFiles ++ mobile-prefs;
libName = "librewolf";
dotDir = ".librewolf";
@@ -225,6 +232,13 @@ in
// treat it as unrevoked.
// see: <https://librewolf.net/docs/faq/#im-getting-sec_error_ocsp_server_error-what-can-i-do>
defaultPref("security.OCSP.require", false);
// scrollbar configuration, see: <https://artemis.sh/2023/10/12/scrollbars.html>
// style=4 gives rectangular scrollbars
// could also enable "always show scrollbars" in about:preferences -- not sure what the actual pref name for that is
// note that too-large scrollbars (like 50px wide) tend to obscure content (and make buttons unclickable)
defaultPref("widget.non-native-theme.scrollbar.size.override", 20);
defaultPref("widget.non-native-theme.scrollbar.style", 4);
'';
fs."${cfg.browser.dotDir}/default".dir = {};
# instruct Firefox to put the profile in a predictable directory (so we can do things like persist just it).

View File

@@ -0,0 +1,47 @@
# Flare is a 3rd-party GTK4 Signal app.
# UI is effectively a clone of Fractal.
#
# compatibility:
# - desko: works fine. pairs, and exchanges contact list (but not message history) with the paired device. exchanges future messages fine.
# - moby (cross compiled flare-signal-nixified): nope. it pairs, but can only *receive* messages and never *send* them.
# - even `rsync`ing the data and keyrings from desko -> moby, still fails in that same manner.
# - console shows error messages. quite possibly an endianness mismatch somewhere
# - moby (partially-emulated flare-signal): works! pairs and can send/receive messages, same as desko.
#
# error signatures (to reset, run `sane-wipe-fractal`):
# - upon sending a message, the other side receives it, but Signal desktop gets "A message from Colin could not be delivered" and the local CLI shows:
# ```
# ERROR libsignal_service::websocket] SignalWebSocket: Websocket error: SignalWebSocket: end of application request stream; socket closing
# ERROR presage::manager] Error opening envelope: ProtobufDecodeError(DecodeError { description: "invalid tag value: 0", stack: [("Content", "data_message")] }), message will be skipped!
# ERROR presage::manager] Error opening envelope: ProtobufDecodeError(DecodeError { description: "invalid tag value: 0", stack: [("Content", "data_message")] }), message will be skipped!
# ```
# - this occurs on moby, desko, `flare-signal` and `flare-signal-nixified`
# - the Websocket error seems to be unrelated, occurs during normal/good operation
# - related issues: <https://github.com/whisperfish/presage/issues/152>
# error when sending from Flare to other Flare device:
# - ```
# ERROR libsignal_protocol::session_cipher] Message from <UUID>.3 failed to decrypt; sender ratchet public key <key> message counter 1
# No current session
# ERROR presage::manager] Error opening envelope: SignalProtocolError(InvalidKyberPreKeyId), message will be skipped!
# ```
# - but signal iOS will still read it.
#
# well, seems to have unpredictable errors particularly when being used on multiple devices.
# desktop _seems_ more reliable than on mobile, but not confident.
{ pkgs, ... }:
{
sane.programs.flare-signal = {
package = pkgs.flare-signal-nixified;
# package = pkgs.flare-signal;
persist.byStore.private = [
# everything: conf, state, files, all opaque
".local/share/flare"
# also persists a secret in ~/.local/share/keyrings. reset with:
# - `secret-tool search --all --unlock 'xdg:schema' 'de.schmidhuberj.Flare'`
# - `secret-tool clear 'xdg:schema' 'de.schmidhuberj.Flare'`
# and it persists some dconf settings (e.g. device name). reset with:
# - `dconf reset -f /de/schmidhuberj/Flare/`.
];
};
}

View File

@@ -1,3 +1,22 @@
# Fractal: GTK4 instant messenger client for the Matrix protocol
#
# very susceptible to state corruption during hard power-cycles.
# if it stalls while launching, especially with a brief message at bottom
# "unable to open store"
# then:
# - remove ~/.local/share/stable/*
# - this might give I/O error, in which case remove the corresponding path under
# /nix/persist/home/colin/private (which can be found by correlating timestamps/sizes with that in ~/private/.local/share/stable).
# - reboot (maybe necessary).
# - now you can send messages, and read messages in unencrypted rooms, but not read messages from encrypted rooms.
# to fix encrypted message receipt:
# - start from above (fractal closed, no ~/.local/share/stable/*)
# - in ~/.local/share/keyrings/Default_keyring.keyring:
# - find the entry that says "display-name=Fractal: Matrix credentials for <mxid>"
# - remove that entry and all associated entries (i.e. ones with same number but different :attributeN)
# - REBOOT. otherwise keyring stuff seems to stay cached in RAM
# - login to Fractal. give an hour to sync.
# - it'll kick you back to a page asking you to cross-sign. open FluffyChat and do the emoji compare. success!
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.fractal;
@@ -18,10 +37,11 @@ in
};
};
persist.private = [
persist.byStore.private = [
# XXX by default fractal stores its state in ~/.local/share/<build-profile>/<UUID>.
".local/share/hack" # for debug-like builds
".local/share/stable" # for normal releases
".local/share/fractal" # for version 5+, i think?
];
suggestedPrograms = [ "gnome-keyring" ];

View File

@@ -8,7 +8,7 @@
{ ... }:
{
sane.programs.g4music = {
persist.plaintext = [
persist.byStore.plaintext = [
# index?
".cache/com.github.neithern.g4music"
];

View File

@@ -1,7 +1,7 @@
{ ... }:
{
sane.programs.gajim = {
persist.private = [
persist.byStore.private = [
# avatars, thumbnails...
".cache/gajim"
# sqlite database labeled "settings". definitely includes UI theming

View File

@@ -0,0 +1,82 @@
# geary is a gtk3 email client.
# outstanding issues:
# - it uses webkitgtk_4_1, which is expensive to build.
# could be upgraded to webkitgtk latest if upgraded to gtk4
# <https://gitlab.gnome.org/GNOME/geary/-/issues/1212>
{ config, lib, ... }:
let
cfg = config.sane.programs."gnome.geary";
in
{
sane.programs."gnome.geary" = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
slowToBuild = true; # uses webkitgtk 4.1
persist.byStore.private = [
# attachments, and email -- contained in a sqlite db
".local/share/geary"
# also `.cache/geary/web-resources`, which tends to stay << 1 MiB
];
fs.".config/geary/account_01/geary.ini".symlink.text = ''
[Metadata]
version=1
status=enabled
[Account]
ordinal=2
label=
# 14 = "fetch last 14d of mail every time i connect"
# -1 = "fetch *all* mail"
prefetch_days=-1
save_drafts=true
save_sent=true
use_signature=false
signature=
sender_mailboxes=colin@uninsane.org;
service_provider=other
[Folders]
archive_folder=Archive;
drafts_folder=
sent_folder=
junk_folder=
trash_folder=
[Incoming]
login=colin
remember_password=true
host=imap.uninsane.org
port=993
transport_security=transport
credentials=custom
[Outgoing]
remember_password=true
host=mx.uninsane.org
port=465
transport_security=transport
credentials=use-incoming
'';
secrets.".config/geary/account_02/geary.ini" = ../../../secrets/common/geary_account_02.ini.bin;
services.geary = {
description = "Geary email client";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/geary";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
};
};
}

View File

@@ -3,7 +3,7 @@
{ ... }:
{
sane.programs.gnome-weather = {
persist.plaintext = [
persist.byStore.plaintext = [
".cache/libgweather"
];
};

View File

@@ -1,4 +1,5 @@
# gnome feeds RSS viewer
# help:
# - #gpodder on irc.libera.chat
{ config, pkgs, sane-lib, ... }:
let
@@ -7,12 +8,22 @@ let
wanted-feeds = feeds.filterByFormat ["podcast"] all-feeds;
in {
sane.programs.gpodder = {
package = pkgs.gpodder-adaptive-configured;
package = pkgs.gpodder-adaptive-configured.overrideAttrs (base: {
# environment variables:
# - GPODDER_HOME (defaults to "~/gPodder")
# - GPODDER_DOWNLOAD_DIR (defaults to "$GPODDER_HOME/Downloads")
# - GPODDER_WRITE_LOGS ("yes" or "no")
# - GPODDER_EXTENSIONS
# - GPODDER_DISABLE_EXTENSIONS ("yes" or "no")
extraMakeWrapperArgs = (base.extraMakeWrapperArgs or []) ++ [
"--set" "GPODDER_HOME" "~/.local/share/gPodder"
];
});
# package = pkgs.gpodder-configured;
fs.".config/gpodderFeeds.opml".symlink.text = feeds.feedsToOpml wanted-feeds;
# XXX: we preserve the whole thing because if we only preserve gPodder/Downloads
# then startup is SLOW during feed import, and we might end up with zombie eps in the dl dir.
persist.plaintext = [ "gPodder" ];
persist.byStore.plaintext = [ ".local/share/gPodder" ];
};
}

View File

@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.gtkcord4;
in
{
sane.programs.gtkcord4 = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
persist.byStore.private = [
".cache/gtkcord4"
".config/gtkcord4" # empty?
];
services.gtkcord4 = {
description = "unofficial Discord chat client";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/gtkcord4";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
};
};
}

View File

@@ -7,7 +7,7 @@
# grammars need to be persisted when developing them
# - `hx --grammar fetch` and `hx --grammar build`
# but otherwise, they ship as part of HELIX_RUNTIME, in the nix store
# persist.plaintext = [ ".config/helix/runtime/grammars" ];
# persist.byStore.plaintext = [ ".config/helix/runtime/grammars" ];
fs.".config/helix/config.toml".symlink.text = ''
# docs: <https://docs.helix-editor.com/configuration.html>
[editor.soft-wrap]

View File

@@ -10,6 +10,6 @@
# jellyfin stores things in a bunch of directories: this one persists auth info.
# it *might* be possible to populate this externally (it's Qt stuff), but likely to
# be fragile and take an hour+ to figure out.
persist.plaintext = [ ".local/share/Jellyfin Media Player" ];
persist.byStore.plaintext = [ ".local/share/Jellyfin Media Player" ];
};
}

View File

@@ -3,6 +3,6 @@
sane.programs.komikku = {
secrets.".local/share/komikku/keyrings/plaintext.keyring" = ../../../secrets/common/komikku_accounts.json.bin;
# downloads end up here, and without the toplevel database komikku doesn't know they exist.
persist.plaintext = [ ".local/share/komikku" ];
persist.byStore.plaintext = [ ".local/share/komikku" ];
};
}

View File

@@ -26,9 +26,8 @@ in {
package = pkgs.koreader-from-src;
# koreader applies these lua "patches" at boot:
# - <https://github.com/koreader/koreader/wiki/User-patches>
# - TODO: upstream this patch to koreader
# fs.".config/koreader/patches".symlink.target = "${./.}";
fs.".config/koreader/patches/2-colin-NetworkManager-isConnected.lua".symlink.target = "${./2-colin-NetworkManager-isConnected.lua}";
# - 2023/10/29: koreader code hasn't changed, but somehow FTP browser seems usable even without the isConnected patch now.
# fs.".config/koreader/patches/2-colin-NetworkManager-isConnected.lua".symlink.target = "${./2-colin-NetworkManager-isConnected.lua}";
# koreader news plugin, enabled by default. file format described here:
# - <repo:koreader/koreader:plugins/newsdownloader.koplugin/feed_config.lua>
@@ -37,12 +36,14 @@ in {
${lib.concatStringsSep ",\n " koreaderRssEntries}
}--do NOT change this line
'';
# easier to navigate via filebrowser than finding the news menu entry
fs."Books/rss-koreader".symlink.target = "../.config/koreader/news";
# koreader on aarch64 errors if there's no fonts directory (sandboxing thing, i guess)
fs.".local/share/fonts".dir = {};
# history, cache, dictionaries...
# could be more explicit if i symlinked the history.lua file to somewhere it can persist better.
persist.plaintext = [ ".config/koreader" ];
persist.byStore.plaintext = [ ".config/koreader" ];
};
}

View File

@@ -2,6 +2,6 @@
{
sane.programs.lemoa = {
# creds
persist.private = [ ".local/share/io.github.lemmygtk.lemoa" ];
persist.byStore.private = [ ".local/share/io.github.lemmygtk.lemoa" ];
};
}

View File

@@ -6,6 +6,8 @@
# package = pkgs.libreoffice-still;
package = pkgs.libreoffice-fresh;
slowToBuild = true;
# disable first-run stuff
fs.".config/libreoffice/4/user/registrymodifications.xcu".symlink.text = ''
<?xml version="1.0" encoding="UTF-8"?>

View File

@@ -4,9 +4,9 @@
{
sane.programs.mepo = {
persist.plaintext = [ ".cache/mepo/tiles" ];
persist.byStore.plaintext = [ ".cache/mepo/tiles" ];
# ~/.cache/mepo/savestate has precise coordinates and pins: keep those private
persist.private = [
persist.byStore.private = [
{ type = "file"; path = ".cache/mepo/savestate"; }
];

View File

@@ -42,10 +42,10 @@ in
# mopidy-moped: <https://github.com/martijnboland/moped>
# mopidy-muse: <https://github.com/cristianpb/muse>
]);
persist.plaintext = [
persist.byStore.plaintext = [
".local/share/mopidy/local" # thumbs, library db
];
persist.private = [
persist.byStore.private = [
".local/share/mopidy/http" # cookie
];
secrets.".config/mopidy/mopidy.conf" = ../../../secrets/common/mopidy.conf.bin;

View File

@@ -3,41 +3,57 @@
# - <https://github.com/mpv-player/mpv/wiki>
# curated mpv mods/scripts/users:
# - <https://github.com/stax76/awesome-mpv>
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.mpv;
in
{
sane.programs.mpv = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.vo = mkOption {
type = types.nullOr types.str;
default = null;
description = "--vo=FOO flag to pass to mpv";
};
};
};
package = pkgs.wrapMpv pkgs.mpv-unwrapped {
scripts = with pkgs.mpvScripts; [
mpris
# uosc
pkgs.mpv-uosc-latest
];
extraMakeWrapperArgs = [
extraMakeWrapperArgs = lib.optionals (cfg.config.vo != null) [
# 2023/08/29: fixes an error where mpv on moby launches with the message
# "DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory"
# audio still works, and controls, screenshotting, etc -- just not the actual rendering
# this is likely a regression for mpv 0.36.0.
# the actual error message *appears* to come from the mesa library, but it's tough to trace.
#
# backend compatibility (2023/10/22):
# run with `--vo=help` to see a list of all output options.
# non-exhaustive (F=fails, W=works)
# ? libmpv render API for libmpv
# ? gpu Shader-based GPU Renderer
# ? gpu-next Video output based on libplacebo
# ? vdpau VDPAU with X11
# ? wlshm Wayland SHM video output (software scaling)
# ? xv X11/Xv
# W sdl SDL 2.0 Renderer
# F dmabuf-wayland Wayland dmabuf video output
# ? vaapi VA API with X11
# ? x11 X11 (software scaling)
# non-exhaustive (W=works, F=fails, A=audio-only, U=audio+ui only (no video))
# ? null Null video output
# ? caca libcaca
# A (default)
# A dmabuf-wayland Wayland dmabuf video output
# A libmpv render API for libmpv (mpv plays the audio, but doesn't even render a window)
# A vdpau VDPAU with X11
# F drm Direct Rendering Manager (software scaling)
"--add-flags" "--vo=sdl"
# F gpu-next Video output based on libplacebo
# F vaapi VA API with X11
# F x11 X11 (software scaling)
# F xv X11/Xv
# U gpu Shader-based GPU Renderer
# W caca libcaca (terminal rendering)
# W sdl SDL 2.0 Renderer
# W wlshm Wayland SHM video output (software scaling)
"--add-flags" "--vo=${cfg.config.vo}"
];
};
persist.plaintext = [ ".local/state/mpv/watch_later" ];
persist.byStore.plaintext = [ ".local/state/mpv/watch_later" ];
fs.".config/mpv/input.conf".symlink.text = ''
# let volume/power keys be interpreted by the system.
# this is important for sxmo.
@@ -101,6 +117,7 @@
mime.priority = 50; # default = 100; 50 in order to take precedence over vlc.
mime.associations."audio/flac" = "mpv.desktop";
mime.associations."audio/mpeg" = "mpv.desktop";
mime.associations."audio/x-opus+ogg" = "mpv.desktop";
mime.associations."audio/x-vorbis+ogg" = "mpv.desktop";
mime.associations."video/mp4" = "mpv.desktop";
mime.associations."video/quicktime" = "mpv.desktop";

View File

@@ -85,27 +85,13 @@ let
plugin-config-lua = concatMapStrings (p: optionalString (p.type or "" == "lua") p.config) plugins;
in
{
# private because there could be sensitive things in the swap
sane.programs.neovim = {
persist.private = [ ".cache/vim-swap" ];
env.EDITOR = "vim";
# git claims it should use EDITOR, but it doesn't!
env.GIT_EDITOR = "vim";
mime.priority = 200; # default=100 => yield to other, more specialized applications
mime.associations."application/schema+json" = "nvim.desktop";
mime.associations."plain/text" = "nvim.desktop";
mime.associations."text/markdown" = "nvim.desktop";
};
programs.neovim = mkIf config.sane.programs.neovim.enabled {
# neovim: https://github.com/neovim/neovim
enable = true;
# package = config.programs.neovim.finalPackage;
package = pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped (pkgs.neovimUtils.makeNeovimConfig {
withRuby = false; #< doesn't cross-compile w/o binfmt
viAlias = true;
vimAlias = true;
configure = {
packages.plugins = {
start = plugin-packages;
};
plugins = plugin-packages;
customRC = ''
" let the terminal handle mouse events, that way i get OS-level ctrl+shift+c/etc
" this used to be default, until <https://github.com/neovim/neovim/pull/19290>
@@ -147,6 +133,16 @@ in
${plugin-config-lua}
EOF
'';
};
});
# private because there could be sensitive things in the swap
persist.byStore.private = [ ".cache/vim-swap" ];
env.EDITOR = "vim";
# git claims it should use EDITOR, but it doesn't!
env.GIT_EDITOR = "vim";
mime.priority = 200; # default=100 => yield to other, more specialized applications
mime.associations."application/schema+json" = "nvim.desktop";
mime.associations."plain/text" = "nvim.desktop";
mime.associations."text/markdown" = "nvim.desktop";
};
}

View File

@@ -7,7 +7,7 @@ let
wanted-feeds = feeds.filterByFormat ["text" "image"] all-feeds;
in {
sane.programs.newsflash = {
persist.plaintext = [ ".local/share/news-flash" ];
persist.byStore.plaintext = [ ".local/share/news-flash" ];
fs.".config/newsflashFeeds.opml".symlink.text =
feeds.feedsToOpml wanted-feeds
;

View File

@@ -1,9 +1,11 @@
{ ... }:
{
sane.programs.nheko = {
# not strictly necessary, but allows caching articles; offline use, etc.
sane.programs.nheko.persist.private = [
persist.byStore.private = [
".config/nheko" # config file (including client token)
".cache/nheko" # media cache
".local/share/nheko" # per-account state database
];
};
}

View File

@@ -2,6 +2,6 @@
{
# provides `nix-locate`, backed by the manually run `nix-index`
sane.programs.nix-index = {
persist.plaintext = [ ".cache/nix-index" ];
persist.byStore.plaintext = [ ".cache/nix-index" ];
};
}

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