Compare commits

...

1533 Commits

Author SHA1 Message Date
3c5fee5d14 attempt to update swaynotificationcenter patch, but fail
the new version has problems: start swaync while one of the services is running, and then itll toggle that service on every control-center open -> close cycle
2023-11-08 21:26:42 +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
b6d2fbdf6d sxmo-utils-latest: 2023-09-22 -> 2023-10-05 2023-10-08 01:45:11 +00:00
cf553b1386 wowlan: more documentation 2023-10-08 00:00:26 +00:00
e40cbaf1cf wowlan: document more about disconnections detection 2023-10-07 21:51:33 +00:00
19b8c0c923 wowlan: document known issues 2023-10-07 21:29:55 +00:00
22e9a48edc gpodder-adaptive: 3.11.2+1 -> 3.11.3+1 2023-10-07 21:29:36 +00:00
a6b1c23e2b remove no-longer-needed qemu override 2023-10-07 21:10:29 +00:00
4a498ef1a9 dino: docs: leave myself a TODO about niceness/priority 2023-10-07 08:27:35 +00:00
4909127ec7 nixpkgs: 2023-10-01 -> 2023-10-03
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/fdd898f8f79e8d2f99ed2ab6b3751811ef683242' (2023-10-01)
  → 'github:nixos/nixpkgs/81e8f48ebdecf07aab321182011b067aafc78896' (2023-10-03)
```
2023-10-07 08:24:13 +00:00
7a75cad65f Dino: bump input latency to 20ms 2023-10-07 08:09:50 +00:00
168fcce157 stepmania: configure directories 2023-10-07 05:50:58 +00:00
03d3ea4965 moby: ship the geoclue where-am-i helper on PATH 2023-10-07 04:34:15 +00:00
e5125065d6 eg25-control: add a timeout to how long a power-on can take 2023-10-07 04:27:14 +00:00
bc3ad7dfa5 moby: gps: restrict geoclue to only my user 2023-10-07 04:27:14 +00:00
2097c3ad77 moby: gps: document some findings 2023-10-07 04:25:44 +00:00
56838a4867 swaync: don't show GPS on non-gps-enabled devices (i.e. desktop/laptop) 2023-10-07 04:14:42 +00:00
d35fe126e3 doc: dino: document findings in adjusting Dino mic buffer 2023-10-07 01:30:45 +00:00
a6ea5da7a1 moby: disable legacy PulseAudio stuff 2023-10-07 01:27:16 +00:00
98a6671e95 moby: decrease the amount of samples Dino drops while in a call 2023-10-07 00:58:11 +00:00
243a4c6f0d moby: gps: document some maps programs 2023-10-07 00:21:40 +00:00
e84be3a7b2 sxmo: link all default hooks into user dir 2023-10-07 00:21:13 +00:00
5fdd6881a0 sxmo-utils: update Dino suspend blocker patch 2023-10-07 00:20:49 +00:00
67192d89a9 sxmo-utils: suspend: block if Dino is in a call 2023-10-06 20:42:49 +00:00
b6c8b1948b bypass-paywalls-clean: don't show options on first launch
this is apparently a thing firefox does when it sees the `options_ui`
key in manifest.json?
2023-10-05 19:02:51 +00:00
3a71d26638 nixpkgs: 2023-09-29 -> 2023-10-01, sops-nix, uninsane-dot-org
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/f5892ddac112a1e9b3612c39af1b72987ee5783a' (2023-09-29)
  → 'github:nixos/nixpkgs/fdd898f8f79e8d2f99ed2ab6b3751811ef683242' (2023-10-01)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2f375ed8702b0d8ee2430885059d5e7975e38f78' (2023-09-21)
  → 'github:Mic92/sops-nix/746c7fa1a64c1671a4bf287737c27fdc7101c4c2' (2023-10-03)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/596611941a74be176b98aeba9328aa9d01b8b322' (2023-09-16)
  → 'github:NixOS/nixpkgs/dbe90e63a36762f1fbde546e26a84af774a32455' (2023-10-01)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=6f06c3a2ecf36ba7f5a4845b1d30a5d9894ca76c' (2023-09-27)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=1f588493031168d92a1e60705f26aaf4b2cdc07e' (2023-10-03)
```
2023-10-05 08:06:08 +00:00
a586611aa0 docs: moby: gps: link to geoclue/gnome-maps support channels 2023-10-05 08:05:35 +00:00
d7120a14f4 moby: gps: fixup geoclue notes 2023-10-04 05:36:22 +00:00
7db8dabf8f theming: ship HighContrast icon theme as default
current gnome.adwaita-icon-theme doesn't generate all icons when cross-compiled

this may be fixed in GNOME 45.

until then, HighContrast gets us *most* icons
2023-10-04 01:01:29 +00:00
d89287af11 switch icon theme to Pop 2023-10-03 20:21:20 +00:00
b14daac0f8 komikku: 1.23.0 -> 1.24.2 2023-10-03 20:11:19 +00:00
f65aaf8852 gtk: add a bunch more icon theme options 2023-10-03 20:10:09 +00:00
5a84c9a585 fractal-nixified: plumb an "optimize" argument to toggle between slow and fast build 2023-10-03 16:31:28 +00:00
464fca9679 eg25-control: actually, dont dump /dev/ttyUSB1 2023-10-03 01:13:37 +00:00
6c6e1ee84b moby: add gps-related services to the "dialout" group 2023-10-03 01:01:06 +00:00
41d8c6681f sway: disable --debug flag 2023-10-03 00:47:33 +00:00
4dbb656a34 eg25-control: dump fix data as part of --dump-debug-info 2023-10-03 00:40:32 +00:00
8c4caab995 linux-megous: 6.4.15 -> 6.5.3 2023-10-03 00:29:42 +00:00
83586ce483 trust-dns: cleanup some typos 2023-10-02 22:33:54 +00:00
e20c4d01e6 trust-dns: fix missing "mkdir" during service startup 2023-10-02 22:12:09 +00:00
01cad7b702 trust-dns: perform more specialization via structured config instead of sed 2023-10-02 22:02:46 +00:00
48715546e2 trust-dns: split into separate (restartable) services 2023-10-02 21:30:51 +00:00
00b59f6985 firefox-extensions: update ublacklist, sponsorblock, ether-metamask 2023-10-02 07:49:21 +00:00
d82d3e55cb firefox-extensions.bypass-paywalls-clean: 3.3.5.0 -> 3.3.6.0 2023-10-02 07:48:01 +00:00
f2c3f9fe52 nixpkgs 2023-09-27 -> 2023-09-29; mobile-nixos -> 2023-10-01
```
• Updated input 'mobile-nixos':
    'github:nixos/mobile-nixos/fa12ebaa98ce18e30cbdaf58a71b9ec56984e38f' (2023-09-19)
  → 'github:nixos/mobile-nixos/7cee346c3f8e73b25b1cfbf7a086a7652c11e0f3' (2023-10-01)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2' (2023-09-27)
  → 'github:nixos/nixpkgs/f5892ddac112a1e9b3612c39af1b72987ee5783a' (2023-09-29)
```
2023-10-02 07:36:14 +00:00
2de6c01262 fractal: launch on boot 2023-10-02 06:12:24 +00:00
bbdc6f3aa9 eg25-control: treat some GPS config failures as non-fatal 2023-10-02 06:12:12 +00:00
16ee30b696 sxmo-utils: kill-window patch: fetch from mail list 2023-10-02 05:39:58 +00:00
9c341c87d8 gnome-maps: fix missing gapplication runtime dep 2023-10-02 05:30:09 +00:00
67a9134130 moby: switch default browser back to epiphany 2023-10-02 05:10:00 +00:00
fe6d2f04c5 sxmo-utils: add a Kill Window option to the wmmenu 2023-10-02 04:53:00 +00:00
d138c99c61 sxmo-utils: fix j4-dmenu-desktop not found when trying to view all apps 2023-10-02 04:37:50 +00:00
290d6a8da5 gnome-maps: ship on lappy/desko/moby 2023-10-02 04:07:21 +00:00
09ed98c973 cross: support gnome-maps 2023-10-02 04:06:34 +00:00
bc7dee6a80 swaync: enable audible notifications for Fractal Matrix client 2023-10-02 03:48:20 +00:00
4c708baf63 remove Videos/servo-incomplete symlink 2023-10-02 03:23:44 +00:00
cc16fe85b0 fractal: ship the nixified build by default 2023-10-02 03:20:55 +00:00
7d63132c48 fractal-nixified: massively reduce build time (via unoptimized build) 2023-10-02 03:20:43 +00:00
5acd704ae7 docs: overlays/cross: mention cdylib fractal workaround 2023-10-01 22:43:14 +00:00
0c0948e8e1 fractal-nixified: tidy up 2023-10-01 22:40:56 +00:00
6283384522 fractal-nixified: sort dependencies 2023-10-01 22:19:37 +00:00
b70fc6841f fractal-nixified: support cross compilation 2023-10-01 22:17:25 +00:00
97dd84ed71 tuba: document an alternative fix 2023-10-01 18:47:47 +00:00
7a6981253b fractal-nixified: remove some unecessary dependencies 2023-10-01 05:02:50 +00:00
9e78ec221b fractal-nixified: avoid double meson build 2023-10-01 04:42:29 +00:00
4a8d7ca1c3 alsa-ucm-conf-sane: route audio to the internal speaker by default 2023-10-01 04:26:54 +00:00
b9f31c6f4b devPkgs: add cargo, rustc 2023-10-01 03:47:45 +00:00
cd3bed023a fractal-nixified: it builds! 2023-10-01 03:15:53 +00:00
0ad6b2bc1b fractal-nixified: get gst-plugin-gtk4 to cross build 2023-09-30 23:42:01 +00:00
54b0c1bfcf fractal-nixified: get pipewire to compile
that's all the dependencies now, except for the special case of gst-plugin-gtk4 on cross
2023-09-30 21:07:20 +00:00
285dd6a1c9 fractal-nixified: get libshumate-sys and sourceview5-sys to compile 2023-09-30 20:28:31 +00:00
1c5e2843a1 fractal-nixified: get libspa crate to build 2023-09-30 20:19:28 +00:00
ce9b30767f fractal-nixified: add a bunch of crateOverrides to get *closer* to a complete build 2023-09-30 07:07:40 +00:00
d26fa5bec1 fractal-nixified: pin serde_derive at 1.0.171 to overcome build failure
https://discourse.nixos.org/t/errors-using-serde-derive-with-buildrustcrate/31398
2023-09-30 04:44:49 +00:00
832ca52ccf fractal-nixified: regenerate with more recent crate2nix 2023-09-30 03:57:03 +00:00
c70176bfb2 WIP: fractal: build with crate2nix 2023-09-30 02:57:52 +00:00
cb3cf57465 cargo: when enabled, persist ~/.cargo 2023-09-30 02:57:30 +00:00
dfaeb7b7de sxmo_hook_inputhandler: document proposed input changes 2023-09-30 01:42:45 +00:00
d3818b5e44 fractal: enable, and persist the right directories 2023-09-29 22:08:13 +00:00
5b8850404b fractal-latest: support cross compilation (this method takes about 60minutes. 45m for deps and 15m for fractal itself) 2023-09-29 21:42:36 +00:00
38fa73cfb7 feeds: unsubscribe from Michael Malice 2023-09-29 18:25:08 +00:00
43fc050eed feeds: subscribe to FasterThanLime 2023-09-29 18:23:14 +00:00
f3423d45bd fractal-latest: reduce build time from 2hr+ to 5 minutes 2023-09-29 18:21:59 +00:00
56866c1ac1 servo: fix lemmy-ui build 2023-09-29 15:39:27 +00:00
99ea6a59c5 remove unused GUI apps: cantata, gajim, dconf-editor, obsidian, rhythmbox 2023-09-29 02:04:06 +00:00
eb5ebf94a7 nixpkgs: 2023-09-25 -> 2023-09-27; uninsane-dot-org -> 2023-09-27
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/6500b4580c2a1f3d0f980d32d285739d8e156d92' (2023-09-25)
  → 'github:nixos/nixpkgs/8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2' (2023-09-27)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=9952b69003eb7397cadf1df0b5d696cea1833248' (2023-09-20)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=6f06c3a2ecf36ba7f5a4845b1d30a5d9894ca76c' (2023-09-27)
```
2023-09-28 22:26:15 +00:00
bdf049d9e4 moby: wowlan: also wake on ARP requests (experimental) 2023-09-28 20:55:18 +00:00
9205e076c5 modules/wowlan: move options to "ipv4" attrset for future protocol expansion 2023-09-28 20:09:04 +00:00
60e5f6b41b fractal-latest: 2023-07-28 -> unstable-2023-09-14 2023-09-28 06:52:56 +00:00
3aa85c96b2 sxmo_hook_rotate.sh: fix bash syntax error 2023-09-28 00:18:43 +00:00
2f71d80c38 firefox-extensions: repeat myself less when wrapping 2023-09-27 23:25:07 +00:00
558a9f4cd0 todo.md: sync 2023-09-27 22:54:04 +00:00
9a6915a0ed firefox-extensions: deprecate "fetchAddon" 2023-09-27 22:30:28 +00:00
d0feca0d57 firefox-extensions: ether-metamask: port to fetchVersionedAddon 2023-09-27 22:26:55 +00:00
36e9f0bcde firefox-extensions: i2p-in-private-browsing: port to fetchVersionedAddon 2023-09-27 22:24:46 +00:00
a17fc1c76e firefox-extensions.ublock-origin: 1.52.0 -> 1.52.3b0 2023-09-27 22:22:14 +00:00
84d8fb5339 firefox-extensions: ublock-origin: port to fetchVersionedAddon 2023-09-27 22:21:42 +00:00
2b9373e0fc firefox-extensions: sidebery: port to fetchVersionedAddon 2023-09-27 22:17:02 +00:00
2992d0db6b firefox-extensions: ublacklist: port to github release fetcher 2023-09-27 22:13:43 +00:00
71b70712f8 firefox-extensions: factor out the github addon fetcher 2023-09-27 22:06:38 +00:00
10c7fc8e91 sxmo: exit fullscreen on screen rotation 2023-09-27 21:42:55 +00:00
48971bb237 sponsorblock: 5.4.19 -> 5.4.21 2023-09-27 19:10:14 +00:00
387b49a8b5 flake.nix: support list-type updateScripts (e.g. nix-update-script {}) 2023-09-27 19:10:14 +00:00
bc9bacb08f sponsorblock: fetch from github instead of Mozilla store 2023-09-27 19:10:14 +00:00
d44cf620c1 firefox-extensions: remove completed TODO 2023-09-27 18:48:16 +00:00
14cef8eb6c bypass-paywalls-clean: 3.3.4.0 -> 3.3.5.0 2023-09-27 18:40:25 +00:00
0bbe3e14c1 flake: show flake targets as part of "help" 2023-09-27 18:38:06 +00:00
6df63d825a sane-bt-search: clean up the jackett URLs 2023-09-27 18:34:04 +00:00
10e6436c34 sane-bt-add: accept https:// urls and extract actual torrents from them 2023-09-27 18:34:04 +00:00
aa3ee802d2 nixpkgs: 2023-09-22 -> 2023-09-25
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e35dcc04a3853da485a396bdd332217d0ac9054f' (2023-09-22)
  → 'github:nixos/nixpkgs/6500b4580c2a1f3d0f980d32d285739d8e156d92' (2023-09-25)
```
2023-09-27 18:34:04 +00:00
9a16b1cda7 ntfy: add a lengthy proxy_read_timeout to prevent hangups 2023-09-27 18:25:36 +00:00
ebbef901c1 wowlan: document VPN shortcomings 2023-09-27 01:32:50 +00:00
1ef203ee07 wowlan: docs: caveats 2023-09-27 01:30:06 +00:00
ca645ed23d wowlan: remove the version/ip header length match 2023-09-27 01:26:51 +00:00
742ed50960 moby: configure wake-on-lan 2023-09-27 01:04:53 +00:00
a60af4990a sway: hide window bar when only one window on workspace 2023-09-26 20:36:30 +00:00
d2890ecbba ntfy-sh: dont autostart except on moby
it's easier to troubleshoot when there's only one subscriber...
2023-09-26 14:48:54 +00:00
36d8158414 zsh: alias annoying lsof/tcpdump defaults 2023-09-26 14:38:06 +00:00
642afd6f34 ntfy: subscribe to the non-443 port 2023-09-26 13:52:10 +00:00
fad9c8f483 ntfy: run on a non-443 port 2023-09-26 13:51:27 +00:00
40a8fc50d9 sxmo-utils: apply patch to launch apps via swaymsg exec 2023-09-26 00:15:28 +00:00
21838afc0d feeds: subscribe to turnoff.us 2023-09-25 23:09:56 +00:00
8821c4edd7 sxmo-timer: connect to swaync so that it alerts on completion 2023-09-25 20:56:22 +00:00
a265dd28dd ntfy-sh: configure auth, simplify proxying 2023-09-25 17:34:50 +00:00
14bc8a1732 ship a trivial service which subscribes to push notifications (ntfy-sh) 2023-09-25 16:56:41 +00:00
10dd18a42a flake: remove nix-serve
even though upstream issue remains open, i observe a successful build via the nix-serve cache
2023-09-25 14:37:58 +00:00
691f009656 clean up documentation 2023-09-25 13:35:50 +00:00
68f1af090e have nix flake .#check do both NUR and system builds 2023-09-25 13:09:02 +00:00
6412778b98 feeds: unsubscribe from The Register 2023-09-25 12:09:56 +00:00
de12a2200e feeds: add amosbbatto 2023-09-25 12:09:38 +00:00
2600d6223c tuba: fix FileDialog 2023-09-24 23:36:05 +00:00
1ed1d8403d tuba: ship a friendly alias 2023-09-24 21:38:20 +00:00
5e34d9e44d sane-scripts.sane-deadlines: fix missing sed dependency 2023-09-24 20:21:13 +00:00
4f49c86d73 sxmo-utils: separate the DWM and Sway dependencies; only ship those we need
also, remove mepo
2023-09-24 19:49:59 +00:00
74309f8fa4 sxmo: fix missing bin/ typo 2023-09-24 18:13:49 +00:00
699c4301b4 static-nix-shell: avoid wrapping when not necessary
i guess this would be a minor perf gain in places
2023-09-24 17:51:19 +00:00
c7c90a9fa3 sxmo-utils: doc: why we include xdg-user-dirs 2023-09-24 17:48:35 +00:00
e5d843b21f sxmo: add missing deps to custom hooks 2023-09-24 17:48:18 +00:00
3ab943ab0b phog: remove DesktopNames==null workaround 2023-09-24 17:24:29 +00:00
e8d2aeb3a6 phog: 0.1.3 -> 0.1.4 2023-09-24 17:16:01 +00:00
28220ea8b4 flake: plumb date/rev into built nixos system images 2023-09-24 15:30:12 +00:00
9f47a29b43 mpv: update watch_later dir
see: <https://github.com/mpv-player/mpv/pull/10838>
2023-09-24 13:15:45 +00:00
46bb39332f lemoa: add an updateScript 2023-09-24 13:02:57 +00:00
e8bf83274f flake: have update.pkgs not update the feeds by default 2023-09-24 12:36:17 +00:00
083bdad88f feeds: update metadata for all
this should fix a couple broken feeds whose URL changed, but most changes here are inconsequential
2023-09-24 12:25:04 +00:00
0e238ff2dd fix pkgs.feeds update scripts 2023-09-24 12:11:28 +00:00
d0cbfaed44 flake: add aliases for bulk package updating 2023-09-24 10:50:02 +00:00
791dc59ba2 flake: expose update script for every package that has one 2023-09-24 10:27:32 +00:00
457197f85b gpodder-adaptive: 3.11.1+1 -> 3.11.2+1 and add an updateScript 2023-09-24 08:16:19 +00:00
07ee54af3a nixpkgs: 2023-09-19 -> 2023-09-22
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/5ba549eafcf3e33405e5f66decd1a72356632b96' (2023-09-19)
  → 'github:nixos/nixpkgs/e35dcc04a3853da485a396bdd332217d0ac9054f' (2023-09-22)
```
2023-09-24 07:40:06 +00:00
865777b7ba enable ntfy (and manually integrate with matrix) 2023-09-23 21:09:04 +00:00
7b38ec3f8f docs: irc: mention mnt-reform channel location 2023-09-23 11:20:45 +00:00
f8448d7d2f sxmo: fix sxmo_init ordering so my hooks are loaded and scale set properly 2023-09-23 11:20:20 +00:00
ba638c1533 sxmo-utils: 2023-09-09 -> 2023-09-22 2023-09-23 10:11:49 +00:00
130901d7f7 sxmo: fix inputhandler hook loic errors 2023-09-23 09:36:16 +00:00
07c3fd8941 sxmo: override the postwake handler 2023-09-23 09:17:21 +00:00
2d98bbf4d6 sxmo: ship a custom inputhandler 2023-09-23 09:13:26 +00:00
08acd9714f swaync: fix perms for jingle toggle 2023-09-22 23:10:50 +00:00
57c3abf2e1 cozy: disable reporting/telemetry 2023-09-22 22:51:05 +00:00
2f12fd8ae7 ejabberd: port config to structured nix attrs 2023-09-22 22:50:51 +00:00
69ab1c1b8f servo-vpn: resolve DNS through the VPN 2023-09-22 19:49:35 +00:00
a2f4dc0b6c nfs4 patch: fix so moby can still build 2023-09-22 19:48:51 +00:00
6d7ff7ea86 fix trust-dns to resolve when invoked from VPN 2023-09-22 18:54:12 +00:00
00d831e755 wg-home: fix DNS forwarding
ugh, this is a mess, but it seems to work
2023-09-22 14:36:56 +00:00
63d65a453c trust-dns: spin up a separate server to wg-home requests, also forwarding them to upstream 2023-09-22 12:36:48 +00:00
68e3bc932f bypass-paywalls-clean: 3.2.5.0 -> 3.3.4.0; lay the foundation for updateScripts in this repo
note that the hash produced by the updateScript wasn't actually correct
(failed once i attempted to build it). hmm.
2023-09-22 10:13:56 +00:00
6222998303 firefox-extensions: update all binary extensions 2023-09-22 09:45:24 +00:00
8d0678457e patch broken NFS mounting 2023-09-22 09:33:05 +00:00
c7c669b8d4 nixpkgs: 2023-09-17 -> 2023-09-19; sops-nix; uninsane-dot-org 2023-08-03 -> 2023-09-20
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/970a59bd19eff3752ce552935687100c46e820a5' (2023-09-17)
  → 'github:nixos/nixpkgs/5ba549eafcf3e33405e5f66decd1a72356632b96' (2023-09-19)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4356a5a0c12c9dc1b6bdde0631c7600d9377ed8b' (2023-09-19)
  → 'github:Mic92/sops-nix/2f375ed8702b0d8ee2430885059d5e7975e38f78' (2023-09-21)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=f4d91aa201b6e49af690f250d4786bd1d8b4dcfd' (2023-08-03)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=9952b69003eb7397cadf1df0b5d696cea1833248' (2023-09-20)
```
2023-09-21 20:59:56 +00:00
e28cf3ebb5 swaync: fix SIP/jingle indicators to use systemctl --user 2023-09-21 20:37:11 +00:00
4ea0256c56 swaync: ignore "Modem crashed!" notifications/warnings 2023-09-21 20:21:38 +00:00
bf52b65dd5 Dino: fix to workspace 1 2023-09-21 20:03:19 +00:00
6de9b87f16 swaync: add entry for SIP/jingle call receiving 2023-09-21 19:53:02 +00:00
2b48adfbef gnome-calls: don't auto-start 2023-09-21 19:44:11 +00:00
7f944ad4a1 dino: autostart (on moby) 2023-09-21 19:40:12 +00:00
50045432fa libkiwix: 12.0.0 -> 12.1.1 2023-09-20 09:41:18 +00:00
cd4b700962 wg-home: docs: link to Arch wiki on wireguard docs 2023-09-20 09:34:26 +00:00
b98934693c programs: ship binutils (for "strings") 2023-09-20 06:42:23 +00:00
e22fb7c6b7 nixpkgs: 2023-09-15 -> 2023-09-17; mobile-nixos; sops-nix
```
• Updated input 'mobile-nixos':
    'github:nixos/mobile-nixos/7564347ef8bc2b96c72abbfaf158e3fd1e47efd6' (2023-09-15)
  → 'github:nixos/mobile-nixos/fa12ebaa98ce18e30cbdaf58a71b9ec56984e38f' (2023-09-19)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/ace5093e36ab1e95cb9463863491bee90d5a4183' (2023-09-15)
  → 'github:nixos/nixpkgs/970a59bd19eff3752ce552935687100c46e820a5' (2023-09-17)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/ea208e55f8742fdcc0986b256bdfa8986f5e4415' (2023-09-12)
  → 'github:Mic92/sops-nix/4356a5a0c12c9dc1b6bdde0631c7600d9377ed8b' (2023-09-19)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/5601118d39ca9105f8e7b39d4c221d3388c0419d' (2023-09-02)
  → 'github:NixOS/nixpkgs/596611941a74be176b98aeba9328aa9d01b8b322' (2023-09-16)
```
2023-09-19 16:43:30 +00:00
dfbe5c5210 swaync: add a button to toggle VPN 2023-09-19 16:25:17 +00:00
f3ed9a3452 sane-vpn: support "vpn-servo" 2023-09-19 16:09:56 +00:00
57e35eeab1 vpn-servo: allow coexistence with wg-home 2023-09-19 16:03:20 +00:00
e3e2af46a1 define a new "vpn-servo" which allows routing all traffic out of servo, via wireguard 2023-09-19 15:52:24 +00:00
3a30b891be sane-vpn-{up,down}: consolidate 2023-09-19 15:41:54 +00:00
b69424983f hosts.nix: split the data out of modules/ and into common/ 2023-09-19 15:32:31 +00:00
37313183f5 engrampa: fix eval error
note that the package doesn't actually build correctly. :s
2023-09-19 14:37:03 +00:00
86453b6873 todo.md: new item to prettify sane-bt-search 2023-09-19 14:23:32 +00:00
c1d62bdbc2 wg-quick: allow clients to contact the internet 2023-09-19 12:36:57 +00:00
bbe633ef2e wg-home: refactor: don't 'use' lib/builtins 2023-09-19 12:09:21 +00:00
201bfb922d WIP: wake-on-lan: use own patch since peetz0r doesnt apply
this patch might not actually be necessary
2023-09-19 11:40:15 +00:00
9d1ebd38ce wg-home: don't infer role from ip address, but set it explicitly 2023-09-19 11:38:51 +00:00
9dfcacf8a3 todo.md: add some apps to install on moby 2023-09-19 10:10:22 +00:00
247b272986 ship nm-connection-editor 2023-09-19 10:09:24 +00:00
072506c5d9 ship ethtool 2023-09-19 10:09:24 +00:00
05bbc5d18f moby: switch to linux-megous-firmware for firmware 2023-09-19 10:09:24 +00:00
e51ca61bfe rtl8723cs-firmware: leave note about mobile-nixos approach 2023-09-19 10:09:24 +00:00
d3ad280731 package megi's linux firmware 2023-09-19 10:09:24 +00:00
85b043af37 WIP: enable wake on wlan 2023-09-19 10:09:24 +00:00
0342594728 programs: ship iw 2023-09-19 10:09:24 +00:00
56e7484721 nixpatches: update g4music/font-manager hashes 2023-09-18 10:10:23 +00:00
cd61a530cb sxmo: fix multi-user.service -> multi-user.target typo 2023-09-17 08:44:31 +00:00
f4c0e06b62 docs: gnome-calls: mention ~/.cache/folks dir 2023-09-17 05:57:21 +00:00
b4d748d87f gnome-calls: run as daemon after log-on 2023-09-17 05:53:05 +00:00
107c07915e ship gnome-calls 2023-09-17 05:00:15 +00:00
f493f005a9 lappy: switch back to sway 2023-09-16 15:11:01 +00:00
fbafbd0d52 todo.md: new item for reducing phog closure 2023-09-16 15:01:49 +00:00
9215da61a3 todo.md: remove completed eg25-control items 2023-09-16 15:00:17 +00:00
61428a5c8b unify fonts across sway and sxmo 2023-09-16 14:59:12 +00:00
77906fb58b font-manager: re-enable 2023-09-16 12:44:31 +00:00
a79d021123 font-manager: build without webkit 2023-09-16 12:44:09 +00:00
d85f5d88cd docs: cross: fractal-next: leave notes about present failure mode 2023-09-16 12:04:31 +00:00
518d63c08d tokodon: remove
this is upstream now; my own build file was already a no-op
2023-09-16 09:23:08 +00:00
b254f0716b engrampa: add a warning to make sure i tend this once upstream updates 2023-09-16 09:21:57 +00:00
9e93a4cdce chatty-latest: unstable-2023-08-01 -> v0.8.0_rc0
this actually is an update, despite the dates (merge order/commit timestamps/timezones)
2023-09-16 09:21:36 +00:00
38f839fb60 servo: fix over-broad "passwordFile" fix 2023-09-16 08:42:05 +00:00
09cee559eb mpv: improve MIME priority; re-enable youtube support 2023-09-16 08:36:08 +00:00
f64af6675b p10k/powerlevel10k: remove (unused)
i use starship now
2023-09-16 08:33:02 +00:00
9d71a08841 kitty: remove configs (unused)
i use alacritty now
2023-09-16 08:26:39 +00:00
321cc62ca0 passwordFile -> hashedPasswordFile to fix deprecation warning 2023-09-16 08:17:48 +00:00
92bf5c3be2 fix g4music build 2023-09-16 08:15:00 +00:00
43db1fed84 nixpkgs: 2023-09-14 -> 2023-09-15
```
• Updated input 'mobile-nixos':
    'github:nixos/mobile-nixos/d25d3b87e7f300d8066e31d792337d9cd7ecd23b' (2023-09-15)
  → 'github:nixos/mobile-nixos/7564347ef8bc2b96c72abbfaf158e3fd1e47efd6' (2023-09-15)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/f2ea252d23ebc9a5336bf6a61e0644921f64e67c' (2023-09-14)
  → 'github:nixos/nixpkgs/ace5093e36ab1e95cb9463863491bee90d5a4183' (2023-09-15)
```
2023-09-16 08:15:00 +00:00
f81b76a975 nixpkgs: 2023-09-11 -> 2023-09-14; mobile-nixos -> 2023-09-15
```
• Updated input 'mobile-nixos':
    'github:nixos/mobile-nixos/d22c60e8d4d21f0197c1cac88c34dcc366b7a16c' (2023-09-10)
  → 'github:nixos/mobile-nixos/d25d3b87e7f300d8066e31d792337d9cd7ecd23b' (2023-09-15)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/3a2786eea085f040a66ecde1bc3ddc7099f6dbeb' (2023-09-11)
  → 'github:nixos/nixpkgs/f2ea252d23ebc9a5336bf6a61e0644921f64e67c' (2023-09-14)
```
2023-09-16 08:15:00 +00:00
81c16ec479 swaync/feedbackd: activate ringer on incoming dino call 2023-09-16 05:06:41 +00:00
254da7e17b swaync: document env vars 2023-09-16 02:55:36 +00:00
400739cd83 feedbackd: add debug logging 2023-09-16 02:55:23 +00:00
2f7655e1c1 eg25-control: don't auto-start GPS on boot
this also means we don't power the modem on boot

this is OK to do now that i have a toggle in swaync for GPS
2023-09-15 16:55:27 +00:00
c3a6943b7e swaync: replace feedbackd button with gps button 2023-09-15 16:51:43 +00:00
fdc37c9f53 swaync: add button to toggle feedbackd
this is just a proof of concept: will toggle GPS later
2023-09-15 16:09:28 +00:00
c73246d7c6 sane-bt-search: fix tracker typos 2023-09-15 11:14:29 +00:00
e03ae48ef6 docs: feedbackd: note about default.json 2023-09-15 10:44:29 +00:00
cd1cfdd5db swaync: fix to also proxy notifs from Purisms Chatty app 2023-09-15 10:35:30 +00:00
d87015836e swaync: integrate with feedbackd for notification sounds 2023-09-15 10:20:18 +00:00
71c01795f4 moby: eg25-control-freshen-agps: fix to actually run hourly 2023-09-15 07:35:05 +00:00
2291c89dbc moby: eg25-control: fixup perms & add service that DLs new agps data when stale 2023-09-15 04:47:12 +00:00
1546304b4e eg25-control: run as own user
its perms might still need adjustment so that it can control modem power and write to mmcli
2023-09-15 03:54:01 +00:00
a0e6efb409 eg25-control: better cache timestamp handling (just use os.stat) 2023-09-15 03:37:18 +00:00
bd18a6871c eg25-control: add --ensure-agps-cache operation 2023-09-15 03:33:00 +00:00
0f3f566d25 eg25-control: use fs timestamp when caching 2023-09-15 02:53:35 +00:00
92451d1e28 eg25-control: cache the location assistance data 2023-09-15 02:35:31 +00:00
a0c2ed38e6 eg25-control: allow finer-grained service control 2023-09-15 01:38:50 +00:00
649e5a2cab sway: persist pipewire/wireplumber audio volumes 2023-09-13 12:57:18 +00:00
f2e51ef742 todo.md: swaync: theme 2023-09-13 10:14:07 +00:00
cf4c27a74c swaynotificationcenter: support pulseaudio even on cross builds 2023-09-13 10:11:11 +00:00
4cff9f99cb alsa-ucm-conf-sane: reduce Internal Speaker playback priority 2023-09-13 09:35:01 +00:00
741264ec48 nixpkgs: 2023-09-08 -> 2023-09-11
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b' (2023-09-08)
  → 'github:nixos/nixpkgs/3a2786eea085f040a66ecde1bc3ddc7099f6dbeb' (2023-09-11)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/faf21ac162173c2deb54e5fdeed002a9bd6e8623' (2023-09-05)
  → 'github:Mic92/sops-nix/ea208e55f8742fdcc0986b256bdfa8986f5e4415' (2023-09-12)
```
2023-09-13 06:07:19 +00:00
9ad1be40b2 persist: stores: crypt: remove unrecognized nodev flag 2023-09-13 06:07:04 +00:00
910d0fa59e persist: remove the nosuid flag since gocryptfs cant parse it here 2023-09-13 05:13:43 +00:00
f54d5a68ff trust-dns: 0.22.1 -> 0.23.0 2023-09-13 02:53:06 +00:00
a359350d7e sxmo-utils.latest: 2023-08-29 -> 2023-09-09 2023-09-12 10:29:10 +00:00
7bef6b4089 modules: users/programs: cleaner option passthrough 2023-09-12 05:44:53 +00:00
8011e78e21 persist: cryptClearOnBoot: note rare (but predictable) bug during redeploy 2023-09-12 04:58:56 +00:00
8a6fcd92ae programs: port to programs.services interface 2023-09-12 04:45:38 +00:00
3e33313bf0 programs: add a "services" option which forwards into the user config 2023-09-12 04:44:07 +00:00
6138291a8d users: add a "services" option via which to configure per-user systemd services 2023-09-12 04:43:23 +00:00
6addf5a3b2 fs: symlink: add an option by which to control the symlink target name 2023-09-12 04:41:32 +00:00
2ead0201ab todo.md: add task for moby battery readout 2023-09-12 00:07:34 +00:00
56ad2370dc colin: add to systemd-journal group 2023-09-12 00:06:00 +00:00
3157ceb88b swaync: dont ship dbus files 2023-09-11 23:03:57 +00:00
df2a2fe427 mako: simplify with a rmDbusServices helper 2023-09-11 22:56:54 +00:00
c55ea59c4f ship unzip, for when dtrx fails 2023-09-11 22:31:54 +00:00
9cb28e037d firefox: sponsorblock: fix to really not show popup on first-run 2023-09-11 22:30:28 +00:00
90eeb380ef firefox-extensions: upadte sponsorblock, ublacklist 2023-09-11 22:21:25 +00:00
9472a5c5d4 todo.md: sort moby tasks 2023-09-11 01:30:29 +00:00
d7884a9c8a nixpkgs: 2023-09-06 -> 2023-09-08
```
• Updated input 'mobile-nixos':
    'github:nixos/mobile-nixos/56fc9f9619f305f0865354975a98d22410eed127' (2023-07-22)
  → 'github:nixos/mobile-nixos/d22c60e8d4d21f0197c1cac88c34dcc366b7a16c' (2023-09-10)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0bffda19b8af722f8069d09d8b6a24594c80b352' (2023-09-06)
  → 'github:nixos/nixpkgs/db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b' (2023-09-08)
```
2023-09-10 12:57:14 +00:00
3f10fbdf4d sway: remove deprecated "types.string" 2023-09-10 12:57:10 +00:00
c5ccc0ab34 eg25-control: mention atinout as a way to send AT commands 2023-09-10 12:56:56 +00:00
664bd473c3 linux-megous: try making more modules be builtin 2023-09-10 12:56:37 +00:00
8ef0926614 cross: build in qemu using stock linux
this allows faster iteration of linux-megous kernel
2023-09-10 11:59:47 +00:00
2298d1bfaa linux-megous: 6.4.7 -> 6.4.15 2023-09-10 11:47:05 +00:00
08857dd143 sane-bt-search: rank miobt/subsplease 2023-09-10 11:46:39 +00:00
b26f7a5d2b sysadminUtils: ship dtc (device tree de/compiler) 2023-09-10 09:49:31 +00:00
4e997591dd snippets: update 2023-09-10 00:49:02 +00:00
fad3972554 sway: waybar: fix media to better handle multiple players 2023-09-10 00:01:39 +00:00
755f844294 doc: sway/wlroots patch: explain the xdg_activation_v1 situation 2023-09-09 10:52:07 +00:00
fd18da52a8 overlays/preferences: remove dead dino code (it never worked) 2023-09-09 09:32:21 +00:00
cc78c3c36e sway: patch to temporarily allow any window to request activation (fix for notifications) 2023-09-09 09:32:00 +00:00
75009f6816 doc: sxmo: explain why we need nerdfonts 2023-09-09 07:44:31 +00:00
59f82cea27 doc: element: leave notes for if element fails to render, again 2023-09-09 07:11:25 +00:00
0da8d282fe feeds: add Andrew Heaton - Political Orphanage 2023-09-09 02:33:48 +00:00
6b4bd5ea28 feeds: remove Useful Idiots
the only ungated content is just idle chitchat
2023-09-09 02:20:02 +00:00
93ceef0163 sane-bt-search: fix bakabt URIs 2023-09-09 00:05:22 +00:00
eab0d656d3 docs: cpuFreqGovernor: explain which hardware this config affects 2023-09-08 23:37:21 +00:00
c2d99603a8 nixpkgs: 2023-09-04 -> 2023-09-06
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/3c15feef7770eb5500a4b8792623e2d6f598c9c1' (2023-09-04)
  → 'github:nixos/nixpkgs/0bffda19b8af722f8069d09d8b6a24594c80b352' (2023-09-06)
```
2023-09-08 21:16:12 +00:00
f73b6b56a9 nixpkgs: 2023-09-02 -> 2023-09-04
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e56990880811a451abd32515698c712788be5720' (2023-09-02)
  → 'github:nixos/nixpkgs/3c15feef7770eb5500a4b8792623e2d6f598c9c1' (2023-09-04)
```
2023-09-08 20:48:56 +00:00
b65eca7dcf sxmo: fix so the sway session launched via phog includes debug logging 2023-09-08 10:59:31 +00:00
dec5826be8 all: switch powerManagement from powersave -> ondemand
how did i end up on powersave?

powersave is unusable on moby
2023-09-08 05:37:56 +00:00
b2393d4715 opengl: enable more broadly
this reduces the amount of sxmo-specific config
2023-09-07 10:47:17 +00:00
c86037e5d0 sway: don't enable greetd by default 2023-09-07 10:45:23 +00:00
d7751fb300 sway: remove unused installConfigs option 2023-09-07 10:33:28 +00:00
9582ea2e0a refactor: hosts/modules/hardware -> hosts/common/hardware
the config here didn't have any options; doesn't really make sense as a module
2023-09-07 10:29:25 +00:00
d92b393f01 hardware/x86_64.nix: split these options into more relevant files
also makes it so we dont ship opengl on platforms where we dont need it (servo)
2023-09-07 10:24:20 +00:00
ea26899735 docs: swaync: show how to view interactive style 2023-09-07 09:09:47 +00:00
f8d807225f swaync: fix backlight controls for moby 2023-09-07 08:54:43 +00:00
4c08609824 swaync: ship as own service 2023-09-07 07:34:22 +00:00
ccb11a4ecf swaync: fix broken black-on-black text 2023-09-07 07:33:15 +00:00
7f8ce68182 transmission: disable the incomplete dir 2023-09-07 06:14:11 +00:00
edf936820a transmission: fix permission-related errors 2023-09-07 06:14:11 +00:00
c6ab274dcf sxmo: waybar: add swaync 2023-09-07 01:27:30 +00:00
4d0c1811a3 neovim: associate with json/txt/md 2023-09-07 00:11:33 +00:00
ccb6f33b2f swaync: tune config; ignore certain sxmo notifications 2023-09-07 00:11:14 +00:00
4484fd243e docs: swaynotificationcenter: show how to reveal the notification center 2023-09-06 10:22:56 +00:00
7f1cdae91a sxmo: remove mako & other programs which are managed by sway now 2023-09-06 10:14:59 +00:00
b763009821 cross: fix swaynotificationcenter compilation 2023-09-06 09:56:46 +00:00
f392c0c02b swaync: tune parameters a bit 2023-09-06 09:20:00 +00:00
027086dd48 waybar: add divider to swaync 2023-09-06 09:19:50 +00:00
6eeca57694 waybar: add swaync notifications center 2023-09-06 09:13:34 +00:00
cc9ff2a2b0 swaynotificationcenter: port text blob to structured nix config 2023-09-06 09:03:19 +00:00
507753b3dc .gitignore: ignore some more things 2023-09-06 08:59:58 +00:00
eaecb395cd sway: switch from mako to swaynotificationcenter
mako's not working great on moby; hoping this will be better
2023-09-06 08:57:25 +00:00
6f5132633f sway: disable unused status_cmd 2023-09-06 08:19:52 +00:00
1076289490 sway: enable xwayland (but not for sxmo) 2023-09-06 08:19:52 +00:00
743f669b8c mako: disable the dbus service so our systemd service can take control 2023-09-06 08:19:52 +00:00
c12fc4bd57 todo.md: remove completed mpv item 2023-09-06 08:19:52 +00:00
9ab82904e6 mpv: remove power-button -> close mpv mapping 2023-09-06 08:19:51 +00:00
45df0954f4 sway: improve waybar text size 2023-09-06 08:19:51 +00:00
de685236a0 sway: waybar: fix default min-width setting (to aid moby) 2023-09-06 01:55:14 +00:00
2aa8033a5f sway: remove defaulted bar options 2023-09-06 01:18:35 +00:00
12b2fb6dfd mako: deploy as systemd service 2023-09-06 00:57:47 +00:00
aa5eb3988d sway: fix broken @status@ substitution 2023-09-06 00:51:13 +00:00
5efeb6ca50 lappy: sxmo: set noidle 2023-09-06 00:46:08 +00:00
18eaebb7fc mako: don't dismiss notifications when touched 2023-09-05 18:21:26 +00:00
9ed3dd4f22 sxmo: let mako be started via normal dbus activation
note that sxmo still installs its own, custom, mako theme
2023-09-05 17:46:01 +00:00
51ecf1b54b sxmo: fix sxmo_hook_init.sh -> sxmo_hook_start.sh 2023-09-05 17:31:33 +00:00
d1741c60dc sxmo: clean up our hook injections 2023-09-05 17:21:02 +00:00
f62c844aaf modules: fs: allow symlink target to be a path 2023-09-05 17:21:02 +00:00
409baf0321 moby: lift background into sway config 2023-09-05 16:13:23 +00:00
c3e37f7864 sops-nix: 2023-08-30 -> 2023-09-05
```
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/d9c5dc41c4b1f74c77f0dbffd0f3a4ebde447b7a' (2023-08-30)
  → 'github:Mic92/sops-nix/faf21ac162173c2deb54e5fdeed002a9bd6e8623' (2023-09-05)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/9117c4e9dc117a6cd0319cca40f2349ed333669d' (2023-08-27)
  → 'github:NixOS/nixpkgs/5601118d39ca9105f8e7b39d4c221d3388c0419d' (2023-09-02)
```
2023-09-05 09:26:59 +00:00
233a81c7d8 sxmo: more logging around power_button/volume_button 2023-09-05 09:14:32 +00:00
aca67b997a sxmo: dont start conky manually (let sway do it) 2023-09-05 08:48:18 +00:00
cddba3d35f conky: ship on sway
this probably causes double conky on sxmo, but i can fix in future patch
2023-09-05 08:31:50 +00:00
14b0d1bd37 sway: tidy up media key handling to not interfere with sxmo hooks 2023-09-05 04:51:12 +00:00
578162a266 sxmo: fix waybar height 2023-09-05 04:32:00 +00:00
ab776d7fc8 sxmo: fold the sway config fully into sane.gui.sway 2023-09-05 04:25:58 +00:00
cd9f05b8e1 sxmo: merge waybar configs into sway 2023-09-05 03:43:32 +00:00
2bf978f845 sway: waybar: disable sway/mode (it doesnt seem to do anything...) 2023-09-05 03:09:32 +00:00
b89212bcbd refactor: waybar: sort these items 2023-09-05 01:19:06 +00:00
5498694729 sway: tidy waybar items and add memory 2023-09-05 01:18:55 +00:00
7b5bf2969a sway: switch theming to be consistent with SXMO, for future merging 2023-09-05 01:05:59 +00:00
e198c49a96 refactor: sway: make snip_cmd be an actual shell script 2023-09-05 00:29:38 +00:00
7f5811db9a refactor: sway: split config template into own file 2023-09-05 00:28:38 +00:00
5c3bb2293c sway: consolidate the nix substitutions into mostly just one area and use sway-native variables after 2023-09-04 23:30:40 +00:00
59ac2061af sxmo: minor docs improvement 2023-09-04 11:33:14 +00:00
905934cad2 moby: disable blueberry app, since it doesnt compile 2023-09-04 11:31:07 +00:00
e89805cd17 sxmo: have sway launch sxmo -- not the other way around
this lets me treat sxmo as just some nice scripts which run atop an existing DE (sway), rather than the opposite

can share more code with my desktop/laptop
2023-09-04 11:10:30 +00:00
680ab2c189 lappy: fix sxmo polyfill 2023-09-04 10:01:29 +00:00
10095e3ce5 sxmo: rename greeter option: {,->greetd-}sway-gtkgreet 2023-09-04 01:06:57 +00:00
a2b8e23eee nixpkgs: 2023-09-01 -> 2023-09-02
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/aa8aa7e2ea35ce655297e8322dc82bf77a31d04b' (2023-09-01)
  → 'github:nixos/nixpkgs/e56990880811a451abd32515698c712788be5720' (2023-09-02)
```
2023-09-03 20:13:07 +00:00
0587c14af5 nixpkgs: 2023-08-31 -> 2023-09-01
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/3e52e76b70d5508f3cec70b882a29199f4d1ee85' (2023-08-31)
  → 'github:nixos/nixpkgs/aa8aa7e2ea35ce655297e8322dc82bf77a31d04b' (2023-09-01)
```
2023-09-03 08:49:56 +00:00
6a83e0ce6c WIP: sxmo: ship notifications-related dependencies 2023-09-03 08:48:43 +00:00
72960aa963 cross: fix flatpak compilation 2023-09-03 08:46:50 +00:00
5f4f047769 cross: fix ostree compilation 2023-09-03 07:45:21 +00:00
a880ba254b sway: remove some unneeded config options 2023-09-02 10:37:09 +00:00
4d75c3d97a ejabberd: document more compat & how to admin 2023-09-02 08:36:32 +00:00
90511ed765 ejabberd: support matrix: clarify client support 2023-09-02 08:36:32 +00:00
aa3b85511f ejabberd: docs: update federation/support matrix 2023-09-02 08:36:32 +00:00
5d90cbcc98 programs: ship gajim on desko 2023-09-02 07:21:16 +00:00
0525f99813 moby: ship dino 2023-09-02 05:13:01 +00:00
769019f2f5 greetd: types.string -> types.str 2023-09-02 01:36:11 +00:00
dcaba0f0ee secrets: fix build when host has no secrets 2023-09-02 01:34:32 +00:00
d33b6eec59 flake: add a check-host-configs target to ensure all hosts are buildable 2023-09-02 01:25:20 +00:00
20aef83496 greetd: refactor: session{Name,Cmd,User} into session attrset 2023-09-02 00:54:05 +00:00
3cc4a1ea19 sxmo: port to greetd abstraction 2023-09-02 00:49:44 +00:00
a41fefa906 consolidate greetd stuff out of sway 2023-09-02 00:07:46 +00:00
c00bba3fcf nixpkgs: 2023-08-30 -> 2023-08-31
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e7f38be3775bab9659575f192ece011c033655f0' (2023-08-30)
  → 'github:nixos/nixpkgs/3e52e76b70d5508f3cec70b882a29199f4d1ee85' (2023-08-31)
```
2023-09-01 20:03:55 +00:00
63fab5899b common: mount /mnt/servo-nfs/playground 2023-09-01 10:10:28 +00:00
357b6ef06e nfs: expose playground as a read/write dir 2023-09-01 10:08:29 +00:00
4fdf74fdbe export: enforce a quota 2023-09-01 03:37:33 +00:00
15e09573d5 exports: consolidate nfs and sftpgo mounts into /var/export 2023-09-01 01:23:35 +00:00
d6479ca148 nfs/sftpgo: combine into "exports" nix directory 2023-09-01 00:39:22 +00:00
cf9558f166 WIP: sftp: define playground as a btrfs subvolume 2023-09-01 00:35:43 +00:00
68bce9c8b7 ports: if they fail to forward, retry after some interval 2023-09-01 00:30:32 +00:00
913201b9cd sane-bt-search: add TPB to TRACKER_RANKS 2023-08-31 23:38:29 +00:00
3f748164e4 ftp: add a playground directory 2023-08-31 12:56:30 +00:00
ded5d94d69 modules: fs: add a "text" type to populate static text files when symlinks wont do 2023-08-31 12:56:30 +00:00
815a8b52b6 refactor: sftpgo: define permissions via nix config 2023-08-31 12:56:30 +00:00
639a4cfe50 ftp: grant read access to LAN 2023-08-31 12:56:30 +00:00
b2af4e8983 nixpkgs: disable phog patch 2023-08-31 12:56:09 +00:00
ff39fc5d95 ports: make upnp service files more human-readable 2023-08-31 01:02:48 +00:00
9fea007d4f cross: support gnome "calls" package 2023-08-31 00:52:28 +00:00
f44a094d1d nixpkgs: 2023-08-28 -> 2023-08-30; sops-nix -> 2023-08-30
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/3efb0f6f404ec8dae31bdb1a9b17705ce0d6986e' (2023-08-28)
  → 'github:nixos/nixpkgs/e7f38be3775bab9659575f192ece011c033655f0' (2023-08-30)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/c89ee06488706b587a22085b1844bf9ca6ba5687' (2023-08-28)
  → 'github:Mic92/sops-nix/d9c5dc41c4b1f74c77f0dbffd0f3a4ebde447b7a' (2023-08-30)
```
2023-08-30 20:45:57 +00:00
ec6f90eb44 mpv: fix "DRM_IOCTL_MODE_CREATE_DUMB failed" bug 2023-08-30 10:32:31 +00:00
bbe583637f mpv: uosc: 2023-07-26 -> 2023-08-29 2023-08-30 06:33:09 +00:00
29eab151a1 lemoa: 0.3 -> 0.4 2023-08-30 05:34:04 +00:00
a7c5daf8a5 sxmo: sway-config: leave a todo for deploying via /etc/sway/config.d 2023-08-30 01:56:32 +00:00
a23dea03a9 sxmo: sway config: pull defaults from upstream sxmo-utils 2023-08-30 01:54:30 +00:00
45e5f3ecca dino: document how to start calls 2023-08-30 01:50:06 +00:00
8bcba8802f sxmo-utils: 2023-08-22 -> 2023-08-29 2023-08-30 01:49:48 +00:00
3e2e0ccc1c nixpatches: note to split xdg-utils patch 2023-08-29 21:26:43 +00:00
c14d88f1ea nixpkgs: 2023-08-27 -> 2023-08-28
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/a999c1cc0c9eb2095729d5aa03e0d8f7ed256780' (2023-08-27)
  → 'github:nixos/nixpkgs/3efb0f6f404ec8dae31bdb1a9b17705ce0d6986e' (2023-08-28)
```
2023-08-29 21:26:43 +00:00
e72e847147 sops-nix: 2023-08-27 -> 2023-08-28 2023-08-29 21:26:43 +00:00
073879e523 nixpkgs: 2023-08-25 -> 2023-08-27
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/5690c4271f2998c304a45c91a0aeb8fb69feaea7' (2023-08-25)
  → 'github:nixos/nixpkgs/a999c1cc0c9eb2095729d5aa03e0d8f7ed256780' (2023-08-27)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/1b7b3a32d65dbcd69c217d7735fdf0a6b2184f45' (2023-08-22)
  → 'github:Mic92/sops-nix/0618c8f0ed5255ad74ee08d1618841ff5af85c86' (2023-08-27)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/5e63e8bbc46bc4fc22254da1edaf42fc7549c18a' (2023-08-20)
  → 'github:NixOS/nixpkgs/9117c4e9dc117a6cd0319cca40f2349ed333669d' (2023-08-27)
```
2023-08-29 21:26:43 +00:00
bf302f70f1 servo: ejabberd: give each TURN port a unique upnp description
i think some impls expect the description to be unique?
2023-08-29 11:46:40 +00:00
a045eaa181 sxmo: persist the fontconfig and mesa_shader_cache directories for faster boot 2023-08-29 10:35:14 +00:00
b83b2ce0cc sxmo-utils: begin to push Makefile patches upstream 2023-08-29 10:32:56 +00:00
377aec7e07 sxmo-utils: re-add lost patch to the stable variant 2023-08-29 10:09:30 +00:00
9d50a6669a sxmo-utils-latest: 2023-08-11 -> 2023-08-22 2023-08-29 10:00:42 +00:00
bded6c9562 todo.md: new entry for getting sxmo youtube script working 2023-08-29 09:44:52 +00:00
5520c74921 sxmo-utils: add missing wl-clipboard dependency (for sxmo_screenshot.sh) 2023-08-29 09:44:30 +00:00
589c005bc4 sxmo-utils: add missing slurp dependency 2023-08-29 09:17:09 +00:00
d64a213ec2 sxmo-utils: add missing wtype package 2023-08-29 08:49:25 +00:00
18c940962e sxmo-utils: fix incorrect PREFIX
this should help the appscripts (screenshotting and the like)
2023-08-29 07:59:43 +00:00
e01b1f35fc sxmo-utils: simplifiy the install phase 2023-08-29 07:35:42 +00:00
60030860e5 todo.md: sxmo: better dependency/PATH handling 2023-08-29 07:35:42 +00:00
90894087e5 sxmo: apply SXMO_DISABLE_CONFIGVERSION_CHECK earlier 2023-08-29 07:35:42 +00:00
bdcccbd894 ejabberd: forward TURN ports over UPnP 2023-08-29 07:22:48 +00:00
b64cf408fb chatty: persist all of ~/.purple 2023-08-29 06:13:24 +00:00
eaca5b9889 cross: record more upstreaming status 2023-08-29 00:18:07 +00:00
1c265b2073 cross: update upstreaming status 2023-08-28 23:33:42 +00:00
fa98ba86bc sxmo: default SXMO_DISABLE_CONFIGVERSION_CHECK to on 2023-08-28 21:53:43 +00:00
53aee9e651 cross: libgweather/tuba: grab from upstream PRs 2023-08-28 12:04:03 +00:00
d4a305f5bb cross: tuba: grab from nixpkgs fork 2023-08-28 11:52:39 +00:00
fd39efe31f sxmo-utils: sxmo_hook_apps: fix some typod apps 2023-08-28 11:15:25 +00:00
3b2f4b6f72 preferences: phog: fix eval typo 2023-08-28 11:15:05 +00:00
9a16942b16 cross: send brightnessctl, libgweather (partially) upstream 2023-08-28 11:14:51 +00:00
fe47d68fd3 sxmo-utils: disable configversion checking
this is not yet deployed -- might not work 100%
2023-08-28 10:32:37 +00:00
deaee833cf cross: move phog patch to preferences.nix 2023-08-28 10:08:50 +00:00
8d03881109 cross compilation: disable kitty patch (no longer needed) 2023-08-28 10:06:24 +00:00
e476adfdf5 todo.md: add entry for fixing fonts in wvkbd 2023-08-28 09:56:24 +00:00
4201aa7466 gui: sxmo: default to sxmo-utils-latest variant of the package 2023-08-28 09:56:02 +00:00
a85d594c89 sxmo-utils: add a few more apps i use 2023-08-28 09:55:34 +00:00
7b98cd3d50 todo.md: remove completed phog item 2023-08-28 09:37:01 +00:00
d256a0b647 todo.md: upstreaming to non-nixpkgs 2023-08-28 09:36:11 +00:00
c87ba7f670 snippets: add link to sxmo-devel maillist 2023-08-28 09:26:41 +00:00
e4e5df80f1 sxmo-utils: factor out commons and create a package for sxmo-utils-latest 2023-08-28 09:26:30 +00:00
02f409451d chatty: persist .purple/chatty 2023-08-28 09:01:29 +00:00
9f2c7b90ce snippets.txt: more uninsane services; Johoe mempool 2023-08-28 08:52:33 +00:00
559c551752 re-enable dino XMPP client 2023-08-28 08:48:35 +00:00
304482cc9b moby: ModemManager: make quieter 2023-08-28 08:09:19 +00:00
ad9db91812 moby: ship eg25-control on user profile 2023-08-28 08:03:27 +00:00
1c7997e1ef rename eg25-control-defaults.service -> eg25-control 2023-08-28 08:03:14 +00:00
deefcaae9a nixpkgs: 2023-08-24 -> 2023-08-25
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/18324978d632ffc55ef1d928e81630c620f4f447' (2023-08-24)
  → 'github:nixos/nixpkgs/5690c4271f2998c304a45c91a0aeb8fb69feaea7' (2023-08-25)
```
2023-08-26 20:07:04 +00:00
562008f3c0 sxmo: default to greetd + sway + phog greeter 2023-08-26 19:57:43 +00:00
2584d62b28 sxmo: enable hardware opengl
this fixes the awful perf i was seeing when not using lightdm-mobile-greeter

xserver enables hardware opengl, i'm just copying that behavior to non-X greeters
2023-08-26 19:57:43 +00:00
dc64193a62 moby: generalize sun4i init failure to displayManager *and* greetd 2023-08-26 19:57:43 +00:00
a7f8089ed8 sane-bt-search: link to jargon definitions 2023-08-26 19:25:23 +00:00
e8e63167d2 phog: bring in-tree and patch to allow launching via sway
it looses the bar functionality (oh well)
2023-08-26 13:04:07 +00:00
c056191de1 sxmo: try some alternate greeters 2023-08-26 12:28:25 +00:00
f2a597f698 moby: sxmo: phog: provide an identifier in the syslog 2023-08-26 10:06:36 +00:00
7b637f976b moby: sxmo: fix phog to log its output 2023-08-26 09:40:07 +00:00
39a378c517 nixpkgs: 2023-08-22 -> 2023-08-24
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/b85ed9dcbf187b909ef7964774f8847d554fab3b' (2023-08-22)
  → 'github:nixos/nixpkgs/18324978d632ffc55ef1d928e81630c620f4f447' (2023-08-24)
```
2023-08-26 01:26:33 +00:00
0f9dfb9f8a sxmo-utils: add missing xrdb dependency 2023-08-25 23:37:05 +00:00
ab7f2fb1ec sxmo: switch back to lightdm-mobile greeter 2023-08-25 23:36:47 +00:00
a892c364c6 sxmo-utils: cherry-pick upstream light -> brightnessctl patch 2023-08-25 22:33:48 +00:00
a5c829fa96 moby: switch to phog by default 2023-08-25 13:29:49 +00:00
e844cf5970 phog: fix hardcoded paths 2023-08-25 13:29:29 +00:00
999c6fd880 preferences: remove a dead todo 2023-08-25 12:14:03 +00:00
2aa4bdd5a6 cross compilation: fix brightnessctl 2023-08-25 12:13:39 +00:00
05801f298f phog: add missing gnome-shell dependency
oof, that's a massive dep to pull in just for the schema files...
2023-08-25 12:05:15 +00:00
0fd1ec861b sxmo-utils: add missing brightnessctl dep 2023-08-25 12:04:28 +00:00
37d0473b7f cross: enable gnome-clocks, gnome-shell, squeekboard, better libgweather 2023-08-25 12:03:35 +00:00
aaca46c485 cross: get ibus to cross-compile 2023-08-25 12:01:49 +00:00
30a6a1c1c2 new todo: fix mpv blank UI bug 2023-08-25 01:34:19 +00:00
2c39ac3015 phoc: remove patches; they've been upstreamed 2023-08-25 01:33:34 +00:00
cc6a0dd8b3 phoc: fix patching style to be better overridable 2023-08-25 01:32:45 +00:00
fbf62f0531 moby: add experimental support for phog greeter 2023-08-25 01:25:07 +00:00
c96b951895 todo.md: moby: switch to phog greeter 2023-08-24 21:31:28 +00:00
34294341d7 libgweather: update nws patch with PR feedback 2023-08-24 11:41:31 +00:00
cdc8885e60 sane-weather: leave notes for future work 2023-08-24 11:23:33 +00:00
41416cd184 moby: conky: tune weather display 2023-08-24 11:17:36 +00:00
3c32246d9a sane-weather: default to METAR only 2023-08-24 11:06:24 +00:00
6862d084ac sane-weather: format the temperature better 2023-08-24 11:06:05 +00:00
6eb3626203 ship gnome-weather to all GUI platforms 2023-08-24 11:00:38 +00:00
5f808eab5c libgweather: push NWS segfault fix upstream 2023-08-24 10:35:54 +00:00
fe15c0b097 sane-weather: switch to METAR + NWS
NWS gets us hourly forecasts
2023-08-24 09:20:36 +00:00
e4fbe9d03c sane-weather: reoder the operations list 2023-08-24 09:20:36 +00:00
de09d54c64 sane-weather: make the location configurable 2023-08-24 09:20:36 +00:00
5bf117fc05 sane-weather: document some functions/classes 2023-08-24 09:20:36 +00:00
f734797628 libgweather: fix null string comparison in nws backend 2023-08-24 09:20:36 +00:00
236470dc33 cross compilation fixes for previous nixpkgs update 2023-08-24 05:56:47 +00:00
555627dad5 nixpkgs: 2023-08-21 -> 2023-08-22
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/91a22f76cd1716f9d0149e8a5c68424bb691de15' (2023-08-21)
  → 'github:nixos/nixpkgs/b85ed9dcbf187b909ef7964774f8847d554fab3b' (2023-08-22)
```
2023-08-24 02:04:25 +00:00
49c5ddd9f3 nixpkgs: 2023-08-19 -> 2023-08-21
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/d680ded26da5cf104dd2735a51e88d2d8f487b4d' (2023-08-19)
  → 'github:nixos/nixpkgs/91a22f76cd1716f9d0149e8a5c68424bb691de15' (2023-08-21)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f81e73cf9a4ef4b949b9225be3daa1e586c096da' (2023-08-15)
  → 'github:Mic92/sops-nix/1b7b3a32d65dbcd69c217d7735fdf0a6b2184f45' (2023-08-22)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/efeed708ece1a9f4ae0506ae4a4d7da264a74102' (2023-08-12)
  → 'github:NixOS/nixpkgs/5e63e8bbc46bc4fc22254da1edaf42fc7549c18a' (2023-08-20)
```
2023-08-23 13:40:45 +00:00
a43ccaac64 conky: display temperature 2023-08-23 13:38:11 +00:00
91c02aec9a sane-weather: enable cross compilation 2023-08-23 13:31:45 +00:00
681d3d5520 sane-weather: more diagnostics 2023-08-23 11:55:30 +00:00
f945dc42fa sane-weather: init
for now, all it does is print the current temperature; no caching
2023-08-23 11:14:13 +00:00
cc6f33b928 sxmo-utils: add missing curl, libxml2 deps 2023-08-23 06:18:24 +00:00
2f83e73139 sxmo: sway: default to tabbed workspaces 2023-08-22 10:03:07 +00:00
53ccb96234 sxmo: sway: theme "urgent" titlebars to match mpv colors 2023-08-22 10:00:13 +00:00
a0d6139e50 add todos around moby GPS 2023-08-22 08:53:55 +00:00
90abadf7c4 eg25-control: document typical jitter 2023-08-22 08:51:10 +00:00
7f1e959ece moby: gps: grant geoclue access to all users 2023-08-22 08:49:04 +00:00
794df4d762 moby: geoclue: restrict to just "colin" user 2023-08-22 07:20:31 +00:00
d6b262a28e moby: enable geoclue service 2023-08-22 07:15:14 +00:00
0cc518e523 todo.md: reflow 4-space tabs to 2-space 2023-08-22 06:41:26 +00:00
8780dff794 add lemonade, new-server-as-remote-builder to todo 2023-08-22 06:40:46 +00:00
0f881006e7 eg25-control: don't abort when AGPS download fails 2023-08-22 04:59:30 +00:00
5d349ce042 moby: init GPS during boot 2023-08-22 04:53:40 +00:00
940711878b eg25-control: make own package 2023-08-22 04:41:54 +00:00
75048efcf3 eg25_gps_init.py: allow CLI config of modem control points 2023-08-22 04:36:37 +00:00
8cc5199d9b FIXUP 2023-08-22 04:35:51 +00:00
3f60bacd38 eg25_gps_init: allow finer CLI control 2023-08-22 04:32:11 +00:00
8fb705dde4 eg25-gps-init: document the SIM requirement 2023-08-21 19:39:55 +00:00
79777cd4ae eg25-gps-init: improve docs 2023-08-21 11:14:16 +00:00
fabd1e3b64 eg25-gps-init: fixup docs 2023-08-21 10:42:27 +00:00
bcb6beef05 check in a script to initialize the eg25 gps
not part of the deployed system: has to be run manually
2023-08-21 10:33:39 +00:00
34336e4ade linux-megous: 6.4.0-rc7 -> 6.4.7
this is the version currently deployed by postmarketOS
2023-08-21 04:49:46 +00:00
a518e56cf1 feeds: leave note to where to find podcasts that have a lemmy community 2023-08-21 01:14:55 +00:00
6cc7655180 feeds: add Tom Scott's podcast 2023-08-21 01:13:19 +00:00
0a15aad6d7 sane-bt-search: rename "source" sort to "tracker" 2023-08-20 09:14:45 +00:00
1d8bee2856 sane-bt-search: add a flag to sort by tracker reputation 2023-08-20 09:14:19 +00:00
6894d5828b sane-bt-search: refactor: move filter logic off of Torrent class 2023-08-20 08:53:06 +00:00
35bc222552 sane-bt-search: allow showing only videos 2023-08-20 08:49:04 +00:00
16b5b6840f sane-bt-search: refactor: make filtering easier to extend 2023-08-20 08:45:10 +00:00
1a7837d740 flake: add a sync-lappy command 2023-08-20 07:46:55 +00:00
607bfbe452 fs: add /mnt/lappy-home 2023-08-20 06:26:20 +00:00
c2b85bd6b8 refactor: break out a helper in fs.nix for mounting remote home dirs 2023-08-20 06:20:28 +00:00
c3bc0ec645 fs: remove desko-root mount
i don't use it in practice
2023-08-20 06:11:17 +00:00
89b5e8145d lemmy: pict-rs: remove unused options 2023-08-20 05:01:24 +00:00
0edab7ed64 lemmy: port to new pict-rs and enable video 2023-08-20 05:00:35 +00:00
c8a3814f6a nixpkgs: 2023-08-18 -> 2023-08-19
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8ecc900b2f695d74dea35a92f8a9f9b32c8ea33d' (2023-08-18)
  → 'github:nixos/nixpkgs/d680ded26da5cf104dd2735a51e88d2d8f487b4d' (2023-08-19)
```
2023-08-20 00:47:38 +00:00
9ddac508e2 sane-bt-search: port to argparse 2023-08-19 23:32:11 +00:00
3245f8f94c nixpkgs: 2023-08-17 -> 2023-08-18
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/42c25608aa2ad4e5d3716d8d63c606063513ba33' (2023-08-17)
  → 'github:nixos/nixpkgs/8ecc900b2f695d74dea35a92f8a9f9b32c8ea33d' (2023-08-18)
```
2023-08-19 11:30:18 +00:00
8be1f43c23 g4music: m4a support: acquire from upstream PR 2023-08-18 20:07:26 +00:00
e29e26605b nixpkgs: 2023-08-16 -> 2023-08-17
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/caac0eb6bdcad0b32cb2522e03e4002c8975c62e' (2023-08-16)
  → 'github:nixos/nixpkgs/42c25608aa2ad4e5d3716d8d63c606063513ba33' (2023-08-17)
```
2023-08-18 10:07:17 +00:00
7bd6c0c14d WIP: moby: launch ModemManager in debug mode
this lets me use mmcli --command=...
2023-08-18 10:05:32 +00:00
d7c912386f linux-megous: re-enable modem-power
it's likely i won't be using eg25-manager after all and will have to manually boot the modem, so may as well use Megi's driver for that
2023-08-18 04:08:32 +00:00
e7e86cae95 modemmanager: undo patching
once i insert a SIM, it's able to understand the modem...
2023-08-18 02:17:09 +00:00
b083ce87be eg25-manager: disable 2023-08-17 10:56:32 +00:00
17b90fc697 eg25-manager: configure without modemmanager support 2023-08-17 08:34:32 +00:00
4fc59fa2ac modemmanager: experimental patch to not fail the whole modem if there's no sim 2023-08-17 08:34:18 +00:00
e87cda2e55 g4music: add mp4 support 2023-08-17 01:51:25 +00:00
2c4d30b5ec postgresql: tune db parameters
fixes pleroma timeouts
2023-08-17 01:28:37 +00:00
d0af645af8 pleroma: add missing "prepare: :named" config 2023-08-17 01:28:33 +00:00
a1f79dc18a komikku: use unpatched upstream now that my fix is in a release 2023-08-17 00:01:15 +00:00
ff65a697a9 nixpatches: apply outstanding komikku, komga update PRs 2023-08-16 22:49:45 +00:00
ef881b1392 podcasts: subscribe to Useful Idiots 2023-08-16 22:03:40 +00:00
debea8fa5b podcasts: subscribe to Behind the Bastards 2023-08-16 21:58:51 +00:00
8a9acbaeea podcasts: subscribe to We're Not Wrong 2023-08-16 21:58:07 +00:00
8869ec7bca podcasts: subscribe to omegatau 2023-08-16 21:54:55 +00:00
dc0268736a g4music: remove (use upstream) 2023-08-16 21:25:25 +00:00
6f9c2a846e nixpkgs: 2023-08-15 -> 2023-08-16
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8353344d3236d3fda429bb471c1ee008857d3b7c' (2023-08-15)
  → 'github:nixos/nixpkgs/caac0eb6bdcad0b32cb2522e03e4002c8975c62e' (2023-08-16)
```
2023-08-16 21:24:51 +00:00
3cb00840de nixpkgs: 2023-08-14 -> 2023-08-15
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/6e287913f7b1ef537c97aa301b67c34ea46b640f' (2023-08-14)
  → 'github:nixos/nixpkgs/8353344d3236d3fda429bb471c1ee008857d3b7c' (2023-08-15)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/32603de0dc988d60a7b80774dd7aed1083cd9629' (2023-08-13)
  → 'github:Mic92/sops-nix/f81e73cf9a4ef4b949b9225be3daa1e586c096da' (2023-08-15)
```
2023-08-16 11:31:04 +00:00
6a2603a4ea dev-machine: disable zeal (requires qtwebengine) 2023-08-16 11:29:43 +00:00
69efecb2ef postgresql: update 13 -> 15 2023-08-16 11:09:22 +00:00
056e6d358e moby: switch back to megi kernel (manjaro kernel has graphical glitches) 2023-08-16 10:59:58 +00:00
793baf0e0f cross: remove upstreamed tracker patches 2023-08-16 10:54:36 +00:00
721899258a cross: point playerctl patch to upstream PR 2023-08-16 10:54:07 +00:00
4f9d84cd82 cross: fix playerctl build 2023-08-16 10:34:13 +00:00
a462180d3c sane-stop-all-servo: add signald, pict-rs 2023-08-16 10:34:13 +00:00
58f2d87959 sane-stop-all-servo: add missing mautrix-signal and lemmy-ui services 2023-08-16 10:34:13 +00:00
a50b8e6373 moby: split the old linux-manjaro config into its own package & update it 2023-08-16 10:10:42 +00:00
4ec947d549 eg25-manager: set RestartSec to make the restart loops less painful 2023-08-16 09:09:13 +00:00
6751a74063 moby: kernel: better docs 2023-08-16 09:08:35 +00:00
6118a18200 gthumb: associate with gif and webp 2023-08-15 20:48:51 +00:00
d223d4be06 cross: try to fix webkitgtk build 2023-08-15 10:56:07 +00:00
ab7ec9bd74 cross: remove dead overrides for upstreamed packages 2023-08-15 10:55:18 +00:00
7b70b5ec86 linux-megous: build WITHOUT modem_power module, for better eg25-manager compatibility 2023-08-15 10:49:07 +00:00
db99043753 eg25-manager.service: remove modem_power module & point to the right UART 2023-08-15 10:46:18 +00:00
8f87e49606 cross: fix comment typos 2023-08-15 05:38:11 +00:00
5557107259 nixpkgs: 2023-08-13 -> 2023-08-14
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/100a1550b0e7a64b960c625b656f9229bdef5f87' (2023-08-13)
  → 'github:nixos/nixpkgs/6e287913f7b1ef537c97aa301b67c34ea46b640f' (2023-08-14)
```
2023-08-15 04:32:49 +00:00
1b5c870798 sane-scripts.sync-music: add to a package set (sane-scripts.sys-utils) 2023-08-15 01:47:45 +00:00
a5162651b7 zsh: re-enable lost keybindings like ctrl+r and ctrl+a 2023-08-15 01:47:12 +00:00
b9868512d6 switch TERMINAL from kitty -> alacritty 2023-08-15 01:46:57 +00:00
8432d9c9ed sway: be terminal agnostic 2023-08-15 01:46:40 +00:00
5d4f94f218 add alacritty program/config 2023-08-15 01:46:22 +00:00
7e9d5d99c7 g4music: obtain via nixpkgs PR 2023-08-14 20:19:22 +00:00
487e64b09b nixos/dconf patch: point to upstream PR 2023-08-14 20:13:19 +00:00
5e350b810f nixpkgs: 2023-08-10 -> 2023-08-13; sops-nix 2023-07-24 -> 2023-08-13
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e' (2023-08-10)
  → 'github:nixos/nixpkgs/100a1550b0e7a64b960c625b656f9229bdef5f87' (2023-08-13)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/c36df4fe4bf4bb87759b1891cab21e7a05219500' (2023-07-24)
  → 'github:Mic92/sops-nix/32603de0dc988d60a7b80774dd7aed1083cd9629' (2023-08-13)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/ce45b591975d070044ca24e3003c830d26fea1c8' (2023-07-22)
  → 'github:NixOS/nixpkgs/efeed708ece1a9f4ae0506ae4a4d7da264a74102' (2023-08-12)
```
2023-08-14 20:12:01 +00:00
5fb3a6be81 desko: disable jellyfin (just use mounted fs, avoid qtwebengine...) 2023-08-14 10:27:10 +00:00
dbec4b8f32 cross: expand buildInQemu to support a few more packages (e.g. g4music, but i didnt need it in the end) 2023-08-14 10:23:23 +00:00
f8b559bef1 g4music: docs on how to get it rendering correctly 2023-08-14 10:21:13 +00:00
7d9d0ce8b5 g4music: wrapGAppsHook -> wrapGAppsHook4 2023-08-14 10:20:54 +00:00
7857f123a4 new nix run '.#sync-moby' command to synchronize music onto my mobile phone 2023-08-14 08:20:06 +00:00
e3ba156fe1 fs: define /mnt/moby-home 2023-08-14 08:10:17 +00:00
c824751682 ~: don't symlink ~/Music/servo
it gets in the way for devices that have a full copy of their music
2023-08-14 08:10:06 +00:00
e5520437a5 sane-sync-music: init 2023-08-14 08:02:29 +00:00
c6211fe48f ship g4music 2023-08-14 06:17:22 +00:00
54d6c9008d g4music: init at 3.2 2023-08-14 06:13:22 +00:00
05e5edcce3 mpv: fix bug where GUI would be missing for some podcasts 2023-08-14 05:52:16 +00:00
3249baccfa mopidy: remove dead service code 2023-08-13 10:20:50 +00:00
274682cf85 mopidy: comment for how to disable spotify backend 2023-08-13 10:17:43 +00:00
31a700f6a7 mcg: support cross compilation 2023-08-13 09:39:04 +00:00
91a6fc32ef desktop: ship rhythmbox music player 2023-08-13 09:27:01 +00:00
135b87a091 mcg: init at 3.2.1 2023-08-13 09:24:17 +00:00
6b9484f611 cross: re-enable qt5 override. i dont actively use it but it is nice for testing 2023-08-13 07:49:29 +00:00
7a612b701d cross: emulateBuildMachine -> buildInQemu 2023-08-13 07:41:45 +00:00
c69fb690f1 cantata: fix to be in desktopGuiApps (because it needs qt) 2023-08-12 09:05:27 +00:00
1ef73dd69d mopidy: get spotify, jellyfin working 2023-08-12 09:00:33 +00:00
54afa1aec5 cross compiling: update status/notes 2023-08-12 08:26:18 +00:00
72c3c939e2 programs: ship cantata & mopidy for music playing (desktop) 2023-08-12 08:26:18 +00:00
67d8e89556 WIP: enable mopidy music server 2023-08-12 08:26:18 +00:00
07408813db python310Packages.keyring: re-enable cryptography dependency (it cross compiles now) 2023-08-12 08:03:16 +00:00
436760a592 python310Packages.keyring: fix cross compilation 2023-08-12 07:58:15 +00:00
5c758df032 gpodder-adaptive: fix cross compilation 2023-08-12 04:14:47 +00:00
d12a41bfa9 gpodder-adaptive: fix pname 2023-08-12 03:51:22 +00:00
8ec22b6320 mepo: fix autoPatchelfHook placement so it cross compiles 2023-08-12 02:44:14 +00:00
95d04467a8 cross: delete binfmt experiment (it will never work); comment out broken proot attempt 2023-08-11 23:28:37 +00:00
dd53de96fe cross: tune linuxMinimal 2023-08-11 23:25:26 +00:00
8089334ea9 cross: fix dconf-system-config 2023-08-11 23:06:25 +00:00
5bbb3678ed helix: support cross compilation 2023-08-11 23:01:46 +00:00
4e7ffe3140 cross compilation: simplify emulateBuilderQemu & use linux-megous as kernel when available 2023-08-11 22:27:35 +00:00
d2842484fd cross: do emulation with a smaller linux image (experimental) 2023-08-11 22:27:35 +00:00
a8932b5a72 WIP: try to cross-compile using proot instead of binfmt
but it doesn't seem to be emulating child processes...
2023-08-11 22:27:35 +00:00
a283d1ee21 linux-megous: simplify the package definition & build w/o debug info 2023-08-11 21:34:19 +00:00
d41d802d83 nixpkgs: 2023-08-09 -> 2023-08-10
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e528fa15d5f740a25b5f536c33932db64cb10fc8' (2023-08-09)
  → 'github:nixos/nixpkgs/ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e' (2023-08-10)
```
2023-08-11 21:32:53 +00:00
8a0efb3e40 servo: bump /tmp space to 32 GB 2023-08-11 07:10:25 +00:00
b013123669 moby: note for future self about a new display-manager failure case 2023-08-11 05:01:48 +00:00
264657d623 nixpkgs: 2023-08-08 -> 2023-08-09
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/41c7605718399dcfa53dd7083793b6ae3bc969ff' (2023-08-08)
  → 'github:nixos/nixpkgs/e528fa15d5f740a25b5f536c33932db64cb10fc8' (2023-08-09)
```
2023-08-10 21:20:56 +00:00
8ad4ee4341 bonsai: support cross compilation 2023-08-10 07:41:12 +00:00
664b21e5f1 enable eg25-manager (experimental) 2023-08-10 07:27:38 +00:00
163a7af328 fix pillow compilation 2023-08-10 05:51:01 +00:00
4adeae6d85 firefox-extensions.sponsorblock: support cross compilation 2023-08-09 23:22:32 +00:00
9168803008 seaborn (visidata dep): fix build 2023-08-09 21:08:32 +00:00
3f9c0d1b60 nixpkgs: 2023-08-07 -> 2023-08-08
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/5a8e9243812ba528000995b294292d3b5e120947' (2023-08-07)
  → 'github:nixos/nixpkgs/41c7605718399dcfa53dd7083793b6ae3bc969ff' (2023-08-08)
```
2023-08-09 07:58:03 +00:00
cc35317b54 bonsai: update PR to use PREFIX instead of DESTDIR 2023-08-09 03:16:55 +00:00
006070d08f cross: confirm that qt5 module emulation is actually necessary 2023-08-08 22:09:35 +00:00
19f6a98d31 nixpatches: note that i sent the mepo patch upstream 2023-08-08 07:03:45 +00:00
301abbe155 gtk{3,4}: acquire schema compilation patches via upstream PR 2023-08-08 01:53:48 +00:00
dab3a2d0a9 mate.engrampa: acquire cross compilation patch from upstream pr 2023-08-08 01:51:55 +00:00
3a00e93dc3 cross: fix mepo to cross compile again 2023-08-08 01:51:55 +00:00
4c4b0ce920 nixpkgs: 2023-08-04 -> 2023-08-07
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/18036c0be90f4e308ae3ebcab0e14aae0336fe42' (2023-08-04)
  → 'github:nixos/nixpkgs/5a8e9243812ba528000995b294292d3b5e120947' (2023-08-07)
```
2023-08-08 01:51:55 +00:00
b9259ff8b9 gtk{3,4}: tidy schema compilation patches 2023-08-08 01:51:55 +00:00
e2ed37196f browserpass-extension: emulate 2023-08-07 10:41:32 +00:00
b343d5d83a firefox-extensions.browserpass-extensions: enable module access via passthru 2023-08-07 10:26:29 +00:00
9bbff0d7a7 firefox-extensions.bypass-paywalls-clean: fix cross compilation by using the build-time zip 2023-08-07 10:26:24 +00:00
014fb5a633 gtk4 schema fix: include needed mesonEmulatorHook
this is probably needed for gtk3 too, only we get it for free when introspection is enabled
2023-08-07 08:30:56 +00:00
76d8921bdf eg25-manager: fix by importing the legacy libgpiod v1 as it appeared nixpkgs 1 wk ago 2023-08-07 08:29:06 +00:00
b7f23a032c eg25-manager: init at 0.4.6 2023-08-07 08:05:34 +00:00
68be1ba2a1 gtk{3,4}: compile schemas even on cross builds 2023-08-07 08:05:07 +00:00
5a6bb475c4 conky: support cross-compilation/wayland via nixpkgs patch stack 2023-08-07 07:33:01 +00:00
132e15cb9f sxmo-utils: switch runtime shell back to bash, but still use busybux during build
no need to patch it out of the build process
2023-08-07 04:29:38 +00:00
07c0878d11 sxmo-utils: force the scripts to run under busybox instead of default /bin/sh 2023-08-07 03:44:07 +00:00
b993479ada sxmo-utils: use busybox 2023-08-07 03:44:07 +00:00
8dc568d52e ship mate.engrampa as archive manager (after getting it to cross compile) 2023-08-07 03:43:37 +00:00
44ee7cd3db conky: build without emulation 2023-08-06 20:59:42 +00:00
2773cd8406 nixpkgs: 2023-08-02 -> 2023-08-04
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/66aedfd010204949cb225cf749be08cb13ce1813' (2023-08-02)
  → 'github:nixos/nixpkgs/18036c0be90f4e308ae3ebcab0e14aae0336fe42' (2023-08-04)
```
2023-08-06 09:59:46 +00:00
9bb26e0199 nixpatches: update xdg-utils cross patch 2023-08-06 09:42:25 +00:00
8d772074ba gupnp: acquire cross patch from upstream nixpkgs PR 2023-08-06 09:16:43 +00:00
18c6ad0663 cross: mepo: fix ld-linux path 2023-08-06 08:53:59 +00:00
24a91acd0a firefox-extensions: update hashes for sponsorblock, ublock-origin 2023-08-06 08:33:18 +00:00
bec5241326 qt5: build in emulator
qt5.qtbase does build, after an hour. qtdeclarative fails to complete even after 3 hours
2023-08-06 08:15:47 +00:00
2b5365d774 packages: only build nheko on desktop 2023-08-06 08:15:05 +00:00
e377a9f05b cross: emulateBuildMachine: bump RAM limit & add helper overrideAttrs fn 2023-08-06 08:13:46 +00:00
2f53e94cc9 mepo_1_1: remove package
i can just use normal `mepo` now.
2023-08-06 08:11:27 +00:00
75770cd34b cross compilation: get mepo to cross compile
in the end i don't even need to emulate zig... (yay)

the mepo_1_1 stuff isn't needed. i'll delete it next patch
2023-08-06 08:09:13 +00:00
a4860c3963 cross: allow makeWrapper in emulated builds 2023-08-06 01:51:55 +00:00
4b072ecbe5 cross: support browserpass-extension w/o emulation 2023-08-06 01:51:14 +00:00
3423f103fc firefox-extensions: tidy the wrapping and dont double-wrap 2023-08-06 01:50:40 +00:00
c3bb776149 cross: qt5.qtbase: build in qemu, not binfmt (holy cow, it actually builds this way) 2023-08-05 12:08:22 +00:00
d31aac4d19 tangram: build the blueprint compiler via qemu, not binfmt 2023-08-05 12:03:05 +00:00
378e72ceb7 cross: automatically convert nativeBuildInputs into their host equivalent 2023-08-05 11:53:14 +00:00
d86be97ced cross: fix emulateBuilder to use build bash in the vmRunCommand 2023-08-05 09:54:56 +00:00
44388b132a cross: fix enableParallelBuilding to work 2023-08-05 09:54:56 +00:00
cd6b112d33 build bonsai/hare/qbe without relying on binfmt emulation 2023-08-05 09:54:56 +00:00
8eb6be863a cross: koreader: build luajit from emulated stdenv, instead of grabbing it from the emulated packageset 2023-08-05 09:54:14 +00:00
3b5ff938ce flake: apply nixpatches/list.nix using the build patcher, not the emulated host patcher 2023-08-05 09:32:50 +00:00
2685c91dd9 cross: build mepo without emulating as many packages 2023-08-05 00:42:07 +00:00
169354bd33 sxmo-utils: fix udev rule 2023-08-04 22:39:30 +00:00
cc1889d2dd mpvScripts.mpris: acquire cross compilation patch via nixpkgs PR 2023-08-04 08:16:06 +00:00
22ffcb1b55 remove fwupd to reduce cross-compilation patches 2023-08-04 07:47:00 +00:00
76abbac6f6 fwupd: define as a sane.program 2023-08-04 07:35:13 +00:00
12e15b6456 wvkbd: fetch cross-compilation fix via nixpkgs PR 2023-08-04 07:27:11 +00:00
8c2a4a31bf cross compilation: remove dead code 2023-08-04 07:21:15 +00:00
1fcfa04447 remove python.pkgs.cryptography as it doesn't cross compile (yet) 2023-08-04 07:19:30 +00:00
f3af31c727 cross: comment out packages i haven't used for an extended time 2023-08-04 05:20:20 +00:00
21e22096b1 uninsane-dot-org: 2023-07-25 -> 2023-08-03 2023-08-04 04:59:56 +00:00
c9383da414 cross: get bonsai to build w/o emulating anything other than stdenv 2023-08-04 04:07:06 +00:00
b82bb13f4f gssapi cross fix: pull from nixpkgs pr 2023-08-04 00:39:02 +00:00
346a68884b cross: fix qt5.overrideScope' deprecation wraning 2023-08-03 23:47:26 +00:00
eb04129959 cross: emulate hare/harec at the consumer level 2023-08-03 23:46:29 +00:00
2e93f58795 update cross-compilation PR URIs 2023-08-03 22:12:10 +00:00
26b77221da nixpkgs: 2023-08-01 -> 2023-08-02
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/9e1960bc196baf6881340d53dccb203a951745a2' (2023-08-01)
  → 'github:nixos/nixpkgs/66aedfd010204949cb225cf749be08cb13ce1813' (2023-08-02)
```
2023-08-03 12:32:21 +00:00
6877507ae0 xdg-utils: patch cross compilation via nixpkgs PR 2023-08-03 12:30:31 +00:00
8757f86c57 gupnp: patch via nixpkgs PR 2023-08-03 12:06:40 +00:00
633997f452 gupnp: update patch to point to nixpkgs PR 2023-08-03 11:38:43 +00:00
ff9163b365 iio-sensor-proxy: fix cross via nixpkgs PR 2023-08-03 10:34:50 +00:00
edd86e3981 upower: fix cross via nixpkgs PR 2023-08-03 10:28:21 +00:00
c9b60788b5 update bonsai/hare-ev/hare-json patches 2023-08-03 09:49:19 +00:00
66dad1e519 libgnt patch: use nixpkgs PR 2023-08-03 09:23:26 +00:00
687ceba474 libkiwix: downgrade to 12.0.0 again 2023-08-03 08:47:15 +00:00
6e85f26964 gupnp: fix via upstream PR 2023-08-03 08:46:36 +00:00
40dc8d698e libkiwix: 12.0.0 -> 12.1.0 2023-08-03 06:10:23 +00:00
350f7e32f8 desko: disable dino/gajim XMPP clients until i need them again 2023-08-03 06:10:03 +00:00
3a5b72a258 moby: ship chatty 2023-08-03 06:10:03 +00:00
b40ac95b5c cross: get chatty-latest to cross compile 2023-08-03 06:10:03 +00:00
c1a8d1aa18 sane-bt-search: document the --h265 option 2023-08-03 05:28:32 +00:00
03d7806adf flakey-tests: leave a note about libqmi 2023-08-03 00:39:44 +00:00
9d06bfb544 cross: compile tangram with less emulation 2023-08-03 00:39:18 +00:00
bf5ac3cb76 cross: get mepo to cross compile
haven't tried running it. its dependency on gpsd drags in the host
python, so probably *something* will need fixing.

this reduces the closure by a full 1GB though.
2023-08-03 00:38:21 +00:00
85e63caeb0 nixpkgs: 2023-07-29 -> 2023-08-01
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e6ab46982debeab9831236869539a507f670a129' (2023-07-29)
  → 'github:nixos/nixpkgs/9e1960bc196baf6881340d53dccb203a951745a2' (2023-08-01)
```
2023-08-02 21:32:11 +00:00
dcf97b70e1 programs: use the declPackageSet helper 2023-08-02 21:20:50 +00:00
44059b34c7 don't ship unused sane-scripts 2023-08-02 21:09:16 +00:00
561802ec41 cross: add links to upstream PRs/issues 2023-08-02 20:30:24 +00:00
b464e60a77 chatty: build w/o samba 2023-08-02 20:30:06 +00:00
b73b4b0439 chatty: persist the share directory 2023-08-02 11:36:49 +00:00
991685d149 chatty-latest: add glib-networking to fix TLS 2023-08-02 11:13:11 +00:00
4d7111feef chatty: try a newer build (still fails homeserver handshake) 2023-08-02 10:49:44 +00:00
bd8cec311e cleanup: guiApps syntax 2023-08-02 08:35:36 +00:00
fd174a0475 gui: ship nheko on moby again 2023-08-02 08:33:58 +00:00
3e83a1956c cross: try to fix fractal compilation (no luck) 2023-08-02 08:31:48 +00:00
57f272c9ba sway: expose needed env vars to user dbus services (xdg-desktop-portal) 2023-08-02 08:23:14 +00:00
186c09594d sway: remove default packages (unused) 2023-08-02 08:19:56 +00:00
c74ba4e733 sway: enable xdg-desktop-portal-gtk
it's failing to start though
2023-08-02 08:16:05 +00:00
8a126d0a64 programs: explicitly declare dependencies on gnome-keyring 2023-08-02 07:40:57 +00:00
2e04a512b3 programs: get a semi-working build of chatty (need to set xdg.portal?) 2023-08-02 07:15:33 +00:00
b4c83987f9 overlays: split the pipewire ffado tweak into a preferences overlay 2023-08-02 06:38:46 +00:00
cc09832187 cross: fix libshumate build (used by fractal) 2023-08-02 06:25:53 +00:00
33b41482e2 cross: use upstream iio-sensor-proxy fix 2023-08-02 06:24:59 +00:00
6e523e7162 fractal: fix fractal-latest, and persist data directory 2023-08-02 06:24:00 +00:00
995c586fd9 nixpatches: remove upstreamed gpodder xdg-utils patch 2023-08-01 22:50:20 +00:00
3aa5852cf2 alsa-project as a scope: push patch upstream 2023-08-01 22:48:02 +00:00
8efad09cf4 cross: remove unused qt stuff 2023-08-01 22:47:43 +00:00
a7b71979f9 cross: move gst-plugins-good override into nheko
and fully disable the qt5 stuff; reduces rebuilds & saves 20MB closure
2023-08-01 22:04:28 +00:00
1082ab22bf cross: work to upstream a few more things (deployed & working) 2023-08-01 21:48:25 +00:00
5b2598bcaa cross: upstream a bunch of stuff (still waiting on build...) 2023-08-01 08:07:27 +00:00
1ba877b325 upnp-forward: add a timeout to the unit
especially, this lets the target die, and the timer restart, when the UPNP stuff hangs
2023-07-31 11:06:04 +00:00
7ab5cfa698 cross: update gcr_4 blockers 2023-07-31 10:31:12 +00:00
8a367b718d moby: replace file-roller with xarchiver 2023-07-31 09:59:15 +00:00
4e37f2c651 cross: annotate upstreaming status 2023-07-31 08:17:32 +00:00
2cf714c999 nixpkgs: 2023-07-25 -> 2023-07-29
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/ef99fa5c5ed624460217c31ac4271cfb5cb2502c' (2023-07-25)
  → 'github:nixos/nixpkgs/e6ab46982debeab9831236869539a507f670a129' (2023-07-29)
```
2023-07-31 03:37:32 +00:00
6f835db8f3 cross: don't unnecessarily emulate pkgsi686Linux.tbb 2023-07-31 03:13:26 +00:00
206dd84477 sane-reclaim-disk-space: remove rmlint
i wasn't using it, and now we can emulate less :)
2023-07-31 03:10:38 +00:00
381a111944 cross: remove explicit emulation of packages i no longer use on arm 2023-07-31 03:06:54 +00:00
3138482ed9 cross: remove ununsed emulation-based compilation fixes 2023-07-31 02:54:32 +00:00
1796d3c259 sxmo-utils: call out (but dont apply) the lock-state perf patch 2023-07-31 02:22:16 +00:00
b565a719fb sxmo-utils: fetch upstreamed xkb path patch instead of using local patch 2023-07-31 02:13:15 +00:00
f7ac46fd30 refactor: don't hardcode the libreoffice 'fresh' variant 2023-07-31 02:03:19 +00:00
61cf801983 nixpatches: use the dtrx from upstream PR 2023-07-31 01:59:53 +00:00
ae9a81919f replace unar with dtrx
the former is costly to (cross-)compile
2023-07-31 01:13:15 +00:00
9ca8c74ed7 feeds: add wireshark podcast 2023-07-31 00:11:47 +00:00
fd58896c0c cross: no longer emulate perl packages 2023-07-31 00:03:21 +00:00
d2a46e88f6 gui: disable chromium 2023-07-31 00:02:09 +00:00
5cd05d8762 programs: split consoleUtils into separate normal/desktop sets 2023-07-30 11:59:38 +00:00
a35f3e238d jellyfin: switch back to stock qt5 upstream 2023-07-30 11:30:17 +00:00
039d685e3c flake: deploy-moby: deploy to the wireguard address, to handle when the device is docked 2023-07-30 11:23:02 +00:00
da42b3ddd7 sxmo: address fonts.fonts -> fonts.packages deprecation warning 2023-07-30 02:26:17 +00:00
51eaf83be8 komikku: downgrade to nixpkgs source, keeping my upstreamed patch 2023-07-30 01:49:12 +00:00
d8a6a1df41 cross fixes 2023-07-30 01:48:29 +00:00
36176abdf3 libwacom, pipewire: fix build/remove qt5 dep 2023-07-30 01:45:37 +00:00
085c38ea47 moby: ship portfolio instead of nautilus file browser 2023-07-30 01:44:49 +00:00
9adaece9d6 sane.programs.nheko: split to own file 2023-07-30 01:44:08 +00:00
df8e572a8f sane.programs.megapixels: ship w/o qt deps 2023-07-30 01:43:35 +00:00
d39b698066 sane.programs.fractal: split to separate file 2023-07-30 01:42:58 +00:00
83c483395c fractal-lated: bump 2023-07-30 01:41:47 +00:00
2e08321016 cross: leave notes for what blocks each fix from being upstreamed 2023-07-29 10:57:55 +00:00
abf80d765c cross: fix nautilus; reduce emulation for tracker{,-miners} 2023-07-29 10:57:05 +00:00
8c0b215832 overlays: disable-flakey-tests: remove dead code 2023-07-28 10:49:05 +00:00
28c9bd3cac overlays: disable-flakey-tests: remove ell/libwacom (not flakey); add elfutils 2023-07-28 10:49:05 +00:00
e1e40332f7 cross: reduce gtk-related emulation (esp wrapGAppsHook) 2023-07-28 10:49:05 +00:00
28ef8141f7 nixpkgs: 2023-07-24 -> 2023-07-25; uninsane-dot-org
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/b12803b6d90e2e583429bb79b859ca53c348b39a' (2023-07-24)
  → 'github:nixos/nixpkgs/ef99fa5c5ed624460217c31ac4271cfb5cb2502c' (2023-07-25)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=1542323cfb46a8950c17a3afa5f7cd2e62dd9672' (2023-07-02)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=fcec1d09b6c469d9425a716b11b4f4995a285774' (2023-07-25)
```
2023-07-28 01:20:25 +00:00
ad6b0ea75e nixpkgs: 2023-07-22 -> 2023-07-24
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/12303c652b881435065a98729eb7278313041e49' (2023-07-22)
  → 'github:nixos/nixpkgs/b12803b6d90e2e583429bb79b859ca53c348b39a' (2023-07-24)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/bd695cc4d0a5e1bead703cc1bec5fa3094820a81' (2023-07-16)
  → 'github:Mic92/sops-nix/c36df4fe4bf4bb87759b1891cab21e7a05219500' (2023-07-24)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/13231eccfa1da771afa5c0807fdd73e05a1ec4e6' (2023-07-16)
  → 'github:NixOS/nixpkgs/ce45b591975d070044ca24e3003c830d26fea1c8' (2023-07-22)
```
2023-07-28 01:20:25 +00:00
f59da7ad0f feeds: add minding our way 2023-07-28 01:14:28 +00:00
183457444c feeds: add Ezra Klein show 2023-07-28 01:08:19 +00:00
28a91723b8 feeds: add Atlas Obscura podcast 2023-07-28 01:06:15 +00:00
9b53a28920 lemmy-server: remove useless override 2023-07-28 00:57:08 +00:00
49e33d7238 mpv-uosc-latest: warn once next release hits nixpkgs 2023-07-28 00:55:37 +00:00
6572557b5b flake: add help program 2023-07-28 00:49:44 +00:00
e18fb2ce4e mpv: change reverse seek from 30s to 10s 2023-07-28 00:34:49 +00:00
027e7cb074 cross: fix mpvScripts.mpris compilation 2023-07-27 12:16:23 +00:00
13ae0b798c mpv-uosc-latest: fix fonts 2023-07-27 12:16:09 +00:00
d8675b544a mpv: uosc: fix for touchscreen support 2023-07-27 11:45:28 +00:00
5bf5d82d30 mpv: add the mpris plugin 2023-07-27 05:47:21 +00:00
0c92f3695a mpv: switch to uosc interface 2023-07-26 12:36:01 +00:00
558258c367 moby: switch to mpv
needs some more tuning, but ditching vlc means no more Qt, and it looks
like i can tune the mpv UI to be substantially better for my wants
2023-07-26 09:56:35 +00:00
7f13c482e5 cross compilation: support clapper 2023-07-26 08:51:51 +00:00
7b21ede5c4 moby: enable gpsd 2023-07-25 12:05:41 +00:00
219bb02cb8 refactor: moby: cleaner way to disable gestures 2023-07-25 10:56:29 +00:00
2df59f7c7d moby: rename firmware.nix -> bootloader.nix 2023-07-25 10:52:58 +00:00
11a7370a76 moby: sxmo: dont auto-start gestures daemon 2023-07-24 21:46:23 +00:00
44e3b01e7c moby: sxmo: waybar: remove the 2px shadows 2023-07-24 21:11:48 +00:00
c7f0e5c8b5 moby: sxmo: waybar: use consistent left/right padding 2023-07-24 21:11:08 +00:00
7ce33340f9 moby: sxmo: style titlebars 2023-07-24 10:50:08 +00:00
8f77b1db94 moby: sxmo: swaybar: decrease animations 0.3s -> 0.2s 2023-07-24 09:36:21 +00:00
f4cac0c158 moby: sxmo: swaybar: shrink from 32 px -> 28 px 2023-07-24 09:33:02 +00:00
04106e660e moby: sxmo: stylize the waybar to match other colors 2023-07-24 08:13:56 +00:00
6ed550b813 moby: theme bemenu to match desktop background 2023-07-24 03:33:50 +00:00
1cfd0fab6a sxmo: patch over duplicated lisgd services 2023-07-24 01:36:13 +00:00
5a31a0b415 koreader-from-src: clean up some dead code/comments 2023-07-23 23:44:33 +00:00
eb82268eee nipkgs: 2023-07-21 -> 2023-07-22; mobile-nixos 2023-05-07 -> 2023-07-22
```
• Updated input 'mobile-nixos':
    'github:nixos/mobile-nixos/ba4638836e94a8f16d1d1f9e8c0530b86078029c' (2023-05-07)
  → 'github:nixos/mobile-nixos/56fc9f9619f305f0865354975a98d22410eed127' (2023-07-22)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/9ca785644d067445a4aa749902b29ccef61f7476' (2023-07-21)
  → 'github:nixos/nixpkgs/12303c652b881435065a98729eb7278313041e49' (2023-07-22)
```
2023-07-23 21:04:46 +00:00
86964f6fde koreader: ship the from-src build 2023-07-23 21:00:43 +00:00
3121a6a7e9 cross: koreader-from-src: fix by emulating luajit 2023-07-23 11:37:18 +00:00
c353f06832 koreader-from-src: support cross compilation (cross luajit fails due to table.pack == nil) 2023-07-23 01:29:20 +00:00
b6a878757c sane-bt-search: implement --h265 flag 2023-07-22 21:56:00 +00:00
c862b559e7 sane-bt-search: error on bad --top=N usage 2023-07-22 21:55:24 +00:00
64c8dabaf2 nixpkgs: 2023-07-16 -> 2023-07-21
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222' (2023-07-16)
  → 'github:nixos/nixpkgs/9ca785644d067445a4aa749902b29ccef61f7476' (2023-07-21)
```
2023-07-22 10:57:43 +00:00
512b5d78d4 moby: update bg, and add the blur/fade to the image instead of to conky 2023-07-22 10:56:06 +00:00
0479a43f2d koreader-from-src: remove some unneeded buildInputs 2023-07-22 09:32:15 +00:00
307e93de3b koreader: RSS: specify download_full_article=true by default 2023-07-22 08:55:05 +00:00
13d623201e koreader-from-src: it runs! 2023-07-22 08:44:11 +00:00
f223af584d koreader: build to install
launch doesn't work because it fails to load libSDL.so
2023-07-22 06:03:54 +00:00
9a2f648463 koreader-from-src: get the entire buildPhase working
fails in install: bash: line 1: /build/koreader/platform/debian/do_debian_package.sh: cannot execute: required file not found
2023-07-22 06:03:54 +00:00
e29361f05e koreader-from-src: get glib input working 2023-07-22 06:03:54 +00:00
439eeeeb45 koreader-from-src: get lua-Spore, libzmq, czmq, libffi deps passing 2023-07-22 06:03:54 +00:00
6a6276c2e0 koreader-from-src: get deps compiling: lua-htmlparser, lpeg 2023-07-22 06:03:54 +00:00
e5d311188e koreader-from-src: get a few more dependencies to succeed 2023-07-22 06:03:54 +00:00
98ef5d77c3 koreader-from-src: get mupdf to build 2023-07-22 06:03:54 +00:00
f3edafd11c koreader-from-src: add most remaining sources 2023-07-22 06:03:54 +00:00
2fdf95cea6 koreader-from-src: add more sources 2023-07-22 06:03:54 +00:00
7b8af3e719 koreader-from-src: remove deepClone and keepDotGit options 2023-07-22 06:03:54 +00:00
f95c45fb8e koreader-from-src: enable freetype2, fbink sources
it seems we still check out submodules even if deepClone is false?
2023-07-22 06:03:54 +00:00
0be20351a1 koreader-from-src: add fribidi source 2023-07-22 06:03:54 +00:00
519ee152b9 koreader-from-src: sort the thirdparty sources alphabetically 2023-07-22 06:03:54 +00:00
5baba0378f koreader-from-src: add curl, zstd sources 2023-07-22 06:03:54 +00:00
3ac193f9b4 koreader-from-src: specify thirdparty sources as attrs instead of list 2023-07-22 06:03:54 +00:00
8b72338f3a koreader-from-src: add sources for libk2pdfopt 2023-07-22 06:03:54 +00:00
c82e445e07 koreader-from-src: add sources for tesseract/leptonica 2023-07-22 06:03:54 +00:00
5ce0805046 koreader-from-src: nit: tidy fetchgit impl 2023-07-22 06:03:54 +00:00
7e5904c073 koreader-from-src: add libpng dep 2023-07-22 06:03:54 +00:00
cc50ad172c koreader-from-src: vendor zlib 2023-07-22 06:03:54 +00:00
29a4466750 koreader-from-src: get further into the build; split sources into own file 2023-07-22 06:03:54 +00:00
ba9eebcda8 koreader-from-src: tidy up 2023-07-22 06:03:54 +00:00
44ba0adacc koreader-from-src: advance the build past luajit (the following jpeg dep fails) 2023-07-22 06:03:54 +00:00
695ff8d057 WIP: build koreader from source 2023-07-22 06:03:54 +00:00
c71136c315 sxmo: conky: tune the shade colors 2023-07-21 23:07:52 +00:00
e7d5b14ab0 sxmo: battery_estimate: improve edge cases 2023-07-21 22:51:24 +00:00
6d216c14fa moby: conky: update config to work better with nixos bg 2023-07-21 22:46:59 +00:00
f037e0b5a4 sxmo: update docs links 2023-07-21 22:46:14 +00:00
75fe6226c8 moby: use librewolf as default browser again 2023-07-21 21:29:48 +00:00
556664f10d sxmo: start lisgd by default again
patching it out the way i was is incompatible with the upstream patch which
makes its enablement status persistent
2023-07-21 21:28:42 +00:00
bc46dc310d sxmo: define a background 2023-07-21 21:28:26 +00:00
94bae57411 gthumb: add svg mime association 2023-07-21 20:00:45 +00:00
bd16aaa884 sxmo-utils: fix so auto-rotate does not restart gestures 2023-07-21 10:17:21 +00:00
777d1a1588 add todo: pkgs.impure-cached set 2023-07-21 09:13:15 +00:00
a73937c32c complete a todo: webkitgtk mem use/swap 2023-07-21 09:10:13 +00:00
ee284901ff firefox-extensions: bypass-paywalls-clean: disable nag pages 2023-07-18 22:38:30 +00:00
0cb81bb86f browserpass-extension: nit: remove unused parameter 2023-07-18 22:08:27 +00:00
10bdd3c05a firefox: ship bypass-paywalls-clean extension 2023-07-18 22:08:27 +00:00
5ed33d90cf moby: fix sidebery disable type 2023-07-18 20:06:36 +00:00
535bbd2c0b sane.{programs,user}.fs: pass fs values onto sane.fs unmerged
notably, this allows ~/.config/zsh/.zshrc to be specified by more than one location, and for the values to not overwrite one another
2023-07-18 11:25:27 +00:00
ad16e50081 sxmo: configure screenshot directory 2023-07-18 10:40:54 +00:00
9f6760a37f moby: doc: add resources 2023-07-18 10:39:44 +00:00
ef203c3215 sxmo-utils: use makeBinaryWrapper for better perf 2023-07-18 10:18:15 +00:00
e3b7896169 zsh/starship: improve padding on ssh line 2023-07-18 10:17:13 +00:00
91f47f863d zsh: factor out the colors to avoid repeating them 2023-07-18 10:14:13 +00:00
532a78e2b2 desko: disable wpa_supplicant 2023-07-18 10:02:25 +00:00
11a4b7006e upnp-forwards: fix timer to actually run every hour 2023-07-18 09:54:06 +00:00
a907fa1ca7 flake: rework so deploy scripts can be run in parallel 2023-07-18 09:10:25 +00:00
90279efebb sxmo-utils: add missing grim dep (for wayland screenshots) 2023-07-18 08:29:42 +00:00
5c1eaf273e zsh/starship: fix bg color for ssh prompt 2023-07-18 08:28:53 +00:00
f12737b1f9 starship: try some other status symbols (but stay as is) 2023-07-18 03:51:03 +00:00
254b248bf3 starship: configure bg color for username section 2023-07-18 03:41:45 +00:00
431b1054e6 complete starship/zsh perf todo 2023-07-18 03:32:31 +00:00
e6b5223e2e zsh: starship: theme 2023-07-18 03:26:51 +00:00
d583d5db4f cross: emulate less of gnustep 2023-07-18 02:50:35 +00:00
1709f64a69 zsh/starship: fix init 2023-07-18 02:17:44 +00:00
23e95ba2ba modules: fs: symlink.text: allow specifying it multiple times 2023-07-18 02:17:25 +00:00
1dfd894568 cross: gnustep: emulate only gnustep.base 2023-07-18 01:32:50 +00:00
13d3a5ba6b cross: silence qt.overrideScope' warning 2023-07-18 01:32:06 +00:00
2716c0398b zsh: switch to starship prompt 2023-07-18 01:30:53 +00:00
0ba1a9f984 zsh: factor p10k stuff out of the main module; minimal support for starship prompt 2023-07-18 01:28:30 +00:00
1ddd79fdf0 complete todos: sway super; firefox first run prompts 2023-07-18 00:43:58 +00:00
761d60a7f4 cross: fix browserpass-extension compilation 2023-07-17 22:28:05 +00:00
82f141c0df firefox-extensions: make it a scope 2023-07-17 22:27:49 +00:00
6ce10b00af firefox-extensions: refactor to be more amenable to overrides 2023-07-17 22:19:29 +00:00
ff17ed599d firefox: disable metamask 2023-07-17 21:33:15 +00:00
96d0c52d28 refactor: firefox-extensions: patch in preferences at the same place we define how to build the addon 2023-07-17 21:32:10 +00:00
007c13f975 sponsorblock: remove the goddamn first-run popup
fuck javascript/typescript/whatever

y'all started with a low-complexity ecosystem and then drove the whole thing with some apparent goal of maximizing complexity

minified js? WHY? compile to native/wasm if you care about perf, else optimize for readability/patchability and leave compression to gzip like a normal fucking person
2023-07-17 21:22:24 +00:00
2b9de91540 firefox-extensions: make the patching logic even more pluggable 2023-07-17 20:47:55 +00:00
0175adbf27 firefox-extensions: make the patching logic more pluggable 2023-07-17 20:41:04 +00:00
83bc056ceb nixpkgs: 2023-07-15 -> 2023-07-16
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8acef304efe70152463a6399f73e636bcc363813' (2023-07-15)
  → 'github:nixos/nixpkgs/6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222' (2023-07-16)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/cfe47aff8660fd760b1db89613a3205c2c4ba7b6' (2023-07-15)
  → 'github:Mic92/sops-nix/bd695cc4d0a5e1bead703cc1bec5fa3094820a81' (2023-07-16)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/3dc2bc15956db2ff2316af45eefd45803fc1372b' (2023-07-15)
  → 'github:NixOS/nixpkgs/13231eccfa1da771afa5c0807fdd73e05a1ec4e6' (2023-07-16)
```
2023-07-17 20:12:50 +00:00
0e5cb3ada9 nixpkgs: 2023-07-14 -> 2023-07-15
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/dfdbcc428f365071f0ca3888f6ec8c25c3792885' (2023-07-14)
  → 'github:nixos/nixpkgs/8acef304efe70152463a6399f73e636bcc363813' (2023-07-15)
```
2023-07-17 19:53:29 +00:00
b4d58a1515 sxmo: do restart lisgd on rotation, but don't enable lisgd by default
the restart logic is racy, and lisgd with autorotate becomes unusable after long enough
2023-07-17 19:53:19 +00:00
88153fe7a1 lemoa: 0.2.0 -> 0.3.0 2023-07-17 06:12:46 +00:00
ad67f7b13e browserpass-extension: move to firefox-extensions scope 2023-07-17 05:25:12 +00:00
40cc0367d8 zsh: switch(): add keep-going flag 2023-07-17 05:22:12 +00:00
a10e31257a sxmo-utils: sxmo_rotate: don't restart lisgd on sway 2023-07-17 05:21:46 +00:00
d7929ed06a firefox: generalize the facility to remove permissions from an extension 2023-07-17 03:57:42 +00:00
2c96ecfd0d firefox-extensions: factor out into own file 2023-07-17 03:12:04 +00:00
7c9664270d sane-wipe-browser: also kill browser processes that might be sticking around in ram 2023-07-17 01:55:32 +00:00
6f5c5a5113 browserpass-extension: disable startup/install notification 2023-07-17 01:55:32 +00:00
ebcc0c269e trust-dns: remove from this repo
it's fully upstreamed into nixpkgs now
2023-07-16 12:27:23 +00:00
57681bfa6d moby: re-enable firefox, but still default to epiphany 2023-07-16 12:26:31 +00:00
9058caac1d moby: firefox: disable sideberry 2023-07-16 12:25:42 +00:00
60650f82fe firefox: switch back to the default UI -- not pmos-mobile 2023-07-16 12:25:12 +00:00
11b4d2d66a doc: mime: show how to go from scheme -> .desktop association 2023-07-16 12:17:54 +00:00
0111d4220e nixos/trust-dns: add myself as maintainer 2023-07-16 04:13:19 +00:00
83b76dc47e moby: fix occasional blank screen on boot 2023-07-16 00:37:09 +00:00
c7ca3ad563 wifi: add new network 2023-07-15 22:40:18 +00:00
1c891f45df wifi: add new network 2023-07-15 22:36:53 +00:00
dc6790e168 nixpkgs: 2023-07-13 -> 2023-07-14
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e74e68449c385db82de3170288a28cd0f608544f' (2023-07-13)
  → 'github:nixos/nixpkgs/dfdbcc428f365071f0ca3888f6ec8c25c3792885' (2023-07-14)
```
2023-07-15 22:13:14 +00:00
3bbbb6c714 sxmo-utils: sxmo_wmmenu: respect SXMO_WORKSPACE_WRAPPING 2023-07-15 22:10:15 +00:00
8788a8c67a servo: upnp-forwards.timer: fix to invoke upnp-forwards.target instead of upnp-forwards.service 2023-07-15 22:08:55 +00:00
6ae73bdf87 lemmy-server: 0.18.1 -> 0.18.2 2023-07-15 21:04:19 +00:00
47a973b603 sops-nix: 2023-07-12 -> 2023-07-15
```
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/88b964df6981e4844c07be8c192aa6bdca768a10' (2023-07-12)
  → 'github:Mic92/sops-nix/cfe47aff8660fd760b1db89613a3205c2c4ba7b6' (2023-07-15)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/510d721ce097150ae3b80f84b04b13b039186571' (2023-07-09)
  → 'github:NixOS/nixpkgs/3dc2bc15956db2ff2316af45eefd45803fc1372b' (2023-07-15)
```
2023-07-15 10:12:29 +00:00
20b8e2934c moby: don't ship firefox 2023-07-15 10:11:45 +00:00
088286d8f7 mime: support multiple implementors of the same association, with different priorities 2023-07-15 10:11:31 +00:00
29b53d934f trust-dns: apply PR feedback 2023-07-15 09:07:57 +00:00
77e5f82b31 programs: rename web-browser -> firefox 2023-07-15 08:51:36 +00:00
55d64eb598 programs: factor out a sane.programs.<foo>.mime schema 2023-07-15 08:44:18 +00:00
d459dd0f85 net: switch from iwd back to stock NetworkManager/wpa_supplicant 2023-07-15 07:16:10 +00:00
9594c03d66 net: port iwd secrets to a .json file that i can make backend agnostic 2023-07-15 06:38:50 +00:00
7391ce0b05 programs: move the guiApps category up to hosts/modules/gui 2023-07-15 01:02:41 +00:00
2822dd6137 programs: update tor-browser bug info 2023-07-15 00:44:24 +00:00
e5cca42717 servo: fix sane.nixcache path 2023-07-15 00:40:31 +00:00
799c53adf4 sway/waybar: remove font specification (it's probably not used by the bar i have actually deployed, anyway?) 2023-07-15 00:38:57 +00:00
0ed9394fff sway: define the secret snippets more idiomatically 2023-07-15 00:23:14 +00:00
e6a989bc92 nginx/pleroma: correct an old todo 2023-07-15 00:08:05 +00:00
2385984152 duplicity: restrict readability 2023-07-15 00:02:22 +00:00
809c9f74c3 phosh: remove dead code 2023-07-14 23:59:35 +00:00
44b15ba8ed users: apply default permissions to any user who goes through the sane.users module 2023-07-14 23:56:01 +00:00
ab7068c819 lappy: remove some dead ipfs code 2023-07-14 23:44:47 +00:00
746af067dc moby: increase menu lines in landscape mode 2023-07-14 23:41:52 +00:00
918febe884 nixpkgs: 2023-07-12 -> 2023-07-13 2023-07-14 22:58:19 +00:00
b5d1baf3ee zramSwap: increase capacity to 100% of uncompressed RAM 2023-07-14 22:57:19 +00:00
2f5c33b2b4 nixcache: tidy up substituter config 2023-07-14 22:33:33 +00:00
fdc18821ca servo: matrix-appservice-irc: remove completed todo 2023-07-14 22:11:59 +00:00
2a537cd3b1 splatmoji: port fully to wayland 2023-07-14 22:09:43 +00:00
9aa4e6c0f2 remove completed todo's 2023-07-14 21:35:25 +00:00
6b1baefaa7 moby: link to some config references 2023-07-14 06:48:02 +00:00
85483cde79 moby: allow video group to write to front-facing LEDs 2023-07-14 06:47:32 +00:00
8feafbb615 pinephone: fix flashlight permissions, the proper way (udev) 2023-07-14 05:55:44 +00:00
e1bb0de76f sxmo: fix pinephone LED permissions 2023-07-14 00:30:53 +00:00
d7fb1b615a feeds: add boginjr.com 2023-07-14 00:02:37 +00:00
8aa2712956 feeds: disable LessWrong (too noisy/too AI) and SimonWillison (too bro) 2023-07-13 23:48:50 +00:00
962ffeab7e re-enable zramSwap on all devices
this is critical on moby, though even with this swap, we run out of CMA (videoram) instead -- just later
2023-07-13 23:37:30 +00:00
e5072c8837 linux-megous: update docs 2023-07-13 23:36:22 +00:00
992ae37ccf sxmo: cleanup use of sane-lib.fs.wantedText 2023-07-13 22:20:26 +00:00
1642734aa3 hosts/common: cleanup uses of sane-lib.fs.wantedText 2023-07-13 22:19:18 +00:00
a8382fed12 hosts/common: move /var/lib/private defn into fs.nix 2023-07-13 22:18:45 +00:00
cfa50500ac hosts/common: remove commented-out code 2023-07-13 22:09:53 +00:00
d3d9b30f29 consolidate /tmp fs into hosts/modules/roles 2023-07-13 22:04:28 +00:00
4b99331e5a nixpkgs: 2023-07-11 -> 2023-07-12
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/f2406198ea0e4e37d4380d0e20336c575b8f8ef9' (2023-07-11)
  → 'github:nixos/nixpkgs/2de8efefb6ce7f5e4e75bdf57376a96555986841' (2023-07-12)
```
2023-07-13 20:19:02 +00:00
76347309bc sxmo: disable Xwayland 2023-07-13 10:50:40 +00:00
1347199a87 sxmo: group these statements more logically 2023-07-13 10:50:40 +00:00
c8a59d9986 trust-dns: grab from nixpkgs PR 2023-07-13 10:49:12 +00:00
41f4d8e85a trust-dns: specify zone via shorthand 2023-07-13 10:04:20 +00:00
e38bf42506 trust-dns: migrate module to nixpkgs repo 2023-07-13 09:57:11 +00:00
ffec91a52c moby: disable zsh deadlines 2023-07-13 08:12:05 +00:00
f54f972056 vlc: move persisted data to ~/private, and add .cache/vlc, for artwork 2023-07-13 07:20:13 +00:00
f2eba95dfc users/colin: persist some notable cache directories 2023-07-13 07:17:27 +00:00
8b3521d08f fixup sxmo persistence (prev two commits don't build 2023-07-13 07:17:09 +00:00
5e07882568 sxmo: back the superd log directory with a store 2023-07-13 06:58:48 +00:00
abb4492897 sxmo: persist the /var/lib/lightdm directory 2023-07-13 06:56:03 +00:00
427e6bb696 /root: back by a physical store 2023-07-13 06:50:46 +00:00
d4ed4ae9f1 librewolf: *always* back the dot dir by a real disk
this saves ram on memory-constrained devices
2023-07-13 06:44:22 +00:00
fe5be03e0a readme: mention the doc/ folder 2023-07-13 06:35:11 +00:00
0875b6fd22 readme: suggest how to send patches 2023-07-13 06:34:19 +00:00
527607e38f desko: use sane.programs.steam 2023-07-13 06:27:54 +00:00
e416405f44 nixpkgs: 2023-07-10 -> 2023-07-11
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/4a729ce4b1fe5ec4fffc71c67c96aa5184ebb462' (2023-07-10)
  → 'github:nixos/nixpkgs/f2406198ea0e4e37d4380d0e20336c575b8f8ef9' (2023-07-11)
```
2023-07-13 02:05:01 +00:00
5090340189 sxmo: battery_estimate: zero-pad the minutes 2023-07-13 02:02:25 +00:00
7dc0899784 sxmo: conky: tune config 2023-07-13 02:00:15 +00:00
19b697cc52 conky-config: remove trailing whitespace 2023-07-13 01:36:24 +00:00
cd011d845a sxmo: include superd on path 2023-07-13 01:35:37 +00:00
67a52eca86 sxmo: conky: include battery estimate 2023-07-13 01:35:31 +00:00
29bf9d410f sxmo: customize the conky display 2023-07-13 01:35:23 +00:00
694a5383cb sane-bt-search: ignore the uhd tag 2023-07-13 01:35:12 +00:00
96b3896017 sane-vpn-up/down: fix sane-ip-check invocation to not use UPNP 2023-07-13 01:33:52 +00:00
4a7398da2f trust-dns: finish hardening 2023-07-13 01:33:31 +00:00
ceef95cbe3 fix komikku patch hash 2023-07-13 00:59:30 +00:00
99d97af742 sops-nix: 2023-07-09 -> 2023-07-12
```
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/b2047c8fc963407916ad3834165309007dc5a1f7' (2023-07-09)
  → 'github:Mic92/sops-nix/88b964df6981e4844c07be8c192aa6bdca768a10' (2023-07-12)
```
2023-07-12 11:38:16 +00:00
545babe86c sxmo: document waybar-config defaults 2023-07-12 11:36:50 +00:00
ba7078527a sway: fix config symlink 2023-07-12 11:34:41 +00:00
c2b2d5eaa9 sxmo: switch to waybar 2023-07-12 11:28:54 +00:00
58be04b632 cross: get waybar to compile 2023-07-12 10:27:08 +00:00
f0d396543f sxmo: set mod key to alt instead of logo 2023-07-12 10:10:03 +00:00
6d21c917d5 sxmo: import the default sway config 2023-07-12 10:03:58 +00:00
ec277d1347 sxmo: move to subdirectory 2023-07-12 09:42:23 +00:00
f5264508eb komikku: fix cross compilation 2023-07-12 09:16:32 +00:00
0d6a10bc3a komikku: don't crash when crop_borders fails to find borders 2023-07-12 08:58:35 +00:00
33c6330cbc gui: delete plasma-mobile 2023-07-12 08:25:09 +00:00
ece02f35c6 gui: delete plasma 2023-07-12 08:24:55 +00:00
d4e6001431 moby: increase workspaces from 4 -> 5 2023-07-12 08:24:13 +00:00
cded837255 moby: sort sxmo prefs alphabetically 2023-07-12 08:24:13 +00:00
2ae187ea62 komikku: update to latest rev 2023-07-12 08:24:13 +00:00
e317cc4c12 refactor: sway: fix config indentation 2023-07-12 08:24:01 +00:00
83275ed0b6 komikku: 1.21.1 -> 1.22.0 2023-07-12 07:51:42 +00:00
e5a81f0a45 moby: update env tunables 2023-07-12 06:45:47 +00:00
e4d0cabd13 conky: enable Wayland support; 1.18.0 -> 1.19.2 2023-07-12 02:09:34 +00:00
a2a2db1611 cross: Tangram: reduce emulated inputs 2023-07-12 01:25:46 +00:00
586b181714 snippets: update firewall address 2023-07-12 00:13:10 +00:00
a51817625a sandboxing todo: mention nixpak 2023-07-11 22:26:12 +00:00
ddec0cae7a nixpkgs: 2023-07-09 -> 2023-07-10
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/408c0e8c15a1c9cf5c3226931b6f283c9867c484' (2023-07-09)
  → 'github:nixos/nixpkgs/4a729ce4b1fe5ec4fffc71c67c96aa5184ebb462' (2023-07-10)
```
2023-07-11 21:13:11 +00:00
4cc4c3293b programs: don't ship ncdu 2023-07-11 21:12:25 +00:00
615e9befb3 document some dconf findings 2023-07-11 10:05:46 +00:00
9502fb34c7 tangram: don't need to create the dconf db: dconf will do that for us if need-be 2023-07-11 10:04:03 +00:00
17951be995 tangram: persist dconf files
with this, saved tabs are *actually* saved
2023-07-11 10:02:47 +00:00
281116bc7d document how to ship programs 2023-07-11 08:11:48 +00:00
70fcf179d5 programs: ship ncdu 2023-07-11 08:11:10 +00:00
3f81370879 install-iwd: allow the paths to be omitted 2023-07-11 07:32:54 +00:00
f71fd4565b sane-ip-reconnect: be more resilient to errors 2023-07-11 07:24:46 +00:00
79fca6c5e5 sane-ip-reconnect: add type annotations to compound types 2023-07-11 07:13:16 +00:00
3bbc4aecbb fix derived secrets (all were failing) 2023-07-11 05:15:56 +00:00
464db2c118 complete UPNP service split todo 2023-07-11 01:57:47 +00:00
8e94d77b0f ports: create a separate systemd service per port forward
this allows one failed forward to not take down all forwards
2023-07-11 01:56:59 +00:00
307121ec2c sane_ssdp: cache the UPNP root device
i could also cache the lan and wan... future work, i guess
2023-07-11 01:18:47 +00:00
8bd7fa8a3f sway: use Super modifier instead of Alt
this allows applications to use the Alt key
2023-07-11 00:55:17 +00:00
41aa13621d add a TODO for using Starship prompt 2023-07-11 00:55:17 +00:00
f765e3d030 sane-ip-check: also store the upnp gateway 2023-07-11 00:55:04 +00:00
798f467128 sane_bt: add return type annotations 2023-07-10 22:42:39 +00:00
35431f5b53 sane_ssdp: add more type annotations 2023-07-10 22:41:06 +00:00
0bc1082596 Merge branch 'staging/nixpkgs-2023-07-09' 2023-07-10 22:32:44 +00:00
c23cb8470f sane-bt-search: document --manga flag 2023-07-10 21:53:55 +00:00
d46ee21ce0 nixpkgs: 2023-07-06 -> 2023-07-09
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/3c7487575d9445185249a159046cc02ff364bff8' (2023-07-06)
  → 'github:nixos/nixpkgs/408c0e8c15a1c9cf5c3226931b6f283c9867c484' (2023-07-09)
```
2023-07-10 21:38:01 +00:00
abc9f4c464 moby: sxmo: switch SXMO_SWAY_SCALE back to default of 2 2023-07-10 09:07:17 +00:00
e92b621e09 sxmo: configure user prefs via ~/.config/sxmo/profile
rather than the system environment
2023-07-10 09:07:16 +00:00
d593349717 sane-ip-reconnect: repopulate secrets if necessary
sometimes iwd just... deletes them
2023-07-10 09:06:23 +00:00
452260f7c7 trust-dns: don't run as root 2023-07-10 09:00:37 +00:00
b648aca505 trust-dns: link to docs in service file 2023-07-10 08:12:07 +00:00
8c4af55f82 trust-dns: apply some hardening (still need more) 2023-07-10 08:00:45 +00:00
384428756d tangram/epiphany: preserve desktop files when patching 2023-07-10 06:49:27 +00:00
069f7b4616 sxmo: use ~/.config/sxmo/profile instead of system environment, for settings 2023-07-10 06:08:17 +00:00
c44756874a git: add todo for using toGitINI 2023-07-10 06:07:47 +00:00
23fb37a3e9 fs: have nodes require their parent instead of the weaker want
this may fix it so spurious (failed) mounts of ~/private *don't* create a bunch of directories that later cause a real mount to be impossible
2023-07-10 05:58:30 +00:00
5188ddf398 keyrings: answer a todo 2023-07-10 01:21:57 +00:00
db93bd42ed moby: ship megapixels camera app 2023-07-10 01:18:40 +00:00
b76d326da3 megapixels: fix cross compilation 2023-07-10 01:14:00 +00:00
3fa3091143 sxmo-utils: fix Tangram icon 2023-07-09 22:13:46 +00:00
81f527070f build machines: disable ccache 2023-07-09 18:55:37 +00:00
445bc08a0c desko: disable guest account 2023-07-09 18:49:36 +00:00
213e738305 sops-nix: 2023-07-02 -> 2023-07-09
```
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/5ed3c22c1fa0515e037e36956a67fe7e32c92957' (2023-07-02)
  → 'github:Mic92/sops-nix/b2047c8fc963407916ad3834165309007dc5a1f7' (2023-07-09)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/f553c016a31277246f8d3724d3b1eee5e8c0842c' (2023-07-02)
  → 'github:NixOS/nixpkgs/510d721ce097150ae3b80f84b04b13b039186571' (2023-07-09)
```
2023-07-09 18:38:54 +00:00
3c309b65af programs: ship tangram to gui platforms 2023-07-09 11:17:54 +00:00
c751268f62 epiphany: leave a note about missing .desktop files 2023-07-09 11:17:07 +00:00
1bd815d2ef tangram: disable sandbox (same reason as with epiphany) 2023-07-09 11:16:08 +00:00
b3db579deb add todos for sway/firefox/helix 2023-07-09 10:50:37 +00:00
b152794cb6 get tangram to cross compile 2023-07-09 10:50:01 +00:00
96ddc9513d sxmo-utils: apply upstreamed patches via fetchpatch instead of storing in-repo 2023-07-09 07:48:10 +00:00
158f978f19 sxmo-utils: add icon for Tangram 2023-07-09 07:29:10 +00:00
963e59070d programs: define persistence for Tangram 2023-07-09 07:20:38 +00:00
5e66bad3dd epiphany: fix to launch on moby 2023-07-09 03:13:17 +00:00
a3a3da4c62 implement a ldd-aarch64 package & ship it for dev hosts 2023-07-09 00:32:22 +00:00
a0473782f9 nixpkgs: 2023-07-05 -> 2023-07-06
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/f292b4964cb71f9dfbbd30dc9f511d6165cd109b' (2023-07-05)
  → 'github:nixos/nixpkgs/3c7487575d9445185249a159046cc02ff364bff8' (2023-07-06)
```
2023-07-08 18:18:28 +00:00
640d9be83d derived-secrets: fix broken encoding 2023-07-08 11:20:28 +00:00
db72f5e11f fs: generated.script.scriptArgs -> generated.command 2023-07-08 11:15:23 +00:00
8753e5e0c6 fs: remove legacy generated.script.script option 2023-07-08 11:15:23 +00:00
558b35fee0 prepare fs.generated.script users to not assume a shell 2023-07-08 11:15:23 +00:00
3ce2716fbe fs: factor out the ensureSymlink/ensureDir/ensurePerms scripts 2023-07-08 10:35:10 +00:00
e9293dbe07 fs: fix raciness that was causing ensure-xyz services to run multiple times per boot 2023-07-08 09:08:59 +00:00
f18d624fd9 fs: avoid creating a new script for every fs entry 2023-07-08 09:00:49 +00:00
43aadef3b3 remove completed items from todo.md; add moby related improvements 2023-07-08 03:03:05 +00:00
6e3e45a9f6 fontconfig: re-enable
i'm not sure why this failed with lib.mkDefault
2023-07-08 02:27:21 +00:00
36dbf696e7 fontconfig: only enable for system, not user 2023-07-08 02:23:50 +00:00
e57efbcb21 zsh: fix history file persistence 2023-07-08 02:22:29 +00:00
8f57394cd2 persist: create the backing path as a dependency of the VFS path 2023-07-08 02:08:18 +00:00
01b8a28a52 programs.fs: remove extraneous wantedBeforeBy clause
it's provided by `sane.user.fs`
2023-07-08 02:06:44 +00:00
b42207882e programs.persist: fix to allow any options that underlying persist allows 2023-07-08 02:06:18 +00:00
b8ccc271fc mepo: fix savestate to be persisted as a file -- not a directory 2023-07-08 01:35:36 +00:00
95c105367c ~/.ssh/id_ed25519: correctly persist as a file -- not a directory 2023-07-08 01:35:23 +00:00
0a519eddb4 persist: allow persisting of individual files, not just directories
i actually do already, with ~/.ssh/id_ed25519 -- it works only as a fluke
2023-07-08 01:31:14 +00:00
8e4dc0c6ae helix: render whitespace 2023-07-08 00:54:51 +00:00
a257d8d1a1 helix: enable soft line wrapping 2023-07-08 00:27:12 +00:00
38411617ef fontconfig: only ship on GUI systems 2023-07-07 23:44:45 +00:00
c21efa005f show package changes during nixos-rebuild switch 2023-07-07 23:34:12 +00:00
24a3c22edc revoke ssh access from servo/moby into any other system (by default) 2023-07-07 21:15:00 +00:00
54b74498b6 helix: don't persist the grammars directory anymore 2023-07-07 11:05:13 +00:00
05f375a5f8 neovim: try to ship nix-shell highlighting (fail) 2023-07-07 10:45:41 +00:00
975bdd64cb helix: ship nix-shell syntax highlighting 2023-07-07 10:43:13 +00:00
62907acedc tree-sitter-nix-shell: init at 0.1.0 2023-07-07 08:33:15 +00:00
7004fb8f4e sane-bt-search: clean up type annotations (thanks Ben for the tips!) 2023-07-07 07:12:48 +00:00
5aeb6a5525 sane-bt-search: fix: parse --top as an integer 2023-07-07 07:11:47 +00:00
ad4631a5a8 sane-bt-search: add (limited) ability to search by category 2023-07-07 07:08:17 +00:00
799cbccdbe desko: disable devPkgs 2023-07-07 06:30:19 +00:00
1f82679f62 add a deploy-servo nix script, like deploy-moby 2023-07-06 22:40:25 +00:00
d318d61895 sxmo-utils: send a couple more patches upstream 2023-07-06 20:16:50 +00:00
e3b853e7f0 nixpkgs: 2023-07-04 -> 2023-07-05
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/78419edadf0fabbe5618643bd850b2f2198ed060' (2023-07-04)
  → 'github:nixos/nixpkgs/f292b4964cb71f9dfbbd30dc9f511d6165cd109b' (2023-07-05)
```
2023-07-06 20:16:50 +00:00
8fa9815b10 sane-bt-search: fix usage for top flag 2023-07-06 20:16:50 +00:00
b7a77375b2 pleroma: block FB/IG/Meta's threads.net instance 2023-07-05 21:36:55 +00:00
d6ccd7d1cb nixpkgs: 2023-07-02 -> 2023-07-04
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0fbe93c5a7cac99f90b60bdf5f149383daaa615f' (2023-07-02)
  → 'github:nixos/nixpkgs/78419edadf0fabbe5618643bd850b2f2198ed060' (2023-07-04)
```
2023-07-05 09:14:51 +00:00
5c75f8c0e3 add todo for port 53 forward 2023-07-05 09:07:20 +00:00
07d7994176 pleroma: simplify proxy settings & make log level configurable 2023-07-05 09:04:50 +00:00
9e7930cb6e nixpatches: fix hashes 2023-07-05 09:04:50 +00:00
1d11c9b342 servo: persist media/datasets
it has to be under media so that transmission can see it
2023-07-05 09:04:50 +00:00
adb04c46f5 nixpkgs: 2023-07-01 -> 2023-07-02
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/645ff62e09d294a30de823cb568e9c6d68e92606' (2023-07-01)
  → 'github:nixos/nixpkgs/0fbe93c5a7cac99f90b60bdf5f149383daaa615f' (2023-07-02)
```
2023-07-04 18:57:27 +00:00
43740c3b9b neovim: nit: fix "tex" -> "viml" typo 2023-07-04 10:28:44 +00:00
2131e638aa desko: enable some dev-related packages
useful as i hack on Helix
2023-07-04 10:27:59 +00:00
8bd2ad0456 zsh: add switch function 2023-07-04 03:31:13 +00:00
61cbdc2c85 add helix text editor 2023-07-04 03:28:54 +00:00
ebf6f46948 persist ~/Books 2023-07-03 22:38:30 +00:00
29e03d59f3 sxmo: cleaner terminal and keyboard config computation 2023-07-03 22:27:29 +00:00
e6cdd5450c moby: specify wvkbd layers explicitly 2023-07-03 22:19:50 +00:00
32e20cdda0 programs: enable epiphany web browser for all gui platforms 2023-07-03 08:16:40 +00:00
8600934755 programs: more cleanup 2023-07-03 08:03:55 +00:00
787b58b284 programs: reorder package groups 2023-07-03 07:58:02 +00:00
acf89a041e modules/programs: cleanup with statements 2023-07-03 07:55:05 +00:00
9340d5f391 programs: remove explicit default definitions 2023-07-03 07:49:44 +00:00
9f1d61c781 programs: remove quadratic behavior 2023-07-03 07:16:24 +00:00
83e48eabad WIP: decrease quadratic operations in modules/programs.nix 2023-07-03 07:04:57 +00:00
9b9273b725 programs: call out some quadratic behavior; i can try to fix it in the future 2023-07-03 06:41:48 +00:00
ccaff668c1 sane-lib: path: fix from bug; tidy 2023-07-03 05:28:53 +00:00
4c44101a83 add a todo for theming adwaita 2023-07-03 05:08:26 +00:00
85b7596763 enable cross-compilation of epiphany web browser 2023-07-03 03:00:46 +00:00
dfbf30912f add a todo for shipping camera app on moby 2023-07-02 23:16:59 +00:00
27964c9c40 moby: mark kernel compression todo item as complete 2023-07-02 23:14:18 +00:00
262592b26a programs: better way to ship jellyfin-media-player only on desktops 2023-07-02 23:12:12 +00:00
7b0e4caa16 programs: ship blanket ambient noise generator 2023-07-02 23:10:05 +00:00
9546908dbf remove unused sane-mount-* helpers 2023-07-02 23:01:56 +00:00
3961923599 scripts: move these to more appropriate places 2023-07-02 22:49:17 +00:00
6b55faec0c install-bluetooth: port to nix-shell 2023-07-02 22:42:52 +00:00
67bf15cca2 nixpkgs: 2023-06-29 -> 2023-07-01; sops-nix -> 2023-07-02; uninsane-dot-org
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/4bc72cae107788bf3f24f30db2e2f685c9298dc9' (2023-06-29)
  → 'github:nixos/nixpkgs/645ff62e09d294a30de823cb568e9c6d68e92606' (2023-07-01)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2ff6973350682f8d16371f8c071a304b8067f192' (2023-06-22)
  → 'github:Mic92/sops-nix/5ed3c22c1fa0515e037e36956a67fe7e32c92957' (2023-07-02)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/e2e2059d19668dab1744301b8b0e821e3aae9c99' (2023-06-17)
  → 'github:NixOS/nixpkgs/f553c016a31277246f8d3724d3b1eee5e8c0842c' (2023-07-02)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=ae27eb61b55b6c6d83c25384fb163df398a80265' (2023-06-26)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=1542323cfb46a8950c17a3afa5f7cd2e62dd9672' (2023-07-02)
```
2023-07-02 12:00:24 +00:00
a62852072e sane-reclaim-disk-space: include delete-older-than 30d argument 2023-07-02 11:59:37 +00:00
83f2438739 moby: fix gtk icons 2023-07-02 11:58:57 +00:00
bad0e9cc53 gui: remove dead code 2023-07-02 11:35:03 +00:00
9aea0945a5 gtk: fix icons, and apply Tokyonight as default theme 2023-07-02 11:33:01 +00:00
cce87eb6fb WIP: theme gtk apps 2023-07-02 09:37:07 +00:00
9777e5f83c trust-dns: rework the module to be more suitable for upstreaming
still need to do hardening and docs
2023-07-02 08:21:33 +00:00
154711432f pleroma: link to docs 2023-07-02 04:33:34 +00:00
b8460b7524 refine moby todos 2023-07-02 03:00:46 +00:00
fa427ad7ea add todo for offline uninsane.org 2023-07-02 02:54:07 +00:00
7be7d5d938 sxmo-utils: add lemoa app listing (and change Tuba icon) 2023-07-02 01:52:26 +00:00
7c5ab7d253 ship lemoa on gui hosts 2023-07-02 01:40:36 +00:00
48adaa832e lemoa: 0.1.0 -> 0.2.0 2023-07-01 23:39:50 +00:00
38b44a31e4 sxmo-utils: link to upstreamed patches 2023-07-01 00:58:43 +00:00
9ad72af979 add todo for better email 2023-07-01 00:57:36 +00:00
2a2ce34bd8 git: sendemail: always annotate and confirm 2023-07-01 00:55:43 +00:00
b2e70c0210 programs: ship msmtp sendmail implementation 2023-07-01 00:28:59 +00:00
3d4cbbf005 git: add br -> branch alias 2023-06-30 23:13:56 +00:00
b18bdc4e3e sxmo-utils: fix typo in gthumb app 2023-06-30 21:17:12 +00:00
2f88ba92d1 nixpkgs: 2023-06-27 -> 2023-06-29
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e18dc963075ed115afb3e312b64643bf8fd4b474' (2023-06-27)
  → 'github:nixos/nixpkgs/4bc72cae107788bf3f24f30db2e2f685c9298dc9' (2023-06-29)
```
2023-06-30 20:29:58 +00:00
f25dbdd4d2 aerc: change name to match git name 2023-06-30 11:09:10 +00:00
3da58f1d41 kitty: set the TERMINAL env var by default 2023-06-30 11:02:53 +00:00
e519c1c629 patch prefered terminal into glib/gio apps like firefox
now i can type mailto:foo@bar.com into firefox urlbar and it opens in aerc in a new terminal
2023-06-30 11:02:53 +00:00
3df165593c web browser: set $BROWSER environment variable
this gets used as fallback by e.g. xdg-email
2023-06-30 08:50:58 +00:00
daabe09bb4 overlays: disable webkitgtk "separateDebugInfo = false;" override 2023-06-30 03:45:27 +00:00
dfbfae90a5 lemmy: remove db migration hack
all my lemmy patches can be removed from this repo, but i'll wait for some stability before actually doing that
2023-06-30 03:45:09 +00:00
ef9f62ed13 sxmo-utils: fix cozy appname 2023-06-29 23:21:24 +00:00
2c49dfa642 refactor: remove overlays/pins.nix 2023-06-29 22:47:51 +00:00
6ddc943a39 add todos for sxmo module & zsh optimizations 2023-06-29 22:45:25 +00:00
5c50243d23 git: allow common dif typo 2023-06-29 22:45:07 +00:00
556600e54b zsh: disable command suggestions 2023-06-29 22:43:49 +00:00
5db9c4f558 nix-index/nix-locate: re-enable 2023-06-29 21:24:32 +00:00
e22fb2f4f5 mime associations: add aerc for email (but... it doesnt work from gui) 2023-06-29 21:08:50 +00:00
71971a050c sxmo-utils: ship app icon for gThumb 2023-06-29 20:37:30 +00:00
ac97accd32 moby: ship gThumb 2023-06-29 20:23:53 +00:00
f391e467c2 networkmanager: remove the default plugins 2023-06-29 10:58:18 +00:00
fa5d4c467c sway: replace gnome-control-center with wdisplays
mostly this is driven to reduce my desktop's dependencies (particularly
on webkitgtk), but it also looks a little nicer than gnome's displays
panel.
2023-06-29 10:56:56 +00:00
4c5333c9ed desko/lappy: don't ship font-manager
with this i no longer ship webkitgtk4_0
2023-06-29 09:45:15 +00:00
6fdb7059e3 gthumb: build without webkitgtk 2023-06-29 09:43:17 +00:00
28f7823077 nixpatches: fix nmap/lua54 hash 2023-06-29 09:14:15 +00:00
9e972d21b4 Merge branch 'master' of git.uninsane.org:colin/nix-files 2023-06-29 09:12:24 +00:00
42f194f447 keyring: fix bad dep ordering that prevented ~/private from being mounted 2023-06-29 09:11:22 +00:00
dbd312e9bd guest: enable access to shelvacu 2023-06-29 09:11:22 +00:00
9be5604c40 nixpkgs: 2023-06-26 -> 2023-06-27
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/6b3d1b1cf13f407fef5e634b224d575eb7211975' (2023-06-26)
  → 'github:nixos/nixpkgs/e18dc963075ed115afb3e312b64643bf8fd4b474' (2023-06-27)
```
2023-06-29 00:49:09 +00:00
97ce93cac6 fs: allow mounting /mnt/* as ordinary user 2023-06-28 10:50:39 +00:00
56c637d4d3 enable systemd-oomd on nix builds 2023-06-28 10:47:53 +00:00
89160f68e8 mention systemd-run in app containerization todo 2023-06-28 10:30:57 +00:00
316eb59071 nixpkgs: 2023-06-22 -> 2023-06-26; uninsane-dot-org -> 2023-06-26
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e603dc5f061ca1d8a19b3ede6a8cf9c9fcba6cdc' (2023-06-22)
  → 'github:nixos/nixpkgs/6b3d1b1cf13f407fef5e634b224d575eb7211975' (2023-06-26)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=0e0aa12aca143639f158b3a5c0c00349fcc2166c' (2023-06-16)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=ae27eb61b55b6c6d83c25384fb163df398a80265' (2023-06-26)
• Updated input 'uninsane-dot-org/flake-utils':
    'github:numtide/flake-utils/93a2b84fc4b70d9e089d029deacc3583435c2ed6' (2023-03-15)
  → 'github:numtide/flake-utils/dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7' (2023-06-25)
• Added input 'uninsane-dot-org/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
```
2023-06-28 06:45:02 +00:00
c19a0af6d7 desko: enable distccd 2023-06-28 04:16:20 +00:00
038d252f7d guest: allow external configuration of authorized ssh keys 2023-06-28 03:53:19 +00:00
68cda2006b cleanup/refactor users 2023-06-28 03:46:29 +00:00
ddf79e54e9 users: split colin and guest apart 2023-06-28 03:34:15 +00:00
ac5e2cc023 users.nix: move to subdir 2023-06-28 03:21:05 +00:00
48eece548f add todo: gitea CI 2023-06-28 03:09:54 +00:00
8e16cd6d32 feeds: link to a place where i might find more 2023-06-28 03:09:23 +00:00
6676935ee1 feeds: add The Linux Experiment 2023-06-28 03:05:45 +00:00
c09b2d0d63 elaborate todo about securing programs 2023-06-28 01:08:53 +00:00
f12672b197 linux-megous: note about stability 2023-06-28 00:20:14 +00:00
8717a91467 programs: git: add alias for diff summary 2023-06-28 00:20:02 +00:00
b43b8a3a22 zsh: disable "command not found" corrections 2023-06-27 22:41:27 +00:00
c1df32695b build-machine: increase the number of nix build users 2023-06-27 22:41:23 +00:00
b98eca1d84 add TODO: remove overlays/pins.nix 2023-06-27 22:41:20 +00:00
7bc718bf15 dev-machine: don't ship docs until i resume development 2023-06-27 22:41:16 +00:00
dbb1d16617 web-browser: update extension hashes 2023-06-27 22:41:14 +00:00
771f482d84 EDITOR, GIT_EDITOR: lift into vim.nix 2023-06-27 10:26:11 +00:00
40ec4d6ce0 programs: allow programs to ship system-level environment variables 2023-06-27 10:24:48 +00:00
b90bc1058d git: add aliases: cp -> cherry-pick; rb -> rebase 2023-06-27 08:54:17 +00:00
0fcddf8970 web-browser: leave myself a todo for cleaning up prefs 2023-06-27 08:10:01 +00:00
cffb54c293 sxmo: give a little more time before transitioning from screen lock -> screen off 2023-06-27 08:10:01 +00:00
36c181c147 matrix-irc: fix oftc connection 2023-06-27 08:08:27 +00:00
cdbd3c2fd8 lemoa: remove excess buildInputs 2023-06-27 07:12:32 +00:00
530163c853 nixpatches: fix mepo hash
probably most of these hashes are outdated, after switching to fetchpatch2
2023-06-27 06:41:03 +00:00
516459b351 lemoa: unstable-2023-06-25 -> 0.1.0 2023-06-27 06:36:45 +00:00
05e37a4557 formatting 2023-06-27 01:59:49 +00:00
4006765387 cross: fix firefox-pmos-mobile cross compilation 2023-06-27 01:59:04 +00:00
db0ce6eadd web-browser: don't apply librewolf prefs to firefox deployments 2023-06-26 23:22:45 +00:00
f188229379 nixpatches: switch to fetchpatch2
fewer edgecases
2023-06-26 10:12:00 +00:00
f0d7d6877b web-browser: clean up some dead comments, defaults 2023-06-26 10:11:22 +00:00
a8025550d5 web-browser: apply pmos styling
on desktop, this doesn't respond to mouse input.
on mobile, not tested.
2023-06-26 10:10:26 +00:00
acd803d5bc patches: import firefox-pmos-mobile 2023-06-26 10:09:32 +00:00
59111b95b3 sane-wipe-browser: also wipe firefox 2023-06-26 08:04:45 +00:00
b5feeb1792 complete TODO: fix NUR evaluation 2023-06-26 01:27:53 +00:00
325398ec28 sane-scripts: rename nix-shell-scripts -> sane-bin 2023-06-26 01:27:35 +00:00
9b3ee537a8 flake: add "check-nur" app to validate that my repo passes NUR checks 2023-06-26 01:26:13 +00:00
7aa0c5e3ea pkgs: fix python3Packages.sane-lib eval outside of flake (i.e. NUR) 2023-06-26 01:25:46 +00:00
8c586bd0db cargo-docset: remove. it's been upstreamed 2023-06-26 01:12:29 +00:00
ec0e8ce38b pkgs: fix error that prevented gpodder-adaptive-configured from being evaluated on its own 2023-06-26 01:09:27 +00:00
be0d5fd7c2 gpodder-configured: name the package based on the input gPodder pname 2023-06-26 01:08:30 +00:00
e7fadbe965 gpodder-configured: name the resulting binary gpodder so it can be started with anything expecting normal gpodder API (e.g. sxmo) 2023-06-26 00:52:11 +00:00
054af010bd add new TODO: neovim LSP 2023-06-26 00:32:47 +00:00
ee5a2ff986 neovim: fix auto-indent for nix files 2023-06-26 00:32:47 +00:00
cb7f84e2b7 neovim: order plugins lexicographically 2023-06-26 00:32:47 +00:00
e5124fd0d6 lemoa: init at unstable-2023-06-25 2023-06-26 00:32:45 +00:00
0751e748ea feeds: add PostmarketOS podcast 2023-06-25 22:22:32 +00:00
afce50b56d jellyfin-media-player-qt6: bump 2023-06-25 22:04:54 +00:00
71e0942cc2 git: configure git stash show to actually... SHOW the stash
OMFG
2023-06-25 21:45:47 +00:00
049ded2a0d firefox-pmos-mobile: rebase patch 2023-06-25 18:05:06 +00:00
4854b8b409 sxmo-utils: ship mepo dependency 2023-06-25 18:04:34 +00:00
55e90f531b mepo: enable cross compilation (via emulation) 2023-06-25 18:04:19 +00:00
3a6bb5a787 add new TODO: better sane.persist behavior esp for ~/private 2023-06-25 02:15:58 +00:00
aae5e40e92 complete todo: librewolf and jellyfin are displayed in sxmo appmenu 2023-06-25 02:14:39 +00:00
5d464b3c64 sxmo: apps: add jellyfin 2023-06-25 02:14:35 +00:00
9b389416cd programs: git: add st and stat aliases 2023-06-25 02:09:25 +00:00
bd57bb7934 programs: add mepo 2023-06-25 02:05:50 +00:00
db2d4ca78e nixpatches: try (and abandon) the firefox-pmos-mobile patch 2023-06-25 01:17:14 +00:00
3812d935a7 sxmo: fix Tuba app entry 2023-06-25 00:42:41 +00:00
bc993d1139 add TODO: fix NUR eval 2023-06-25 00:37:08 +00:00
ec62b5f664 sxmo: leave a TODO about reducing nerdfonts size 2023-06-25 00:36:58 +00:00
71e96fff18 sxmo: add missing gnugrep dependency 2023-06-25 00:03:36 +00:00
33eaa00957 sxmo: add app entry for Sublime Music 2023-06-25 00:03:36 +00:00
a5af1e0893 sxmo: fix MPRIS detection so that any active player will block suspend 2023-06-24 23:54:39 +00:00
be21ac57f8 sxmo-utils: add some missing runtime deps 2023-06-24 23:43:00 +00:00
63a773d8a9 sxmo-utils: add missing dbus dependency 2023-06-24 23:14:57 +00:00
505fcf5111 sxmo-utils: add missing modemmanager dependency (for mmcli) 2023-06-24 23:13:15 +00:00
f0e76ef11f sxmo-utils: add app entries for Librewolf and Tuba 2023-06-24 23:02:43 +00:00
cb721ac70e elaborate TODO about OOM: consider placing nix builds in their own subdir 2023-06-24 22:13:23 +00:00
aae783876b delete completed TODOs 2023-06-24 22:11:19 +00:00
5e3a8cf702 cross: fix tuba compilation for moby 2023-06-24 19:43:09 +00:00
d9b9349572 programs: disable a few that i don't actually use 2023-06-24 19:43:09 +00:00
b6b0e65ef6 flake/nixpkgs: 2023-06-17 -> 2023-06-22
```
• Updated input 'nix-serve':
    'github:edolstra/nix-serve/e6e3d09438e803daa5374ad8edf1271289348456' (2023-05-17)
  → 'github:edolstra/nix-serve/d6df5bd8584f37e22cff627db2fc4058a4aab5ee' (2023-06-20)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/04af42f3b31dba0ef742d254456dc4c14eedac86' (2023-06-17)
  → 'github:nixos/nixpkgs/e603dc5f061ca1d8a19b3ede6a8cf9c9fcba6cdc' (2023-06-22)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/1634d2da53f079e7f5924efa7a96511cd9596f81' (2023-06-18)
  → 'github:Mic92/sops-nix/2ff6973350682f8d16371f8c071a304b8067f192' (2023-06-22)
```
2023-06-24 19:43:09 +00:00
a723d1274b all: ship Tuba mastodon/pleroma client 2023-06-24 09:50:12 +00:00
d41ad9db01 lappy: fix build (syntax error) 2023-06-24 09:39:58 +00:00
d6720f3601 sxmo: lift device-specific config out of the sxmo-utils & into the hosts 2023-06-23 10:24:47 +00:00
0b0d453916 sxmo: remove cfg.{deviceHooks,hooks}
seems sxmo is able to find them through XDG_DATA_DIR
2023-06-23 09:13:57 +00:00
59adddafc7 sxmo: make the package a config option 2023-06-23 08:38:23 +00:00
50fa70ca56 sxmo-utils: leave note about which hooks to lift out of package 2023-06-23 08:31:53 +00:00
86855b0c40 sxmo: run upstream set-permissions script at boot
this doesn't seem to do much in practice.
ideally upstream would include the logic for LEDs here too, but they
don't.
2023-06-23 08:31:53 +00:00
931838fb0d sxmo: ship deps via package instead of at the DE level 2023-06-23 08:31:48 +00:00
ec3a7067b6 modules/programs.nix: fix eval error when a program is suggestedBy multiple enabled packages 2023-06-23 02:05:26 +00:00
8cb236b0a9 users: add self to transmission group 2023-06-23 00:27:48 +00:00
5f47372f6a sane-bt: add --freeleech and --archive flags to control torrent location 2023-06-23 00:02:51 +00:00
afe27fd9cb sane-bt-add: support moving torrents to new directories 2023-06-22 23:48:00 +00:00
e8265807a9 NIX_PATH: point overlays to ~/nixos, not /nix/store/... 2023-06-22 23:34:15 +00:00
85ecaf64e9 sane-scripts: tidy up python deps 2023-06-22 23:33:49 +00:00
33b33a9237 sane-bt-*: remove extraneous nix-shell dep 2023-06-22 22:39:02 +00:00
fecd2fa7d3 sane-bt-*: add top-level docs 2023-06-22 22:37:02 +00:00
74ec65c8a9 sane-bt-show: allow showing multiple torrents (again) 2023-06-22 22:32:38 +00:00
21a060d856 sane-scripts: lift the transmission runtime dependency into sane-lib.bt 2023-06-22 22:29:52 +00:00
6249f7553c sane-bt-*: refactor: executor -> bt_api rename 2023-06-22 22:25:13 +00:00
96c976a3b0 sane-bt-show: port to Python 2023-06-22 22:24:49 +00:00
d48d3a979f sane-scripts: leave comment about cleaning up setup.py 2023-06-22 21:35:45 +00:00
ab8ee51321 sane-ip-port-forward: fix broken import 2023-06-22 21:34:59 +00:00
74891fb2f0 sane-scripts: split sane-lib-ssdp into an actual, nix-level library 2023-06-22 09:58:56 +00:00
f62bd83eb8 sane-scripts: split sane-lib-bt into an actual, nix-level library
a bit less hacky, i think
2023-06-22 09:53:30 +00:00
c977665214 sane-scripts: port sane-bt-rm to python
also fix missing lib in sane-bt-add
2023-06-22 07:24:08 +00:00
b3a605c76b sane-ip-port-forward: remind why we sys.path.insert 2023-06-22 02:28:10 +00:00
2cbd44b2b3 sane-bt-add: port to Python (and add a dry-run option) 2023-06-22 02:27:47 +00:00
689c63a905 record my attempt at updating matrix-appservice-irc in case i try again in the future 2023-06-21 06:13:27 +00:00
ed2480f48c matrix-appservice-irc: fix permissions errors 2023-06-21 06:12:08 +00:00
7aad3a62ba koreader: ship RSS feeds 2023-06-20 19:58:02 +00:00
1583b213f1 fs: ensure directories for remote filesystems are created 2023-06-20 08:40:25 +00:00
db851d960c sxmo: include sfeed, for use by sxmo_rss.sh
note that sxmo_rss.sh needs to be run from a terminal,
and i'm not sure it's totally wired up "correct".
2023-06-20 08:38:18 +00:00
fb7cb091e3 tuiApps: add sfeed 2023-06-20 08:38:11 +00:00
048dbc5809 moby/linux: 6.3.0 -> 6.4.0-rc7
this supposedly brings better power usage during sleep
by powering off the touchscreen
2023-06-20 03:01:10 +00:00
bb1a2c9dcb moby: remove ~/.config/sxmo/profile in favor of the nixos-level config options
note that this reverts from a SXMO_SWAY_SCALE of 2.0 -> 1.5

there may be other idiomatic ways to tune that
2023-06-20 00:33:10 +00:00
86c8fe1466 sane-bt-search: remove jackett hostname hack 2023-06-20 00:29:16 +00:00
95f6fd7082 jackett: use recommendedProxySettings so that returned URLs are correct 2023-06-20 00:28:46 +00:00
5fb52ba38e sxmo: show battery percentage by default; idle timeout to 5min, both configurable 2023-06-20 00:13:39 +00:00
4f8d0023ef sxmo: make an option with which to configure noidle 2023-06-20 00:05:06 +00:00
280c4aa2e8 sxmo: add missing j4-dmenu-desktop
this adds the "all apps" option to the app menu
2023-06-19 23:58:04 +00:00
fd270dd0b8 sxmo-utils: 1.14.1 -> 1.14.2 2023-06-19 23:57:44 +00:00
8e17e2beb2 lemmy: remove unsupported settings.federation.enabled option 2023-06-19 21:17:59 +00:00
d68704474d sane-bt-search: include links to the tracker page 2023-06-19 21:01:52 +00:00
0fa5b5bf52 flake/nixpkgs: 2023-06-15 -> 2023-06-17
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/7c67f006ea0e7d0265f16d7df07cc076fdffd91f' (2023-06-15)
  → 'github:nixos/nixpkgs/04af42f3b31dba0ef742d254456dc4c14eedac86' (2023-06-17)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/1e2bae54870a06aa9364f8d33a5b9a0869d792fc' (2023-06-16)
  → 'github:Mic92/sops-nix/1634d2da53f079e7f5924efa7a96511cd9596f81' (2023-06-18)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/aa4b53f79d961a7cbba0b24f791401a34c18011a' (2023-06-16)
  → 'github:NixOS/nixpkgs/e2e2059d19668dab1744301b8b0e821e3aae9c99' (2023-06-17)
```
2023-06-19 19:33:51 +00:00
9caa2a0a17 koreader: note to self that the os.execute bug may affect other features 2023-06-19 09:48:57 +00:00
023e28fb03 koreader: fix that "isOnline" check was failing and preventing FTP access 2023-06-19 09:21:30 +00:00
bed33fae60 koreader: 2023.04 -> 2023.05.1 2023-06-19 08:02:54 +00:00
3b958ba356 sftp: allow read-only anonymous FTP 2023-06-19 03:49:51 +00:00
adb6ff4c66 remove dead code: resholve-prologue 2023-06-18 21:48:12 +00:00
931c76c2e7 unftp: init at 0.14.3 2023-06-18 06:38:01 +00:00
d95042ab65 servo: partially enable a FTP server
disabled as i tidy it
strugging to enable an anonymous FTP user -- might not be possible without using the web admin interface
2023-06-17 10:15:30 +00:00
0605094461 Merge branch 'staging/nixpkgs-2023-06-15' 2023-06-17 10:13:21 +00:00
4eb6c1fd7d flake/nixpkgs: 2023-06-12 -> 2023-06-15
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0eeebd64de89e4163f4d3cf34ffe925a5cf67a05' (2023-06-12)
  → 'github:nixos/nixpkgs/7c67f006ea0e7d0265f16d7df07cc076fdffd91f' (2023-06-15)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/cb85e297937af1bd1434cf5f85a3f86a21dc8207' (2023-06-11)
  → 'github:Mic92/sops-nix/1e2bae54870a06aa9364f8d33a5b9a0869d792fc' (2023-06-16)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/ef24b2fa0c5f290a35064b847bc211f25cb85c88' (2023-06-10)
  → 'github:NixOS/nixpkgs/aa4b53f79d961a7cbba0b24f791401a34c18011a' (2023-06-16)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=f3747a1dad3d34880613821faf26357ba432d3d7' (2023-05-19)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=0e0aa12aca143639f158b3a5c0c00349fcc2166c' (2023-06-16)
```
2023-06-17 10:07:59 +00:00
c553e74cd6 common: fs: remove invalid "nofail" option from ssh mounts 2023-06-17 10:03:44 +00:00
4eb6f59b01 sane-ip-reconnect: add some logging 2023-06-16 07:17:31 +00:00
9f55a8288d ship koreader ebook reader (and persist relevant data) 2023-06-16 01:23:55 +00:00
feb299eb22 cross: fix koreader build 2023-06-16 01:23:55 +00:00
b21c79a0b4 cross: fix nautilus 2023-06-16 01:23:55 +00:00
c819bc2d95 cross: fix cozy unable to load FileChooser at runtime 2023-06-16 01:23:55 +00:00
21006e52dc sane-bt-search: add a --help option 2023-06-15 10:25:59 +00:00
5562d60cbb fs mounts: add nofail and mount-timeout to reduce shutdown hangs on nfs 2023-06-15 10:08:54 +00:00
17041384e9 fs mounts: reduce nfs timeouts, for faster shutdown
it still takes 90s; maybe the issue is nested mounts?
2023-06-15 09:25:48 +00:00
9eb36441e1 fs mounts: don't auto-mount ssh; try to specify correct net dependencies for better shutdown 2023-06-15 08:40:21 +00:00
0d0a9fce6a associate ssh pubkeys to my hosts' wireguard names 2023-06-15 07:54:31 +00:00
847e618dee cozy: persist data 2023-06-15 06:34:50 +00:00
c4e345e2e7 cozy: ship on all gui devices 2023-06-15 06:08:10 +00:00
c75719e751 /mnt/servo-media: default to the nfs mount
maybe i remove the ssh mounts if/when nfs proves stable
2023-06-15 02:31:17 +00:00
7a57cf5327 clients: fs: mount servo over nfs 2023-06-15 02:14:42 +00:00
b81642ccc9 servo/nfs: fix netmask typo 2023-06-15 02:13:29 +00:00
57ca3e67b3 servo/nfs: export rw if the source is wireguard 2023-06-15 01:52:15 +00:00
bcca6b6096 servo: export some read-only NFS mounts 2023-06-15 01:38:09 +00:00
79772d4e3d cozy: fix launch 2023-06-14 22:27:03 +00:00
339c0a47ab flake/nixpkgs: 2023-06-11 -> 2023-06-12
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/75a5ebf473cd60148ba9aec0d219f72e5cf52519' (2023-06-11)
  → 'github:nixos/nixpkgs/0eeebd64de89e4163f4d3cf34ffe925a5cf67a05' (2023-06-12)
```
2023-06-14 20:38:43 +00:00
b1be78529b gpodder: apply update via upstream PR 2023-06-14 07:39:18 +00:00
cce53b968b sequoia: apply update via upstream PR 2023-06-14 07:35:50 +00:00
1d55b98cd1 sequoia: 0.28.0 -> 0.30.1 2023-06-14 07:16:21 +00:00
e9d45c3b31 snippets: update 2023-06-14 02:30:29 +00:00
32dde42ee2 zecwallet-light-cli: init at 1.7.7 2023-06-14 00:32:54 +00:00
b60986cfb8 update snippets 2023-06-13 22:10:59 +00:00
60ef232bc0 flake/nixpkgs: 2023-06-10 -> 2023-06-11
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/21951114383770f96ae528d0ae68824557768e81' (2023-06-10)
  → 'github:nixos/nixpkgs/75a5ebf473cd60148ba9aec0d219f72e5cf52519' (2023-06-11)
```
2023-06-13 08:49:55 +00:00
7f7bc33be5 sane-bt-search: report errors for unexpected options 2023-06-13 08:01:52 +00:00
f52f56a34c moby: no longer ship Jellyfin 2023-06-13 07:05:21 +00:00
425de71583 komikuu: ship on all GUI platforms 2023-06-13 07:04:43 +00:00
0bd87077c1 komikku: fix for cross compilation 2023-06-13 07:04:26 +00:00
601bf567eb gpodder: ship the gpodder-adaptive branch
better mobile experience
2023-06-13 05:30:10 +00:00
4f74078423 komikku: persist downloaded comics 2023-06-13 05:30:10 +00:00
f170351de7 ship komikku (comic/manga viewer) 2023-06-13 05:30:10 +00:00
bee9dab513 gpodder: 3.10.21 -> 3.11.1 2023-06-13 05:30:10 +00:00
16c3d4289e cross: jellyfin-media-player-qt6: fix wrapQtAppsHook 2023-06-13 05:30:10 +00:00
21e0c0d00f sane_ssdp: fix get_ips_from_location return value on failure 2023-06-12 20:11:02 +00:00
fdf85156bc lemmy: re-enable the version pin 2023-06-11 12:12:41 +00:00
79a7daca12 lemmy: more debugging 2023-06-11 11:24:15 +00:00
3996e1be08 lemmy-ui: no need to patch nodejs version after upstream nixpkgs update 2023-06-11 10:51:05 +00:00
8b1dbd42da roles/dev-machine: disable docs for lemmy-server 2023-06-11 10:51:05 +00:00
a2c7edf340 flake/nixpkgs: 2023-06-07 -> 2023-06-10
```
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/381e92a35e2d196fdd6077680dca0cd0197e75cb' (2023-06-07)
  → 'github:nixos/nixpkgs/21951114383770f96ae528d0ae68824557768e81' (2023-06-10)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/a522e12ee35e50fa7d902a164a9796e420e6e75b' (2023-06-04)
  → 'github:Mic92/sops-nix/cb85e297937af1bd1434cf5f85a3f86a21dc8207' (2023-06-11)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/eaf03591711b46d21abc7082a8ebee4681f9dbeb' (2023-06-03)
  → 'github:NixOS/nixpkgs/ef24b2fa0c5f290a35064b847bc211f25cb85c88' (2023-06-10)
```
2023-06-11 10:51:05 +00:00
9b365d1771 sxmo: fix volume controls for pipewire 2023-06-11 09:57:47 +00:00
8cf3402be4 add new TODOs for better sxmo experiences 2023-06-11 08:34:20 +00:00
a92fa489cb complete todos: sxmo auto-rotation 2023-06-11 08:32:56 +00:00
837f20e892 lemmy: apply PR feedback 2023-06-11 03:43:35 +00:00
3d56117d65 gocryptfs: remove "defaults" flag 2023-06-10 23:21:42 +00:00
1724ac60e5 feeds: update URL for The Intercept 2023-06-10 23:08:51 +00:00
bf168c7f0f feeds: update URL for Deconstructed 2023-06-10 22:59:44 +00:00
37cafcf610 moby: re-enable nautilus file browser 2023-06-10 22:54:27 +00:00
490 changed files with 111982 additions and 8649 deletions

3
.gitignore vendored
View File

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

View File

@@ -4,18 +4,38 @@ this is the top-level repo from which i configure/deploy all my NixOS machines:
- desktop
- laptop
- server
- mobile phone
- mobile phone (Pinephone)
i enjoy a monorepo approach. this repo references [nixpkgs][nixpkgs], a couple 3rd party
nix modules like [sops][sops], the sources for [uninsane.org][uninsane-org], and that's
about it. custom derivations and modules (some of which i try to upstream) live
directly here; even the sources for those packages is often kept here too.
everything outside of <./hosts/> and <./secrets/> is intended for export, to be importable for use by 3rd parties.
the only hard dependency for my exported pkgs/modules should be [nixpkgs][nixpkgs].
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)
- [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:
- <./modules/fs/default.nix>
- <./modules/programs.nix>
- <./modules/users.nix>
[nixpkgs]: https://github.com/NixOS/nixpkgs
[sops]: https://github.com/Mic92/sops-nix
[uninsane-org]: https://uninsane.org
## Using This Repo In Your Own Config
this should be a pretty "standard" flake. just reference it, and import either
- `nixosModules.sane` (for the modules)
- `overlays.pkgs` (for the packages)
or follow the instructions [here][NUR] to use it via the Nix User Repositories.
[NUR]: https://nur.nix-community.org/
## Layout
- `doc/`
- instructions for tasks i find myself doing semi-occasionally in this repo.
- `hosts/`
- the bulk of config which isn't factored with external use in mind.
- that is, if you were to add this repo to a flake.nix for your own use,
@@ -37,9 +57,7 @@ directly here; even the sources for those packages is often kept here too.
- inline code for wholly custom packages (e.g. `pkgs/additional/sane-scripts/` for CLI tools
that are highly specific to my setup).
- `scripts/`
- scripts which are referenced by other things in this repo.
- these aren't generally user-facing, but they're factored out so that they can
be invoked directly when i need to debug.
- scripts which aren't reachable on a deployed system, but may aid manual deployments
- `secrets/`
- encrypted keys, API tokens, anything which one or more of my machines needs
read access to but shouldn't be world-readable.
@@ -90,12 +108,6 @@ them being factored out of my config, message me and we could work to make that
[home-manager]: https://github.com/nix-community/home-manager
## Using This Repo In Your Own Config
this should be a pretty "standard" flake. just reference it, and import either
- `nixosModules.sane` (for the modules)
- `overlays.pkgs` (for the packages)
## Mirrors
this repo exists in a few known locations:
@@ -106,3 +118,6 @@ this repo exists in a few known locations:
if you want to contact me for questions, or collaborate to split something useful into a shared repo, etc,
you can reach me via any method listed [here](https://uninsane.org/about).
patches, for this repo or any other i host, will be warmly welcomed in any manner you see fit:
`git send-email`, DM'ing the patch over Matrix/Lemmy/ActivityPub/etc, even a literal PR where you
link me to your own clone.

112
TODO.md
View File

@@ -1,8 +1,10 @@
## BUGS
- why i need to manually restart `wireguard-wg-ovpns` on servo periodically
- else DNS fails
- else DNS fails
- ringer (i.e. dino incoming call) doesn't prevent moby from sleeping
## REFACTORING:
### sops/secrets
- attach secrets to the thing they're used by (sane.programs)
- rework secrets to leverage `sane.fs`
@@ -10,70 +12,102 @@
### roles
- allow any host to take the role of `uninsane.org`
- will make it easier to test new services?
- will make it easier to test new services?
### upstreaming
- split out a trust-dns module
- see: <https://github.com/NixOS/nixpkgs/pull/205866#issuecomment-1575753054>
- split out a sxmo module usable by NUR consumers
- bump nodejs version in lemmy-ui
- add updateScripts to all my packages in nixpkgs
- fix lightdm-mobile-greeter for newer libhandy
- port zecwallet-lite to a from-source build
- fix or abandon Whalebird
- FIX failed CI on bonsai PR: <https://github.com/NixOS/nixpkgs/pull/233892>
- 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>
- sxmo: add new app entries
## IMPROVEMENTS:
### security/resilience
- matrix/ntfy: automatically add the ntfy.uninsane.org push URL as part of synapse launch
- ntfy: use a more secure topic
- validate duplicity backups!
- encrypt more ~ dirs (~/archives, ~/records, ..?)
- best to do this after i know for sure i have good backups
- best to do this after i know for sure i have good backups
- have `sane.programs` be wrapped such that they run in a cgroup?
- at least, only give them access to the portion of the fs they *need*.
- Android takes approach of giving each app its own user: could hack that in here.
- at least, only give them access to the portion of the fs they *need*.
- Android takes approach of giving each app its own user: could hack that in here.
- **systemd-run** takes a command and runs it in a temporary scope (cgroup)
- presumably uses the same options as systemd services
- see e.g. <https://github.com/NixOS/nixpkgs/issues/113903#issuecomment-857296349>
- flatpak does this, somehow
- apparmor? SElinux? (desktop) "portals"?
- see Spectrum OS; Alyssa Ross; etc
- bubblewrap-based sandboxing: <https://github.com/nixpak/nixpak>
- canaries for important services
- e.g. daily email checks; daily backup checks
- e.g. daily email checks; daily backup checks
- integrate `nix check` into Gitea actions?
### user experience
- firefox/librewolf: don't show browserpass/sponsorblock/metamask "first run" on every boot
#### 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
- SwayNC:
- don't show MPRIS if no players detected
- this is a problem of playerctld, i guess
- add option to change audio output
- fix colors (red alert) to match overall theme
- extend width to 100% of portrait mode
- moby: tune GPS
- run only geoclue, and not gpsd, to save power?
- tune QGPS setting in eg25-control, for less jitter?
- direct mepo to prefer gpsd, with fallback to geoclue, for better accuracy?
- configure geoclue to do some smoothing?
- manually do smoothing, as some layer between mepo and geoclue/gpsd?
- moby: show battery state on ssh login
- moby: improve gPodder launch time
- moby: replace jellyfin-desktop with jellyfin-vue?
- allows (maybe) to cache media for offline use
- "newer" jellyfin client
- not packaged for nix
- find a nice desktop ActivityPub client
- 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)
- 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?
- especially, make the menubar collapsible
- try Gradience tool specifically for theming adwaita? <https://linuxphoneapps.org/apps/com.github.gradienceteam.gradience/>
- phog: remove the gnome-shell runtime dependency to save hella closure size
#### non-moby
- neovim: set up language server (lsp; rnix-lsp; nvim-lspconfig)
- Helix: make copy-to-system clipboard be the default
- firefox/librewolf: persist history
- just not cookies or tabs
- package Nix/NixOS docs for Zeal
- install [doc-browser](https://github.com/qwfy/doc-browser)
- this supports both dash (zeal) *and* the datasets from <https://devdocs.io> (which includes nix!)
- install [devhelp](https://wiki.gnome.org/Apps/Devhelp) (gnome)
- auto-mount servo
- install [doc-browser](https://github.com/qwfy/doc-browser)
- this supports both dash (zeal) *and* the datasets from <https://devdocs.io> (which includes nix!)
- install [devhelp](https://wiki.gnome.org/Apps/Devhelp) (gnome)
- have xdg-open parse `<repo:...> URIs (or adjust them so that it _can_ parse)
- `sane.programs`: auto-populate defaults with everything from `pkgs`
- zsh: disable "command not found" corrections
- sxmo: allow rotation to the upside-down position
- see: <repo:mil/sxmo-utils:scripts/core/sxmo_autorotate.sh>
- all orientations *except* upside down are supported
- sxmo: launch with auto-rotation enabled
- sane-bt-search: show details like 5.1 vs stereo, h264 vs h265
- maybe just color these "keywords" in all search results?
- uninsane.org: make URLs relative to allow local use (and as offline homepage)
- email: fix so that local mail doesn't go to junk
- git sendmail flow adds the DKIM signatures, but gets delivered locally w/o having the sig checked, so goes into Junk
- could change junk filter from "no DKIM success" to explicit "DKIM failed"
### perf
- 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?
- fix OOM for large builds like webkitgtk
- these use significant /tmp space.
- either place /tmp on encrypted-cleared-at-boot storage
- which probably causes each CPU load for the encryption
- **or set up encrypted swap**
- encrypted swap could remove the need for my encrypted-cleared-at-boot stuff
- 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!
- 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
## NEW FEATURES:
- add a FTP-accessible file share to servo
- just /var/www?
- migrate MAME cabinet to nix
- boot it from PXE from servo?
- boot it from PXE from servo?
- deploy to new server, and use it as a remote builder
- enable IPv6
- package lemonade lemmy app: <https://linuxphoneapps.org/apps/ml.mdwalters.lemonade/>

9
default.nix Normal file
View File

@@ -0,0 +1,9 @@
# limited, non-flake interface to this repo.
# this file exposes the same view into `pkgs` which the flake would see when evaluated.
#
# the primary purpose of this file is so i can run `updateScript`s which expect
# the root to be `default.nix`
{ pkgs ? import <nixpkgs> {} }:
pkgs.appendOverlays [
(import ./overlays/all.nix)
]

13
doc/adding-a-program.md Normal file
View File

@@ -0,0 +1,13 @@
to ship `pkgs.foo` on some host, either:
- add it as an entry in `suggestedPrograms` to the appropriate category in `hosts/common/programs/assorted.nix`, or
- `sane.programs.foo.enableFor.user.colin = true` in `hosts/by-name/myhost/default.nix`
if the program needs customization (persistence, configs, secrets):
- add a file for it at `hosts/common/programs/<foo>.nix`
- set the options, `sane.programs.foo.{fs,persist}`
if it's unclear what fs paths a program uses:
- run one of these commands, launch the program, run it again, and `diff`:
- `du -x --apparent-size ~`
- `find ~ -xdev`
- or, inspect the whole tmpfs root with `ncdu -x /`

93
flake.lock generated
View File

@@ -1,12 +1,15 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@@ -18,75 +21,43 @@
"mobile-nixos": {
"flake": false,
"locked": {
"lastModified": 1683422260,
"narHash": "sha256-79zaClbubRkBNlJ04OSADILuLQHH48N5fu296hEWYlw=",
"lastModified": 1694749521,
"narHash": "sha256-MiVokKlpcJmfoGuWAMeW1En7gZ5hk0rCQArYm6P9XCc=",
"owner": "nixos",
"repo": "mobile-nixos",
"rev": "ba4638836e94a8f16d1d1f9e8c0530b86078029c",
"rev": "d25d3b87e7f300d8066e31d792337d9cd7ecd23b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "d25d3b87e7f300d8066e31d792337d9cd7ecd23b",
"repo": "mobile-nixos",
"type": "github"
}
},
"nix-serve": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1684319086,
"narHash": "sha256-5wwlkWqP1cQUPXp/PJsi09FkgAule5yBghngRZZbUQg=",
"owner": "edolstra",
"repo": "nix-serve",
"rev": "e6e3d09438e803daa5374ad8edf1271289348456",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "nix-serve",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1606086654,
"narHash": "sha256-VFl+3eGIMqNp7cyOMJ6TjM/+UcsLKtodKoYexrlTJMI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "19db3e5ea2777daa874563b5986288151f502e27",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-20.09",
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685758009,
"narHash": "sha256-IT4Z5WGhafrq+xbDTyuKrRPRQ1f+kVOtE+4JU1CHFeo=",
"lastModified": 1698544399,
"narHash": "sha256-vhRmPyEyoPkrXF2iykBsWHA05MIaOSmMRLMF7Hul6+s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eaf03591711b46d21abc7082a8ebee4681f9dbeb",
"rev": "d87c5d8c41c9b3b39592563242f3a448b5cc4bc9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unpatched": {
"locked": {
"lastModified": 1686135559,
"narHash": "sha256-pY8waAV8K/sbHBdLn5diPFnQKpNg0YS9w03MrD2lUGE=",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "381e92a35e2d196fdd6077680dca0cd0197e75cb",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
@@ -99,7 +70,6 @@
"root": {
"inputs": {
"mobile-nixos": "mobile-nixos",
"nix-serve": "nix-serve",
"nixpkgs-unpatched": "nixpkgs-unpatched",
"sops-nix": "sops-nix",
"uninsane-dot-org": "uninsane-dot-org"
@@ -113,11 +83,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1685848844,
"narHash": "sha256-Iury+/SVbAwLES76QJSiKFiQDzmf/8Hsq8j54WF2qyw=",
"lastModified": 1698548647,
"narHash": "sha256-7c03OjBGqnwDW0FBaBc+NjfEBxMkza+dxZGJPyIzfFE=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "a522e12ee35e50fa7d902a164a9796e420e6e75b",
"rev": "632c3161a6cc24142c8e3f5529f5d81042571165",
"type": "github"
},
"original": {
@@ -126,6 +96,21 @@
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"uninsane-dot-org": {
"inputs": {
"flake-utils": "flake-utils",
@@ -134,11 +119,11 @@
]
},
"locked": {
"lastModified": 1684528780,
"narHash": "sha256-QdYxjcTCCLPv++1v9tJBL98nn/AFx0fmzlgzcLK6KRE=",
"lastModified": 1698634059,
"narHash": "sha256-+Oyv6vDyCtBzab/5cTG0nUrHD9gj7KgGfD4D1Rn4fCk=",
"ref": "refs/heads/master",
"rev": "f3747a1dad3d34880613821faf26357ba432d3d7",
"revCount": 194,
"rev": "2419750ca98fc04af42c91e50c49a29c68d465d2",
"revCount": 210,
"type": "git",
"url": "https://git.uninsane.org/colin/uninsane"
},

279
flake.nix
View File

@@ -4,6 +4,8 @@
# - this is marginally the case with schemes like `github:nixos/nixpkgs`.
# - given the *existing* `git+https://` scheme, i propose expressing github URLs similarly:
# - `github+https://github.com/nixos/nixpkgs/tree/nixos-22.11`
# - this would allow for the same optimizations as today's `github:nixos/nixpkgs`, but without obscuring the source.
# a code reader could view the source being referenced simply by clicking the https:// portion of that URI.
# - need some way to apply local patches to inputs.
#
#
@@ -23,9 +25,6 @@
# preferably, i would rewrite the human-readable https URLs to nix-specific github: URLs with a helper,
# but `inputs` is required to be a strict attrset: not an expression.
inputs = {
# <https://github.com/nixos/nixpkgs/tree/nixos-22.11>
# nixpkgs-stable.url = "github:nixos/nixpkgs?ref=nixos-22.11";
# branch workflow:
# - daily:
# - nixos-unstable cut from master after enough packages have been built in caches.
@@ -49,24 +48,26 @@
mobile-nixos = {
# <https://github.com/nixos/mobile-nixos>
url = "github:nixos/mobile-nixos";
# only used for building disk images, not relevant after deployment
# 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 = {
# <https://github.com/Mic92/sops-nix>
# used to distribute secrets to my hosts
url = "github:Mic92/sops-nix";
# inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs-unpatched";
};
uninsane-dot-org = {
# provides the package to deploy <https://uninsane.org>, used only when building the servo host
url = "git+https://git.uninsane.org/colin/uninsane";
# inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs-unpatched";
};
nix-serve = {
# <https://github.com/edolstra/nix-serve>
url = "github:edolstra/nix-serve";
};
};
outputs = {
@@ -75,21 +76,37 @@
mobile-nixos,
sops-nix,
uninsane-dot-org,
nix-serve,
...
}@inputs:
let
inherit (builtins) attrNames elem listToAttrs map mapAttrs;
# redefine some nixpkgs `lib` functions to avoid the infinite recursion
# of if we tried to use patched `nixpkgs.lib` as part of the patching process.
mapAttrs' = f: set:
listToAttrs (map (attr: f attr set.${attr}) (attrNames set));
optionalAttrs = cond: attrs: if cond then attrs else {};
# mapAttrs but without the `name` argument
mapAttrValues = f: mapAttrs (_: f);
# rather than apply our nixpkgs patches as a flake input, do that here instead.
# this (temporarily?) resolves the bad UX wherein a subflake residing in the same git
# repo as the main flake causes the main flake to have an unstable hash.
nixpkgs = (import ./nixpatches/flake.nix).outputs {
self = nixpkgs;
nixpkgs = nixpkgs-unpatched;
} // {
# provide values that nixpkgs ordinarily sources from the flake.lock file,
# inaccessible to it here because of the import-from-derivation.
# rev and shortRev seem to not always exist (e.g. if the working tree is dirty),
# so those are made conditional.
#
# these values impact the name of a produced nixos system. having date/rev in the
# `readlink /run/current-system` store path helps debuggability.
inherit (self) lastModifiedDate lastModified;
} // optionalAttrs (self ? rev) {
inherit (self) rev;
} // optionalAttrs (self ? shortRev) {
inherit (self) shortRev;
};
nixpkgsCompiledBy = system: nixpkgs.legacyPackages."${system}";
@@ -97,7 +114,17 @@
evalHost = { name, local, target }: nixpkgs.lib.nixosSystem {
system = target;
modules = [
(import ./hosts/instantiate.nix { localSystem = local; hostName = name; })
{
nixpkgs = (if (local != null) then {
buildPlatform = local;
} else {}) // {
# TODO: does the earlier `system` arg to nixosSystem make its way here?
hostPlatform.system = target;
};
# nixpkgs.buildPlatform = local; # set by instantiate.nix instead
# nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
}
(import ./hosts/instantiate.nix { hostName = name; })
self.nixosModules.default
self.nixosModules.passthru
{
@@ -106,12 +133,6 @@
self.overlays.sane-all
];
}
({ lib, ... }: {
# TODO: does the earlier `system` arg to nixosSystem make its way here?
nixpkgs.hostPlatform.system = target;
# nixpkgs.buildPlatform = local; # set by instantiate.nix instead
# nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
})
];
};
in {
@@ -166,8 +187,8 @@
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;
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,
@@ -177,30 +198,16 @@
disable-flakey-tests = final: prev: import ./overlays/disable-flakey-tests.nix final prev;
pkgs = final: prev: import ./overlays/pkgs.nix final prev;
pins = final: prev: import ./overlays/pins.nix final prev;
preferences = final: prev: import ./overlays/preferences.nix final prev;
optimizations = final: prev: import ./overlays/optimizations.nix final prev;
passthru = final: prev:
let
stable =
if inputs ? "nixpkgs-stable" then (
final': prev': {
stable = inputs.nixpkgs-stable.legacyPackages."${prev'.stdenv.hostPlatform.system}";
}
) else (final': prev': {});
mobile = (import "${mobile-nixos}/overlay/overlay.nix");
uninsane = uninsane-dot-org.overlay;
# nix-serve' = nix-serve.overlay;
nix-serve' = next: prev: {
# XXX(2023/03/02): upstream isn't compatible with modern `nix`. probably the perl bindings.
# - we use the package built against `nixpkgs` specified in its flake rather than use its overlay,
# to get around this.
inherit (nix-serve.packages."${next.system}") nix-serve;
};
in
(stable final prev)
// (mobile final prev)
// (uninsane final prev)
// (nix-serve' final prev)
;
(mobile final prev)
// (uninsane final prev)
;
};
nixosModules = rec {
@@ -249,32 +256,204 @@
apps."x86_64-linux" =
let
pkgs = self.legacyPackages."x86_64-linux";
deployScript = action: pkgs.writeShellScript "deploy-moby" ''
nixos-rebuild --flake '.#moby' build $@
sudo nix sign-paths -r -k /run/secrets/nix_serve_privkey $(readlink ./result)
nixos-rebuild --flake '.#moby' ${action} --target-host colin@moby-hn --use-remote-sudo $@
sanePkgs = import ./pkgs { inherit pkgs; };
deployScript = host: addr: action: pkgs.writeShellScript "deploy-${host}" ''
nix build '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} $@
sudo nix sign-paths -r -k /run/secrets/nix_serve_privkey $(readlink ./result-${host})
# XXX: this triggers another config eval & (potentially) build.
# if the config changed between these invocations, the above signatures might not apply to the deployed config.
# 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 $@
'';
in {
update-feeds = {
# pkg updating.
# a cleaner alternative lives here: <https://discourse.nixos.org/t/how-can-i-run-the-updatescript-of-personal-packages/25274/2>
mkUpdater = attrPath: {
type = "app";
program = "${pkgs.feeds.updateScript}";
program = let
pkg = pkgs.lib.getAttrFromPath attrPath sanePkgs;
strAttrPath = pkgs.lib.concatStringsSep "." attrPath;
commandArgv = pkg.updateScript.command or pkg.updateScript;
command = pkgs.lib.escapeShellArgs commandArgv;
in builtins.toString (pkgs.writeShellScript "update-${strAttrPath}" ''
export UPDATE_NIX_NAME=${pkg.name}
export UPDATE_NIX_PNAME=${pkg.pname}
export UPDATE_NIX_OLD_VERSION=${pkg.version}
export UPDATE_NIX_ATTR_PATH=${strAttrPath}
${command}
'');
};
mkUpdatersNoAliases = opts: basePath: pkgs.lib.concatMapAttrs
(name: pkg:
if pkg.recurseForDerivations or false then {
"${name}" = mkUpdaters opts (basePath ++ [ name ]);
} else if pkg.updateScript or null != null then {
"${name}" = mkUpdater (basePath ++ [ name ]);
} else {}
)
(pkgs.lib.getAttrFromPath basePath sanePkgs);
mkUpdaters = { ignore ? [] }@opts: basePath:
let
updaters = mkUpdatersNoAliases opts basePath;
invokeUpdater = name: pkg:
let
fullPath = basePath ++ [ name ];
doUpdateByDefault = !builtins.elem fullPath ignore;
# in case `name` has a `.` in it, we have to quote it
escapedPath = builtins.map (p: ''"${p}"'') fullPath;
updatePath = builtins.concatStringsSep "." ([ "update" "pkgs" ] ++ escapedPath);
in pkgs.lib.optionalString doUpdateByDefault (
pkgs.lib.escapeShellArgs [
"nix" "run" ".#${updatePath}"
]
);
in {
type = "app";
program = builtins.toString (pkgs.writeShellScript
(builtins.concatStringsSep "-" (["update"] ++ basePath))
(builtins.concatStringsSep
"\n"
(pkgs.lib.mapAttrsToList invokeUpdater updaters)
)
);
} // updaters;
in {
help = {
type = "app";
program = let
helpMsg = builtins.toFile "nixos-config-help-message" ''
commands:
- `nix run '.#help'`
- show this message
- `nix run '.#update.pkgs'`
- updates every package
- `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 '.#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}
echo ""
echo "complete flake structure:"
nix flake show --option allow-import-from-derivation true
'');
};
update.pkgs = mkUpdaters { ignore = [ ["feeds"] ]; } [];
update.feeds = mkUpdaters {} [ "feeds" ];
init-feed = {
# use like `nix run '.#init-feed' uninsane.org`
type = "app";
program = "${pkgs.feeds.initFeedScript}";
program = "${pkgs.feeds.init-feed}";
};
deploy-moby-test = {
# `nix run '.#deploy-moby-test'`
deploy-lappy = {
type = "app";
program = ''${deployScript "test"}'';
program = ''${deployScript "lappy" "lappy" "switch"}'';
};
deploy-moby-test = {
type = "app";
program = ''${deployScript "moby" "moby-hn" "test"}'';
};
deploy-moby = {
# `nix run '.#deploy-moby-switch'`
type = "app";
program = ''${deployScript "switch"}'';
program = ''${deployScript "moby" "moby-hn" "switch"}'';
};
deploy-servo = {
type = "app";
program = ''${deployScript "servo" "servo" "switch"}'';
};
sync-moby = {
# copy music from the current device to moby
# TODO: should i actually sync from /mnt/servo-media/Music instead of the local drive?
type = "app";
program = builtins.toString (pkgs.writeShellScript "sync-to-moby" ''
sudo mount /mnt/moby-home
${pkgs.sane-scripts.sync-music}/bin/sane-sync-music ~/Music /mnt/moby-home/Music
'');
};
sync-lappy = {
# copy music from servo to lappy
# can run this from any device that has ssh access to lappy
type = "app";
program = builtins.toString (pkgs.writeShellScript "sync-to-lappy" ''
sudo mount /mnt/lappy-home
${pkgs.sane-scripts.sync-music}/bin/sane-sync-music /mnt/servo-media/Music /mnt/lappy-home/Music
'');
};
check = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "check-all" ''
nix run '.#check.nur'
RC0=$?
nix run '.#check.host-configs'
RC1=$?
nix run '.#check.rescue'
RC2=$?
echo "nur: $RC0"
echo "host-configs: $RC1"
echo "rescue: $RC2"
exit $(($RC0 | $RC1 | $RC2))
'');
};
check.nur = {
# `nix run '.#check-nur'`
# validates that my repo can be included in the Nix User Repository
type = "app";
program = builtins.toString (pkgs.writeShellScript "check-nur" ''
cd ${./.}/integrations/nur
NIX_PATH= NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-env -f . -qa \* --meta --xml \
--allowed-uris https://static.rust-lang.org \
--option restrict-eval true \
--option allow-import-from-derivation true \
--drv-path --show-trace \
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
-I ../../ \
| tee # tee to prevent interactive mode
'');
};
check.host-configs = {
type = "app";
program = let
checkHost = host: ''
nix build -v '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} -j2 $@
RC_${host}=$?
'';
in builtins.toString (pkgs.writeShellScript
"check-host-configs"
''
${checkHost "desko"}
${checkHost "lappy"}
${checkHost "servo"}
${checkHost "moby"}
${checkHost "rescue"}
echo "desko: $RC_desko"
echo "lappy: $RC_lappy"
echo "servo: $RC_servo"
echo "moby: $RC_moby"
echo "rescue: $RC_rescue"
exit $(($RC_desko | $RC_lappy | $RC_servo | $RC_moby | $RC_rescue))
''
);
};
check.rescue = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "check-rescue" ''
nix build -v '.#imgs.rescue' --out-link ./result-rescue-img -j2
'');
};
};

View File

@@ -4,6 +4,11 @@
./fs.nix
];
# sane.guest.enable = true;
# services.distccd.enable = true;
# sane.programs.distcc.enableFor.user.guest = true;
sops.secrets.colin-passwd.neededForUsers = true;
sane.roles.build-machine.enable = true;
@@ -17,9 +22,11 @@
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" ];
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
# sane.programs.devPkgs.enableFor.user.colin = true;
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
@@ -29,6 +36,7 @@
# don't enable wifi by default: it messes with connectivity.
systemd.services.iwd.enable = false;
systemd.services.wpa_supplicant.enable = false;
# default config: https://man.archlinux.org/man/snapper-configs.5
# defaults to something like:
@@ -42,17 +50,6 @@
ALLOW_USERS = [ "colin" ];
};
programs.steam = {
enable = true;
# not sure if needed: stole this whole snippet from the wiki
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
sane.user.persist.plaintext = [
".steam"
".local/share/Steam"
];
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
system.stateVersion = "21.05";
}

View File

@@ -2,17 +2,10 @@
{
sane.persist.root-on-tmpfs = true;
# we need a /tmp for building large nix things.
# 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" = {
device = "none";
fsType = "tmpfs";
options = [
"mode=777"
"size=64G"
"defaults"
];
};
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";

View File

@@ -19,7 +19,7 @@
"desktopGuiApps"
"stepmania"
];
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" ];
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
sops.secrets.colin-passwd.neededForUsers = true;
@@ -34,9 +34,6 @@
ALLOW_USERS = [ "colin" ];
};
# TODO: only here for debugging
# services.ipfs.enable = true;
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
system.stateVersion = "21.05";
}

View File

@@ -2,15 +2,6 @@
{
sane.persist.root-on-tmpfs = true;
# we need a /tmp of default size (half RAM) for building large nix things
fileSystems."/tmp" = {
device = "none";
fsType = "tmpfs";
options = [
"mode=777"
"defaults"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/75230e56-2c69-4e41-b03e-68475f119980";

View File

@@ -1,15 +1,17 @@
# doesn't actually *enable* anything,
# but sets up any modules such that if they *were* enabled, they'll act as expected.
{ ... }:
{ pkgs, ... }:
{
sane.gui.sxmo = {
greeter = "sway";
greeter = "greetd-sway-gtkgreet";
noidle = true; #< power button requires 1s hold, which makes it impractical to be dealing with.
settings = {
# XXX: make sure the user is part of the `input` group!
SXMO_LISGD_INPUT_DEVICE = "/dev/input/by-id/usb-Wacom_Co._Ltd._Pen_and_multitouch_sensor-event-if00";
# these identifiers are from `swaymsg -t get_inputs`
SXMO_VOLUME_BUTTON = "1:1:AT_Translated_Set_2_keyboard";
# SXMO_VOLUME_BUTTON = "none";
# N.B.: thinkpad's power button requires a full second press to do anything
SXMO_POWER_BUTTON = "0:1:Power_Button";
# SXMO_POWER_BUTTON = "none";
SXMO_DISABLE_LEDS = "1";
@@ -27,6 +29,15 @@
# - SXMO_SWAY_SCALE
# see <repo:mil/sxmo-utils:scripts/deviceprofiles>
# SXMO_DEVICE_NAME = "pine64,pinephone-1.2";
# if sxmo doesn't know the device, it can't decide whether to use one_button or three_button mode
# 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.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

@@ -1,13 +1,26 @@
# Pinephone
# other setups to reference:
# - <https://hamblingreen.gitlab.io/2022/03/02/my-pinephone-setup.html>
# - sxmo Arch user. lots of app recommendations
#
# wikis, resources, ...:
# - Linux Phone Apps: <https://linuxphoneapps.org/>
# - massive mobile-friendly app database
# - Mobian wiki: <https://wiki.mobian-project.org/doku.php?id=start>
# - recommended apps, chatrooms
{ config, pkgs, lib, ... }:
{
imports = [
./firmware.nix
./bootloader.nix
./fs.nix
./gps.nix
./kernel.nix
./polyfill.nix
];
sane.roles.client = 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;
@@ -18,57 +31,85 @@
sops.secrets.colin-passwd.neededForUsers = true;
sane.programs.web-browser.config = {
# compromise impermanence for the sake of usability
persistCache = "private";
persistData = "private";
# i don't do crypto stuff on moby
addons.ether-metamask.enable = false;
# addons.sideberry.enable = false;
};
sane.user.persist.plaintext = [
# TODO: make this just generally conditional upon pulse being enabled?
".config/pulse" # persist pulseaudio volume
];
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.mercurial.enableFor.user.colin = false; # does not 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 (gthumb depends on webkitgtk, particularly)
# disabled for faster deploys
sane.programs.soundconverter.enableFor.user.colin = false;
sane.programs."gnome.nautilus".enableFor.user.colin = false;
sane.programs.gthumb.enableFor.user.colin = false;
# 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.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
sane.user.fs.".config/pipewire/pipewire.conf.d/10-fix-dino-mic-cutout.conf".symlink.text = ''
# config docs: <https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PipeWire#properties>
# useful to run `pw-top` to see that these settings are actually having effect,
# and `pw-metadata` to see if any settings conflict (e.g. max-quantum < min-quantum)
#
# restart pipewire after editing these files:
# - `systemctl --user restart pipewire`
# - pipewire users will likely stop outputting audio until they are also restarted
#
# there's seemingly two buffers for the mic (see: <https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/FAQ#pipewire-buffering-explained>)
# 1. Pipewire buffering out of the driver and into its own member.
# 2. Pipewire buffering into Dino.
# the latter is fixed at 10ms by Dino, difficult to override via runtime config.
# the former defaults low (e.g. 512 samples)
# this default configuration causes the mic to regularly drop out entirely for a couple seconds at a time during a call,
# presumably because the system can't keep up (pw-top shows incrementing counter in ERR column).
# `pw-metadata -n settings 0 clock.force-quantum 1024` reduces to about 1 error per second.
# `pw-metadata -n settings 0 clock.force-quantum 2048` reduces to 1 error every < 10s.
# pipewire default config includes `clock.power-of-two-quantum = true`
context.properties = {
default.clock.min-quantum = 2048
default.clock.max-quantum = 8192
}
'';
boot.loader.efi.canTouchEfiVariables = false;
# /boot space is at a premium. default was 20.
# even 10 can be too much
# TODO: compress moby kernels!
boot.loader.generic-extlinux-compatible.configurationLimit = 8;
# mobile.bootloader.enable = false;
# 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`
#
# mobile-nixos' /lib/firmware includes:
# rtl_bt (bluetooth)
# anx7688-fw.bin (USB-C -> HDMI bridge)
# anx7688-fw.bin (USB-C chip: power negotiation, HDMI/dock)
# ov5640_af.bin (camera module)
# hardware.firmware = [ config.mobile.device.firmware ];
hardware.firmware = [ pkgs.rtl8723cs-firmware ];
# hardware.firmware = [ pkgs.rtl8723cs-firmware ];
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";
@@ -86,16 +127,17 @@
# 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 ];
systemd =
let ucm-env = config.environment.variables.ALSA_CONFIG_UCM2;
in {
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 {
# cribbed from <repo:nixos/mobile-nixos:modules/quirks/audio.nix>
# pulseaudio
user.services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm-env;
services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm-env;
# pipewire
user.services.pipewire.environment.ALSA_CONFIG_UCM2 = ucm-env;
user.services.pipewire-pulse.environment.ALSA_CONFIG_UCM2 = ucm-env;
@@ -103,8 +145,30 @@
services.pipewire.environment.ALSA_CONFIG_UCM2 = ucm-env;
services.pipewire-pulse.environment.ALSA_CONFIG_UCM2 = ucm-env;
services.wireplumber.environment.ALSA_CONFIG_UCM2 = ucm-env;
# pulseaudio
# user.services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm-env;
# services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm-env;
# TODO: move elsewhere...
services.ModemManager.serviceConfig = {
# N.B.: the extra "" in ExecStart serves to force upstream ExecStart to be ignored
ExecStart = [ "" "${pkgs.modemmanager}/bin/ModemManager --debug" ];
# --debug sets DEBUG level logging: so reset
ExecStartPost = [ "${pkgs.modemmanager}/bin/mmcli --set-logging=INFO" ];
};
};
services.udev.extraRules = let
chmod = "${pkgs.coreutils}/bin/chmod";
chown = "${pkgs.coreutils}/bin/chown";
in ''
# make Pinephone flashlight writable by user.
# taken from postmarketOS: <repo:postmarketOS/pmaports:device/main/device-pine64-pinephone/60-flashlight.rules>
SUBSYSTEM=="leds", DEVPATH=="*/*:flash", RUN+="${chmod} g+w /sys%p/brightness /sys%p/flash_strobe", RUN+="${chown} :video /sys%p/brightness /sys%p/flash_strobe"
hardware.opengl.driSupport = true;
# make Pinephone front LEDs writable by user.
SUBSYSTEM=="leds", DEVPATH=="*/*:indicator", RUN+="${chmod} g+w /sys%p/brightness", RUN+="${chown} :video /sys%p/brightness"
'';
}

View File

@@ -0,0 +1,69 @@
# pinephone GPS happens in EG25 modem
# serial control interface to modem is /dev/ttyUSB2
# after enabling GPS, readout is /dev/ttyUSB1
#
# minimal process to enable modem and GPS:
# - `echo 1 > /sys/class/modem-power/modem-power/device/powered`
# - `screen /dev/ttyUSB2 115200`
# - `AT+QGPSCFG="nmeasrc",1`
# - `AT+QGPS=1`
# this process is automated by my `eg25-control` program and services (`eg25-control-powered`, `eg25-control-gps`)
# - see the `modules/` directory further up this repository.
#
# now, something like `gpsd` can directly read from /dev/ttyUSB1,
# or geoclue can query the GPS directly through modem-manager
#
# initial GPS fix can take 15+ minutes.
# meanwhile, services like eg25-manager or eg25-control-freshen-agps can speed this up by uploading assisted GPS data to the modem.
#
# support/help:
# - geoclue, gnome-maps
# - irc: #gnome-maps on irc.gimp.org
# - Matrix: #gnome-maps:gnome.org (unclear if bridged to IRC)
#
# programs to pair this with:
# - `satellite-gtk`: <https://codeberg.org/tpikonen/satellite>
# - shows/tracks which satellites the GPS is connected to; useful to understand fix characteristics
# - `gnome-maps`: uses geoclue, has route planning
# - `mepo`: uses gpsd, minimalist, flaky, and buttons are kinda hard to activate on mobile
# - puremaps?
# - osmin?
#
# known/outstanding bugs:
# - `systemctl start eg25-control-gps` can the hang the whole system (2023/10/06)
# - i think it's actually `eg25-control-powered` which does this (started by the gps)
# - best guess is modem draws so much power at launch that other parts of the system see undervoltage
# - workaround is to hard power-cycle the system. the modem may not bring up after reboot: leave unpowered for 60s and boot again.
#
# future work:
# - integrate with [wigle](https://www.wigle.net/) for offline equivalent to Mozilla Location Services
{ config, lib, ... }:
{
# test gpsd with `gpspipe -w -n 10 2> /dev/null | grep -m 1 TPV | jq '.lat, .lon' | tr '\n' ' '`
# ^ should return <lat> <long>
services.gpsd.enable = true;
services.gpsd.devices = [ "/dev/ttyUSB1" ];
# test geoclue2 by building `geoclue2-with-demo-agent`
# and running "${geoclue2-with-demo-agent}/libexec/geoclue-2.0/demos/where-am-i"
# note that geoclue is dbus-activated, and auto-stops after 60s with no caller
services.geoclue2.enable = true;
services.geoclue2.appConfig.where-am-i = {
# this is the default "agent", shipped by geoclue package: allow it to use location
isAllowed = true;
isSystem = false;
# XXX: setting users != [] might be causing `where-am-i` to time out
users = [
# restrict to only one set of users. empty array (default) means "allow any user to access geolocation".
(builtins.toString config.users.users.colin.uid)
];
};
systemd.services.geoclue.after = lib.mkForce []; #< defaults to network-online, but not all my sources require network
users.users.geoclue.extraGroups = [
"dialout" # TODO: figure out if dialout is required. that's for /dev/ttyUSB1, but geoclue probably doesn't read that?
];
sane.services.eg25-control.enable = true;
sane.programs.where-am-i.enableFor.user.colin = true;
}

View File

@@ -1,71 +1,56 @@
{ lib, pkgs, ... }:
{ pkgs, ... }:
let
# use the last commit on the 5.18 branch (5.18.14)
# manjaro's changes between kernel patch versions tend to be minimal if any.
manjaroBase = "https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/raw/25bd828cd47b1c6e09fcbcf394a649b89d2876dd";
manjaroPatch = name: sha256: {
inherit name;
patch = pkgs.fetchpatch {
inherit name;
url = "${manjaroBase}/${name}?inline=false";
inherit sha256;
};
};
dmesg = "${pkgs.util-linux}/bin/dmesg";
grep = "${pkgs.gnugrep}/bin/grep";
modprobe = "${pkgs.kmod}/bin/modprobe";
ensureHWReady = ''
# common boot failure:
# blank screen (no backlight even), with the following log:
# ```syslog
# sun8i-dw-hdmi 1ee0000.hdmi: Couldn't get the HDMI PHY
# ...
# sun4i-drm display-engine: Couldn't bind all pipelines components
# ...
# sun8i-dw-hdmi: probe of 1ee0000.hdmi failed with error -17
# ```
#
# in particular, that `probe ... failed` occurs *only* on failed boots
# (the other messages might sometimes occur even on successful runs?)
#
# reloading the sun8i hdmi driver usually gets the screen on, showing boot text.
# then restarting display-manager.service gets us to the login.
#
# NB: the above log is default level. though less specific, there's a `err` level message that also signals this:
# sun4i-drm display-engine: failed to bind 1ee0000.hdmi (ops sun8i_dw_hdmi_ops [sun8i_drm_hdmi]): -17
# NB: this is the most common, but not the only, failure mode for `display-manager`.
# another error seems characterized by these dmesg logs, in which reprobing sun8i_drm_hdmi does not fix:
# ```syslog
# sun6i-mipi-dsi 1ca0000.dsi: Couldn't get the MIPI D-PHY
# sun4i-drm display-engine: Couldn't bind all pipelines components
# sun6i-mipi-dsi 1ca0000.dsi: Couldn't register our component
# ```
# the idea for patching off Manjaro's kernel comes from jakewaksbaum:
# - https://git.sr.ht/~jakewaksbaum/pi/tree/af20aae5653545d6e67a459b59ee3e1ca8a680b0/item/kernel/default.nix
# - he later abandoned this, i think because he's using the Pinephone Pro which received mainline support.
manjaroPatches = [
(manjaroPatch
"1001-arm64-dts-allwinner-add-hdmi-sound-to-pine-devices.patch"
"sha256-DApd791A+AxB28Ven/MVAyuyVphdo8KQDx8O7oxVPnc="
)
# these patches below are critical to enable wifi (RTL8723CS)
# - the alternative is a wholly forked kernel by megi/megous:
# - https://xnux.eu/howtos/build-pinephone-kernel.html#toc-how-to-build-megi-s-pinehpone-kernel
# - i don't know if these patches are based on megi's or original
(manjaroPatch
"2001-Bluetooth-Add-new-quirk-for-broken-local-ext-features.patch"
"sha256-CExhJuUWivegxPdnzKINEsKrMFx/m/1kOZFmlZ2SEOc="
)
(manjaroPatch
"2002-Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch"
"sha256-dDdvOphTcP/Aog93HyH+L9m55laTgtjndPSE4/rnzUA="
)
(manjaroPatch
"2004-arm64-dts-allwinner-enable-bluetooth-pinetab-pinepho.patch"
"sha256-o43P3WzXyHK1PF+Kdter4asuyGAEKO6wf5ixcco2kCQ="
)
# XXX: this one has a Makefile, which hardcodes /sbin/depmod:
# - drivers/staging/rtl8723cs/Makefile
# - not sure if this is problematic?
(manjaroPatch
"2005-staging-add-rtl8723cs-driver.patch"
"sha256-6ywm3dQQ5JYl60CLKarxlSUukwi4QzqctCj3tVgzFbo="
)
];
if (${dmesg} --kernel --level err --color=never --notime | ${grep} -q 'sun4i-drm display-engine: failed to bind 1ee0000.hdmi')
then
echo "reprobing sun8i_drm_hdmi"
# if a command here fails it errors the whole service, so prefer to log instead
${modprobe} -r sun8i_drm_hdmi || echo "failed to unload sun8i_drm_hdmi"
${modprobe} sun8i_drm_hdmi || echo "failed to load sub8i_drm_hdmi"
fi
'';
in
{
# use Megi's kernel:
# even with the Manjaro patches, stock 5.18 has a few issues on Pinephone:
# - no battery charging
# - phone rotation sensor is off by 90 degrees
# - ambient light sensor causes screen brightness to be shakey
# - phosh greeter may not appear after wake from sleep
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous;
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-manjaro;
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
# alternatively, use nixos' kernel and add the stuff we want:
# # cross-compilation optimization:
# boot.kernelPackages =
# let p = (import nixpkgs { localSystem = "x86_64-linux"; });
# in p.pkgsCross.aarch64-multiplatform.linuxPackages_5_18;
# # non-cross:
# # boot.kernelPackages = pkgs.linuxPackages_5_18;
# alternatively, apply patches directly to stock nixos kernel:
# boot.kernelPatches = manjaroPatches ++ [
# (patchDefconfig kernelConfig)
# ];
# configure nixos to build a compressed kernel image, since it doesn't usually do that for aarch64 target.
# without this i run out of /boot space in < 10 generations
nixpkgs.hostPlatform.linux-kernel = {
# defaults:
name = "aarch64-multiplatform";
@@ -80,4 +65,25 @@ in
target = "Image.gz"; # <-- compress the kernel image
# 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

@@ -1,23 +1,96 @@
{ sane-lib, ... }:
# this file configures preferences per program, without actually enabling any programs.
# the goal is to separate the place where we decide *what* to use (i.e. `sane.programs.firefox.enable = true` -- at the toplevel)
# from where we specific how that thing should behave *if* it's in use.
#
# NixOS backgrounds:
# - <https://github.com/NixOS/nixos-artwork>
# - <https://github.com/NixOS/nixos-artwork/issues/50> (colorful; unmerged)
# - <https://github.com/NixOS/nixos-artwork/pull/60/files> (desktop-oriented; clean; unmerged)
# - <https://itsfoss.com/content/images/2023/04/nixos-tutorials.png>
{ lib, pkgs, sane-lib, ... }:
{
sane.programs.firefox.config = {
# compromise impermanence for the sake of usability
persistCache = "private";
persistData = "private";
# i don't do crypto stuff on moby
addons.ether-metamask.enable = false;
# sidebery UX doesn't make sense on small screen
addons.sidebery.enable = false;
};
sane.programs.swaynotificationcenter.config = {
backlight = "backlight"; # /sys/class/backlight/*backlight*/brightness
};
sane.gui.sxmo = {
nogesture = true;
settings = {
# touch screen
### hardware: touch screen
SXMO_LISGD_INPUT_DEVICE = "/dev/input/by-path/platform-1c2ac00.i2c-event";
# vol and power are detected correctly by upstream
### preferences
DEFAULT_COUNTRY = "US";
SXMO_AUTOROTATE = "1"; # enable auto-rotation at launch. has no meaning in stock/upstream sxmo-utils
# BEMENU lines (wayland DMENU):
# - camera is 9th entry
# - flashlight is 10th entry
# - config is 14th entry. inside that:
# - autorotate is 11th entry
# - system menu is 19th entry
# - close is 20th entry
# - power is 15th entry
# - close is 16th entry
SXMO_BEMENU_LANDSCAPE_LINES = "11"; # default 8
SXMO_BEMENU_PORTRAIT_LINES = "16"; # default 16
SXMO_LOCK_IDLE_TIME = "15"; # how long between screenoff -> lock -> back to screenoff (default: 8)
# gravity: how far to tilt the device before the screen rotates
# for a given setting, normal <-> invert requires more movement then left <-> right
# i.e. the settingd doesn't feel completely symmetric
# SXMO_ROTATION_GRAVITY default is 16374
# SXMO_ROTATION_GRAVITY = "12800"; # uncomfortably high
# SXMO_ROTATION_GRAVITY = "12500"; # kinda uncomfortable when walking
SXMO_ROTATION_GRAVITY = "12000";
SXMO_SCREENSHOT_DIR = "/home/colin/Pictures"; # default: "$HOME"
# 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.6";
# SXMO_SWAY_SCALE = "1.8";
# SXMO_SWAY_SCALE = "2";
SXMO_WORKSPACE_WRAPPING = "5"; # how many workspaces. default: 4
# wvkbd layers:
# - full
# - landscape
# - special (e.g. coding symbols like ~)
# - emoji
# - nav
# - simple (like landscape, but no parens/tab/etc; even fewer chars)
# - simplegrid (simple, but grid layout)
# - dialer (digits)
# - cyrillic
# - arabic
# - persian
# - greek
# - georgian
WVKBD_LANDSCAPE_LAYERS = "landscape,special,emoji";
WVKBD_LAYERS = "full,special,emoji";
};
};
# TODO: only populate this if sxmo is enabled?
sane.user.fs.".config/sxmo/profile" = sane-lib.fs.wantedText ''
# sourced by sxmo_init.sh
. sxmo_common.sh
export SXMO_SWAY_SCALE=1.5
export SXMO_ROTATION_GRAVITY=12800
export DEFAULT_COUNTRY=US
export BROWSER=librewolf
export SXMO_BG_IMG="$(xdg_data_path sxmo/background.jpg)"
'';
}

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

@@ -18,10 +18,18 @@
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"
"sane-scripts.stop-all-servo"
];
sane.services.dyn-dns.enable = true;
sane.services.wg-home.enable = true;
sane.services.wg-home.enableWan = true;
sane.services.wg-home.visibleToWan = true;
sane.services.wg-home.forwardToWan = true;
sane.services.wg-home.routeThroughServo = false;
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.services.duplicity.enable = true; # TODO: re-enable after HW upgrade
# automatically log in at the virtual consoles.

View File

@@ -2,15 +2,9 @@
{
sane.persist.root-on-tmpfs = true;
# we need a /tmp for building large nix things
fileSystems."/tmp" = {
device = "none";
fsType = "tmpfs";
options = [
"mode=777"
"defaults"
];
};
# 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" ];
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/cc81cca0-3cc7-4d82-a00c-6243af3e7776";
@@ -42,31 +36,60 @@
};
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"; directory = "/var/lib/uninsane"; }
{ user = "colin"; group = "users"; path = "/var/lib/uninsane"; }
];
# force some problematic directories to always get correct permissions:
sane.fs."/var/lib/uninsane/media".dir.acl = {
user = "colin"; group = "media"; mode = "0775";
};
sane.fs."/var/lib/uninsane/media/archive".dir = {};
sane.fs."/var/lib/uninsane/media/archive/README.md".file.text = ''
this directory is for media i wish to remove from my library,
but keep for a short time in case i reverse my decision.
treat it like a system trash can.
'';
sane.fs."/var/lib/uninsane/media/Books".dir = {};
sane.fs."/var/lib/uninsane/media/Books/Audiobooks".dir = {};
sane.fs."/var/lib/uninsane/media/Books/Books".dir = {};
sane.fs."/var/lib/uninsane/media/Books/Visual".dir = {};
sane.fs."/var/lib/uninsane/media/collections".dir = {};
sane.fs."/var/lib/uninsane/media/datasets".dir = {};
sane.fs."/var/lib/uninsane/media/freeleech".dir = {};
sane.fs."/var/lib/uninsane/media/Music".dir = {};
sane.fs."/var/lib/uninsane/media/Pictures".dir = {};
sane.fs."/var/lib/uninsane/media/Videos".dir = {};
sane.fs."/var/lib/uninsane/media/Videos/Film".dir = {};
sane.fs."/var/lib/uninsane/media/Videos/Shows".dir = {};
sane.fs."/var/lib/uninsane/media/Videos/Talks".dir = {};
sane.fs."/var/lib/uninsane/datasets/README.md".file.text = ''
this directory may seem redundant with ../media/datasets. it isn't.
this directory exists on SSD, allowing for speedy access to specific datasets when necessary.
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 = [
{
user = "colin";
group = "users";
mode = "0777";
directory = "/var/lib/uninsane/media/Videos";
path = "/var/lib/uninsane/media/Videos";
}
{
user = "colin";
group = "users";
mode = "0777";
directory = "/var/lib/uninsane/media/freeleech";
path = "/var/lib/uninsane/media/freeleech";
}
{
user = "colin";
group = "users";
mode = "0777";
path = "/var/lib/uninsane/media/datasets";
}
];
# in-memory compressed RAM (seems to be dynamically sized)
# zramSwap = {
# enable = true;
# };
# btrfs doesn't easily support swapfiles
# swapDevices = [
# { device = "/nix/persist/swapfile"; size = 4096; }

View File

@@ -1,220 +1,233 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
portOpts = with lib; types.submodule {
options = {
visibleTo.ovpn = mkOption {
type = types.bool;
default = false;
};
};
};
in
{
networking.domain = "uninsane.org";
sane.ports.openFirewall = true;
sane.ports.openUpnp = true;
# view refused packets with: `sudo journalctl -k`
# networking.firewall.logRefusedPackets = true;
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
# XXX colin: probably don't need this. wlan0 won't be populated unless i touch a value in networking.interfaces.wlan0
networking.wireless.enable = false;
# this is needed to forward packets from the VPN to the host
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
# unless we add interface-specific settings for each VPN, we have to define nameservers globally.
# networking.nameservers = [
# "1.1.1.1"
# "9.9.9.9"
# ];
# use systemd's stub resolver.
# /etc/resolv.conf isn't sophisticated enough to use different servers per net namespace (or link).
# instead, running the stub resolver on a known address in the root ns lets us rewrite packets
# in the ovnps namespace to use the provider's DNS resolvers.
# a weakness is we can only query 1 NS at a time (unless we were to clone the packets?)
# there also seems to be some cache somewhere that's shared between the two namespaces.
# i think this is a libc thing. might need to leverage proper cgroups to _really_ kill it.
# - getent ahostsv4 www.google.com
# - try fix: <https://serverfault.com/questions/765989/connect-to-3rd-party-vpn-server-but-dont-use-it-as-the-default-route/766290#766290>
services.resolved.enable = true;
# without DNSSEC:
# - dig matrix.org => works
# - curl https://matrix.org => works
# with default DNSSEC:
# - dig matrix.org => works
# - curl https://matrix.org => fails
# i don't know why. this might somehow be interfering with the DNS run on this device (trust-dns)
services.resolved.dnssec = "false";
networking.nameservers = [
# use systemd-resolved resolver
# full resolver (which understands /etc/hosts) lives on 127.0.0.53
# stub resolver (just forwards upstream) lives on 127.0.0.54
"127.0.0.53"
];
# nscd -- the Name Service Caching Daemon -- caches DNS query responses
# in a way that's unaware of my VPN routing, so routes are frequently poor against
# services which advertise different IPs based on geolocation.
# nscd claims to be usable without a cache, but in practice i can't get it to not cache!
# nsncd is the Name Service NON-Caching Daemon. it's a drop-in that doesn't cache;
# this is OK on the host -- because systemd-resolved caches. it's probably sub-optimal
# in the netns and we query upstream DNS more often than needed. hm.
# TODO: run a separate recursive resolver in each namespace.
services.nscd.enableNsncd = true;
# services.resolved.extraConfig = ''
# # docs: `man resolved.conf`
# # DNS servers to use via the `wg-ovpns` interface.
# # i hope that from the root ns, these aren't visible.
# DNS=46.227.67.134%wg-ovpns 192.165.9.158%wg-ovpns
# FallbackDNS=1.1.1.1 9.9.9.9
# '';
# OVPN CONFIG (https://www.ovpn.com):
# DOCS: https://nixos.wiki/wiki/WireGuard
# if you `systemctl restart wireguard-wg-ovpns`, make sure to also restart any other services in `NetworkNamespacePath = .../ovpns`.
# TODO: why not create the namespace as a seperate operation (nix config for that?)
networking.wireguard.enable = true;
networking.wireguard.interfaces.wg-ovpns = let
ip = "${pkgs.iproute2}/bin/ip";
in-ns = "${ip} netns exec ovpns";
iptables = "${pkgs.iptables}/bin/iptables";
veth-host-ip = "10.0.1.5";
veth-local-ip = "10.0.1.6";
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";
in {
privateKeyFile = config.sops.secrets.wg_ovpns_privkey.path;
# wg is active only in this namespace.
# run e.g. ip netns exec ovpns <some command like ping/curl/etc, it'll go through wg>
# sudo ip netns exec ovpns ping www.google.com
interfaceNamespace = "ovpns";
ips = [
"185.157.162.178/32"
];
peers = [
{
publicKey = "SkkEZDCBde22KTs/Hc7FWvDBfdOCQA4YtBEuC3n5KGs=";
endpoint = "185.157.162.10:9930";
# alternatively: use hostname, but that presents bootstrapping issues (e.g. if host net flakes)
# endpoint = "vpn36.prd.amsterdam.ovpn.com:9930";
allowedIPs = [ "0.0.0.0/0" ];
# nixOS says this is important for keeping NATs active
persistentKeepalive = 25;
# re-executes wg this often. docs hint that this might help wg notice DNS/hostname changes.
# so, maybe that helps if we specify endpoint as a domain name
# dynamicEndpointRefreshSeconds = 30;
# when refresh fails, try it again after this period instead.
# TODO: not avail until nixpkgs upgrade
# dynamicEndpointRefreshRestartSeconds = 5;
}
];
preSetup = "" + ''
${ip} netns add ovpns || echo "ovpns already exists"
'';
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"
# restore rules/routes
${ip} rule del from ${veth-host-ip} lookup ovpns pref 50 || echo "couldn't delete init -> ovpns rule"
${ip} route del default via ${veth-local-ip} dev ovpns-veth-a proto kernel src ${veth-host-ip} metric 1002 table ovpns || echo "couldn't delete init -> ovpns route"
${ip} rule add from all lookup local pref 0
${ip} rule del from all lookup local pref 100
'';
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/>
# create veth pair
${ip} link add ovpns-veth-a type veth peer name ovpns-veth-b
${ip} addr add ${veth-host-ip}/24 dev ovpns-veth-a
${ip} link set ovpns-veth-a up
# mv veth-b into the ovpns namespace
${ip} link set ovpns-veth-b netns ovpns
${in-ns} ip addr add ${veth-local-ip}/24 dev ovpns-veth-b
${in-ns} ip link set ovpns-veth-b up
# make it so traffic originating from the host side of the veth
# is sent over the veth no matter its destination.
${ip} rule add from ${veth-host-ip} lookup ovpns pref 50
# for traffic originating at the host veth to the WAN, use the veth as our gateway
# not sure if the metric 1002 matters.
${ip} route add default via ${veth-local-ip} dev ovpns-veth-a proto kernel src ${veth-host-ip} metric 1002 table ovpns
# give the default route lower priority
${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
'';
options = with lib; {
sane.ports.ports = mkOption {
# add the `visibleTo.ovpn` option
type = types.attrsOf portOpts;
};
};
# create a new routing table that we can use to proxy traffic out of the root namespace
# through the ovpns namespace, and to the WAN via VPN.
networking.iproute2.rttablesExtraConfig = ''
5 ovpns
'';
networking.iproute2.enable = true;
config = {
networking.domain = "uninsane.org";
sane.ports.openFirewall = true;
sane.ports.openUpnp = true;
# view refused packets with: `sudo journalctl -k`
# networking.firewall.logRefusedPackets = true;
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
# XXX colin: probably don't need this. wlan0 won't be populated unless i touch a value in networking.interfaces.wlan0
networking.wireless.enable = false;
# this is needed to forward packets from the VPN to the host
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
# unless we add interface-specific settings for each VPN, we have to define nameservers globally.
# networking.nameservers = [
# "1.1.1.1"
# "9.9.9.9"
# ];
# use systemd's stub resolver.
# /etc/resolv.conf isn't sophisticated enough to use different servers per net namespace (or link).
# instead, running the stub resolver on a known address in the root ns lets us rewrite packets
# in the ovnps namespace to use the provider's DNS resolvers.
# a weakness is we can only query 1 NS at a time (unless we were to clone the packets?)
# there also seems to be some cache somewhere that's shared between the two namespaces.
# i think this is a libc thing. might need to leverage proper cgroups to _really_ kill it.
# - getent ahostsv4 www.google.com
# - try fix: <https://serverfault.com/questions/765989/connect-to-3rd-party-vpn-server-but-dont-use-it-as-the-default-route/766290#766290>
services.resolved.enable = true;
# without DNSSEC:
# - dig matrix.org => works
# - curl https://matrix.org => works
# with default DNSSEC:
# - dig matrix.org => works
# - curl https://matrix.org => fails
# i don't know why. this might somehow be interfering with the DNS run on this device (trust-dns)
services.resolved.dnssec = "false";
networking.nameservers = [
# use systemd-resolved resolver
# full resolver (which understands /etc/hosts) lives on 127.0.0.53
# stub resolver (just forwards upstream) lives on 127.0.0.54
"127.0.0.53"
];
# nscd -- the Name Service Caching Daemon -- caches DNS query responses
# in a way that's unaware of my VPN routing, so routes are frequently poor against
# services which advertise different IPs based on geolocation.
# nscd claims to be usable without a cache, but in practice i can't get it to not cache!
# nsncd is the Name Service NON-Caching Daemon. it's a drop-in that doesn't cache;
# this is OK on the host -- because systemd-resolved caches. it's probably sub-optimal
# in the netns and we query upstream DNS more often than needed. hm.
# TODO: run a separate recursive resolver in each namespace.
services.nscd.enableNsncd = true;
# services.resolved.extraConfig = ''
# # docs: `man resolved.conf`
# # DNS servers to use via the `wg-ovpns` interface.
# # i hope that from the root ns, these aren't visible.
# DNS=46.227.67.134%wg-ovpns 192.165.9.158%wg-ovpns
# FallbackDNS=1.1.1.1 9.9.9.9
# '';
# OVPN CONFIG (https://www.ovpn.com):
# DOCS: https://nixos.wiki/wiki/WireGuard
# if you `systemctl restart wireguard-wg-ovpns`, make sure to also restart any other services in `NetworkNamespacePath = .../ovpns`.
# TODO: why not create the namespace as a seperate operation (nix config for that?)
networking.wireguard.enable = true;
networking.wireguard.interfaces.wg-ovpns = let
ip = "${pkgs.iproute2}/bin/ip";
in-ns = "${ip} netns exec ovpns";
iptables = "${pkgs.iptables}/bin/iptables";
veth-host-ip = "10.0.1.5";
veth-local-ip = "10.0.1.6";
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.
# run e.g. ip netns exec ovpns <some command like ping/curl/etc, it'll go through wg>
# sudo ip netns exec ovpns ping www.google.com
interfaceNamespace = "ovpns";
ips = [
"185.157.162.178/32"
];
peers = [
{
publicKey = "SkkEZDCBde22KTs/Hc7FWvDBfdOCQA4YtBEuC3n5KGs=";
endpoint = "185.157.162.10:9930";
# alternatively: use hostname, but that presents bootstrapping issues (e.g. if host net flakes)
# endpoint = "vpn36.prd.amsterdam.ovpn.com:9930";
allowedIPs = [ "0.0.0.0/0" ];
# nixOS says this is important for keeping NATs active
persistentKeepalive = 25;
# re-executes wg this often. docs hint that this might help wg notice DNS/hostname changes.
# so, maybe that helps if we specify endpoint as a domain name
# dynamicEndpointRefreshSeconds = 30;
# when refresh fails, try it again after this period instead.
# TODO: not avail until nixpkgs upgrade
# dynamicEndpointRefreshRestartSeconds = 5;
}
];
preSetup = ''
${ip} netns add ovpns || echo "ovpns already exists"
'';
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"
# restore rules/routes
${ip} rule del from ${veth-host-ip} lookup ovpns pref 50 || echo "couldn't delete init -> ovpns rule"
${ip} route del default via ${veth-local-ip} dev ovpns-veth-a proto kernel src ${veth-host-ip} metric 1002 table ovpns || echo "couldn't delete init -> ovpns route"
${ip} rule add from all lookup local pref 0
${ip} rule del from all lookup local pref 100
'';
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/>
# create veth pair
${ip} link add ovpns-veth-a type veth peer name ovpns-veth-b
${ip} addr add ${veth-host-ip}/24 dev ovpns-veth-a
${ip} link set ovpns-veth-a up
# mv veth-b into the ovpns namespace
${ip} link set ovpns-veth-b netns ovpns
${in-ns} ip addr add ${veth-local-ip}/24 dev ovpns-veth-b
${in-ns} ip link set ovpns-veth-b up
# make it so traffic originating from the host side of the veth
# is sent over the veth no matter its destination.
${ip} rule add from ${veth-host-ip} lookup ovpns pref 50
# for traffic originating at the host veth to the WAN, use the veth as our gateway
# not sure if the metric 1002 matters.
${ip} route add default via ${veth-local-ip} dev ovpns-veth-a proto kernel src ${veth-host-ip} metric 1002 table ovpns
# give the default route lower priority
${ip} rule add from all lookup local pref 100
${ip} rule del from all lookup local pref 0
# 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
# through the ovpns namespace, and to the WAN via VPN.
networking.iproute2.rttablesExtraConfig = ''
5 ovpns
'';
networking.iproute2.enable = true;
# HURRICANE ELECTRIC CONFIG:
# networking.sits = {
# hurricane = {
# remote = "216.218.226.238";
# local = "192.168.0.5";
# # local = "10.0.0.5";
# # remote = "10.0.0.1";
# # local = "10.0.0.22";
# dev = "eth0";
# ttl = 255;
# };
# };
# networking.interfaces."hurricane".ipv6 = {
# addresses = [
# # mx.uninsane.org (publically routed /64)
# {
# address = "2001:470:b:465::1";
# prefixLength = 128;
# }
# # client addr
# # {
# # address = "2001:470:a:466::2";
# # prefixLength = 64;
# # }
# ];
# routes = [
# {
# address = "::";
# prefixLength = 0;
# # via = "2001:470:a:466::1";
# }
# ];
# };
# HURRICANE ELECTRIC CONFIG:
# networking.sits = {
# hurricane = {
# remote = "216.218.226.238";
# local = "192.168.0.5";
# # local = "10.0.0.5";
# # remote = "10.0.0.1";
# # local = "10.0.0.22";
# dev = "eth0";
# ttl = 255;
# };
# };
# networking.interfaces."hurricane".ipv6 = {
# addresses = [
# # mx.uninsane.org (publically routed /64)
# {
# address = "2001:470:b:465::1";
# prefixLength = 128;
# }
# # client addr
# # {
# # address = "2001:470:a:466::2";
# # prefixLength = 64;
# # }
# ];
# routes = [
# {
# address = "::";
# prefixLength = 0;
# # via = "2001:470:a:466::1";
# }
# ];
# };
# # after configuration, we want the hurricane device to look like this:
# # hurricane: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1480
# # inet6 2001:470:a:450::2 prefixlen 64 scopeid 0x0<global>
# # inet6 fe80::c0a8:16 prefixlen 64 scopeid 0x20<link>
# # sit txqueuelen 1000 (IPv6-in-IPv4)
# # test with:
# # curl --interface hurricane http://[2607:f8b0:400a:80b::2004]
# # ping 2607:f8b0:400a:80b::2004
# # after configuration, we want the hurricane device to look like this:
# # hurricane: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1480
# # inet6 2001:470:a:450::2 prefixlen 64 scopeid 0x0<global>
# # inet6 fe80::c0a8:16 prefixlen 64 scopeid 0x20<link>
# # sit txqueuelen 1000 (IPv6-in-IPv4)
# # test with:
# # curl --interface hurricane http://[2607:f8b0:400a:80b::2004]
# # ping 2607:f8b0:400a:80b::2004
};
}

View File

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

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,11 +2,13 @@
{
imports = [
./calibre.nix
./coturn.nix
./ddns-afraid.nix
./ddns-he.nix
./email
./ejabberd.nix
./freshrss.nix
./export
./gitea.nix
./goaccess.nix
./ipfs.nix
@@ -17,12 +19,13 @@
./lemmy.nix
./matrix
./navidrome.nix
./nixserve.nix
./nginx.nix
./nixserve.nix
./ntfy
./pict-rs.nix
./pleroma.nix
./postgres.nix
./prosody.nix
./prosody
./transmission.nix
./trust-dns.nix
./wikipedia.nix

View File

@@ -14,76 +14,111 @@
#
# compliance tests:
# - <https://compliance.conversations.im/server/uninsane.org/#xep0352>
#
# administration:
# - `sudo -u ejabberd ejabberdctl help`
#
# federation/support matrix:
# - avatars
# - nixnet.services + dino: works in MUCs but not DMs (as of 2023 H1)
# - movim.eu + dino: works in DMs, MUCs untested (as of 2023/08/29)
# - calls
# - local + dino: audio, video, works in DMs (as of 2023/08/29)
# - movim.eu + dino: audio, video, works in DMs, no matter which side initiates (as of 2023/08/30)
# - +native-cell-number@cheogram.com + dino: audio works in DMs, no matter which side initiates (as of 2023/09/01)
# - can receive calls even if sender isn't in my roster
# - this is presumably using JMP.chat's SIP servers, which then convert it to XMPP call
#
# bugs:
# - 2023/09/01: will randomly stop federating. `systemctl restart ejabberd` fixes, but takes 10 minutes.
{ config, lib, pkgs, ... }:
# XXX: avatar support works in MUCs but not DMs
# lib.mkIf false
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
# 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 = [
{ user = "ejabberd"; group = "ejabberd"; directory = "/var/lib/ejabberd"; }
sane.persist.sys.byStore.plaintext = [
{ user = "ejabberd"; group = "ejabberd"; path = "/var/lib/ejabberd"; }
];
sane.ports.ports."3478" = {
protocol = [ "tcp" "udp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-stun-turn";
};
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-bosh-https";
};
sane.ports.ports."5349" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-stun-turn-over-tls";
};
sane.ports.ports."5443" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-web-services"; # file uploads, websockets, admin
};
sane.ports.ports = lib.mkMerge ([
{
"3478" = {
protocol = [ "tcp" "udp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-stun-turn";
};
"5222" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-client-to-server";
};
"5223" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpps-client-to-server"; # XMPP over TLS
};
"5269" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
description = "colin-xmpp-server-to-server";
};
"5270" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
description = "colin-xmpps-server-to-server"; # XMPP over TLS
};
"5280" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-bosh";
};
"5281" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-bosh-https";
};
"5349" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-stun-turn-over-tls";
};
"5443" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-web-services"; # file uploads, websockets, admin
};
}
] ++ (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;
description = "colin-xmpp-turn-${builtins.toString count}-of-${builtins.toString numPorts}";
};
})
turnPortRange
));
# TODO: forward these TURN ports!
networking.firewall.allowedTCPPortRanges = [{
from = 49152; # TURN
to = 49408;
}];
networking.firewall.allowedUDPPortRanges = [{
from = 49152; # TURN
to = 49408;
}];
# 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.
@@ -150,284 +185,285 @@
services.ejabberd.enable = true;
services.ejabberd.configFile = "/var/lib/ejabberd/ejabberd.yaml";
systemd.services.ejabberd.preStart = let
config-in = pkgs.writeTextFile {
name = "ejabberd.yaml.in";
text = ''
hosts:
- uninsane.org
config-in = pkgs.writeText "ejabberd.yaml.in" (lib.generators.toYAML {} {
hosts = [ "uninsane.org" ];
# none | emergency | alert | critical | error | warning | notice | info | debug
loglevel = "debug";
acme.auto = false;
certfiles = [ "/var/lib/acme/uninsane.org/full.pem" ];
# ca_file = "${pkgs.cacert.unbundled}/etc/ssl/certs/";
# ca_file = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
# none | emergency | alert | critical | error | warning | notice | info | debug
loglevel: debug
# loglevel: info
# loglevel: notice
pam_userinfotype = "jid";
acl = {
admin.user = [ "colin@uninsane.org" ];
local.user_regexp = "";
loopback.ip = [ "127.0.0.0/8" "::1/128" ];
};
acme:
auto: false
certfiles:
- /var/lib/acme/uninsane.org/full.pem
# ca_file: ${pkgs.cacert.unbundled}/etc/ssl/certs/
# ca_file: ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
access_rules = {
local.allow = "local";
c2s_access.allow = "all";
announce.allow = "admin";
configure.allow = "admin";
muc_create.allow = "local";
pubsub_createnode_access.allow = "all";
trusted_network.allow = "loopback";
};
pam_userinfotype: jid
# docs: <https://docs.ejabberd.im/admin/configuration/basic/#shaper-rules>
shaper_rules = {
# setting this to above 1 may break outgoing messages
# - maybe some servers rate limit? or just don't understand simultaneous connections?
max_s2s_connections = 1;
max_user_sessions = 10;
max_user_offline_messages = 5000;
c2s_shaper.fast = "all";
s2s_shaper.med = "all";
};
acl:
admin:
user:
- "colin@uninsane.org"
local:
user_regexp: ""
loopback:
ip:
- 127.0.0.0/8
- ::1/128
# docs: <https://docs.ejabberd.im/admin/configuration/basic/#shapers>
# this limits the bytes/sec.
# for example, burst: 3_000_000 and rate: 100_000 means:
# - each client has a BW budget that accumulates 100kB/sec and is capped at 3 MB
shaper.fast = 1000000;
shaper.med = 500000;
# shaper.fast.rate = 1000000;
# shaper.fast.burst_size = 10000000;
# shaper.med.rate = 500000;
# shaper.med.burst_size = 5000000;
access_rules:
local:
allow: local
c2s_access:
allow: all
announce:
allow: admin
configure:
allow: admin
muc_create:
allow: local
pubsub_createnode_access:
allow: all
trusted_network:
allow: loopback
# see: <https://docs.ejabberd.im/admin/configuration/listen/>
# s2s_use_starttls = true;
s2s_use_starttls = "optional";
# lessens 504: remote-server-timeout errors
# see: <https://github.com/processone/ejabberd/issues/3105#issuecomment-562182967>
negotiation_timeout = 60;
# docs: <https://docs.ejabberd.im/admin/configuration/basic/#shaper-rules>
shaper_rules:
# setting this to above 1 may break outgoing messages
# - maybe some servers rate limit? or just don't understand simultaneous connections?
max_s2s_connections: 1
max_user_sessions: 10
max_user_offline_messages: 5000
c2s_shaper:
fast: all
s2s_shaper:
med: all
listen = [
{
port = 5222;
module = "ejabberd_c2s";
shaper = "c2s_shaper";
starttls = true;
access = "c2s_access";
}
{
port = 5223;
module = "ejabberd_c2s";
shaper = "c2s_shaper";
tls = true;
access = "c2s_access";
}
{
port = 5269;
module = "ejabberd_s2s_in";
shaper = "s2s_shaper";
}
{
port = 5270;
module = "ejabberd_s2s_in";
shaper = "s2s_shaper";
tls = true;
}
{
port = 5443;
module = "ejabberd_http";
tls = true;
request_handlers = {
"/admin" = "ejabberd_web_admin"; # TODO: ensure this actually works
"/api" = "mod_http_api"; # ejabberd API endpoint (to control server)
"/bosh" = "mod_bosh";
"/upload" = "mod_http_upload";
"/ws" = "ejabberd_http_ws";
# "/.well-known/host-meta" = "mod_host_meta";
# "/.well-known/host-meta.json" = "mod_host_meta";
};
}
{
# STUN+TURN TCP
# note that the full port range should be forwarded ("not NAT'd")
# `use_turn=true` enables both TURN *and* STUN
port = 3478;
module = "ejabberd_stun";
transport = "tcp";
use_turn = true;
turn_min_port = turnPortLow;
turn_max_port = turnPortHigh;
turn_ipv4_address = "%ANATIVE%";
}
{
# STUN+TURN UDP
port = 3478;
module = "ejabberd_stun";
transport = "udp";
use_turn = true;
turn_min_port = turnPortLow;
turn_max_port = turnPortHigh;
turn_ipv4_address = "%ANATIVE%";
}
{
# STUN+TURN TLS over TCP
port = 5349;
module = "ejabberd_stun";
transport = "tcp";
tls = true;
certfile = "/var/lib/acme/uninsane.org/full.pem";
use_turn = true;
turn_min_port = turnPortLow;
turn_max_port = turnPortHigh;
turn_ipv4_address = "%ANATIVE%";
}
];
# docs: <https://docs.ejabberd.im/admin/configuration/basic/#shapers>
# this limits the bytes/sec.
# for example, burst: 3_000_000 and rate: 100_000 means:
# - each client has a BW budget that accumulates 100kB/sec and is capped at 3 MB
shaper:
fast: 1000000
med: 500000
# fast:
# - rate: 1000000
# - burst_size: 10000000
# med:
# - rate: 500000
# - burst_size: 5000000
# TODO: enable mod_fail2ban
# TODO(low): look into mod_http_fileserver for serving macros?
modules = {
# mod_adhoc = {};
# mod_announce = {
# access = "admin";
# };
# allows users to set avatars in vCard
# - <https://docs.ejabberd.im/admin/configuration/modules/#mod-avatar>
mod_avatar = {};
mod_caps = {}; # for mod_pubsub
mod_carboncopy = {}; # allows multiple clients to receive a user's message
# queues messages when recipient is offline, including PEP and presence messages.
# compliance test suggests this be enabled
mod_client_state = {};
# see: <https://docs.ejabberd.im/admin/configuration/listen/>
# s2s_use_starttls: true
s2s_use_starttls: optional
# lessens 504: remote-server-timeout errors
# see: <https://github.com/processone/ejabberd/issues/3105#issuecomment-562182967>
negotiation_timeout: 60
listen:
-
port: 5222
module: ejabberd_c2s
shaper: c2s_shaper
starttls: true
access: c2s_access
-
port: 5223
module: ejabberd_c2s
shaper: c2s_shaper
tls: true
access: c2s_access
-
port: 5269
module: ejabberd_s2s_in
shaper: s2s_shaper
-
port: 5270
module: ejabberd_s2s_in
shaper: s2s_shaper
tls: true
-
port: 5443
module: ejabberd_http
tls: true
request_handlers:
/admin: ejabberd_web_admin # TODO: ensure this actually works
/api: mod_http_api # ejabberd API endpoint (to control server)
/bosh: mod_bosh
/upload: mod_http_upload
/ws: ejabberd_http_ws
# /.well-known/host-meta: mod_host_meta
# /.well-known/host-meta.json: mod_host_meta
-
# STUN+TURN TCP
# note that the full port range should be forwarded ("not NAT'd")
# `use_turn=true` enables both TURN *and* STUN
port: 3478
module: ejabberd_stun
transport: tcp
use_turn: true
turn_min_port: 49152
turn_max_port: 65535
turn_ipv4_address: %ANATIVE%
-
# STUN+TURN UDP
port: 3478
module: ejabberd_stun
transport: udp
use_turn: true
turn_min_port: 49152
turn_max_port: 65535
turn_ipv4_address: %ANATIVE%
-
# STUN+TURN TLS over TCP
port: 5349
module: ejabberd_stun
transport: tcp
tls: true
certfile: /var/lib/acme/uninsane.org/full.pem
use_turn: true
turn_min_port: 49152
turn_max_port: 65535
turn_ipv4_address: %ANATIVE%
# TODO: enable mod_fail2ban
# TODO(low): look into mod_http_fileserver for serving macros?
modules:
# mod_adhoc: {}
# mod_announce:
# access: admin
# allows users to set avatars in vCard
# - <https://docs.ejabberd.im/admin/configuration/modules/#mod-avatar>
mod_avatar: {}
mod_caps: {} # for mod_pubsub
mod_carboncopy: {} # allows multiple clients to receive a user's message
# queues messages when recipient is offline, including PEP and presence messages.
# compliance test suggests this be enabled
mod_client_state: {}
# mod_conversejs: TODO: enable once on 21.12
# allows clients like Dino to discover where to upload files
mod_disco:
server_info:
-
modules: all
name: abuse-addresses
urls:
- "mailto:admin.xmpp@uninsane.org"
- "xmpp:colin@uninsane.org"
-
modules: all
name: admin-addresses
urls:
- "mailto:admin.xmpp@uninsane.org"
- "xmpp:colin@uninsane.org"
mod_http_upload:
host: upload.xmpp.uninsane.org
hosts:
- upload.xmpp.uninsane.org
put_url: "https://@HOST@:5443/upload"
dir_mode: "0750"
file_mode: "0750"
rm_on_unregister: false
# allow discoverability of BOSH and websocket endpoints
# TODO: enable once on ejabberd 22.05 (presently 21.04)
# mod_host_meta: {}
mod_jidprep: {} # probably not needed: lets clients normalize jids
mod_last: {} # allow other users to know when i was last online
mod_mam:
# Mnesia is limited to 2GB, better to use an SQL backend
# For small servers SQLite is a good fit and is very easy
# to configure. Uncomment this when you have SQL configured:
# db_type: sql
assume_mam_usage: true
default: always
mod_muc:
access:
- allow
access_admin:
- allow: admin
access_create: muc_create
access_persistent: muc_create
access_mam:
- allow
history_size: 100 # messages to show new participants
host: muc.xmpp.uninsane.org
hosts:
- muc.xmpp.uninsane.org
default_room_options:
anonymous: false
lang: en
persistent: true
mam: true
mod_muc_admin: {}
mod_offline: # store messages for a user when they're offline (TODO: understand multi-client workflow?)
access_max_user_messages: max_user_offline_messages
store_groupchat: true
mod_ping: {}
mod_privacy: {} # deprecated, but required for `ejabberctl export_piefxis`
mod_private: {} # allow local clients to persist arbitrary data on my server
# push notifications to services integrated with e.g. Apple/Android.
# default is for a maximum amount of PII to be withheld, since these push notifs
# generally traverse 3rd party services. can opt to include message body, etc, though.
mod_push: {}
# i don't fully understand what this does, but it seems aimed at making push notifs more reliable.
mod_push_keepalive: {}
mod_roster:
versioning: true
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-s2s-dialback>
# s2s dialback to verify inbound messages
# unclear to what degree the XMPP network requires this
mod_s2s_dialback: {}
mod_shared_roster: {} # creates groups for @all, @online, and anything manually administered?
mod_stream_mgmt:
resend_on_timeout: if_offline # resend undelivered messages if the origin client is offline
# fallback for when DNS-based STUN discovery is unsupported.
# - see: <https://xmpp.org/extensions/xep-0215.html>
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-stun-disco>
# people say to just keep this defaulted (i guess ejabberd knows to return its `host` option of uninsane.org?)
mod_stun_disco: {}
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-vcard>
mod_vcard:
allow_return_all: true # all users are discoverable (?)
host: vjid.xmpp.uninsane.org
hosts:
- vjid.xmpp.uninsane.org
search: true
mod_vcard_xupdate: {} # needed for avatars
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-pubsub>
mod_pubsub: # needed for avatars
access_createnode: pubsub_createnode_access
host: pubsub.xmpp.uninsane.org
hosts:
- pubsub.xmpp.uninsane.org
ignore_pep_from_offline: false
last_item_cache: true
plugins:
- pep
- flat
force_node_config:
# ensure client bookmarks are private
storage:bookmarks:
access_model: whitelist
urn:xmpp:avatar:data:
access_model: open
urn:xmpp:avatar:metadata:
access_model: open
mod_version: {}
'';
};
# mod_conversejs: TODO: enable once on 21.12
# allows clients like Dino to discover where to upload files
mod_disco.server_info = [
{
modules = "all";
name = "abuse-addresses";
urls = [
"mailto:admin.xmpp@uninsane.org"
"xmpp:colin@uninsane.org"
];
}
{
modules = "all";
name = "admin-addresses";
urls = [
"mailto:admin.xmpp@uninsane.org"
"xmpp:colin@uninsane.org"
];
}
];
mod_http_upload = {
host = "upload.xmpp.uninsane.org";
hosts = [ "upload.xmpp.uninsane.org" ];
put_url = "https://@HOST@:5443/upload";
dir_mode = "0750";
file_mode = "0750";
rm_on_unregister = false;
};
# allow discoverability of BOSH and websocket endpoints
# TODO: enable once on ejabberd 22.05 (presently 21.04)
# mod_host_meta = {};
mod_jidprep = {}; # probably not needed: lets clients normalize jids
mod_last = {}; # allow other users to know when i was last online
mod_mam = {
# Mnesia is limited to 2GB, better to use an SQL backend
# For small servers SQLite is a good fit and is very easy
# to configure. Uncomment this when you have SQL configured:
# db_type: sql
assume_mam_usage = true;
default = "always";
};
mod_muc = {
access = [ "allow" ];
access_admin = { allow = "admin"; };
access_create = "muc_create";
access_persistent = "muc_create";
access_mam = [ "allow" ];
history_size = 100; # messages to show new participants
host = "muc.xmpp.uninsane.org";
hosts = [ "muc.xmpp.uninsane.org" ];
default_room_options = {
anonymous = false;
lang = "en";
persistent = true;
mam = true;
};
};
mod_muc_admin = {};
mod_offline = {
# store messages for a user when they're offline (TODO: understand multi-client workflow?)
access_max_user_messages = "max_user_offline_messages";
store_groupchat = true;
};
mod_ping = {};
mod_privacy = {}; # deprecated, but required for `ejabberctl export_piefxis`
mod_private = {}; # allow local clients to persist arbitrary data on my server
# push notifications to services integrated with e.g. Apple/Android.
# default is for a maximum amount of PII to be withheld, since these push notifs
# generally traverse 3rd party services. can opt to include message body, etc, though.
mod_push = {};
# i don't fully understand what this does, but it seems aimed at making push notifs more reliable.
mod_push_keepalive = {};
mod_roster = {
versioning = true;
};
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-s2s-dialback>
# s2s dialback to verify inbound messages
# unclear to what degree the XMPP network requires this
mod_s2s_dialback = {};
mod_shared_roster = {}; # creates groups for @all, @online, and anything manually administered?
mod_stream_mgmt = {
# resend undelivered messages if the origin client is offline
resend_on_timeout = "if_offline";
};
# fallback for when DNS-based STUN discovery is unsupported.
# - see: <https://xmpp.org/extensions/xep-0215.html>
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-stun-disco>
# people say to just keep this defaulted (i guess ejabberd knows to return its `host` option of uninsane.org?)
mod_stun_disco = {};
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-vcard>
mod_vcard = {
allow_return_all = true; # all users are discoverable (?)
host = "vjid.xmpp.uninsane.org";
hosts = [ "vjid.xmpp.uninsane.org" ];
search = true;
};
mod_vcard_xupdate = {}; # needed for avatars
# docs: <https://docs.ejabberd.im/admin/configuration/modules/#mod-pubsub>
mod_pubsub = {
#^ needed for avatars
access_createnode = "pubsub_createnode_access";
host = "pubsub.xmpp.uninsane.org";
hosts = [ "pubsub.xmpp.uninsane.org" ];
ignore_pep_from_offline = false;
last_item_cache = true;
plugins = [
"pep"
"flat"
];
force_node_config = {
# ensure client bookmarks are private
"storage:bookmarks:" = {
"access_model" = "whitelist";
};
"urn:xmpp:avatar:data" = {
"access_model" = "open";
};
"urn:xmpp:avatar:metadata" = {
"access_model" = "open";
};
};
};
mod_version = {};
};
});
sed = "${pkgs.gnused}/bin/sed";
in ''
ip=$(cat '${config.sane.services.dyn-dns.ipPath}')
# config is 444 (not 644), so we want to write out-of-place and then atomically move
# TODO: factor this out into `sane-woop` helper?
rm -f /var/lib/ejabberd/ejabberd.yaml.new
${sed} "s/%ANATIVE%/$ip/" ${config-in} > /var/lib/ejabberd/ejabberd.yaml.new
${sed} "s/%ANATIVE%/$ip/g" ${config-in} > /var/lib/ejabberd/ejabberd.yaml.new
mv /var/lib/ejabberd/ejabberd.yaml{.new,}
'';

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,31 +18,35 @@ let
};
in
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode? could be more granular
{ user = "opendkim"; group = "opendkim"; directory = "/var/lib/opendkim"; }
{ user = "root"; group = "root"; directory = "/var/lib/postfix"; }
{ user = "root"; group = "root"; directory = "/var/spool/mail"; }
{ user = "opendkim"; group = "opendkim"; path = "/var/lib/opendkim"; }
{ user = "root"; group = "root"; path = "/var/lib/postfix"; }
{ user = "root"; group = "root"; path = "/var/spool/mail"; }
# *probably* don't need these dirs:
# "/var/lib/dhparams" # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/security/dhparams.nix
# "/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

@@ -0,0 +1,53 @@
{ config, ... }:
{
imports = [
./nfs.nix
./sftpgo.nix
];
users.groups.export = {};
fileSystems."/var/export/media" = {
# everything in here could be considered publicly readable (based on the viewer's legal jurisdiction)
device = "/var/lib/uninsane/media";
options = [ "rbind" ];
};
# fileSystems."/var/export/playground" = {
# device = config.fileSystems."/mnt/persist/ext".device;
# fsType = "btrfs";
# options = [
# "subvol=export-playground"
# "compress=zstd"
# "defaults"
# ];
# };
# N.B.: the backing directory should be manually created here **as a btrfs subvolume** and with a quota.
# - `sudo btrfs subvolume create /mnt/persist/ext/persist/var/export/playground`
# - `sudo btrfs quota enable /mnt/persist/ext/persist/var/export/playground`
# - `sudo btrfs quota rescan -sw /mnt/persist/ext/persist/var/export/playground`
# to adjust the limits (which apply at the block layer, i.e. post-compression):
# - `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 = [
{ user = "root"; group = "export"; mode = "0775"; path = "/var/export/playground"; }
];
sane.fs."/var/export/README.md" = {
wantedBy = [ "nfs.service" "sftpgo.service" ];
file.text = ''
- media/ read-only: Videos, Music, Books, etc
- playground/ read-write: use it to share files with other users of this server
'';
};
sane.fs."/var/export/playground/README.md" = {
wantedBy = [ "nfs.service" "sftpgo.service" ];
file.text = ''
this directory is intentionally read+write by anyone with access (i.e. on the LAN).
- share files
- write poetry
- be a friendly troll
'';
};
}

View File

@@ -0,0 +1,110 @@
# docs:
# - <https://nixos.wiki/wiki/NFS>
# - <https://wiki.gentoo.org/wiki/Nfs-utils>
# system files:
# - /etc/exports
# system services:
# - nfs-server.service
# - nfs-idmapd.service
# - nfs-mountd.service
# - nfsdcld.service
# - rpc-statd.service
# - rpcbind.service
#
# TODO: force files to be 755, or 750.
# - could maybe be done with some mount option?
{ config, lib, ... }:
{
services.nfs.server.enable = true;
# see which ports NFS uses with:
# - `rpcinfo -p`
sane.ports.ports."111" = {
protocol = [ "tcp" "udp" ];
visibleTo.lan = true;
description = "NFS server portmapper";
};
sane.ports.ports."2049" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
description = "NFS server";
};
sane.ports.ports."4000" = {
protocol = [ "udp" ];
visibleTo.lan = true;
description = "NFS server status daemon";
};
sane.ports.ports."4001" = {
protocol = [ "tcp" "udp" ];
visibleTo.lan = true;
description = "NFS server lock daemon";
};
sane.ports.ports."4002" = {
protocol = [ "tcp" "udp" ];
visibleTo.lan = true;
description = "NFS server mount daemon";
};
# NFS4 allows these to float, but NFS3 mandates specific ports, so fix them for backwards compat.
services.nfs.server.lockdPort = 4001;
services.nfs.server.mountdPort = 4002;
services.nfs.server.statdPort = 4000;
# format:
# fspoint visibility(options)
# options:
# - see: <https://wiki.gentoo.org/wiki/Nfs-utils#Exports>
# - see [man 5 exports](https://linux.die.net/man/5/exports)
# - insecure: require clients use src port > 1024
# - rw, ro (default)
# - async, sync (default)
# - no_subtree_check (default), subtree_check: verify not just that files requested by the client live
# in the expected fs, but also that they live under whatever subdirectory of that fs is exported.
# - no_root_squash, root_squash (default): map requests from uid 0 to user `nobody`.
# - crossmnt: reveal filesystems that are mounted under this endpoint
# - fsid: must be zero for the root export
# - fsid=root is alias for fsid=0
# - mountpoint[=/path]: only export the directory if it's a mountpoint. used to avoid exporting failed mounts.
# - all_squash: rewrite all client requests such that they come from anonuid/anongid
# - any files a user creates are owned by local anonuid/anongid.
# - users can read any local file which anonuid/anongid would be able to read.
# - users can't chown to/away from anonuid/anongid.
# - users can chmod files they own, to anything (making them unreadable to non-`nfsuser` export users, like FTP).
# - `stat` remains unchanged, returning the real UIDs/GIDs to the client.
# - thus programs which check `uid` or `gid` before trying an operation may incorrectly conclude they can't perform some op.
#
# 10.0.0.0/8 to export both to LAN (readonly, unencrypted) and wg vpn (read-write, encrypted)
services.nfs.server.exports =
let
fmtExport = { export, baseOpts, extraLanOpts ? [], extraVpnOpts ? [] }:
let
always = [ "subtree_check" ];
lanOpts = always ++ baseOpts ++ extraLanOpts;
vpnOpts = always ++ baseOpts ++ extraVpnOpts;
in "${export} 10.78.79.0/22(${lib.concatStringsSep "," lanOpts}) 10.0.10.0/24(${lib.concatStringsSep "," vpnOpts})";
in lib.concatStringsSep "\n" [
(fmtExport {
export = "/var/export";
baseOpts = [ "crossmnt" "fsid=root" ];
extraLanOpts = [ "ro" ];
extraVpnOpts = [ "rw" "no_root_squash" ];
})
(fmtExport {
export = "/var/export/playground";
baseOpts = [
"mountpoint"
"all_squash"
"rw"
"anonuid=${builtins.toString config.users.users.nfsuser.uid}"
"anongid=${builtins.toString config.users.groups.export.gid}"
];
})
];
users.users.nfsuser = {
description = "virtual user for anonymous NFS operations";
group = "export";
isSystemUser = true;
};
}

View File

@@ -0,0 +1,184 @@
# docs:
# - <https://github.com/drakkan/sftpgo>
# - config options: <https://github.com/drakkan/sftpgo/blob/main/docs/full-configuration.md>
# - config defaults: <https://github.com/drakkan/sftpgo/blob/main/sftpgo.json>
# - nixos options: <repo:nixos/nixpkgs:nixos/modules/services/web-apps/sftpgo.nix>
# - nixos example: <repo:nixos/nixpkgs:nixos/tests/sftpgo.nix>
#
# sftpgo is a FTP server that also supports WebDAV, SFTP, and web clients.
#
# TODO: change umask so sftpgo-created files default to 644.
# - it does indeed appear that the 600 is not something sftpgo is explicitly doing.
{ config, lib, pkgs, sane-lib, ... }:
let
# user permissions:
# - see <repo:drakkan/sftpgo:internal/dataprovider/user.go>
# - "*" = grant all permissions
# - read-only perms:
# - "list" = list files and directories
# - "download"
# - rw perms:
# - "upload"
# - "overwrite" = allow uploads to replace existing files
# - "delete" = delete files and directories
# - "delete_files"
# - "delete_dirs"
# - "rename" = rename files and directories
# - "rename_files"
# - "rename_dirs"
# - "create_dirs"
# - "create_symlinks"
# - "chmod"
# - "chown"
# - "chtimes" = change atime/mtime (access and modification times)
#
# home_dir:
# - it seems (empirically) that a user can't cd above their home directory.
# though i don't have a reference for that in the docs.
authResponseSuccess = {
status = 1;
username = "anonymous";
expiration_date = 0;
home_dir = "/var/export";
# uid/gid 0 means to inherit sftpgo uid.
# - i.e. users can't read files which Linux user `sftpgo` can't read
# - uploaded files belong to Linux user `sftpgo`
# other uid/gid values aren't possible for localfs backend, unless i let sftpgo use `sudo`.
uid = 0;
gid = 0;
# uid = 65534;
# gid = 65534;
max_sessions = 0;
# quota_*: 0 means to not use SFTP's quota system
quota_size = 0;
quota_files = 0;
permissions = {
"/" = [ "list" "download" ];
"/playground" = [
# read-only:
"list"
"download"
# write:
"upload"
"overwrite"
"delete"
"rename"
"create_dirs"
"create_symlinks"
# intentionally omitted:
# "chmod"
# "chown"
# "chtimes"
];
};
upload_bandwidth = 0;
download_bandwidth = 0;
filters = {
allowed_ip = [];
denied_ip = [];
};
public_keys = [];
# other fields:
# ? groups
# ? virtual_folders
};
authResponseFail = {
username = "";
};
authSuccessJson = pkgs.writeText "sftp-auth-success.json" (builtins.toJSON authResponseSuccess);
authFailJson = pkgs.writeText "sftp-auth-fail.json" (builtins.toJSON authResponseFail);
unwrappedAuthProgram = pkgs.static-nix-shell.mkBash {
pname = "sftpgo_external_auth_hook";
src = ./.;
pkgs = [ "coreutils" ];
};
authProgram = pkgs.writeShellScript "sftpgo-auth-hook" ''
${unwrappedAuthProgram}/bin/sftpgo_external_auth_hook ${authFailJson} ${authSuccessJson}
'';
in
{
# Client initiates a FTP "control connection" on port 21.
# - this handles the client -> server commands, and the server -> client status, but not the actual data
# - file data, directory listings, etc need to be transferred on an ephemeral "data port".
# - 50000-50100 is a common port range for this.
sane.ports.ports = {
"21" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
description = "colin-FTP server";
};
} // (sane-lib.mapToAttrs
(port: {
name = builtins.toString port;
value = {
protocol = [ "tcp" ];
visibleTo.lan = true;
description = "colin-FTP server data port range";
};
})
(lib.range 50000 50100)
);
services.sftpgo = {
enable = true;
group = "export";
settings = {
ftpd = {
bindings = [
{
# binding this means any wireguard client can connect
address = "10.0.10.5";
port = 21;
debug = true;
}
{
# binding this means any LAN client can connect
address = "10.78.79.51";
port = 21;
debug = true;
}
];
# active mode is susceptible to "bounce attacks", without much benefit over passive mode
disable_active_mode = true;
hash_support = true;
passive_port_range = {
start = 50000;
end = 50100;
};
banner = ''
Welcome, friends, to Colin's read-only FTP server! Also available via NFS on the same host.
Username: "anonymous"
Password: "anonymous"
CONFIGURE YOUR CLIENT FOR "PASSIVE" mode, e.g. `ftp --passive uninsane.org`
Please let me know if anything's broken or not as it should be. Otherwise, browse and DL freely :)
'';
};
data_provider = {
driver = "memory";
external_auth_hook = "${authProgram}";
# track_quota:
# - 0: disable quota tracking
# - 1: quota is updated on every upload/delete, even if user has no quota restriction
# - 2: quota is updated on every upload/delete, but only if user/folder has a quota restriction (default, i think)
# track_quota = 2;
};
};
};
users.users.sftpgo.extraGroups = [ "export" ];
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

@@ -0,0 +1,23 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils
# vim: set filetype=bash :
#
# available environment variables:
# - SFTPGO_AUTHD_USERNAME
# - SFTPGO_AUTHD_USER
# - SFTPGO_AUTHD_IP
# - SFTPGO_AUTHD_PROTOCOL = { "DAV", "FTP", "HTTP", "SSH" }
# - SFTPGO_AUTHD_PASSWORD
# - SFTPGO_AUTHD_PUBLIC_KEY
# - SFTPGO_AUTHD_KEYBOARD_INTERACTIVE
# - SFTPGO_AUTHD_TLS_CERT
#
#
# call with <script_name> /path/to/fail/response.json /path/to/success/response.json
if [ "$SFTPGO_AUTHD_USERNAME" = "anonymous" ]; then
cat "$2"
else
cat "$1"
fi

View File

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

View File

@@ -2,9 +2,9 @@
{ config, pkgs, lib, ... }:
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode? could be more granular
{ user = "git"; group = "gitea"; directory = "/var/lib/gitea"; }
{ user = "git"; group = "gitea"; path = "/var/lib/gitea"; }
];
services.gitea.enable = true;
services.gitea.user = "git"; # default is 'gitea'

View File

@@ -10,9 +10,9 @@
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"; directory = "/var/lib/ipfs"; }
{ user = "261"; group = "261"; path = "/var/lib/ipfs"; }
];
networking.firewall.allowedTCPPorts = [ 4001 ];

View File

@@ -1,9 +1,9 @@
{ ... }:
{
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"; directory = "/var/lib/jackett"; }
{ user = "root"; group = "root"; path = "/var/lib/jackett"; }
];
services.jackett.enable = true;
@@ -24,6 +24,7 @@
locations."/" = {
# proxyPass = "http://ovpns.uninsane.org:9117";
proxyPass = "http://10.0.1.6:9117";
recommendedProxySettings = true;
};
};

View File

@@ -40,8 +40,8 @@
description = "colin-jellyfin-https-lan";
};
sane.persist.sys.plaintext = [
{ user = "jellyfin"; group = "jellyfin"; mode = "0700"; directory = "/var/lib/jellyfin"; }
sane.persist.sys.byStore.plaintext = [
{ user = "jellyfin"; group = "jellyfin"; mode = "0700"; path = "/var/lib/jellyfin"; }
];
sane.fs."/var/lib/jellyfin/config/logging.json" = {
# "Emby.Dlna" logging: <https://jellyfin.org/docs/general/networking/dlna>

View File

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

View File

@@ -3,19 +3,29 @@
# - <repo:LemmyNet/lemmy:docker/nginx.conf>
# - <repo:LemmyNet/lemmy-ansible:templates/nginx.conf>
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let
inherit (builtins) toString;
inherit (lib) mkForce;
uiPort = 1234; # default ui port is 1234
backendPort = 8536; # default backend port is 8536
# - i guess the "backend" port is used for federation?
#^ i guess the "backend" port is used for federation?
pict-rs = pkgs.pict-rs.overrideAttrs (upstream: {
# as of v 0.4.2, all non-GIF video is forcibly transcoded.
# that breaks lemmy, because of the request latency.
# and it eats up hella CPU.
# pict-rs is iffy around video altogether: mp4 seems the best supported.
postPatch = (upstream.postPatch or "") + ''
substituteInPlace src/validate.rs \
--replace 'if transcode_options.needs_reencode() {' 'if false {'
'';
});
in {
services.lemmy = {
enable = true;
settings.hostname = "lemmy.uninsane.org";
settings.federation.enabled = true;
# federation.debug forces outbound federation queries to be run synchronously
# N.B.: this option might not be read for 0.17.0+? <https://github.com/LemmyNet/lemmy/blob/c32585b03429f0f76d1e4ff738786321a0a9df98/RELEASES.md#upgrade-instructions>
# settings.federation.debug = true;
settings.port = backendPort;
ui.port = uiPort;
@@ -32,6 +42,7 @@ in {
systemd.services.lemmy.environment = {
RUST_BACKTRACE = "full";
# RUST_LOG = "debug";
# RUST_LOG = "trace";
# upstream defaults LEMMY_DATABASE_URL = "postgres:///lemmy?host=/run/postgresql";
# - Postgres complains that we didn't specify a user
# lemmy formats the url as:
@@ -55,4 +66,20 @@ in {
};
sane.dns.zones."uninsane.org".inet.CNAME."lemmy" = "native";
#v DO NOT REMOVE: defaults to 0.3, instead of latest, so always need to explicitly set this.
services.pict-rs.package = pict-rs;
# pict-rs configuration is applied in this order:
# - via toml
# - via env vars (overrides everything above)
# - via CLI flags (overrides everything above)
# some of the CLI flags have defaults, making it the only actual way to configure certain things even when docs claim otherwise.
# CLI args: <https://git.asonix.dog/asonix/pict-rs#user-content-running>
systemd.services.pict-rs.serviceConfig.ExecStart = lib.mkForce (lib.concatStringsSep " " [
"${lib.getBin pict-rs}/bin/pict-rs run"
"--media-max-frame-count" (builtins.toString (30*60*60))
"--media-process-timeout 120"
"--media-enable-full-video true" # allow audio
]);
}

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,67 +20,73 @@
./signal.nix
];
sane.persist.sys.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; directory = "/var/lib/matrix-synapse"; }
sane.persist.sys.byStore.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/matrix-synapse"; }
];
services.matrix-synapse.enable = true;
# this changes the default log level from INFO to WARN.
# maybe there's an easier way?
services.matrix-synapse.settings.log_config = ./synapse-log_level.yaml;
services.matrix-synapse.settings.server_name = "uninsane.org";
services.matrix-synapse.settings = {
# this changes the default log level from INFO to WARN.
# maybe there's an easier way?
log_config = ./synapse-log_level.yaml;
server_name = "uninsane.org";
# services.matrix-synapse.enable_registration_captcha = true;
# services.matrix-synapse.enable_registration_without_verification = true;
services.matrix-synapse.settings.enable_registration = true;
# services.matrix-synapse.registration_shared_secret = "<shared key goes here>";
# services.matrix-synapse.enable_registration_captcha = true;
# services.matrix-synapse.enable_registration_without_verification = true;
enable_registration = true;
# services.matrix-synapse.registration_shared_secret = "<shared key goes here>";
# default for listeners is port = 8448, tls = true, x_forwarded = false.
# we change this because the server is situated behind nginx.
services.matrix-synapse.settings.listeners = [
{
port = 8008;
bind_addresses = [ "127.0.0.1" ];
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
compress = false;
}
];
}
];
# default for listeners is port = 8448, tls = true, x_forwarded = false.
# we change this because the server is situated behind nginx.
listeners = [
{
port = 8008;
bind_addresses = [ "127.0.0.1" ];
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
compress = false;
}
];
}
];
services.matrix-synapse.settings.x_forwarded = true; # because we proxy matrix behind nginx
services.matrix-synapse.settings.max_upload_size = "100M"; # default is "50M"
ip_range_whitelist = [
# to communicate with ntfy.uninsane.org push notifs.
# TODO: move this to some non-shared loopback device: we don't want Matrix spouting http requests to *anything* on this machine
"10.78.79.51"
];
services.matrix-synapse.settings.admin_contact = "admin.matrix@uninsane.org";
services.matrix-synapse.settings.registrations_require_3pid = [ "email" ];
x_forwarded = true; # because we proxy matrix behind nginx
max_upload_size = "100M"; # default is "50M"
admin_contact = "admin.matrix@uninsane.org";
registrations_require_3pid = [ "email" ];
};
services.matrix-synapse.extraConfigFiles = [
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
@@ -141,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,8 +5,8 @@
# - recommended to use mautrix-discord: <https://github.com/NixOS/nixpkgs/pull/200462>
lib.mkIf false
{
sane.persist.sys.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; directory = "/var/lib/mx-puppet-discord"; }
sane.persist.sys.byStore.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/mx-puppet-discord"; }
];
services.matrix-synapse.settings.app_service_config_files = [

View File

@@ -1,16 +1,14 @@
# config docs:
# - <https://github.com/matrix-org/matrix-appservice-irc/blob/develop/config.sample.yaml>
# TODO: /quit message for bridged users reveals to IRC users that i'm using a bridge;
# probably want to remove that.
{ config, lib, ... }:
let
ircServer = { name, additionalAddresses ? [], sasl ? true }: let
ircServer = { name, additionalAddresses ? [], sasl ? true, port ? 6697 }: let
lowerName = lib.toLower name;
in {
# XXX sasl: appservice doesn't support NickServ identification (only SASL, or PASS if sasl = false)
inherit name additionalAddresses sasl;
port = 6697;
inherit name additionalAddresses sasl port;
ssl = true;
botConfig = {
# bot has no presence in IRC channel; only real Matrix users
@@ -103,11 +101,17 @@ in
})
];
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode?
{ user = "matrix-appservice-irc"; group = "matrix-appservice-irc"; directory = "/var/lib/matrix-appservice-irc"; }
{ user = "matrix-appservice-irc"; group = "matrix-appservice-irc"; path = "/var/lib/matrix-appservice-irc"; }
];
# XXX: matrix-appservice-irc PreStart tries to chgrp the registration.yml to matrix-synapse,
# which requires matrix-appservice-irc to be of that group
users.users.matrix-appservice-irc.extraGroups = [ "matrix-synapse" ];
# weird race conditions around registration.yml mean we want matrix-synapse to be of matrix-appservice-irc group too.
users.users.matrix-synapse.extraGroups = [ "matrix-appservice-irc" ];
services.matrix-synapse.settings.app_service_config_files = [
"/var/lib/matrix-appservice-irc/registration.yml" # auto-created by irc appservice
];
@@ -137,6 +141,7 @@ in
sasl = false;
# notable channels:
# - #hare
# - #mnt-reform
};
"irc.myanonamouse.net" = ircServer {
name = "MyAnonamouse";
@@ -145,6 +150,7 @@ in
};
"irc.oftc.net" = ircServer {
name = "oftc";
sasl = false;
# notable channels:
# - #sxmo
# - #sxmo-offtopic
@@ -153,4 +159,10 @@ in
};
};
};
systemd.services.matrix-appservice-irc.serviceConfig = {
# XXX 2023/06/20: nixos specifies this + @aio and @memlock as forbidden
# the service actively uses at least one of these, and both of them are fairly innocuous
SystemCallFilter = lib.mkForce "~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @setuid @swap";
};
}

View File

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

View File

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

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
@@ -101,7 +102,8 @@ in
};
# allow ActivityPub clients to discover how to reach @user@uninsane.org
# TODO: waiting on https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3361/
# see: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3361/
# not sure this makes sense while i run multiple AP services (pleroma, lemmy)
# locations."/.well-known/nodeinfo" = {
# proxyPass = "http://127.0.0.1:4000";
# extraConfig = pleromaExtraConfig;
@@ -132,10 +134,10 @@ 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"; directory = "/var/lib/acme"; }
{ user = "colin"; group = "users"; directory = "/var/www/sites"; }
{ user = "acme"; group = "acme"; path = "/var/lib/acme"; }
{ user = "colin"; group = "users"; path = "/var/www/sites"; }
];
# let's encrypt default chain looks like:

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

@@ -0,0 +1,92 @@
# ntfy: UnifiedPush notification delivery system
# - used to get push notifications out of Matrix and onto a Phone (iOS, Android, or a custom client)
#
# config options:
# - <https://docs.ntfy.sh/config/#config-options>
#
# usage:
# - ntfy sub https://ntfy.uninsane.org/TOPIC
# - ntfy pub https://ntfy.uninsane.org/TOPIC "my message"
# in production, TOPIC is a shared secret between the publisher (Matrix homeserver) and the subscriber (phone)
#
# administering:
# - sudo -u ntfy-sh ntfy access
#
# debugging:
# - make sure that the keepalives are good:
# - on the subscriber machine, run `lsof -i4` to find the port being used
# - `sudo tcpdump tcp port <p>`
# - shouldn't be too spammy
#
# matrix integration:
# - the user must manually point synapse to the ntfy endpoint:
# - `curl --header "Authorization: <your_token>" --data '{ "app_display_name": "sane-nix moby", "app_id": "ntfy.uninsane.org", "data": { "url": "https://ntfy.uninsane.org/_matrix/push/v1/notify", "format": "event_id_only" }, "device_display_name": "sane-nix moby", "kind": "http", "lang": "en-US", "profile_tag": "", "pushkey": "https://ntfy.uninsane.org/TOPIC" }' localhost:8008/_matrix/client/v3/pushers/set`
# where the token is grabbed from Element's help&about page when logged in
# - to remove, send this `curl` with `"kind": null`
{ config, lib, pkgs, ... }:
let
# subscribers need a non-443 public port to listen on as a way to easily differentiate this traffic
# at the IP layer, to enable e.g. wake-on-lan.
altPort = 2587;
in
{
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.
{ user = "ntfy-sh"; group ="ntfy-sh"; path = "/var/lib/ntfy-sh"; }
];
services.ntfy-sh.enable = true;
services.ntfy-sh.settings = {
base-url = "https://ntfy.uninsane.org";
behind-proxy = true; # not sure if needed
# keepalive interval is a ntfy-specific keepalive thing, where it sends actual data down the wire.
# it's not simple TCP keepalive.
# defaults to 45s.
# note that the client may still do its own TCP-level keepalives, typically every 30s
keepalive-interval = "15m";
log-level = "trace"; # trace, debug, info (default), warn, error
auth-default-access = "deny-all";
};
systemd.services.ntfy-sh.serviceConfig.DynamicUser = lib.mkForce false;
systemd.services.ntfy-sh.preStart = ''
# make this specific topic read-write by world
# it would be better to use the token system, but that's extra complexity for e.g.
# how do i plumb a secret into the Matrix notification pusher
#
# note that this will fail upon first run, i.e. before ntfy has created its db.
# just restart the service.
topic=$(cat ${config.sops.secrets.ntfy-sh-topic.path})
${pkgs.ntfy-sh}/bin/ntfy access everyone "$topic" read-write
'';
services.nginx.virtualHosts."ntfy.uninsane.org" = {
forceSSL = true;
enableACME = true;
listen = [
{ addr = "0.0.0.0"; port = altPort; ssl = true; }
{ addr = "0.0.0.0"; port = 443; ssl = true; }
{ addr = "0.0.0.0"; port = 80; ssl = false; }
];
locations."/" = {
proxyPass = "http://127.0.0.1:2586";
proxyWebsockets = true; #< support websocket upgrades. without that, `ntfy sub` hangs silently
recommendedProxySettings = true; #< adds headers so ntfy logs include the real IP
extraConfig = ''
# absurdly long timeout (86400s=24h) so that we never hang up on clients.
# make sure the client is smart enough to detect a broken proxy though!
proxy_read_timeout 86400s;
'';
};
};
sane.dns.zones."uninsane.org".inet.CNAME."ntfy" = "native";
sane.ports.ports."${builtins.toString altPort}" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-ntfy.uninsane.org";
};
}

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,8 +5,8 @@ let
cfg = config.services.pict-rs;
in
{
sane.persist.sys.plaintext = lib.mkIf cfg.enable [
{ user = "pict-rs"; group = "pict-rs"; directory = cfg.dataDir; }
sane.persist.sys.byStore.plaintext = lib.mkIf cfg.enable [
{ user = "pict-rs"; group = "pict-rs"; path = cfg.dataDir; }
];
systemd.services.pict-rs.serviceConfig = {

View File

@@ -1,14 +1,21 @@
# docs:
# - https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/pleroma.nix
# - https://docs.pleroma.social/backend/configuration/cheatsheet/
# - <https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/pleroma.nix>
# - <https://docs.pleroma.social/backend/configuration/cheatsheet/>
# example config:
# - <https://git.pleroma.social/pleroma/pleroma/-/blob/develop/config/config.exs>
#
# to run it in a oci-container: https://github.com/barrucadu/nixfiles/blob/master/services/pleroma.nix
# to run it in a oci-container: <https://github.com/barrucadu/nixfiles/blob/master/services/pleroma.nix>
#
# admin frontend: <https://fed.uninsane.org/pleroma/admin>
{ config, pkgs, ... }:
let
logLevel = "warn";
# logLevel = "debug";
in
{
sane.persist.sys.plaintext = [
# TODO: mode? could be more granular
{ user = "pleroma"; group = "pleroma"; directory = "/var/lib/pleroma"; }
sane.persist.sys.byStore.plaintext = [
{ user = "pleroma"; group = "pleroma"; path = "/var/lib/pleroma"; }
];
services.pleroma.enable = true;
services.pleroma.secretConfigFile = config.sops.secrets.pleroma_secrets.path;
@@ -56,6 +63,7 @@
database: "pleroma",
hostname: "localhost",
pool_size: 10,
prepare: :named,
parameters: [
plan_cache_mode: "force_custom_plan"
]
@@ -96,10 +104,22 @@
backends: [{ExSyslogger, :ex_syslogger}]
config :logger, :ex_syslogger,
level: :warn
# level: :debug
level: :${logLevel}
# policies => list of message rewriting facilities to be enabled
# transparence => whether to publish these rules in node_info (and /about)
config :pleroma, :mrf,
policies: [Pleroma.Web.ActivityPub.MRF.SimplePolicy],
transparency: true
# reject => { host, reason }
config :pleroma, :mrf_simple,
reject: [ {"threads.net", "megacorp"}, {"*.threads.net", "megacorp"} ]
# reject: [ [host: "threads.net", reason: "megacorp"], [host: "*.threads.net", reason: "megacorp"] ]
# XXX colin: not sure if this actually _does_ anything
# better to steal emoji from other instances?
# - <https://docs.pleroma.social/backend/configuration/cheatsheet/#mrf_steal_emoji>
config :pleroma, :emoji,
shortcode_globs: ["/emoji/**/*.png"],
groups: [
@@ -148,6 +168,7 @@
# inherit kTLS;
locations."/" = {
proxyPass = "http://127.0.0.1:4000";
recommendedProxySettings = true;
# documented: https://git.pleroma.social/pleroma/pleroma/-/blob/develop/installation/pleroma.nginx
extraConfig = ''
# XXX colin: this block is in the nixos examples: i don't understand all of it
@@ -166,17 +187,18 @@
add_header Referrer-Policy same-origin;
add_header X-Download-Options noopen;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# proxy_set_header Host $http_host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# # proxy_set_header Host $http_host;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# colin: added this due to Pleroma complaining in its logs
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-Proto $scheme;
# NB: this defines the maximum upload size
client_max_body_size 16m;
'';
};

View File

@@ -1,12 +1,39 @@
{ ... }:
{ pkgs, ... }:
let
GiB = n: MiB 1024*n;
MiB = n: KiB 1024*n;
KiB = n: 1024*n;
in
{
sane.persist.sys.plaintext = [
sane.persist.sys.byStore.plaintext = [
# TODO: mode?
{ user = "postgres"; group = "postgres"; directory = "/var/lib/postgresql"; }
{ user = "postgres"; group = "postgres"; path = "/var/lib/postgresql"; }
];
services.postgresql.enable = true;
# services.postgresql.dataDir = "/opt/postgresql/13";
# HOW TO UPDATE:
# postgres version updates are manual and require intervention.
# - `sane-stop-all-servo`
# - `systemctl start postgresql`
# - as `sudo su postgres`:
# - `cd /var/log/postgresql`
# - `pg_dumpall > state.sql`
# - `echo placeholder > <new_version>` # to prevent state from being created earlier than we want
# - then, atomically:
# - update the `services.postgresql.package` here
# - `dataDir` is atomically updated to match package; don't touch
# - `nixos-rebuild --flake . switch ; sane-stop-all-servo`
# - `sudo rm -rf /var/lib/postgresql/<new_version>`
# - `systemctl start postgresql`
# - as `sudo su postgres`:
# - `cd /var/lib/postgreql`
# - `psql -f state.sql`
# - restart dependent services (maybe test one at a time)
services.postgresql.package = pkgs.postgresql_15;
# XXX colin: for a proper deploy, we'd want to include something for Pleroma here too.
# services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
# CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD '<password goes here>';
@@ -17,10 +44,33 @@
# LC_CTYPE = "C";
# '';
# TODO: perf tuning
# perf tuning
# - for recommended values see: <https://pgtune.leopard.in.ua/>
# - for official docs (sparse), see: <https://www.postgresql.org/docs/11/config-setting.html#CONFIG-SETTING-CONFIGURATION-FILE>
# services.postgresql.settings = { ... }
services.postgresql.settings = {
# DB Version: 15
# OS Type: linux
# DB Type: web
# Total Memory (RAM): 32 GB
# CPUs num: 12
# Data Storage: ssd
max_connections = 200;
shared_buffers = "8GB";
effective_cache_size = "24GB";
maintenance_work_mem = "2GB";
checkpoint_completion_target = 0.9;
wal_buffers = "16MB";
default_statistics_target = 100;
random_page_cost = 1.1;
effective_io_concurrency = 200;
work_mem = "10485kB";
min_wal_size = "1GB";
max_wal_size = "4GB";
max_worker_processes = 12;
max_parallel_workers_per_gather = 4;
max_parallel_workers = 12;
max_parallel_maintenance_workers = 4;
};
# daily backups to /var/backup
services.postgresqlBackup.enable = true;

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"; directory = "/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

@@ -1,12 +1,27 @@
{ pkgs, ... }:
{ 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 = "transmission"; directory = "/var/lib/transmission"; }
{ user = "transmission"; group = config.users.users.transmission.group; path = "/var/lib/transmission"; }
];
users.users.transmission.extraGroups = [ "media" ];
services.transmission.enable = true;
services.transmission.package = pkgs.transmission_4; #< 2023/09/06: nixpkgs `transmission` defaults to old 3.00
#v setting `group` this way doesn't tell transmission to `chown` the files it creates
# it's a nixpkgs setting which just runs the transmission daemon as this group
services.transmission.group = "media";
# transmission will by default not allow the world to read its files.
services.transmission.downloadDirPermissions = "775";
services.transmission.extraFlags = [
"--log-level=debug"
];
services.transmission.settings = {
# message-level = 3; #< enable for debug logging. 0-3, default is 2.
# 0.0.0.0 => allow rpc from any host: we gate it via firewall and auth requirement
rpc-bind-address = "0.0.0.0";
#rpc-host-whitelist = "bt.uninsane.org";
#rpc-whitelist = "*.*.*.*";
@@ -17,9 +32,8 @@
rpc-password = "{503fc8928344f495efb8e1f955111ca5c862ce0656SzQnQ5";
rpc-whitelist-enabled = false;
# download-dir = "/opt/uninsane/media/";
# hopefully, make the downloads world-readable
umask = 0;
# umask = 0; #< default is 2: i.e. deny writes from world
# force peer connections to be encrypted
encryption = 2;
@@ -35,17 +49,18 @@
download-dir = "/var/lib/uninsane/media";
incomplete-dir = "/var/lib/uninsane/media/incomplete";
# transmission regularly fails to move stuff from the incomplete dir to the main one, so disable:
# TODO: uncomment this line!
incomplete-dir-enabled = false;
};
# transmission will by default not allow the world to read its files.
services.transmission.downloadDirPermissions = "775";
systemd.services.transmission.after = [ "wireguard-wg-ovpns.service" ];
systemd.services.transmission.partOf = [ "wireguard-wg-ovpns.service" ];
systemd.services.transmission.serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
LogLevelMax = "warning";
Restart = "on-failure";
RestartSec = "30s";
};
# service to automatically backup torrents i add to transmission

View File

@@ -1,15 +1,25 @@
# TODO: split this file apart into smaller files to make it easier to understand
{ config, lib, pkgs, ... }:
let
nativeAddrs = lib.mapAttrs (_name: builtins.head) config.sane.dns.zones."uninsane.org".inet.A;
bindOvpn = "10.0.1.5";
in lib.mkMerge [
{
sane.services.trust-dns.enable = true;
services.trust-dns.enable = true;
sane.services.trust-dns.listenAddrsIPv4 = [
# specify each address explicitly, instead of using "*".
# this ensures responses are sent from the address at which the request was received.
config.sane.hosts.by-name."servo".lan-ip
"10.0.1.5"
];
sane.services.trust-dns.quiet = true;
# don't bind to IPv6 until i explicitly test that stack
services.trust-dns.settings.listen_addrs_ipv6 = [];
services.trust-dns.quiet = true;
# 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";
};
sane.dns.zones."uninsane.org".TTL = 900;
@@ -24,18 +34,19 @@
sane.dns.zones."uninsane.org".inet = {
SOA."@" = ''
ns1.uninsane.org. admin-dns.uninsane.org. (
2022122101 ; Serial
2023092101 ; Serial
4h ; Refresh
30m ; Retry
7d ; Expire
5m) ; Negative response TTL
'';
TXT."rev" = "2023052901";
TXT."rev" = "2023092101";
CNAME."native" = "%CNAMENATIVE%";
A."@" = "%ANATIVE%";
A."wan" = "%AWAN%";
A."servo.wan" = "%AWAN%";
A."servo.lan" = config.sane.hosts.by-name."servo".lan-ip;
A."servo.hn" = config.sane.hosts.by-name."servo".wg-home.ip;
# XXX NS records must also not be CNAME
# it's best that we keep this identical, or a superset of, what org. lists as our NS.
@@ -51,49 +62,25 @@
];
};
# we need trust-dns to load our zone by relative path instead of /nix/store path
# because we generate it at runtime.
sane.services.trust-dns.zones."uninsane.org".file = lib.mkForce "uninsane.org.zone";
sane.services.trust-dns.zonedir = null;
services.trust-dns.settings.zones = [ "uninsane.org" ];
sane.services.trust-dns.package =
let
sed = "${pkgs.gnused}/bin/sed";
zone-dir = "/var/lib/trust-dns";
zone-wan = "${zone-dir}/wan/uninsane.org.zone";
zone-lan = "${zone-dir}/lan/uninsane.org.zone";
zone-template = pkgs.writeText "uninsane.org.zone.in" config.sane.services.trust-dns.zones."uninsane.org".text;
in pkgs.writeShellScriptBin "named" ''
# compute wan/lan values
mkdir -p ${zone-dir}/{ovpn,wan,lan}
wan=$(cat '${config.sane.services.dyn-dns.ipPath}')
lan=${config.sane.hosts.by-name."servo".lan-ip}
# TODO: can i transform this into some sort of service group?
# have `systemctl restart trust-dns.service` restart all the individual services?
systemd.services.trust-dns.serviceConfig = {
DynamicUser = lib.mkForce false;
User = "trust-dns";
Group = "trust-dns";
wantedBy = lib.mkForce [];
};
systemd.services.trust-dns.enable = false;
# create specializations that resolve native.uninsane.org to different CNAMEs
${sed} s/%AWAN%/$wan/ ${zone-template} \
| ${sed} s/%CNAMENATIVE%/wan/ \
| ${sed} s/%ANATIVE%/$wan/ \
> ${zone-wan}
${sed} s/%AWAN%/$wan/ ${zone-template} \
| ${sed} s/%CNAMENATIVE%/servo.lan/ \
| ${sed} s/%ANATIVE%/$lan/ \
> ${zone-lan}
users.groups.trust-dns = {};
users.users.trust-dns = {
group = "trust-dns";
isSystemUser = true;
};
# launch the different interfaces, separately
${pkgs.trust-dns}/bin/named --port 53 --zonedir ${zone-dir}/wan/ $@ &
WANPID=$!
${pkgs.trust-dns}/bin/named --port 1053 --zonedir ${zone-dir}/lan/ $@ &
LANPID=$!
# wait until any of the processes exits, then kill them all and exit error
while kill -0 $WANPID $LANPID ; do
sleep 5
done
kill $WANPID $LANPID
exit 1
'';
sane.services.dyn-dns.restartOnChange = [ "trust-dns.service" ];
# sane.services.dyn-dns.restartOnChange = [ "trust-dns.service" ];
networking.nat.enable = true;
networking.nat.extraCommands = ''
@@ -109,12 +96,113 @@
-m iprange --src-range 10.78.76.0-10.78.79.255 \
-j DNAT --to-destination :1053
'';
sane.ports.ports."1053" = {
# because the NAT above redirects in nixos-nat-pre, LAN requests behave as though they arrived on the external interface at the redirected port.
# TODO: try nixos-nat-post instead?
# TODO: or, don't NAT from port 53 -> port 1053, but rather nat from LAN addr to a loopback addr.
# - this is complicated in that loopback is a different interface than eth0, so rewriting the destination address would cause the packets to just be dropped by the interface
protocol = [ "udp" "tcp" ];
visibleTo.lan = true;
description = "colin-redirected-dns-for-lan-namespace";
};
}
{
systemd.services =
let
sed = "${pkgs.gnused}/bin/sed";
stateDir = "/var/lib/trust-dns";
zoneTemplate = pkgs.writeText "uninsane.org.zone.in" config.sane.dns.zones."uninsane.org".rendered;
zoneDirFor = flavor: "${stateDir}/${flavor}";
zoneFor = flavor: "${zoneDirFor flavor}/uninsane.org.zone";
mkTrustDnsService = opts: flavor: let
flags = let baseCfg = config.services.trust-dns; in
(lib.optional baseCfg.debug "--debug") ++ (lib.optional baseCfg.quiet "--quiet");
flagsStr = builtins.concatStringsSep " " flags;
anative = nativeAddrs."servo.${flavor}";
toml = pkgs.formats.toml { };
configTemplate = opts.config or (toml.generate "trust-dns-${flavor}.toml" (
(
lib.filterAttrsRecursive (_: v: v != null) config.services.trust-dns.settings
) // {
listen_addrs_ipv4 = opts.listen or [ anative ];
}
));
configFile = "${stateDir}/${flavor}-config.toml";
port = opts.port or 53;
in {
description = "trust-dns Domain Name Server (serving ${flavor})";
unitConfig.Documentation = "https://trust-dns.org/";
preStart = ''
wan=$(cat '${config.sane.services.dyn-dns.ipPath}')
${sed} s/%AWAN%/$wan/ ${configTemplate} > ${configFile}
'' + lib.optionalString (!opts ? config) ''
mkdir -p ${zoneDirFor flavor}
${sed} \
-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/${pkgs.trust-dns.meta.mainProgram} \
--port ${builtins.toString port} \
--zonedir ${zoneDirFor flavor}/ \
--config ${configFile} ${flagsStr}
'';
};
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
};
in {
trust-dns-wan = mkTrustDnsService { listen = [ nativeAddrs."servo.lan" bindOvpn ]; } "wan";
trust-dns-lan = mkTrustDnsService { port = 1053; } "lan";
trust-dns-hn = mkTrustDnsService { port = 1053; } "hn";
trust-dns-hn-resolver = mkTrustDnsService {
config = pkgs.writeText "hn-resolver-config.toml" ''
# i host a resolver in the wireguard VPN so that clients can resolve DNS through the VPN.
# (that's what this file achieves).
#
# one would expect this resolver could host the authoritative zone for `uninsane.org`, and then forward everything else to the system resolver...
# and while that works for `dig`, it breaks for `nslookup` (and so `ssh`, etc).
#
# DNS responses include a flag for if the responding server is the authority of the zone queried.
# it seems that default Linux stub resolvers either:
# - expect DNSSEC when the response includes that bit, or
# - expect A records to be in the `answer` section instead of `additional` section.
# or perhaps something more nuanced. but for `nslookup` to be reliable, it has to talk to an
# instance of trust-dns which is strictly a resolver, with no authority.
# hence, this config: a resolver which forwards to the actual authority.
listen_addrs_ipv4 = ["${nativeAddrs."servo.hn"}"]
listen_addrs_ipv6 = []
[[zones]]
zone = "uninsane.org"
zone_type = "Forward"
stores = { type = "forward", name_servers = [{ socket_addr = "${nativeAddrs."servo.hn"}:1053", protocol = "udp", trust_nx_responses = true }] }
[[zones]]
# forward the root zone to the local DNS resolver
zone = "."
zone_type = "Forward"
stores = { type = "forward", name_servers = [{ socket_addr = "127.0.0.53:53", protocol = "udp", trust_nx_responses = true }] }
'';
} "hn-resolver";
};
sane.services.dyn-dns.restartOnChange = [
"trust-dns-wan.service"
"trust-dns-lan.service"
"trust-dns-hn.service"
# "trust-dns-hn-resolver.service" # doesn't need restart because it doesn't know about WAN IP
];
}
]

View File

@@ -3,8 +3,9 @@
imports = [
./feeds.nix
./fs.nix
./hardware.nix
./hardware
./home
./hosts.nix
./ids.nix
./machine-id.nix
./net.nix
@@ -13,7 +14,7 @@
./programs
./secrets.nix
./ssh.nix
./users.nix
./users
./vpn.nix
];
@@ -23,9 +24,6 @@
sane.programs.sysadminUtils.enableFor.system = lib.mkDefault true;
sane.programs.consoleUtils.enableFor.user.colin = lib.mkDefault true;
# some services which use private directories error if the parent (/var/lib/private) isn't 700.
sane.fs."/var/lib/private".dir.acl.mode = "0700";
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowBroken = true; # NIXPKGS_ALLOW_BROKEN
@@ -43,48 +41,47 @@
# does the builder use some content-addressed db to efficiently dedupe?
nix.settings.auto-optimise-store = true;
fonts = {
enableDefaultFonts = true;
fonts = with pkgs; [ font-awesome noto-fonts-emoji hack-font ];
fontconfig.enable = true;
fontconfig.defaultFonts = {
emoji = [ "Font Awesome 6 Free" "Noto Color Emoji" ];
monospace = [ "Hack" ];
serif = [ "DejaVu Serif" ];
sansSerif = [ "DejaVu Sans" ];
};
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
# kill nix-daemon subprocesses when systemd-oomd detects an out-of-memory condition
# see:
# - nixos PR that enabled systemd-oomd: <https://github.com/NixOS/nixpkgs/pull/169613>
# - systemd's docs on these properties: <https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#ManagedOOMSwap=auto%7Ckill>
#
# systemd's docs warn that without swap, systemd-oomd might not be able to react quick enough to save the system.
# see `man oomd.conf` for further tunables that may help.
#
# alternatively, apply this more broadly with `systemd.oomd.enableSystemSlice = true` or `enableRootSlice`
# TODO: also apply this to the guest user's slice (user-1100.slice)
# TODO: also apply this to distccd
ManagedOOMMemoryPressure = "kill";
ManagedOOMSwap = "kill";
};
# XXX: twitter-color-emoji doesn't cross-compile; but not-fonts-emoji does
# fonts = {
# enableDefaultFonts = true;
# fonts = with pkgs; [ font-awesome twitter-color-emoji hack-font ];
# fontconfig.enable = true;
# fontconfig.defaultFonts = {
# emoji = [ "Font Awesome 6 Free" "Twitter Color Emoji" ];
# monospace = [ "Hack" ];
# serif = [ "DejaVu Serif" ];
# sansSerif = [ "DejaVu Sans" ];
# };
# };
system.activationScripts.nixClosureDiff = {
supportsDryActivation = true;
text = ''
# show which packages changed versions or are new/removed in this upgrade
# source: <https://github.com/luishfonseca/dotfiles/blob/32c10e775d9ec7cc55e44592a060c1c9aadf113e/modules/upgrade-diff.nix>
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
'';
};
# disable non-required packages like nano, perl, rsync, strace
environment.defaultPackages = [];
# programs.vim.defaultEditor = true;
environment.variables = {
EDITOR = "vim";
# git claims it should use EDITOR, but it doesn't!
GIT_EDITOR = "vim";
# TODO: these should be moved to `home.sessionVariables` (home-manager)
# Electron apps should use native wayland backend:
# https://nixos.wiki/wiki/Slack#Wayland
# Discord under sway crashes with this.
# NIXOS_OZONE_WL = "1";
# LIBGL_ALWAYS_SOFTWARE = "1";
};
# dconf docs: <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/profiles>
# this lets programs temporarily write user-level dconf settings (aka gsettings).
# they're written to ~/.config/dconf/user, unless `DCONF_PROFILE` is set to something other than the default of /etc/dconf/profile/user
# find keys/values with `dconf dump /`
programs.dconf.enable = true;
programs.dconf.packages = [
@@ -97,6 +94,7 @@
'';
})
];
# sane.programs.glib.enableFor.user.colin = true; # for `gsettings`
# link debug symbols into /run/current-system/sw/lib/debug
# hopefully picked up by gdb automatically?

View File

@@ -1,3 +1,7 @@
# where to find good stuff?
# - podcasts w/ a community: <https://lemmyverse.net/communities?query=podcast>
# - podcast rec thread: <https://lemmy.ml/post/1565858>
#
# candidates:
# - The Nonlinear Library (podcast): <https://forum.effectivealtruism.org/posts/JTZTBienqWEAjGDRv/listen-to-more-ea-content-with-the-nonlinear-library>
# - has ~10 posts per day, text-to-speech; i would need better tagging before adding this
@@ -53,71 +57,62 @@ 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)
(fromDb "congressionaldish.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; also available: <rss.acast.com/deconstructed>
(fromDb "rss.prod.firstlook.media/deconstructed/podcast.rss" // pol)
## The Daily
(mkPod "https://feeds.simplecast.com/54nAGcIl" // pol // daily)
# The Intercept - Intercepted; also available: <https://rss.acast.com/intercepted-with-jeremy-scahill>
(fromDb "rss.prod.firstlook.media/intercepted/podcast.rss" // pol)
(fromDb "podcast.posttv.com/itunes/post-reports.xml" // pol)
## Eric Weinstein
(fromDb "rss.art19.com/the-portal" // rat)
(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)
## 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 "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.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)
(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)
## The Verge - Decoder
(fromDb "feeds.megaphone.fm/recodedecode" // tech)
## Matrix (chat) Live
(fromDb "feed.podbean.com/matrixlive/feed.xml" // tech)
## Michael Malice - Your Welcome -- also available here: <https://origin.podcastone.com/podcast?categoryID2=2232>
(fromDb "rss.art19.com/your-welcome" // 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)
(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 = [
# AGGREGATORS (> 1 post/day)
(fromDb "lwn.net" // tech)
(fromDb "lesswrong.com" // rat)
# (fromDb "lesswrong.com" // rat)
# (fromDb "econlib.org" // pol)
# AGGREGATORS (< 1 post/day)
@@ -127,7 +122,7 @@ let
(mkText "https://linuxphoneapps.org/blog/atom.xml" // tech // infrequent)
(fromDb "tuxphones.com" // tech)
(fromDb "spectrum.ieee.org" // tech)
(fromDb "theregister.com" // tech)
# (fromDb "theregister.com" // tech)
(fromDb "thisweek.gnome.org" // tech)
# more nixos stuff here, but unclear how to subscribe: <https://nixos.org/blog/categories.html>
(mkText "https://nixos.org/blog/announcements-rss.xml" // tech // infrequent)
@@ -143,6 +138,8 @@ let
(fromDb "uninsane.org" // tech)
(fromDb "ascii.textfiles.com" // tech) # Jason Scott
(fromDb "xn--gckvb8fzb.com" // tech)
(fromDb "amosbbatto.wordpress.com" // tech)
(fromDb "fasterthanli.me" // tech)
(fromDb "mg.lol" // tech)
# (fromDb "drewdevault.com" // tech)
## Ken Shirriff
@@ -153,16 +150,20 @@ 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)
(fromDb "ianthehenry.com" // tech)
(fromDb "bitbashing.io" // tech)
(fromDb "idiomdrottning.org" // uncat)
(mkText "http://boginjr.com/feed" // tech // infrequent)
(mkText "https://anish.lakhwara.com/home.html" // tech // weekly)
(fromDb "jefftk.com" // tech)
(fromDb "pomeroyb.com" // tech)
(mkText "https://til.simonwillison.net/tils/feed.atom" // tech // weekly)
(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
(fromDb "blog.rust-lang.org" // tech)
@@ -212,6 +213,7 @@ let
(fromDb "preposterousuniverse.com" // rat)
(mkSubstack "eliqian" // rat // weekly)
(mkText "https://acoup.blog/feed" // rat // weekly)
(fromDb "mindingourway.com" // rat)
## mostly dating topics. not advice, or humor, but looking through a social lens
(fromDb "putanumonit.com" // rat)
@@ -226,6 +228,7 @@ let
images = [
(fromDb "smbc-comics.com" // img // humor)
(fromDb "xkcd.com" // img // humor)
(fromDb "turnoff.us" // img // humor)
(fromDb "pbfcomics.com" // img // humor)
# (mkImg "http://dilbert.com/feed" // humor // daily)
(fromDb "poorlydrawnlines.com/feed" // img // humor)

View File

@@ -1,74 +1,143 @@
{ pkgs, ... }:
# docs
# - x-systemd options: <https://www.freedesktop.org/software/systemd/man/systemd.mount.html>
let sshOpts = rec {
fsType = "fuse.sshfs";
optionsBase = [
"x-systemd.automount"
"_netdev"
"user"
"identityfile=/home/colin/.ssh/id_ed25519"
"allow_other"
"default_permissions"
];
optionsColin = optionsBase ++ [
"transform_symlinks"
"idmap=user"
"uid=1000"
"gid=100"
];
{ lib, pkgs, sane-lib, ... }:
optionsRoot = optionsBase ++ [
# we don't transform_symlinks because that breaks the validity of remote /nix stores
"sftp_server=/run/wrappers/bin/sudo\\040/run/current-system/sw/libexec/sftp-server"
];
};
let
fsOpts = rec {
common = [
"_netdev"
"noatime"
"user" # allow any user with access to the device to mount the fs
"x-systemd.requires=network-online.target"
"x-systemd.after=network-online.target"
"x-systemd.mount-timeout=10s" # how long to wait for mount **and** how long to wait for unmount
];
auto = [ "x-systemd.automount" ];
noauto = [ "noauto" ]; # don't mount as part of remote-fs.target
wg = [
"x-systemd.requires=wireguard-wg-home.service"
"x-systemd.after=wireguard-wg-home.service"
];
ssh = common ++ [
"identityfile=/home/colin/.ssh/id_ed25519"
"allow_other"
"default_permissions"
];
sshColin = ssh ++ [
"transform_symlinks"
"idmap=user"
"uid=1000"
"gid=100"
];
sshRoot = ssh ++ [
# we don't transform_symlinks because that breaks the validity of remote /nix stores
"sftp_server=/run/wrappers/bin/sudo\\040/run/current-system/sw/libexec/sftp-server"
];
# in the event of hunt NFS mounts, consider:
# - <https://unix.stackexchange.com/questions/31979/stop-broken-nfs-mounts-from-locking-a-directory>
# NFS options: <https://linux.die.net/man/5/nfs>
# actimeo=n = how long (in seconds) to cache file/dir attributes (default: 3-60s)
# bg = retry failed mounts in the background
# retry=n = for how many minutes `mount` will retry NFS mount operation
# soft = on "major timeout", report I/O error to userspace
# retrans=n = how many times to retry a NFS request before giving userspace a "server not responding" error (default: 3)
# timeo=n = number of *deciseconds* to wait for a response before retrying it (default: 600)
# note: client uses a linear backup, so the second request will have double this timeout, then triple, etc.
nfs = common ++ [
# "actimeo=10"
"bg"
"retrans=4"
"retry=0"
"soft"
"timeo=15"
"nofail" # don't fail remote-fs.target when this mount fails (not an option for sshfs else would be common)
];
};
remoteHome = host: {
fileSystems."/mnt/${host}-home" = {
device = "colin@${host}:/home/colin";
fsType = "fuse.sshfs";
options = fsOpts.sshColin ++ fsOpts.noauto;
noCheck = true;
};
sane.fs."/mnt/${host}-home" = sane-lib.fs.wantedDir;
};
in
{
environment.pathsToLink = [
# needed to achieve superuser access for user-mounted filesystems (see optionsRoot above)
# we can only link whole directories here, even though we're only interested in pkgs.openssh
"/libexec"
];
lib.mkMerge [
{
# some services which use private directories error if the parent (/var/lib/private) isn't 700.
sane.fs."/var/lib/private".dir.acl.mode = "0700";
fileSystems."/mnt/servo-media-wan" = {
device = "colin@uninsane.org:/var/lib/uninsane/media";
inherit (sshOpts) fsType;
options = sshOpts.optionsColin;
noCheck = true;
};
fileSystems."/mnt/servo-media-lan" = {
device = "colin@servo:/var/lib/uninsane/media";
inherit (sshOpts) fsType;
options = sshOpts.optionsColin;
noCheck = true;
};
fileSystems."/mnt/servo-root-wan" = {
device = "colin@uninsane.org:/";
inherit (sshOpts) fsType;
options = sshOpts.optionsRoot;
noCheck = true;
};
fileSystems."/mnt/servo-root-lan" = {
device = "colin@servo:/";
inherit (sshOpts) fsType;
options = sshOpts.optionsRoot;
noCheck = true;
};
fileSystems."/mnt/desko-home" = {
device = "colin@desko:/home/colin";
inherit (sshOpts) fsType;
options = sshOpts.optionsColin;
noCheck = true;
};
fileSystems."/mnt/desko-root" = {
device = "colin@desko:/";
inherit (sshOpts) fsType;
options = sshOpts.optionsRoot;
noCheck = true;
};
# in-memory compressed RAM
# defaults to compressing at most 50% size of RAM
# claimed compression ratio is about 2:1
# - but on moby w/ zstd default i see 4-7:1 (ratio lowers as it fills)
# note that idle overhead is about 0.05% of capacity (e.g. 2B per 4kB page)
# docs: <https://www.kernel.org/doc/Documentation/blockdev/zram.txt>
#
# to query effectiveness:
# `cat /sys/block/zram0/mm_stat`. whitespace separated fields:
# - *orig_data_size* (bytes)
# - *compr_data_size* (bytes)
# - mem_used_total (bytes)
# - mem_limit (bytes)
# - mem_used_max (bytes)
# - *same_pages* (pages which are e.g. all zeros (consumes no additional mem))
# - *pages_compacted* (pages which have been freed thanks to compression)
# - huge_pages (incompressible)
#
# see also:
# - `man zramctl`
zramSwap.enable = true;
# how much ram can be swapped into the zram device.
# this shouldn't be higher than the observed compression ratio.
# the default is 50% (why?)
# 100% should be "guaranteed" safe so long as the data is even *slightly* compressible.
# but it decreases working memory under the heaviest of loads by however much space the compressed memory occupies (e.g. 50% if 2:1; 25% if 4:1)
zramSwap.memoryPercent = 100;
environment.systemPackages = [
pkgs.sshfs-fuse
];
}
# fileSystems."/mnt/servo-nfs" = {
# device = "servo-hn:/";
# noCheck = true;
# fsType = "nfs";
# options = fsOpts.nfs ++ fsOpts.auto ++ fsOpts.wg;
# };
fileSystems."/mnt/servo-nfs/media" = {
device = "servo-hn:/media";
noCheck = true;
fsType = "nfs";
options = fsOpts.nfs ++ fsOpts.auto ++ fsOpts.wg;
};
fileSystems."/mnt/servo-nfs/playground" = {
device = "servo-hn:/playground";
noCheck = true;
fsType = "nfs";
options = fsOpts.nfs ++ fsOpts.auto ++ fsOpts.wg;
};
# fileSystems."/mnt/servo-media-nfs" = {
# device = "servo-hn:/media";
# noCheck = true;
# fsType = "nfs";
# options = fsOpts.common ++ fsOpts.auto;
# };
sane.fs."/mnt/servo-media" = sane-lib.fs.wantedSymlinkTo "/mnt/servo-nfs/media";
environment.pathsToLink = [
# needed to achieve superuser access for user-mounted filesystems (see optionsRoot above)
# we can only link whole directories here, even though we're only interested in pkgs.openssh
"/libexec"
];
environment.systemPackages = [
pkgs.sshfs-fuse
];
}
(remoteHome "desko")
(remoteHome "lappy")
(remoteHome "moby")
]

View File

@@ -1,45 +0,0 @@
{ lib, pkgs, ... }:
{
boot.initrd.supportedFilesystems = [ "ext4" "btrfs" "ext2" "ext3" "vfat" ];
# useful emergency utils
boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.btrfs-progs}/bin/btrfstune
'';
boot.kernelParams = [ "boot.shell_on_fail" ];
# other kernelParams:
# "boot.trace"
# "systemd.log_level=debug"
# "systemd.log_target=console"
# hack in the `boot.shell_on_fail` arg since that doesn't always seem to work.
boot.initrd.preFailCommands = "allowShell=1";
# default: 4 (warn). 7 is debug
boot.consoleLogLevel = 7;
boot.loader.grub.enable = lib.mkDefault false;
boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true;
# non-free firmware
hardware.enableRedistributableFirmware = true;
services.fwupd.enable = true;
# powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS
powerManagement.powertop.enable = false;
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
# services.snapper.configs = {
# root = {
# subvolume = "/";
# extraConfig = {
# ALLOW_USERS = "colin";
# };
# };
# };
# services.snapper.snapshotInterval = "daily";
}

View File

@@ -0,0 +1,73 @@
{ lib, pkgs, ... }:
{
imports = [
./x86_64.nix
];
boot.initrd.supportedFilesystems = [ "ext4" "btrfs" "ext2" "ext3" "vfat" ];
# 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.nvme-cli}/bin/nvme
copy_bin_and_libs ${pkgs.e2fsprogs}/bin/resize2fs
'';
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"
# "systemd.log_target=console"
# hack in the `boot.shell_on_fail` arg since that doesn't always seem to work.
boot.initrd.preFailCommands = "allowShell=1";
# default: 4 (warn). 7 is debug
boot.consoleLogLevel = 7;
boot.loader.grub.enable = lib.mkDefault false;
boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true;
# non-free firmware
hardware.enableRedistributableFirmware = true;
# powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS
powerManagement.powertop.enable = false;
# linux CPU governor: <https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt>
# - options:
# - "powersave" => force CPU to always run at lowest supported frequency
# - "performance" => force CPU to always run at highest frequency
# - "ondemand" => adjust frequency based on load
# - "conservative" (ondemand but slower to adjust)
# - "schedutil"
# - "userspace"
# - not all options are available for all platforms
# - intel (intel_pstate) appears to manage scaling w/o intervention/control from the OS.
# - AMD (acpi-cpufreq) appears to manage scaling via the OS *or* HW. but the ondemand defaults never put it to max hardware frequency.
# - qualcomm (cpufreq-dt) appears to manage scaling *only* via the OS. ondemand governor exercises the full range.
# - query details with `sudo cpupower frequency-info`
powerManagement.cpuFreqGovernor = "ondemand";
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
# services.snapper.configs = {
# root = {
# subvolume = "/";
# extraConfig = {
# ALLOW_USERS = "colin";
# };
# };
# };
# services.snapper.snapshotInterval = "daily";
}

View File

@@ -9,12 +9,7 @@
# efi_pstore evivars
];
powerManagement.cpuFreqGovernor = "powersave";
hardware.cpu.amd.updateMicrocode = true; # desktop
hardware.cpu.intel.updateMicrocode = true; # laptop
hardware.opengl.driSupport = true;
# For 32 bit applications
hardware.opengl.driSupport32Bit = true;
};
}

View File

@@ -1,7 +1,7 @@
{ ... }:
{
imports = [
./keyring.nix
./keyring
./mime.nix
./ssh.nix
./xdg-dirs.nix

View File

@@ -1,11 +0,0 @@
{ config, sane-lib, ... }:
{
sane.user.persist.private = [ ".local/share/keyrings" ];
sane.user.fs."private/.local/share/keyrings/default" = {
generated.script.script = builtins.readFile ../../../scripts/init-keyring;
# TODO: is this `wantedBy` needed? can we inherit it?
wantedBy = [ config.sane.fs."/home/colin/private".unit ];
};
}

View File

@@ -0,0 +1,17 @@
{ config, pkgs, sane-lib, ... }:
let
init-keyring = pkgs.static-nix-shell.mkBash {
pname = "init-keyring";
src = ./.;
};
in
{
sane.user.persist.byStore.private = [ ".local/share/keyrings" ];
sane.user.fs."private/.local/share/keyrings/default" = {
generated.command = [ "${init-keyring}/bin/init-keyring" ];
wantedBy = [ config.sane.fs."/home/colin/private".unit ];
wantedBeforeBy = [ ]; # don't created this as part of `multi-user.target`
};
}

View File

@@ -1,4 +1,5 @@
#!/bin/sh
#!/usr/bin/env nix-shell
#!nix-shell -i bash
# initializes the default libsecret keyring (used by gnome-keyring) if not already initialized.
# this initializes it to be plaintext/unencrypted.

View File

@@ -1,43 +1,28 @@
{ config, sane-lib, ...}:
{ config, lib, ...}:
let
www = config.sane.programs.web-browser.config.browser.desktop;
pdf = "org.gnome.Evince.desktop";
md = "obsidian.desktop";
thumb = "org.gnome.gThumb.desktop";
video = "vlc.desktop";
# audio = "mpv.desktop";
audio = "vlc.desktop";
# ProgramConfig -> { "<mime-type>" = { priority, desktop }; }
weightedMimes = prog: builtins.mapAttrs (_key: desktop: { priority = prog.mime.priority; desktop = desktop; }) prog.mime.associations;
# [ { "<mime-type>" = { priority, desktop } ]; } ] -> { "<mime-type>" = [ { priority, desktop } ... ]; }
mergeMimes = mimes: lib.foldAttrs (item: acc: [item] ++ acc) [] mimes;
# [ { priority, desktop } ... ] -> Self
sortOneMimeType = associations: builtins.sort (l: r: assert l.priority != r.priority; l.priority < r.priority) associations;
sortMimes = mimes: builtins.mapAttrs (_k: sortOneMimeType) mimes;
removePriorities = mimes: builtins.mapAttrs (_k: associations: builtins.map (a: a.desktop) associations) mimes;
# [ ProgramConfig ]
enabledPrograms = builtins.filter (p: p.enabled) (builtins.attrValues config.sane.programs);
# [ { "<mime-type>" = { prority, desktop } ]
enabledWeightedMimes = builtins.map weightedMimes enabledPrograms;
in
{
# the xdg mime type for a file can be found with:
# - `xdg-mime query filetype path/to/thing.ext`
# the default handler for a mime type can be found with:
# - `xdg-mime query default <mimetype>` (e.g. x-scheme-handler/http)
#
# we can have single associations or a list of associations.
# there's also options to *remove* [non-default] associations from specific apps
xdg.mime.enable = true;
xdg.mime.defaultApplications = {
# AUDIO
"audio/flac" = audio;
"audio/mpeg" = audio;
"audio/x-vorbis+ogg" = audio;
# IMAGES
"image/heif" = thumb; # apple codec
"image/png" = thumb;
"image/jpeg" = thumb;
# VIDEO
"video/mp4" = video;
"video/quicktime" = video;
"video/webm" = video;
"video/x-matroska" = video;
# HTML
"text/html" = www;
"x-scheme-handler/http" = www;
"x-scheme-handler/https" = www;
"x-scheme-handler/about" = www;
"x-scheme-handler/unknown" = www;
# RICH-TEXT DOCUMENTS
"application/pdf" = pdf;
"text/markdown" = md;
};
xdg.mime.defaultApplications = removePriorities (sortMimes (mergeMimes enabledWeightedMimes));
}

View File

@@ -1,26 +1,29 @@
{ config, lib, sane-lib, ... }:
# TODO: this should be moved to users/colin.nix
{ config, lib, ... }:
with lib;
let
host = config.networking.hostName;
user-pubkey-full = config.sane.ssh.pubkeys."colin@${host}" or {};
user-pubkey = user-pubkey-full.asUserKey or null;
host-keys = filter (k: k.user == "root") (attrValues config.sane.ssh.pubkeys);
known-hosts-text = concatStringsSep
host-keys = lib.filter (k: k.user == "root") (lib.attrValues config.sane.ssh.pubkeys);
known-hosts-text = lib.concatStringsSep
"\n"
(map (k: k.asHostKey) host-keys)
(builtins.map (k: k.asHostKey) host-keys)
;
in
{
# ssh key is stored in private storage
sane.user.persist.private = [ ".ssh/id_ed25519" ];
sane.user.fs.".ssh/id_ed25519.pub" =
mkIf (user-pubkey != null) (sane-lib.fs.wantedText user-pubkey);
sane.user.fs.".ssh/known_hosts" = sane-lib.fs.wantedText known-hosts-text;
sane.user.persist.byStore.private = [
{ type = "file"; path = ".ssh/id_ed25519"; }
];
sane.user.fs.".ssh/id_ed25519.pub" = lib.mkIf (user-pubkey != null) {
symlink.text = user-pubkey;
};
sane.user.fs.".ssh/known_hosts".symlink.text = known-hosts-text;
users.users.colin.openssh.authorizedKeys.keys =
let
user-keys = filter (k: k.user == "colin") (attrValues config.sane.ssh.pubkeys);
user-keys = lib.filter (k: k.user == "colin") (lib.attrValues config.sane.ssh.pubkeys);
in
map (k: k.asUserKey) user-keys;
builtins.map (k: k.asUserKey) user-keys;
}

View File

@@ -1,9 +1,9 @@
{ lib, sane-lib, ...}:
{ ... }:
{
# XDG defines things like ~/Desktop, ~/Downloads, etc.
# these clutter the home, so i mostly don't use them.
sane.user.fs.".config/user-dirs.dirs" = sane-lib.fs.wantedText ''
sane.user.fs.".config/user-dirs.dirs".symlink.text = ''
XDG_DESKTOP_DIR="$HOME/.xdg/Desktop"
XDG_DOCUMENTS_DIR="$HOME/dev"
XDG_DOWNLOAD_DIR="$HOME/tmp"
@@ -16,5 +16,5 @@
# prevent `xdg-user-dirs-update` from overriding/updating our config
# see <https://manpages.ubuntu.com/manpages/bionic/man5/user-dirs.conf.5.html>
sane.user.fs.".config/user-dirs.conf" = sane-lib.fs.wantedText "enabled=False";
sane.user.fs.".config/user-dirs.conf".symlink.text = "enabled=False";
}

39
hosts/common/hosts.nix Normal file
View File

@@ -0,0 +1,39 @@
{ lib, ... }:
{
# TODO: this should be populated per-host
sane.hosts.by-name."desko" = {
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPU5GlsSfbaarMvDA20bxpSZGWviEzXGD8gtrIowc1pX";
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFw9NoRaYrM6LbDd3aFBc4yyBlxGQn8HjeHd/dZ3CfHk";
wg-home.pubkey = "17PMZssYi0D4t2d0vbmhjBKe1sGsE8kT8/dod0Q2CXc=";
wg-home.ip = "10.0.10.22";
lan-ip = "10.78.79.52";
};
sane.hosts.by-name."lappy" = {
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDpmFdNSVPRol5hkbbCivRhyeENzb9HVyf9KutGLP2Zu";
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILSJnqmVl9/SYQ0btvGb0REwwWY8wkdkGXQZfn/1geEc";
wg-home.pubkey = "FTUWGw2p4/cEcrrIE86PWVnqctbv8OYpw8Gt3+dC/lk=";
wg-home.ip = "10.0.10.20";
lan-ip = "10.78.79.53";
};
sane.hosts.by-name."moby" = {
ssh.authorized = lib.mkDefault false; # moby's too easy to hijack: don't let it ssh places
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICrR+gePnl0nV/vy7I5BzrGeyVL+9eOuXHU1yNE3uCwU";
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1N/IT3nQYUD+dBlU1sTEEVMxfOyMkrrDeyHcYgnJvw";
wg-home.pubkey = "I7XIR1hm8bIzAtcAvbhWOwIAabGkuEvbWH/3kyIB1yA=";
wg-home.ip = "10.0.10.48";
lan-ip = "10.78.79.54";
};
sane.hosts.by-name."servo" = {
ssh.authorized = lib.mkDefault false; # servo presents too many services to the internet: easy atack vector
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPS1qFzKurAdB9blkWomq8gI1g0T3sTs9LsmFOj5VtqX";
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOfdSmFkrVT6DhpgvFeQKm3Fh9VKZ9DbLYOPOJWYQ0E8";
wg-home.pubkey = "roAw+IUFVtdpCcqa4khB385Qcv9l5JAB//730tyK4Wk=";
wg-home.ip = "10.0.10.5";
wg-home.endpoint = "uninsane.org:51820";
lan-ip = "10.78.79.51";
};
}

View File

@@ -40,6 +40,15 @@
sane.ids.lemmy.gid = 2408;
sane.ids.pict-rs.uid = 2409;
sane.ids.pict-rs.gid = 2409;
sane.ids.sftpgo.uid = 2410;
sane.ids.sftpgo.gid = 2410;
sane.ids.trust-dns.uid = 2411;
sane.ids.trust-dns.gid = 2411;
sane.ids.export.gid = 2412;
sane.ids.nfsuser.uid = 2413;
sane.ids.media.gid = 2414;
sane.ids.ntfy-sh.uid = 2415;
sane.ids.ntfy-sh.gid = 2415;
sane.ids.colin.uid = 1000;
sane.ids.guest.uid = 1100;
@@ -77,4 +86,8 @@
sane.ids.rtkit.gid = 2307;
# phosh
sane.ids.feedbackd.gid = 2308;
# new moby users
sane.ids.eg25-control.uid = 2309;
sane.ids.eg25-control.gid = 2309;
}

View File

@@ -11,17 +11,37 @@
# - `man iwd.config` for global config
# - `man iwd.network` for per-SSID config
# use `iwctl` to control
networking.networkmanager.wifi.backend = "iwd";
networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = {
# auto-connect to a stronger network if signal drops below this value
# bedroom -> bedroom connection is -35 to -40 dBm
# bedroom -> living room connection is -60 dBm
General.RoamThreshold = "-52"; # default -70
General.RoamThreshold5G = "-52"; # default -76
};
# networking.networkmanager.wifi.backend = "iwd";
# networking.wireless.iwd.enable = true;
# networking.wireless.iwd.settings = {
# # auto-connect to a stronger network if signal drops below this value
# # bedroom -> bedroom connection is -35 to -40 dBm
# # bedroom -> living room connection is -60 dBm
# General.RoamThreshold = "-52"; # default -70
# General.RoamThreshold5G = "-52"; # default -76
# };
# plugins mostly add support for establishing different VPN connections.
# the default plugin set includes mostly proprietary VPNs:
# - fortisslvpn (Fortinet)
# - iodine (DNS tunnels)
# - l2tp
# - openconnect (Cisco Anyconnect / Juniper / ocserv)
# - openvpn
# - vpnc (Cisco VPN)
# - sstp
#
# i don't use these, and notably they drag in huge dependency sets and don't cross compile well.
# e.g. openconnect drags in webkitgtk (for SSO)!
networking.networkmanager.plugins = lib.mkForce [];
networking.firewall.allowedUDPPorts = [
1900 # to received UPnP advertisements. required by sane-ip-check-upnp
];
# keyfile.path = where networkmanager should look for connection credentials
networking.networkmanager.extraConfig = ''
[keyfile]
path=/var/lib/NetworkManager/system-connections
'';
}

View File

@@ -5,6 +5,9 @@
nix.nixPath = [
"nixpkgs=${pkgs.path}"
# note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root
"nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay"
# "nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay"
# as long as my system itself doesn't rely on NIXPKGS at runtime, we can point the overlays to git
# to avoid switching so much during development
"nixpkgs-overlays=/home/colin/dev/nixos/hosts/common/nix-path/overlay"
];
}

View File

@@ -5,14 +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
# TODO: move elsewhere
"/var/lib/alsa" # preserve output levels, default devices
"/var/lib/colord" # preserve color calibrations (?)
"/var/lib/machines" # maybe not needed, but would be painful to add a VM and forget.
"/var/lib/systemd/backlight" # backlight brightness
];
sane.persist.sys.byStore.cryptClearOnBoot = [
"/var/lib/systemd/coredump"
];
}

View File

@@ -2,5 +2,8 @@
{ ... }:
{
sane.programs.aerc.secrets.".config/aerc/accounts.conf" = ../../../secrets/common/aerc_accounts.conf.bin;
sane.programs.aerc = {
secrets.".config/aerc/accounts.conf" = ../../../secrets/common/aerc_accounts.conf.bin;
mime.associations."x-scheme-handler/mailto" = "aerc.desktop";
};
}

View File

@@ -0,0 +1,24 @@
# alacritty terminal emulator
# - config options: <https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd>
# - `man 5 alacritty`
# - defaults: <https://github.com/alacritty/alacritty/releases> -> alacritty.yml
# - irc: #alacritty on libera.chat
{ lib, ... }:
{
sane.programs.alacritty = {
env.TERMINAL = lib.mkDefault "alacritty";
# note: alacritty will switch to .toml config in 13.0 release
# - run `alacritty migrate` to convert the yaml to toml
fs.".config/alacritty/alacritty.yml".symlink.text = ''
font:
size: 14
key_bindings:
- { key: N, mods: Control, action: CreateNewWindow }
- { key: PageUp, mods: Control, action: ScrollPageUp }
- { key: PageDown, mods: Control, action: ScrollPageDown }
- { key: PageUp, mods: Control|Shift, action: ScrollPageUp }
- { key: PageDown, mods: Control|Shift, action: ScrollPageDown }
'';
};
}

View File

@@ -1,381 +1,277 @@
{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
inherit (builtins) attrNames;
flattenedPkgs = pkgs // (with pkgs; {
# XXX can't `inherit` a nested attr, so we move them to the toplevel
"cacert.unbundled" = pkgs.cacert.unbundled;
"gnome.cheese" = gnome.cheese;
"gnome.dconf-editor" = gnome.dconf-editor;
"gnome.file-roller" = gnome.file-roller;
"gnome.gnome-disk-utility" = gnome.gnome-disk-utility;
"gnome.gnome-maps" = gnome.gnome-maps;
"gnome.nautilus" = gnome.nautilus;
"gnome.gnome-system-monitor" = gnome.gnome-system-monitor;
"gnome.gnome-terminal" = gnome.gnome-terminal;
"gnome.gnome-weather" = gnome.gnome-weather;
"gnome.totem" = gnome.totem;
"libsForQt5.plasmatube" = libsForQt5.plasmatube;
});
sysadminPkgs = {
inherit (flattenedPkgs)
btrfs-progs
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
cryptsetup
dig
efibootmgr
fatresize
fd
file
gawk
git
gptfdisk
hdparm
htop
iftop
inetutils # for telnet
iotop
iptables
jq
killall
lsof
miniupnpc
nano
netcat
nethogs
nmap
openssl
parted
pciutils
powertop
pstree
ripgrep
screen
smartmontools
socat
strace
subversion
tcpdump
tree
usbutils
wget
wirelesstools # iwlist
;
declPackageSet = pkgs: {
package = null;
suggestedPrograms = pkgs;
};
sysadminExtraPkgs = {
# application-specific packages
inherit (pkgs)
backblaze-b2
duplicity
sqlite # to debug sqlite3 databases
;
};
iphonePkgs = {
inherit (pkgs)
ifuse
ipfs
libimobiledevice
;
};
tuiPkgs = {
inherit (pkgs)
aerc # email client
offlineimap # email mailox sync
visidata # TUI spreadsheet viewer/editor
w3m
;
};
consoleMediaPkgs = {
inherit (pkgs)
ffmpeg
imagemagick
sox
yt-dlp
;
};
# TODO: split these into smaller groups.
# - moby doesn't want a lot of these.
# - categories like
# - dev?
# - debugging?
consolePkgs = {
inherit (pkgs)
alsaUtils # for aplay, speaker-test
cdrtools
clinfo
dmidecode
efivar
flashrom
fwupd
gh # MS GitHub cli
git # needed as a user package, for config.
gnupg
gocryptfs
gopass # TODO: shouldn't be needed here
gopass-jsonapi
kitty # TODO: move to GUI, but `ssh servo` from kitty sets `TERM=xterm-kitty` in the remove and breaks things
libsecret # for managing user keyrings
lm_sensors # for sensors-detect
lshw
# memtester
neovim
# nettools
# networkmanager
nixpkgs-review
# nixos-generators
nmon
# node2nix
# oathToolkit # for oathtool
# ponymix
pulsemixer
python3
ripgrep # needed as a user package so that its user-level config file can be installed
rsync
# python3Packages.eyeD3 # music tagging
sane-scripts
sequoia
snapper
sops
speedtest-cli
# ssh-to-age
sudo
# tageditor # music tagging
unar
wireguard-tools
xdg-utils # for xdg-open
# yarn
zsh
;
};
guiPkgs = {
inherit (flattenedPkgs)
# celluloid # mpv frontend
# emote
evince # works on phosh
# { pkg = fluffychat-moby; persist.plaintext = [ ".local/share/chat.fluffy.fluffychat" ]; } # TODO: ship normal fluffychat on non-moby?
# foliate # e-book reader
# XXX by default fractal stores its state in ~/.local/share/<UUID>.
# after logging in, manually change ~/.local/share/keyrings/... to point it to some predictable subdir.
# then reboot (so that libsecret daemon re-loads the keyring...?)
# { pkg = fractal-latest; persist.private = [ ".local/share/fractal" ]; }
# { pkg = fractal-next; persist.private = [ ".local/share/fractal" ]; }
# "gnome.cheese"
# gnome-feeds # RSS reader (with claimed mobile support)
"gnome.file-roller"
# "gnome.gnome-maps" # works on phosh
"gnome.nautilus"
# gnome-podcasts
# "gnome.gnome-system-monitor"
# "gnome.gnome-terminal" # works on phosh
# "gnome.gnome-weather"
gpodder
gthumb
jellyfin-media-player
# lollypop
# mpv
# networkmanagerapplet
# newsflash
nheko
pavucontrol
# picard # music tagging
# "libsForQt5.plasmatube" # Youtube player
soundconverter
# sublime-music
# tdesktop # broken on phosh
# tokodon
vlc
# pleroma client (Electron). input is broken on phosh. TODO(2023/02/02): fix electron19 input (insecure)
# whalebird
xterm # broken on phosh
;
};
desktopGuiPkgs = {
inherit (flattenedPkgs)
audacity
brave # for the integrated wallet -- as a backup
chromium
dino
electrum
element-desktop
font-manager
gajim # XMPP client
gimp # broken on phosh
"gnome.dconf-editor"
"gnome.gnome-disk-utility"
# "gnome.totem" # video player, supposedly supports UPnP
handbrake
hase
inkscape
kdenlive
kid3 # audio tagging
krita
libreoffice-fresh
mumble
obsidian
slic3r
steam
wireshark # could maybe ship the cli as sysadmin pkg
;
};
x86GuiPkgs = {
inherit (pkgs)
discord
# kaiteki # Pleroma client
# gnome.zenity # for kaiteki (it will use qarma, kdialog, or zenity)
# gpt2tc # XXX: unreliable mirror
# logseq # Personal Knowledge Management
losslesscut-bin
makemkv
monero-gui
signal-desktop
spotify
tor-browser-bundle-bin
zecwallet-lite
;
};
# packages not part of any package set; not enabled by default
otherPkgs = {
inherit (pkgs)
lemmy-server
mx-sanebot
stepmania
;
};
# define -- but don't enable -- the packages in some attrset.
declarePkgs = pkgsAsAttrs: lib.mapAttrs (_n: p: {
# no need to actually define the package here: it's defaulted
# package = mkDefault p;
}) pkgsAsAttrs;
in
{
sane.programs = lib.mkMerge [
(declarePkgs consoleMediaPkgs)
(declarePkgs consolePkgs)
(declarePkgs desktopGuiPkgs)
(declarePkgs guiPkgs)
(declarePkgs iphonePkgs)
(declarePkgs sysadminPkgs)
(declarePkgs sysadminExtraPkgs)
(declarePkgs tuiPkgs)
(declarePkgs x86GuiPkgs)
(declarePkgs otherPkgs)
{
# link the various package sets into their own meta packages
consoleMediaUtils = {
package = null;
suggestedPrograms = attrNames consoleMediaPkgs;
};
consoleUtils = {
package = null;
suggestedPrograms = attrNames consolePkgs;
};
desktopGuiApps = {
package = null;
suggestedPrograms = attrNames desktopGuiPkgs;
};
guiApps = {
package = null;
suggestedPrograms = (attrNames guiPkgs)
++ [ "web-browser" ]
++ [ "tuiApps" ]
++ lib.optional (pkgs.system == "x86_64-linux") "x86GuiApps";
};
iphoneUtils = {
package = null;
suggestedPrograms = attrNames iphonePkgs;
};
sysadminUtils = {
package = null;
suggestedPrograms = attrNames sysadminPkgs;
};
sysadminExtraUtils = {
package = null;
suggestedPrograms = attrNames sysadminExtraPkgs;
};
tuiApps = {
package = null;
suggestedPrograms = attrNames tuiPkgs;
};
x86GuiApps = {
package = null;
suggestedPrograms = attrNames x86GuiPkgs;
};
}
{
# nontrivial package definitions
sane.programs = {
# PACKAGE SETS
"sane-scripts.backup" = declPackageSet [
"sane-scripts.backup-ls"
"sane-scripts.backup-restore"
];
"sane-scripts.bittorrent" = declPackageSet [
"sane-scripts.bt-add"
"sane-scripts.bt-rm"
"sane-scripts.bt-search"
"sane-scripts.bt-show"
];
"sane-scripts.dev" = declPackageSet [
"sane-scripts.dev-cargo-loop"
"sane-scripts.git-init"
];
"sane-scripts.cli" = declPackageSet [
"sane-scripts.deadlines"
"sane-scripts.find-dotfiles"
"sane-scripts.ip-check"
"sane-scripts.ip-reconnect"
"sane-scripts.private-change-passwd"
"sane-scripts.private-do"
"sane-scripts.private-init"
"sane-scripts.private-lock"
"sane-scripts.private-unlock"
"sane-scripts.rcp"
"sane-scripts.reboot"
"sane-scripts.reclaim-boot-space"
"sane-scripts.reclaim-disk-space"
"sane-scripts.secrets-dump"
"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"
"sane-scripts.sync-music"
];
dino.persist.private = [ ".local/share/dino" ];
# creds, but also 200 MB of node modules, etc
discord.persist.private = [ ".config/discord" ];
sysadminUtils = declPackageSet [
"btrfs-progs"
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
"cryptsetup"
"ddrescue"
"dig"
"dtc" # device tree [de]compiler
"e2fsprogs" # resize2fs
"efibootmgr"
"ethtool"
"fatresize"
"fd"
"file"
# "fwupd"
"gawk"
"gdb" # to debug segfaults
"git"
"gptfdisk" # gdisk
"hdparm"
"htop"
"iftop"
"inetutils" # for telnet
"iotop"
"iptables"
"iw"
"jq"
"killall"
"lsof"
"miniupnpc"
"nano"
# "ncdu" # ncurses disk usage. doesn't cross compile (zig)
"neovim"
"netcat"
"nethogs"
"nmap"
"nvme-cli" # nvme
"openssl"
"parted"
"pciutils"
"powertop"
"pstree"
"ripgrep"
"screen"
"smartmontools" # smartctl
"socat"
"strace"
"subversion"
"tcpdump"
"tree"
"usbutils"
"util-linux" # lsblk, lscpu, etc
"wget"
"wirelesstools" # iwlist
];
sysadminExtraUtils = declPackageSet [
"backblaze-b2"
"duplicity"
"sane-scripts.backup"
"sqlite" # to debug sqlite3 databases
];
# creds/session keys, etc
element-desktop.persist.private = [ ".config/Element" ];
# TODO: split these into smaller groups.
# - moby doesn't want a lot of these.
# - categories like
# - dev?
# - debugging?
consoleUtils = declPackageSet [
"alsaUtils" # for aplay, speaker-test
"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"
# "gocryptfs"
# "gopass"
# "gopass-jsonapi"
"helix" # text editor
"libsecret" # for managing user keyrings. TODO: what needs this? lift into the consumer
"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"
# "nixos-generators"
"nmon"
# "node2nix"
# "oathToolkit" # for oathtool
# "ponymix"
"pulsemixer"
"python3-repl"
# "python3Packages.eyeD3" # music tagging
"ripgrep" # needed as a user package so that its user-level config file can be installed
"rsync"
"sane-scripts.bittorrent"
"sane-scripts.cli"
"snapper"
"sops"
"speedtest-cli"
# "ssh-to-age"
"sudo"
# "tageditor" # music tagging
# "unar"
"unzip"
"wireguard-tools"
"xdg-utils" # for xdg-open
# "yarn"
"zsh"
];
# `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" ];
desktopConsoleUtils = declPackageSet [
"gh" # MS GitHub cli
"nix-index"
"nixpkgs-review"
"sane-scripts.dev"
"sequoia"
];
# 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" ];
consoleMediaUtils = declPackageSet [
"ffmpeg"
"imagemagick"
"sox"
"yt-dlp"
];
# 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" ];
tuiApps = declPackageSet [
"aerc" # email client
"msmtp" # sendmail
"offlineimap" # email mailbox sync
"sfeed" # RSS fetcher
"visidata" # TUI spreadsheet viewer/editor
"w3m" # web browser
];
mumble.persist.private = [ ".local/share/Mumble" ];
iphoneUtils = declPackageSet [
"ifuse"
"ipfs"
"libimobiledevice"
"sane-scripts.sync-from-iphone"
];
# not strictly necessary, but allows caching articles; offline use, etc.
nheko.persist.private = [
".config/nheko" # config file (including client token)
".cache/nheko" # media cache
".local/share/nheko" # per-account state database
];
devPkgs = declPackageSet [
"cargo"
"clang"
"lua"
"nodejs"
"patchelf"
"rustc"
"tree-sitter"
];
# settings (electron app)
obsidian.persist.plaintext = [ ".config/obsidian" ];
# creds, media
signal-desktop.persist.private = [ ".config/Signal" ];
# INDIVIDUAL PACKAGE DEFINITIONS
# printer/filament settings
slic3r.persist.plaintext = [ ".Slic3r" ];
cargo.persist.byStore.plaintext = [ ".cargo" ];
# creds, widevine .so download. TODO: could easily manage these statically.
spotify.persist.plaintext = [ ".config/spotify" ];
# creds, but also 200 MB of node modules, etc
discord.persist.byStore.private = [ ".config/discord" ];
tdesktop.persist.private = [ ".local/share/TelegramDesktop" ];
# `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.byStore.plaintext = [ ".local/share/Emote" ];
tokodon.persist.private = [ ".cache/KDE/tokodon" ];
fluffychat-moby.persist.byStore.plaintext = [ ".local/share/chat.fluffy.fluffychat" ];
# hardenedMalloc solves a crash at startup
# TODO 2023/02/02: is this safe to remove yet?
tor-browser-bundle-bin.package = pkgs.tor-browser-bundle-bin.override {
useHardenedMalloc = false;
};
font-manager.package = pkgs.font-manager.override {
# build without the "Google Fonts" integration feature, to save closure / avoid webkitgtk_4_0
withWebkit = false;
};
whalebird.persist.private = [ ".config/Whalebird" ];
# 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.byStore.private = [ ".config/gh" ];
yarn.persist.plaintext = [ ".cache/yarn" ];
"gnome.gnome-maps".persist.byStore.plaintext = [ ".cache/shumate" ];
"gnome.gnome-maps".persist.byStore.private = [ ".local/share/maps-places.json" ];
# zcash coins. safe to delete, just slow to regenerate (10-60 minutes)
zecwallet-lite.persist.private = [ ".zcash" ];
}
];
# 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.byStore.plaintext = [ ".bitmonero" ];
mumble.persist.byStore.private = [ ".local/share/Mumble" ];
# settings (electron app)
obsidian.persist.byStore.plaintext = [ ".config/obsidian" ];
python3-repl.package = pkgs.python3.withPackages (ps: with ps; [
requests
]);
# creds, media
signal-desktop.persist.byStore.private = [ ".config/Signal" ];
# printer/filament settings
slic3r.persist.byStore.plaintext = [ ".Slic3r" ];
tdesktop.persist.byStore.private = [ ".local/share/TelegramDesktop" ];
tokodon.persist.byStore.private = [ ".cache/KDE/tokodon" ];
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.byStore.private = [ ".zcash" ];
};
programs.feedbackd = lib.mkIf config.sane.programs.feedbackd.enabled {
enable = true;
};
}

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

@@ -0,0 +1,61 @@
# GNOME calls
# - <https://gitlab.gnome.org/GNOME/calls>
# - both a dialer and a call handler.
# - uses callaudiod dbus package.
#
# initial JMP.chat configuration:
# - message @cheogram.com "reset sip account" (this is not destructive, despite the name)
# - the bot will reply with auto-generated username/password plus a SIP server endpoint.
# just copy those into gnome-calls' GUI configurator
# - now gnome-calls can do outbound calls. inbound calls requires more chatting with the help bot
#
# my setup here is still very WIP.
# open questions:
# - can i receive calls even with GUI closed?
# - e.g. activated by callaudiod?
# - looks like `gnome-calls --daemon` does that?
{ config, lib, ... }:
let
cfg = config.sane.programs.calls;
in
{
sane.programs.calls = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
persist.byStore.private = [
# ".cache/folks" # contact avatars?
# ".config/calls"
".local/share/calls" # call "records"
# .local/share/folks # contacts?
];
secrets.".config/calls/sip-account.cfg" = ../../../secrets/common/gnome_calls_sip-account.cfg.bin;
suggestedPrograms = [
"feedbackd" # needs `phone-incoming-call`, in particular
];
services.gnome-calls = {
# TODO: prevent gnome-calls from daemonizing when started manually
description = "gnome-calls daemon to monitor incoming SIP calls";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
# add --verbose for more debugging
ExecStart = "${cfg.package}/bin/gnome-calls --daemon";
Type = "simple";
Restart = "always";
RestartSec = "10s";
};
environment.G_MESSAGES_DEBUG = "all";
};
};
programs.calls = lib.mkIf cfg.enabled {
enable = true;
};
}

View File

@@ -0,0 +1,36 @@
# cantata is a mpd frontend.
# before launching it, run `mopidy` in some tab
# TODO: auto-launch mopidy when cantata launches?
{ ... }:
{
sane.programs.cantata = {
persist.byStore.plaintext = [
".cache/cantata" # album art
".local/share/cantata/library" # library index (?)
];
fs.".config/cantata/cantata.conf".symlink.text = ''
[General]
fetchCovers=true
storeCoversInMpdDir=false
version=2.5.0
[Connection]
allowLocalStreaming=true
applyReplayGain=true
autoUpdate=false
dir=~/Music
host=localhost
partition=
passwd=
port=6600
replayGain=off
streamUrl=
[LibraryPage]
artist\gridZoom=100
artist\searchActive=false
artist\viewMode=detailedtree
'';
suggestedPrograms = [ "mopidy" ];
};
}

View File

@@ -0,0 +1,46 @@
{ pkgs, ... }:
let
chattyNoOauth = pkgs.chatty.override {
# the OAuth feature (presumably used for web-based logins) pulls a full webkitgtk.
# especially when using the gtk3 version of evolution-data-server, it's an ancient webkitgtk_4_1.
# disable OAuth for a faster build & smaller closure
evolution-data-server = pkgs.evolution-data-server.override {
enableOAuth2 = false;
gnome-online-accounts = pkgs.gnome-online-accounts.override {
# disables the upstream "goabackend" feature -- presumably "Gnome Online Accounts Backend"
# frees us from webkit_4_1, in turn.
enableBackend = false;
gvfs = pkgs.gvfs.override {
# saves 20 minutes of build time, for unused feature
samba = null;
};
};
};
};
chatty-latest = pkgs.chatty-latest.override {
evolution-data-server-gtk4 = pkgs.evolution-data-server-gtk4.override {
gnome-online-accounts = pkgs.gnome-online-accounts.override {
# disables the upstream "goabackend" feature -- presumably "Gnome Online Accounts Backend"
# frees us from webkit_4_1, in turn.
enableBackend = false;
gvfs = pkgs.gvfs.override {
# saves 20 minutes of build time and cross issues, for unused feature
samba = null;
};
};
};
};
in
{
sane.programs.chatty = {
# package = chattyNoOauth;
package = chatty-latest;
suggestedPrograms = [ "gnome-keyring" ];
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
".purple"
];
};
}

View File

@@ -0,0 +1,32 @@
#!/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="󱊥"
fmt_minutes() {
# args: <battery symbol> <text if ludicrous estimate> <estimated minutes to full/empty>
if [[ $3 -gt 1440 ]]; then
printf "%s %s" "$1" "$2" # more than 1d
else
hr=$(($3 / 60))
hr_in_min=$(($hr * 60))
min=$(($3 - $hr_in_min))
printf "%s %dh%02dm" "$1" "$hr" "$min"
fi
}
if [[ $rate -lt 0 ]]; then
# discharging
fmt_minutes "$bat_dis" '∞' "$(($full * 60 * $perc / (-100 * $rate)))"
elif [[ $rate -gt 0 ]]; then
# charging
fmt_minutes "$bat_chg" '100%' "$(($full * 60 * $perc_left / (100 * $rate)))"
else
echo "$bat_dis $perc%"
fi

View File

@@ -0,0 +1,50 @@
-- docs: <https://conky.cc/variables>
-- color names are X11 colors: <https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart>
-- - can also use #rrggbb syntax
-- example configs: <https://forum.manjaro.org/t/conky-showcase-2022/97123>
-- example configs: <https://www.reddit.com/r/Conkyporn/>
conky.config = {
out_to_wayland = true,
update_interval = 10,
alignment = 'middle_middle',
own_window_type = 'desktop',
-- own_window_argb_value: opacity of the background (0-255)
own_window_argb_value = 0,
-- own_window_argb_value = 92,
-- own_window_colour = '#beebe5', -- beebe5 matches nixos flake bg color
-- "border" pads the entire conky window
-- this can be used to control the extent of the own_window background
border_inner_margin = 8,
-- optionally, actually draw borders
-- draw_borders = true,
-- shades are drop-shadows, outline is the centered version. both apply to text only
draw_shades = true,
draw_outline = false,
default_shade_color = '#beebe5',
default_outline_color = '#beebe5',
font = 'sans-serif:size=8',
use_xft = true,
default_color = '#ffffff',
color1 = '000000',
color2 = '404040',
}
-- texeci <interval_sec> <cmd>: run the command periodically, _in a separate thread_ so as not to block rendering
conky.text = [[
${color1}${shadecolor 707070}${font sans-serif:size=50:style=Bold}${alignc}${exec date +"%H:%M"}${font}
${color2}${shadecolor a4d7d0}${font sans-serif:size=20}${alignc}${exec date +"%a %d %b"}${font}
${color1}${shadecolor}${font sans-serif:size=22:style=Bold}${alignc}${exec @bat@ }${font}
${color1}${shadecolor}${font sans-serif:size=20:style=Bold}${alignc}${texeci 600 @weather@ }${font}
${color2}${shadecolor a4d7d0}${font sans-serif:size=16}${alignc}⇅ ${downspeedf wlan0}K/s${font}
${font sans-serif:size=16}${alignc}☵ $memperc%  $cpu%${font}
]]

View File

@@ -0,0 +1,34 @@
{ config, pkgs, ... }:
{
sane.programs.conky = {
fs.".config/conky/conky.conf".symlink.target =
let
battery_estimate = pkgs.static-nix-shell.mkBash {
pname = "battery_estimate";
src = ./.;
};
in pkgs.substituteAll {
src = ./conky.conf;
bat = "${battery_estimate}/bin/battery_estimate";
weather = "timeout 20 ${pkgs.sane-weather}/bin/sane-weather";
};
services.conky = {
description = "conky dynamic desktop background";
wantedBy = [ "default.target" ];
# XXX: should be part of graphical-session.target, but whatever mix of greetd/sway
# i'm using means that target's never reached...
# wantedBy = [ "graphical-session.target" ];
# partOf = [ "graphical-session.target" ];
serviceConfig.ExecStart = "${config.sane.programs.conky.package}/bin/conky";
serviceConfig.Type = "simple";
serviceConfig.Restart = "on-failure";
serviceConfig.RestartSec = "10s";
# serviceConfig.Slice = "session.slice";
# don't start conky until after sway
preStart = ''test -n "$SWAYSOCK"'';
};
};
}

View File

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

View File

@@ -3,25 +3,70 @@
{
imports = [
./aerc.nix
./alacritty.nix
./assorted.nix
./bemenu.nix
./brave.nix
./calls.nix
./cantata.nix
./chatty.nix
./conky
./cozy.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
./helix.nix
./imagemagick.nix
./jellyfin-media-player.nix
./kitty
./komikku.nix
./koreader
./libreoffice.nix
./lemoa.nix
./mako.nix
./megapixels.nix
./mepo.nix
./mopidy.nix
./mpv.nix
./msmtp.nix
./neovim.nix
./newsflash.nix
./nheko.nix
./nix-index.nix
./ntfy-sh.nix
./obsidian.nix
./offlineimap.nix
./playerctl.nix
./rhythmbox.nix
./ripgrep.nix
./sfeed.nix
./splatmoji.nix
./spotify.nix
./steam.nix
./stepmania.nix
./sublime-music.nix
./swaynotificationcenter.nix
./tangram.nix
./tor-browser-bundle-bin.nix
./tuba.nix
./vlc.nix
./web-browser.nix
./wireshark.nix
./xarchiver.nix
./zeal.nix
./zsh
];

View File

@@ -0,0 +1,71 @@
# usage:
# - start a DM with a rando via
# - '+' -> 'start conversation'
# - add a user to your roster via
# - '+' -> 'start conversation' -> '+' (opens the "add contact" dialog)
# - this triggers a popup on the remote side asking them for confirmation
# - after the remote's confirmation there will be a local popup for you to allow them to add you to their roster
# - to make a call:
# - ensure the other party is in your roster
# - open a DM with the party
# - click the phone icon at top (only visible if other party is in your roster)
#
# dino can be autostarted on login -- useful to ensure that i always receive calls and notifications --
# but at present it has no "start in tray" type of option: it must render a window.
#
# outstanding bugs:
# - mic is sometimes disabled at call start despite presenting as enabled
# - 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:
# - `rtp-WRNING: plugin.vala:148: Warning in pipeline: Can't record audio fast enough
# - this was *partially* fixed by bumping the pipewire mic buffer to 2048 samples (from ~512)
# - this was further fixed by setting PULSE_LATENCY_MSEC=20.
# - possibly Dino should be updated internally: `info.rate / 100` -> `info.rate / 50`.
# - i think that affects the batching for echo cancellation, adaptive gain control, etc.
#
{ config, lib, ... }:
let
cfg = config.sane.programs.dino;
in
{
sane.programs.dino = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
persist.byStore.private = [ ".local/share/dino" ];
services.dino = {
description = "auto-start and maintain dino XMPP connection";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/dino";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
# audio buffering; see: <https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/FAQ#pipewire-buffering-explained>
# dino defaults to 10ms mic buffer, which causes underruns, which Dino handles *very* poorly
# as in, the other end of the call will just not receive sound from us for a couple seconds.
# pipewire uses power-of-two buffering for the mic itself. that would put us at 21.33 ms, but this env var supports only whole numbers (21ms ends up not power-of-two).
# also, Dino's likely still doing things in 10ms batches internally anyway.
environment.PULSE_LATENCY_MSEC = "20";
# note that debug logging during calls produces so much journal spam that it pegs the CPU and causes dropped audio
# environment.G_MESSAGES_DEBUG = "all";
};
};
}

View File

@@ -0,0 +1,15 @@
# debugging tips:
# - if element opens but does not render:
# - `element-desktop --disable-gpu --in-process-gpu`
# - <https://github.com/vector-im/element-desktop/issues/1029#issuecomment-1632688224>
# - `rm -rf ~/.config/Element/GPUCache`
# - <https://github.com/NixOS/nixpkgs/issues/244486>
{ ... }:
{
sane.programs.element-desktop = {
# creds/session keys, etc
persist.byStore.private = [ ".config/Element" ];
suggestedPrograms = [ "gnome-keyring" ];
};
}

View File

@@ -0,0 +1,48 @@
# epiphany web browser
# - GTK4/webkitgtk
#
# usability notes:
# - touch-based scroll works well (for moby)
# - URL bar constantly resets cursor to the start of the line as i type
# - maybe due to the URLbar suggestions getting in the way
{ pkgs, ... }:
{
sane.programs.epiphany = {
# 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
# - (nothing in `env` or in this repo touches /var/run)
# - no xdg-desktop-portal is installed (unlikely)
#
# a few other users have hit this, in different contexts:
# - <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+=(
--set WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS "1"
);
'' + (upstream.preFixup or "");
});
persist.byStore.private = [
".cache/epiphany"
".local/share/epiphany"
# also .config/epiphany, but appears empty
];
mime.priority = 200; # default priority is 100: install epiphany only as a fallback
mime.associations = let
desktop = "org.gnome.Epiphany.desktop";
in {
"text/html" = desktop;
"x-scheme-handler/http" = desktop;
"x-scheme-handler/https" = desktop;
"x-scheme-handler/about" = desktop;
"x-scheme-handler/unknown" = desktop;
};
};
}

View File

@@ -0,0 +1,4 @@
{ ... }:
{
sane.programs.evince.mime.associations."application/pdf" = "org.gnome.Evince.desktop";
}

View File

@@ -0,0 +1,114 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.feedbackd;
in
{
sane.programs.feedbackd = {
package = pkgs.rmDbusServices pkgs.feedbackd;
configOption = with lib; mkOption {
type = types.submodule {
options.proxied = mkOption {
type = types.bool;
default = false;
description = ''
whether to use a sound theme in which common application events are muted
with the intent that a proxy (notification daemon) with knowledge of this
modification will "speak" on behalf of all applications.
'';
};
};
default = {};
};
# N.B.: feedbackd will load ~/.config/feedbackd/themes/default.json by default
# - but using that would forbid `parent-theme = "default"`
# the default theme ships support for these events:
# - alarm-clock-elapsed
# - battery-caution
# - bell-terminal
# - button-pressed
# - button-released
# - camera-focus
# - camera-shutter
# - message-missed-email
# - message-missed-instant
# - message-missed-notification
# - message-missed-sms
# - message-new-email
# - message-new-instant
# - message-new-sms
# - message-sent-instant
# - phone-failure
# - phone-hangup
# - phone-incoming-call
# - phone-missed-call
# - phone-outgoing-busy
# - screen-capture
# - theme-demo
# - timeout-completed
# - window-close
fs.".config/feedbackd/themes/proxied.json".symlink.text = builtins.toJSON {
name = "proxied";
parent-theme = "default";
profiles = [
{
name = "full";
feedbacks = [
# forcibly disable normal events which we'd prefer for the notification daemon (e.g. swaync) to handle
{
event-name = "message-new-instant";
type = "Dummy";
}
{
event-name = "proxied-message-new-instant";
type = "Sound";
effect = "message-new-instant";
}
# re-define sounds from the default theme which we'd like to pass through w/o proxying.
# i guess this means i'm not inheriting the default theme :|
{
event-name = "phone-incoming-call";
type = "Sound";
effect = "phone-incoming-call";
}
{
event-name = "alarm-clock-elapsed";
type = "Sound";
effect = "alarm-clock-elapsed";
}
{
event-name = "timeout-completed";
type = "Sound";
effect = "complete";
}
];
}
];
};
services.feedbackd = {
description = "feedbackd audio/vibration/led controller";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/libexec/feedbackd";
Type = "simple";
Restart = "on-failure";
RestartSec = "10s";
};
environment = {
G_MESSAGES_DEBUG = "all";
} // (lib.optionalAttrs cfg.config.proxied {
FEEDBACK_THEME = "/home/colin/.config/feedbackd/themes/proxied.json";
});
};
};
services.udev.packages = lib.mkIf cfg.enabled [
# ships udev rules for `feedbackd` group to be able to control vibrator and LEDs
cfg.package
];
users.groups = lib.mkIf cfg.enabled {
feedbackd = {};
};
}

View File

@@ -9,21 +9,20 @@
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.sane.programs.web-browser.config;
cfg = config.sane.programs.firefox.config;
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 (drv: {
# # this allows side-loading unsigned addons
# MOZ_REQUIRE_SIGNING = false;
# });
extraPrefsFiles = pkgs.librewolf-unwrapped.extraPrefsFiles ++ mobile-prefs;
libName = "librewolf";
dotDir = ".librewolf";
cacheDir = ".cache/librewolf"; # TODO: is it?
cacheDir = ".cache/librewolf";
desktop = "librewolf.desktop";
};
firefoxSettings = {
browser = pkgs.firefox-esr-unwrapped;
extraPrefsFiles = mobile-prefs;
libName = "firefox";
dotDir = ".mozilla/firefox";
cacheDir = ".cache/mozilla";
@@ -47,8 +46,7 @@ let
package = pkgs.wrapFirefox cfg.browser.browser {
# inherit the default librewolf.cfg
# it can be further customized via ~/.librewolf/librewolf.overrides.cfg
inherit (pkgs.librewolf-unwrapped) extraPrefsFiles;
inherit (cfg.browser) libName;
inherit (cfg.browser) extraPrefsFiles libName;
extraNativeMessagingHosts = optional cfg.addons.browserpass-extension.enable pkgs.browserpass;
# extraNativeMessagingHosts = [ pkgs.gopass-native-messaging-host ];
@@ -72,7 +70,10 @@ let
};
UserMessaging = {
ExtensionRecommendations = false;
FeatureRecommendations = false;
SkipOnboarding = true;
UrlbarInterventions = false;
WhatsNew = false;
};
# these were taken from Librewolf
@@ -144,54 +145,62 @@ in
{
config = mkMerge [
({
sane.programs.web-browser.configOption = mkOption {
sane.programs.firefox.configOption = mkOption {
type = types.submodule configOpts;
default = {};
};
sane.programs.web-browser.config.addons = {
# get names from:
# - ~/ref/nix-community/nur-combined/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
# `wget ...xpi`; `unar ...xpi`; `cat */manifest.json | jq '.browser_specific_settings.gecko.id'`
sane.programs.firefox.config.addons = {
browserpass-extension = {
# package = addon "browserpass-ce" "browserpass@maximbaz.com" "sha256-sXgUBbRvMnRpeIW1MTkmTcoqtW/8RDXAkxAq1evFkpc=";
package = localAddon pkgs.browserpass-extension;
package = pkgs.firefox-extensions.browserpass-extension;
enable = lib.mkDefault true;
};
# TODO: build bypass-paywalls from source? it's mysteriously disappeared from the Mozilla store.
# bypass-paywalls-clean.package = addon "bypass-paywalls-clean" "{d133e097-46d9-4ecc-9903-fa6a722a6e0e}" "sha256-oUwdqdAwV3DezaTtOMx7A/s4lzIws+t2f08mwk+324k=";
# bypass-paywalls-clean.enable = lib.mkDefault true;
ether-metamask = {
package = addon "ether-metamask" "webextension@metamask.io" "sha256-G+MwJDOcsaxYSUXjahHJmkWnjLeQ0Wven8DU/lGeMzA=";
bypass-paywalls-clean = {
package = pkgs.firefox-extensions.bypass-paywalls-clean;
enable = lib.mkDefault true;
};
ether-metamask = {
package = pkgs.firefox-extensions.ether-metamask;
enable = lib.mkDefault false; # until i can disable the first-run notification
};
i2p-in-private-browsing = {
package = addon "i2p-in-private-browsing" "i2ppb@eyedeekay.github.io" "sha256-dJcJ3jxeAeAkRvhODeIVrCflvX+S4E0wT/PyYzQBQWs=";
package = pkgs.firefox-extensions.i2p-in-private-browsing;
enable = lib.mkDefault config.services.i2p.enable;
};
sidebery = {
package = addon "sidebery" "{3c078156-979c-498b-8990-85f7987dd929}" "sha256-YONfK/rIjlsrTgRHIt3km07Q7KnpIW89Z9r92ZSCc6w=";
package = pkgs.firefox-extensions.sidebery;
enable = lib.mkDefault true;
};
sponsorblock = {
package = addon "sponsorblock" "sponsorBlocker@ajay.app" "sha256-hRsvLaAsVm3dALsTrJqHTNgRFAQcU7XSaGhr5G6+mFs=";
package = pkgs.firefox-extensions.sponsorblock;
enable = lib.mkDefault true;
};
ublacklist = {
package = addon "ublacklist" "@ublacklist" "sha256-RqY5iHzbL2qizth7aguyOKWPyINXmrwOlf/OsfqAS48=";
package = pkgs.firefox-extensions.ublacklist;
enable = lib.mkDefault true;
};
ublock-origin = {
package = addon "ublock-origin" "uBlock0@raymondhill.net" "sha256-eHlQrU/b9X/6sTbHBpGAd+0VsLT7IrVCnd0AQ948lyA=";
package = pkgs.firefox-extensions.ublock-origin;
enable = lib.mkDefault true;
};
};
})
({
sane.programs.web-browser = {
sane.programs.firefox = {
inherit package;
mime.associations = let
inherit (cfg.browser) desktop;
in {
"text/html" = desktop;
"x-scheme-handler/http" = desktop;
"x-scheme-handler/https" = desktop;
"x-scheme-handler/about" = desktop;
"x-scheme-handler/unknown" = desktop;
};
# env.BROWSER = "${package}/bin/${cfg.browser.libName}";
env.BROWSER = cfg.browser.libName; # used by misc tools like xdg-email, as fallback
# uBlock filter list configuration.
# specifically, enable the GDPR cookie prompt blocker.
# data.toOverwrite.filterLists is additive (i.e. it supplements the default filters)
@@ -210,11 +219,18 @@ in
}
}
'';
# TODO: this is better suited in `extraPrefs` during `wrapFirefox` call
fs."${cfg.browser.dotDir}/${cfg.browser.libName}.overrides.cfg".symlink.text = ''
// if we can't query the revocation status of a SSL cert because the issuer is offline,
// 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
defaultPref("widget.non-native-theme.scrollbar.size.override", 50);
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).
@@ -231,16 +247,22 @@ in
'';
};
})
(mkIf config.sane.programs.web-browser.enabled {
(mkIf config.sane.programs.firefox.enabled {
# TODO: move the persistence into the sane.programs API (above)
# flush the cache to disk to avoid it taking up too much tmp
sane.user.persist.byPath."${cfg.browser.cacheDir}" = lib.mkIf (cfg.persistCache != null) {
store = cfg.persistCache;
};
# flush the cache to disk to avoid it taking up too much tmp.
sane.user.persist.byPath."${cfg.browser.cacheDir}".store =
if (cfg.persistData != null) then
cfg.persistData
else
"cryptClearOnBoot"
;
sane.user.persist.byPath."${cfg.browser.dotDir}/default" = lib.mkIf (cfg.persistData != null) {
store = cfg.persistData;
};
sane.user.persist.byPath."${cfg.browser.dotDir}/default".store =
if (cfg.persistData != null) then
cfg.persistData
else
"cryptClearOnBoot"
;
})
];
}

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

@@ -0,0 +1,68 @@
# to preview fonts:
# - `font-manager` (gui)
# - useful to determine official name; codepoint support
{ config, lib, pkgs, ... }:
let
# nerdfonts takes popular open fonts and patches them to support a wider range of glyphs, notably emoji.
# any nerdfonts font includes icons such as these:
# - 󱊥 (battery charging)
# - 󰃝 (brightness)
# -  (gps / crosshairs)
# - 󰎈 (music note)
# - 󰍦 (message bubble)
# - 󰏲 (phone)
# -  (weather/sun-behind-clouds)
# used particularly by sxmo utilities, but also a few of my own (e.g. conky)
#
# nerdfonts is very heavy. each font is 20-900 MiB (2 MiB per "variation")
# lots of redundant data inside there, but no deduplication except whatever nix or the fs does implicitly.
wantedNerdfonts = [
# used explicitly by SXMO
# "DejaVuSansMono" # 25 MiB
# good terminal/coding font. grab via nerdfonts for more emoji/unicode support
"Hack" # 26 MiB
"Noto" # 861 MiB
];
nerdfontPkgs = builtins.map
(f: pkgs.nerdfonts.override { fonts = [ f ]; })
wantedNerdfonts;
in
{
fonts = lib.mkIf config.sane.programs.fontconfig.enabled {
fontconfig.enable = true;
fontconfig.defaultFonts = {
emoji = [
"Noto Color Emoji"
"Font Awesome 6 Free"
"Font Awesome 6 Brands"
];
monospace = [
"Hack Nerd Font Propo"
# "DejaVuSansM Nerd Font Propo"
"NotoMono Nerd Font Propo"
];
serif = [
"NotoSerif Nerd Font"
"DejaVu Serif"
];
sansSerif = [
"NotoSans Nerd Font"
"DejaVu Sans"
];
};
#vvv enables dejavu_fonts, freefont_ttf, gyre-fonts, liberation_ttf, unifont, noto-fonts-emoji
enableDefaultPackages = false;
packages = with pkgs; [
# TODO: reduce this font set.
# - probably need only one of dejavu/freefont/liberation
dejavu_fonts # 10 MiB; DejaVu {Sans,Serif,Sans Mono,Math TeX Gyre}; also available as a NerdFonts (Sans Mono only)
font-awesome # 2 MiB; Font Awesome 6 {Free,Brands}
freefont_ttf # 11 MiB; Free{Mono,Sans,Serif}
gyre-fonts # 4 MiB; Tex Gyre *; ttf substitutes for standard PostScript fonts
# hack-font # 1 MiB; Hack; also available as a NerdFonts
liberation_ttf # 4 MiB; Liberation {Mono,Sans,Serif}; also available as a NerdFonts
noto-fonts-color-emoji # 10 Mib; Noto Color Emoji
unifont # 16 MiB; Unifont; provides LOTS of unicode coverage
] ++ nerdfontPkgs;
};
}

View File

@@ -0,0 +1,60 @@
# 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;
in
{
sane.programs.fractal = {
package = pkgs.fractal-nixified;
# package = pkgs.fractal-latest;
# package = pkgs.fractal-next;
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = true;
};
};
};
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
];
suggestedPrograms = [ "gnome-keyring" ];
services.fractal = {
description = "auto-start and maintain fractal Matrix connection";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/fractal";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
# environment.G_MESSAGES_DEBUG = "all";
};
};
}

View File

@@ -0,0 +1,7 @@
{ config, lib, ... }:
{
services.fwupd = lib.mkIf config.sane.programs.fwupd.enabled {
# enables the dbus service, which i think the frontend speaks to.
enable = true;
};
}

View File

@@ -0,0 +1,16 @@
# N.B.: requires first-run setup on moby:
# - UI will render transparent
# - click the hamburger (top-right: immediately left from close button)
# > Preferences
# > Background-blur mode: change from "Always" to "Never"
#
# the background blur is probably some dconf setting somewhere.
{ ... }:
{
sane.programs.g4music = {
persist.byStore.plaintext = [
# index?
".cache/com.github.neithern.g4music"
];
};
}

View File

@@ -0,0 +1,13 @@
{ ... }:
{
sane.programs.gajim = {
persist.byStore.private = [
# avatars, thumbnails...
".cache/gajim"
# sqlite database labeled "settings". definitely includes UI theming
".config/gajim"
# omemo keys, downloads, logs
".local/share/gajim"
];
};
}

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