Compare commits

...

606 Commits

Author SHA1 Message Date
53bbd611da nixpkgs-review: persist the ~/.cache/nixpkgs-review directory 2024-06-01 17:15:54 +00:00
f0128b9496 apply patch for when trust-dns is renamed to hickory-dns 2024-06-01 17:07:44 +00:00
368169d48d todo.md: start documenting sudo issues 2024-06-01 17:06:36 +00:00
cb1d5d53c6 feeds: add mintcast podcast 2024-06-01 16:28:42 +00:00
a5a635f00b sftpgo: simplify my package override now that sftpgo 2.6.0 is merged 2024-06-01 16:22:22 +00:00
6fe3d26b30 modemmanager: fix missing mmcli binary in service definition 2024-06-01 15:41:14 +00:00
8340cf059f nixpkgs-review: fix sandboxing 2024-06-01 15:26:23 +00:00
e0da3ece60 errno: simplify 2024-06-01 14:48:55 +00:00
8ea379d53b errno: ship on all platforms 2024-06-01 14:04:45 +00:00
c7dd49af91 errno: fix cross compilation by not building *all* of moreutils 2024-06-01 14:03:59 +00:00
e8b900c722 todo.md: add media looping controls 2024-06-01 13:37:51 +00:00
36f4fa3018 checkSandboxed: fix so that cross-built scripts can be checked again
how did this work earlier? does lappy have binfmt enabled??
2024-06-01 13:24:41 +00:00
d8d11de9bc sftpgo: replace deprecated "crypt" with "passlib" 2024-06-01 13:01:19 +00:00
07194d062a servo: nfs: disable 2024-06-01 12:45:10 +00:00
24c49df75f health-check: add a check that ftp://uninsane.org is operational 2024-06-01 12:42:53 +00:00
9f7e143d5e todo.md: add some kernel work to be done 2024-06-01 12:38:28 +00:00
0a382ae8a3 todo.md: remove completed "landlock sandboxer prints garbage" item 2024-06-01 12:35:46 +00:00
96f177ceb2 docs: overlays/cross: slightly tidy up the "outstanding issues" part 2024-06-01 12:24:00 +00:00
2aa3fa35b8 nixpkgs: 2024-05-31 -> 2024-06-01; nixpkgs-wayland -> 2024-05-31
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/8a0a33b56d6279fec4827da602882561ef00f2fb' (2024-05-31)
  → 'github:nixos/nixpkgs/f7de25c01e4c073c06e0525226a0c2311d530cee' (2024-06-01)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/7ccd1516effbc5510391d3b498a7a3bef92a090b' (2024-05-31)
  → 'github:nixos/nixpkgs/61c1d282153dbfcb5fe413c228d172d0fe7c2a7e' (2024-06-01)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/1db9b79a45c8e346e03480767e6d9749fabfaf10' (2024-05-31)
  → 'github:nix-community/nixpkgs-wayland/93b225ddba91179248b378913a91defbc6aeb899' (2024-05-31)
```
2024-06-01 12:20:45 +00:00
8657cf1fcf ship ausyscall binary 2024-06-01 12:17:08 +00:00
f875db916d sandboxing: fix checkSandboxed to handle packages with multiple outputs 2024-06-01 12:12:46 +00:00
e3e86a43a9 brightnessctl: disable unused dbus access 2024-06-01 12:09:51 +00:00
05986d363d brightnessctl: fix udev rules so i can run it again 2024-06-01 12:02:24 +00:00
539d9e45a2 networkmanager/modemmanager: ship separate packages for the daemon and CLI tools
they require fundamentally different sandboxing approaches. the daemon *can't* always use bwrap if it wants to run as non-root. meanwhile the CLI tools would mostly *prefer* to run under bwrap.

in the long term i'll maybe upstream the systemd sandboxing into nixpkgs, where there looks to be desire for it
2024-05-31 23:26:16 +00:00
a380bd04c4 trivial-builders: init deepLinkIntoOwnPackage 2024-05-31 23:26:16 +00:00
f296d8df93 make-sandboxed: fix multi-output packages and sandbox *all* their outputs
this mostly applies to the wrapperType = 'inplace' users
2024-05-31 23:26:16 +00:00
326bf045b0 networkmanager/wpa_supplicant: switch user back to "networkmanager"
root gives too much power, even with bwrap/namespaces
2024-05-31 23:26:16 +00:00
a1181a10ea networkmanager: install parallel dbus .conf files to allow the services to be run as *either* networkmanager or root user (hopefully!) 2024-05-31 23:26:16 +00:00
9bb6a903bb wpa_supplicant: get it to run under bwrap 2024-05-31 23:26:16 +00:00
214f963d89 networkmanager: run all services as root instead of networkmanager user
i believe this may allow using bwrap instead of landlock
2024-05-31 23:26:16 +00:00
c7eb4b66a5 polyunfill: remove unused su and sg security wrappers 2024-05-31 14:59:23 +00:00
452543e6f3 fix rescue host build 2024-05-31 10:37:03 +00:00
d692ac9851 overlays/cross: remove broken cdrtools fix (that project is INSANE) 2024-05-31 09:40:44 +00:00
5cba283859 overlays/cross: update upstreaming status
my part of the gnome2.GConf fix was actually upstreamed a year ago; the package fails for a different reason
2024-05-31 09:04:16 +00:00
7a701f92eb nixpkgs: bump
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/d3d81af60c22e9e93a3930a9630b210362341ab9' (2024-05-31)
  → 'github:nixos/nixpkgs/8a0a33b56d6279fec4827da602882561ef00f2fb' (2024-05-31)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/4e60a4d94bdc1abafeefc1928aa3cda6ce6c4210' (2024-05-31)
  → 'github:nixos/nixpkgs/7ccd1516effbc5510391d3b498a7a3bef92a090b' (2024-05-31)
```
2024-05-31 08:44:53 +00:00
3c3a32e436 nixpatches: grab libphonenumber cross patch from PR 2024-05-31 08:43:27 +00:00
07aec3ca3c apps: explain why i ship both engrampa and xarchiver archive managers 2024-05-31 08:39:23 +00:00
58d5f11c7a overlays/cross: disable patches which im not actively using 2024-05-31 08:21:23 +00:00
ed2d4ef488 overlays/cross: update upstreaming status 2024-05-31 08:02:25 +00:00
e8f8866032 overlays/cross: remove old emulated package set and buildInQemu, etc 2024-05-31 06:59:32 +00:00
a2dfd8f08e libphonenumber: use a better patch for cross (CMAKE_CROSSCOMPILING_EMULATOR) 2024-05-31 06:27:10 +00:00
c7fd3d2217 nixpkgs: 2024-05-26 -> 2024-05-31, nixpkgs-wayland -> 2024-05-31
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/2baa940f86e1fc54757fd7d1ed551c0a38904bf2' (2024-05-26)
  → 'github:nixos/nixpkgs/d3d81af60c22e9e93a3930a9630b210362341ab9' (2024-05-31)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/7780e5160e011b39019797a4c4b1a4babc80d1bf' (2024-05-26)
  → 'github:nixos/nixpkgs/4e60a4d94bdc1abafeefc1928aa3cda6ce6c4210' (2024-05-31)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/397c85d463aef789a8dd24c4db467e9ad787907b' (2024-05-26)
  → 'github:nix-community/nixpkgs-wayland/1db9b79a45c8e346e03480767e6d9749fabfaf10' (2024-05-31)
```
2024-05-31 06:09:03 +00:00
0fcc3f8d5d ModemManager: make the sandbox more strict 2024-05-30 21:32:35 +00:00
0bb887158b implement a dropbear SSH module 2024-05-30 20:58:01 +00:00
6570c5ed84 modemmanager: sandbox with bwrap instead of landlock 2024-05-30 18:47:09 +00:00
820fdecfd5 modemmanager: minimal (working) sandbox 2024-05-30 18:27:34 +00:00
8d43565f31 sane-theme: disable sandbox 2024-05-30 16:54:10 +00:00
18364761dd wireplumber: undo the enableSystemd=false patch 2024-05-30 16:50:53 +00:00
d3937487e6 moby: cleanup bonsai <-> sway circular dependency (slightly) 2024-05-30 12:43:09 +00:00
3fdeacc336 sane-input-handler: add a --help command 2024-05-30 12:30:41 +00:00
847414ac1f health-check: add a test that git is online 2024-05-30 12:18:57 +00:00
84f2006115 servo: fix gitea 2024-05-30 12:12:06 +00:00
7f5e12da8d dbus: dont consider the service "up" until the unix pipe actually appears 2024-05-30 11:04:02 +00:00
afa8a3c52e activationScripts.notifyActive: future-proof for if ever DBUS_SESSION_BUS_ADDRESS changes 2024-05-30 11:03:35 +00:00
bfbcb4789b activationScripts.notifyActive: fix forrenamed XDG_RUNTIME_DIR 2024-05-30 10:56:17 +00:00
2531cc1cf6 bonsai: place the socket in a subdirectory to improve sandboxing 2024-05-30 09:54:28 +00:00
e55b75c333 wireplumber: build without systemd 2024-05-30 09:46:29 +00:00
adb54657d4 sway: fix bonsai to be visible in the sandbox 2024-05-30 09:46:04 +00:00
6eefb9ce20 wireplumber: build against the same pipewire i deploy 2024-05-30 09:06:41 +00:00
2233622bb7 landlock-sandboxer: remove startup messages for 6.9 2024-05-30 08:55:13 +00:00
274a7821a7 wireplumber: remove no-longer-needed /run/systemd directory
not necessary when using seatd/when a member of the 'audio' group
2024-05-30 08:54:41 +00:00
4c84d1a727 doc: modules/users: show what XDG_SESSION_{ID,CLASS,TYPE} could look like if set 2024-05-30 08:44:26 +00:00
175acf6442 pipewire: build without systemd 2024-05-30 08:44:11 +00:00
0761b6135a users/colin: add myself to "audio" group so that wireplumber can access audio devices w/o systemd/logind 2024-05-30 08:44:11 +00:00
66c899d099 callaudiod: fix to not start before dbus/pipewire are up (avoids coredump on boot) 2024-05-30 06:07:08 +00:00
4aeb3360d3 cleanup: programs: dont assume sway is always the wayland/x11 provider 2024-05-30 06:00:32 +00:00
0c456d11d8 programs: ensure things which depend on sound or wayland are ordered after it 2024-05-30 04:55:05 +00:00
3b73773169 programs: ensure things which depend on dbus are ordered after it 2024-05-30 03:48:45 +00:00
9ba8ff738b refactor: sane.programs.$foo.service: specify type concretely 2024-05-30 03:39:32 +00:00
f1d397940f seatd: patch sandboxing for desko 2024-05-29 19:42:45 +00:00
fa94fa8e6c seatd: sandbox with bwrap
it always surprises my that you can sandbox something with cap_sys_admin like this...

i think this works *only* because the user is root
2024-05-29 19:09:57 +00:00
4b9c125c8c seatd: sandbox 2024-05-29 18:58:38 +00:00
0f7d25d8a5 doc: sway: say why i wrapperType = "inplace" 2024-05-29 18:58:05 +00:00
140641729e gvfs: disable (it was broken) 2024-05-29 18:39:31 +00:00
32124d76bf cups: disable (not currently used, and not sandboxed) 2024-05-29 18:33:17 +00:00
c5c174f988 sway: patch to use a narrower sandbox 2024-05-29 18:24:59 +00:00
29bc1608aa sway: remove sandbox input which are no longer necessary 2024-05-29 17:07:18 +00:00
635ca1e5d8 seatd: pull the service definition into my own repo
this will allow me to configure the package
2024-05-29 16:34:32 +00:00
2789868703 seatd: split out of sway conf 2024-05-29 16:22:52 +00:00
c40ec1990a sshd: disable systemd integration 2024-05-29 15:57:19 +00:00
d4dfcd6510 login: remove systemd pam integration (so it doesnt try, and fail, to start the user manager) 2024-05-29 15:42:39 +00:00
d865be952a refactor: sandboxing: replace manual --sanebox-keep-namespace pid config with isolatePids = false 2024-05-29 12:56:46 +00:00
7c8a18ecbd systemd: remove no-longer-used user@1000 override 2024-05-29 12:56:19 +00:00
35ff7de06e dbus: manage it ourselves instead of having systemd do it 2024-05-29 12:55:51 +00:00
00d06db66a make-sandboxed: handle more systemd service files 2024-05-29 12:54:44 +00:00
c570b7bf5d dbus: manage it ourselves instead of having systemd do it 2024-05-29 11:30:33 +00:00
770fc2e574 systemd: fix typod IgnoreOnIsolate option 2024-05-29 11:30:33 +00:00
0ed7eb24fb programs: assorted: remove legacy programs.feedback setting 2024-05-29 11:30:33 +00:00
ad8e75b6a3 programs: assorted: remove /var/lib/alsa persistence; doesnt seem to be needed 2024-05-29 11:30:33 +00:00
e8dbe0750d networkmanager: fix sandbox to actually work with systemd-resolved 2024-05-29 10:34:24 +00:00
1378988f21 desko: *really* disable wpa_supplicant 2024-05-29 10:34:03 +00:00
b88467771e doc: trust-dns: fix wan.txt example path 2024-05-29 09:33:59 +00:00
4309d887da wpa_supplicant: remove unused services 2024-05-29 09:33:25 +00:00
1ee21c4795 NetworkManager: run as user instead of root 2024-05-29 09:16:30 +00:00
fb7bcbb5f5 NetworkManager-wait-online: fix missing sanebox path 2024-05-29 01:37:15 +00:00
0013e8305e networkmanager: cleanup 2024-05-29 01:35:38 +00:00
7dedfcebb9 networkmanager: sandbox 2024-05-29 01:33:15 +00:00
753b97ffb4 todo.md: mark hosts/modules/gui cleanup as complete 2024-05-28 16:51:29 +00:00
247fc1f887 hosts/modules/gui: fold into hosts/common/programs 2024-05-28 16:51:02 +00:00
3c2ca46ef9 hosts/modules/gui/gtk: hoist to sane.programs.sane-theme 2024-05-28 16:44:27 +00:00
95dc395925 hosts/modules/gui/theme: lift my sway background up into its own package 2024-05-28 15:48:37 +00:00
cefd6c0534 documentation improvements 2024-05-28 13:36:01 +00:00
05efec8fd7 wg-home: decrease the refresh timeout 2024-05-28 13:36:01 +00:00
e8846b2d6b wpa_supplicant: sandbox 2024-05-28 13:36:01 +00:00
be38d56717 make-sandboxed: handle more systemd/dbus service file locations 2024-05-28 13:36:01 +00:00
7d242ab02c sane-battery-estimate: sandbox 2024-05-28 09:41:04 +00:00
47611eaa26 sane-weather: sandbox 2024-05-28 09:38:04 +00:00
9719f0f785 mpv: relax sandboxing for the sake of subtitle downloading 2024-05-28 09:37:57 +00:00
8042ea76e6 assorted programs: specify sandbox.autodetectCliPaths variant more precisely than just true 2024-05-28 07:14:27 +00:00
c59236509b sane-cast: sandbox 2024-05-28 07:07:11 +00:00
50e5206b0e todo.md: document that moby touchscreen stays on even when the screen is disabled 2024-05-28 05:27:37 +00:00
4ba0343315 networkmanager: hoist some lib.mkIfs up a few levels
would you believe one of these attributes was being set without a mkIf cfg.enabled guard :)
2024-05-28 05:27:23 +00:00
cbe6072c03 polyunfill: remove policykit suid wrappers 2024-05-28 05:24:37 +00:00
bea1fd95e5 polyunfill: disable dbus-daemon-launch-helper suid wrapper 2024-05-28 05:14:06 +00:00
ae544c0649 polyunfill: disable mount/umount suid wrappers 2024-05-28 05:02:26 +00:00
b571f70988 polyunfill: remove fusermount suid wrapper 2024-05-28 04:56:14 +00:00
e6498ad152 notejot: fix sandboxing 2024-05-28 03:59:31 +00:00
976b8ae45e rofi-snippets: make the filtering case insensitive, and improve ellipsis placement come 1.7.6 2024-05-28 03:38:36 +00:00
ab7c4d7410 rofi-snippets: remove the subshell and just use a pipe
i expect that this is faster, particularly because bash should stand up each section of the pipeline in parallel, right?
2024-05-28 03:23:04 +00:00
d2c3bec98e rofi-snippets: remove an extraneous layer of sandbox 2024-05-28 03:04:57 +00:00
3c5e5632ee wtype: sandbox 2024-05-28 03:04:26 +00:00
dcedb8d3f0 sanebox: handle --flag=path style of autodetected paths 2024-05-28 03:04:02 +00:00
8586db59f1 todo.md: sync 2024-05-28 02:14:10 +00:00
1f4d500b02 snippets: update 2024-05-28 02:11:49 +00:00
56b846023b update snippets 2024-05-28 01:27:59 +00:00
747d6c876d sane-vpn: add a "dns-fix" subcommand to open a shell using an external DNS resolver
this is hopefully temporary, until i can cleanup my trust-dns recursive resolver
2024-05-28 01:23:22 +00:00
f38d2d52d2 alsa-ucm-pinephone-pmos: prefer the earpiece over the "internal speaker" 2024-05-27 14:13:56 +00:00
04bbf54385 alsa-ucm-conf: switch to postmarketos version 2024-05-27 13:41:03 +00:00
f2271180dd alsa-ucm-conf: split the patched alsa confs out into their own package 2024-05-27 12:53:33 +00:00
60b1ab1429 conky: split sane-battery-estimate out into its own program 2024-05-27 11:33:40 +00:00
db3636641d sxmo-utils: disable update script 2024-05-27 07:51:56 +00:00
54a891504d delfin: 0.4.2 -> 0.4.4 2024-05-27 07:51:56 +00:00
8ea5061bef firefox-extensions: update to latest 2024-05-27 07:51:56 +00:00
b6d19a7a09 firefox-extensions.ctrl-shift-c-should-copy: update version field to use unstable idioms 2024-05-27 07:51:56 +00:00
439be20be7 lemmy-lemonade: 2024.03.20 -> 2024.04.22 2024-05-27 07:51:56 +00:00
a024f685c3 firefox: replace i-still-dont-care-about-cookies extension with a uBlock filter list
simpler that way; fewer extensions to trust
2024-05-27 07:43:55 +00:00
9c20cef6ea firefox: ublacklist: disable (i wasnt using any rules; it wasnt blocking anything from google search results) 2024-05-27 07:22:47 +00:00
abb65e55c6 uassets: fix updateScript 2024-05-27 07:16:50 +00:00
a2d385708f flake: echo the update command before running it 2024-05-27 07:16:42 +00:00
f6f1a6e136 firefox: uBlock Origin: ship filter lists statically 2024-05-27 06:54:52 +00:00
7941a8b1ed refactor: firefox: fix uBlock json indentation 2024-05-27 04:46:38 +00:00
bbcf8841ea todo.md: sync 2024-05-27 00:49:51 +00:00
063b0be5b6 hosts/modules/gui/greetd: remove 2024-05-27 00:44:01 +00:00
7e490f5c07 remove lingering references to sxmo 2024-05-27 00:38:30 +00:00
10a985e7f9 hosts/modules/gui/sxmo: remove 2024-05-27 00:27:53 +00:00
f3c3df2ca7 sxmo_suspend.sh: lift out of hosts/modules/gui/sxmo/hooks
i want to preserve this script for the future, while deleting the rest of my (unused) SXMO config
2024-05-27 00:23:50 +00:00
f477604063 hosts/modules/gui: remove gnome 2024-05-27 00:13:19 +00:00
d46fa8a242 swaync-fbcli: sandbox (experimental) 2024-05-27 00:11:20 +00:00
62b2eb874c swaync-service-dispatcher: sandbox 2024-05-27 00:07:30 +00:00
133c1b3699 swaync: remove unused systemd integrations
it's all s6 now
2024-05-27 00:06:03 +00:00
1b4300dbeb swaync: remove unused vpn button 2024-05-27 00:00:44 +00:00
a1c1a87dd8 nixpkgs: 2024-05-24 -> 2024-05-26; nixpkgs-wayland, sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/cc5c0d369b5e8f49705e2a2d7464e4b162804805' (2024-05-24)
  → 'github:nixos/nixpkgs/2baa940f86e1fc54757fd7d1ed551c0a38904bf2' (2024-05-26)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/2baa58d3488bd9cc4d53d6812509edc34a1c7e2a' (2024-05-24)
  → 'github:nixos/nixpkgs/7780e5160e011b39019797a4c4b1a4babc80d1bf' (2024-05-26)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/8746004cd97164c89f0997ea06642b819e5bc3fb' (2024-05-24)
  → 'github:nix-community/nixpkgs-wayland/397c85d463aef789a8dd24c4db467e9ad787907b' (2024-05-26)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/5fa64b174daa22fe0d20ebbcc0ec2c7905b503f1' (2024-05-19)
  → 'github:nix-community/lib-aggregate/dbc9130fe1455e0f6ee4d8f5f799f9be551f866b' (2024-05-26)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/0df131b5ee4d928a4b664b6d0cd99cf134d6ab6b' (2024-05-19)
  → 'github:nix-community/nixpkgs.lib/d0d27192931680482081aa1c38389da2af84a651' (2024-05-26)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/b549832718b8946e875c016a4785d204fcfc2e53' (2024-05-22)
  → 'github:Mic92/sops-nix/962797a8d7f15ed7033031731d0bb77244839960' (2024-05-26)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/e7cc61784ddf51c81487637b3031a6dd2d6673a2' (2024-05-18)
  → 'github:NixOS/nixpkgs/59a450646ec8ee0397f5fa54a08573e8240eb91f' (2024-05-25)
```
2024-05-26 15:07:25 +00:00
92b9a56894 cleanup: remove unused secrets/common/wg/* 2024-05-26 14:37:33 +00:00
b159240b7f servo: import ovpn privkey 2024-05-26 14:37:33 +00:00
8a9f96eefc moby: import own OVPN privkey 2024-05-26 14:31:08 +00:00
af5aa15c23 cross: get passt to cross compile 2024-05-26 14:26:56 +00:00
a03099569c sanebox: fix bwrap+pasta DNS forwarding for hosts not using trust-dns 2024-05-26 14:26:56 +00:00
b1c7061b21 vpn: fix typos from previous 2 commits 2024-05-26 14:26:47 +00:00
c528bb3ec9 desko: add to OVPN 2024-05-26 14:07:32 +00:00
002639cc76 ovpn: use a single key per-device
this should fix the traffic collisions i'm seeing with the existing setup
2024-05-26 14:04:52 +00:00
45967fde7b brave: fix sandboxing under pasta/netns 2024-05-26 13:05:44 +00:00
ed97a81ef3 sane-vpn: use bwrap instead of just pasta so that the uids get mapped and programs can be happy 2024-05-26 13:04:13 +00:00
f158842c70 sanebox: fix uid mapping when bwrap uses the pasta backend 2024-05-26 13:03:50 +00:00
90d428be7f sane-vpn: allow sane-vpn do to work with no additional arguments 2024-05-26 11:33:12 +00:00
9d7b68eeb4 sane-tag-music: rewrite empty tracknumber tag to delete the tracknumber tag 2024-05-26 10:44:25 +00:00
8951df2e2c sane-scripts: set vim tags for python scripts 2024-05-26 10:42:12 +00:00
3a045f4d88 doc: polyunfill: point to https://github.com/NixOS/nixpkgs/pull/314791 2024-05-26 08:00:18 +00:00
57d6a9a4c3 polyunfill: simplify pam hacks 2024-05-26 07:04:12 +00:00
2ee39ca0cc poly_unfill: remove /run/wrappers/bin/unix_chkpwd
non-privileged users don't need to check passwords

well, maybe they do (for desktop unlockers), but i've already solved that :)
2024-05-26 06:37:59 +00:00
9d9211c5fa polyunfill: distribute /run/wrappers/bin/unix_chkpwd without suid bit 2024-05-26 01:18:30 +00:00
9ce7dcd57a /run/wrappers: remove unused newgidmap,newuidmap,newgrp binaries 2024-05-26 01:18:30 +00:00
af72f312d3 sandbox: remove /run/wrappers: SUID wrappers dont really accomplish much inside a namespace 2024-05-26 01:18:30 +00:00
efa1ee6c69 iproute2: disable sandbox and fix ip commands 2024-05-26 01:18:30 +00:00
6a15434cc6 net/vpn: remove the bridge devices from my VPN setup 2024-05-26 01:18:30 +00:00
59e4256dd8 sane-vpn: lint 2024-05-26 01:18:30 +00:00
6365bb7594 desko: disable wpa_supplicant/wireless networking again 2024-05-26 01:18:17 +00:00
8cb73687ce unl0kr: don't add extra deps to user's PATH 2024-05-26 01:17:42 +00:00
73f5c9608e sanebox: tighter dependency handling, to not rely on @BACKEND_FALLBACK@ 2024-05-25 10:26:36 +00:00
b035d312aa firejail: purge 2024-05-25 10:21:31 +00:00
a5e1a804c9 sane-vpn: port to sanebox/pasta (no more firejail) 2024-05-25 10:09:10 +00:00
7c6813ff37 sanebox: add a new method pastaonly 2024-05-25 10:08:49 +00:00
7b1bc210fd sanebox: integrate with pasta (passt) for better net sandboxing 2024-05-25 09:39:18 +00:00
118ed5f950 sanebox: populate --sanebox-net-dev with the actual net device -- not the bridge 2024-05-25 08:17:38 +00:00
ffe599e5cb sanebox: rename --sanebox-net to --sanebox-net-dev 2024-05-25 08:13:35 +00:00
fc52860dfc nixpatches: fix miniupnpc 2024-05-25 08:04:08 +00:00
377b1a21a8 todo.md: explore beets for mp3 tagging 2024-05-25 08:03:35 +00:00
a7881ecfce self-check: refactor 2024-05-25 04:10:15 +00:00
692bc89cbb health-check: include a wg-home check 2024-05-25 03:49:33 +00:00
842651efd5 mpv: tune webm.conf 2024-05-25 02:05:18 +00:00
27b4d4da16 mpv: ship a music visualizer
note that it doesnt show in `webm` exports
2024-05-25 02:05:09 +00:00
e407467e55 mpv: ship mpv-webm tool for clipping videos 2024-05-25 00:55:40 +00:00
30c677fafc feeds: subscribe to weekinethereumnews.com 2024-05-25 00:52:39 +00:00
ac59083e01 nixpkgs: 2024-05-23 -> 2024-05-24; nixpkgs-wayland -> 2024-05-24
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/4e80f8a6e6acab514a039e525b8613651c301ad3' (2024-05-23)
  → 'github:nixos/nixpkgs/cc5c0d369b5e8f49705e2a2d7464e4b162804805' (2024-05-24)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/b962cd91aa0b1150ebd4e8552943de9b7700fe5e' (2024-05-23)
  → 'github:nixos/nixpkgs/2baa58d3488bd9cc4d53d6812509edc34a1c7e2a' (2024-05-24)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/ff79b5982b903329be17630667bb7a0f28552ac5' (2024-05-23)
  → 'github:nix-community/nixpkgs-wayland/8746004cd97164c89f0997ea06642b819e5bc3fb' (2024-05-24)
• Updated input 'nixpkgs-wayland/nix-eval-jobs/nixpkgs':
    'github:NixOS/nixpkgs/b962cd91aa0b1150ebd4e8552943de9b7700fe5e' (2024-05-06)
  → 'github:NixOS/nixpkgs/ad7efee13e0d216bf29992311536fce1d3eefbef' (2024-05-06)
```
2024-05-24 23:27:05 +00:00
49b48b24fc ship linux/posix manpages 2024-05-24 06:57:20 +00:00
4bc6a4fc67 todo.md: document mpv audiocast limitations 2024-05-24 06:42:23 +00:00
844a128d60 iproute2: fix sandboxing (hopefully) 2024-05-24 06:41:12 +00:00
d25fb31767 sanebox: fix qoute error in linkCache array test 2024-05-24 06:14:08 +00:00
309797fe23 sane-input-handler: fix unrecoverable terminal state
bonsai is prone to miss inputs during high CPU load.
2024-05-24 04:29:34 +00:00
a6b10244eb sane-input-handler: set vim filetype hint 2024-05-24 04:06:53 +00:00
18ec5505c4 servo: re-enable slskd
routing seems stable
2024-05-24 02:58:09 +00:00
e6dbf2d530 nixpatches: update gnome-keyring patch 2024-05-24 02:58:09 +00:00
a9e31539ea koreader-from-src: avoid a runtime dep on cmake 2024-05-24 02:58:09 +00:00
2ccb4d94c5 nixpkgs: 2024-05-16 -> 2024-05-23, nixpkgs-wayland, sops-nix, uninsane-dot-org
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/1887e39d7e68bb191eb804c0f976ad25b3980595' (2024-05-16)
  → 'github:nixos/nixpkgs/?' (2024-05-23)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/977a49df312d89b7dfbb3579bf13b7dfe23e7878' (2024-05-16)
  → 'github:nixos/nixpkgs/?' (2024-05-23)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/5e2c5345f3204c867c9d4183cbb68069d0f7a951' (2024-05-16)
  → 'github:nix-community/nixpkgs-wayland/?' (2024-05-23)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/09883ca828e8cfaacdb09e29190a7b84ad1d9925' (2024-05-12)
  → 'github:nix-community/lib-aggregate/5fa64b174daa22fe0d20ebbcc0ec2c7905b503f1' (2024-05-19)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/58e03b95f65dfdca21979a081aa62db0eed6b1d8' (2024-05-12)
  → 'github:nix-community/nixpkgs.lib/0df131b5ee4d928a4b664b6d0cd99cf134d6ab6b' (2024-05-19)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/b6cb5de2ce57acb10ecdaaf9bbd62a5ff24fa02e' (2024-05-12)
  → 'github:Mic92/sops-nix/b549832718b8946e875c016a4785d204fcfc2e53' (2024-05-22)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/8e47858badee5594292921c2668c11004c3b0142' (2024-05-11)
  → 'github:NixOS/nixpkgs/e7cc61784ddf51c81487637b3031a6dd2d6673a2' (2024-05-18)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=af8420d1c256d990b5e24de14ad8592a5d85bf77' (2024-04-15)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=e6f88f563bdd1700c04018951de4f69862646dd1' (2024-05-16)
```
2024-05-24 02:57:53 +00:00
ca57fd692f sane-input-handler: simplify the volume button controls; reduce vol-hold repeat count to 3 2024-05-23 02:50:38 +00:00
e6a8f5bae8 eg25-control: fix --enable-gps and --ensure-agps commands
these were failing due to pathing changes from systemd -> s6
2024-05-23 02:50:38 +00:00
d9922f8aa8 moby: tidy up the initrd kernel modules 2024-05-23 02:07:30 +00:00
c51dcb30a2 linux-postmarketos: add an option for building *with* modem power feature 2024-05-23 02:07:30 +00:00
03dab63042 moby: ship a bunch of kernel modules in the initrd: this allows the postmarketos kernel to boot to graphics! 2024-05-22 22:35:04 +00:00
293af36d25 linux-postmarketos: ship landlock 2024-05-22 22:33:40 +00:00
0a1b1ae52f linux-megous: remove some unneeded options (i.e. PCI) 2024-05-22 20:25:17 +00:00
5952c275a0 moby: document kernel compatibility 2024-05-21 22:54:11 +00:00
ea8eaaa91a moby: un-blacklist stk3310
i don't know if blacklisting it is maybe interfering with other stuff
2024-05-21 22:47:12 +00:00
14a92b3f64 moby: disable iio sensor
this relaxes kernel requirements, allowing the pmOS kernel to pass eval checks
2024-05-21 22:47:12 +00:00
c5e7ef7b0c polyunfill: don't ship x86-only kernel modules to moby's initrd
notably, this relaxes some constraints on the kernel so that e.g.
postmarketOS kernel actually passes eval checks (and boots to ssh!
no graphics yet)
2024-05-21 22:47:12 +00:00
b6d31e127d linux-megous: dont auto-enable SELINUX
i think maybe it's disabled for a reason: systemd is built without it, and either it or SUN8I_DE2_CCU seems to be the difference between working drm and non-working drm
2024-05-21 22:47:12 +00:00
7f71a47d3b linux-postmarketos: build in a manner such that nixpkgs eval-time assertions pass
nixpkgs needs to know the config as an actual nix expression => have to vendor the pmos config then
2024-05-21 22:47:12 +00:00
2640253424 todo.md: note that bpf may be disabled on moby 2024-05-21 22:47:12 +00:00
42d11998e8 linux-postmarketos: init 2024-05-21 22:47:12 +00:00
d0734947bf polyunfill: disable swraid 2024-05-21 22:47:12 +00:00
41b385b6ca moby: refactor the kernel config into the actual kernel package and do less of that in the module system
this makes it easier to swap Kconfigs verbatim from other distros, e.g.
2024-05-21 22:47:12 +00:00
2e07797065 megapixels: document how to debug 2024-05-21 10:12:20 +00:00
b8a7ac8c95 todo.md: document moby kaslr failings 2024-05-21 01:11:02 +00:00
cda70b2a16 sane-reclaim-disk-space: tell the user about nix profile options 2024-05-20 20:45:58 +00:00
4834b61188 linux-megous: trim config (RC_CORE, DRM_KMS_HELPER)
it still boots to a working desktop without these
2024-05-20 19:40:54 +00:00
134b27f70e linux-megous: remove unnecessary SYSFB_SIMPLEFB config
seems to still work without it
2024-05-20 19:14:48 +00:00
a47102e152 linux-megous: simplify the Kconfig further 2024-05-20 18:08:42 +00:00
6eb75b3841 linux-megous: re-enable OV8858 now that it compiles 2024-05-20 10:04:00 +00:00
3d295e8757 gst-device-monitor: bundle more gstreamer plugins to improve node detection 2024-05-20 09:59:08 +00:00
e3a20477f7 gst-device-monitor: wrap with required gst-plugins-base runtime dependency 2024-05-20 06:17:11 +00:00
7fd527c9d6 trivial-builders: add runCommandLocalOverridable, like runCommand, but supports standard hooks like postBuild, etc. 2024-05-20 06:14:35 +00:00
c21ddca1fd servo: doof tunnel: enable IPv6 and forward-DNS records 2024-05-20 05:47:04 +00:00
f7cc3fc5d9 modules/dns: support AAAA records 2024-05-20 05:46:25 +00:00
875fe315c0 todo.md: document wg-ovpnd-... issue 2024-05-20 05:09:59 +00:00
47da8e55f3 servo: disable jackett/slskd/transmission temporarily 2024-05-20 05:08:58 +00:00
3b99bb497b servo: bridge to doof.net 2024-05-20 05:08:32 +00:00
cfedcc91bd gst-device-monitor: fix so manpages are bundled 2024-05-20 03:00:23 +00:00
ce663b1346 scripts: add health-check as a sort of poor-mans manual CI 2024-05-20 01:53:10 +00:00
9873353d00 refactor: replace --replace substitutions with --replace-fail where applicable 2024-05-19 23:31:54 +00:00
d58bdf82d9 cross: replace --replace with --replace-fail where applicable 2024-05-19 23:24:07 +00:00
9c2cc9641b cross: fix upstream fractal build
it still takes like an hour to build though
2024-05-19 23:16:29 +00:00
5a92b07f5d cross: clean up the meson x cargo flag patching 2024-05-19 22:33:00 +00:00
f20a0ac409 fractal-latest: purge (unused package) 2024-05-19 21:16:06 +00:00
87c84f0e2e ship libcamera, snapshot
note that properly packaging these is still a WIP
2024-05-19 10:41:09 +00:00
c0a6313023 home/mime: micro-opt: use toString instead of string coercion 2024-05-19 10:40:15 +00:00
26e347f38c moby: ship with way higher CMA by default 2024-05-19 10:40:15 +00:00
2d67b78ca4 linux-megous: configure with better DMABUF_HEAPS/CMA flags, which seems to help libcamera? 2024-05-19 10:40:15 +00:00
38c2db0333 libmegapixels: 2024-05-11 -> 2024-05-18 and patch some observed errors
not enough that it works completely though
2024-05-19 10:40:15 +00:00
631e0db7b4 cross: get snapshot to build 2024-05-19 10:40:15 +00:00
5619bb3334 pkgs: ship gst-device-monitor binary 2024-05-19 10:40:15 +00:00
e9d94f2c71 linux-firmware-megous: 2023-05-06 -> 2024-02-28
nothing really changed here
2024-05-19 07:55:22 +00:00
67f0d22ec6 linux-megous: 6.8.4 -> 6.9.0 (orange-pi-6.8-20240405-1842 -> orange-pi-6.9-20240514-1047) 2024-05-19 07:54:48 +00:00
0fc4f83fc9 sane-input-handler: bump volume hold time from 600ms -> 750ms
hopefully this decreases the number of volup inputs which are misread as volup-hold (which happens a lot when the screen is off...?)
2024-05-19 00:34:23 +00:00
1b24bd50f9 errno: ship 2024-05-19 00:21:30 +00:00
f481ef077c megapixels-next: init at unstable-2024-05-11
i might need to still do some wrapping with graphicsmagick/exiftool, not sure
2024-05-18 22:52:20 +00:00
1952e210f0 libmegapixels: init at 0.1.0-unstable-2024-05-11 2024-05-18 22:33:17 +00:00
58ef2cf863 calls/callaudiod: update documentation 2024-05-18 20:55:16 +00:00
da4c71d5f6 todo.md: elaborate a solution for trust-dns stuff 2024-05-18 09:48:51 +00:00
41bc4ac7b4 callaudiod: fix repo URL 2024-05-18 08:10:34 +00:00
6365a58c3e sanebox: avert a subshell in removeSubpaths 2024-05-18 08:10:34 +00:00
3361f2bbe7 zsh: port to sane.programs 2024-05-18 08:10:34 +00:00
c987f13ef0 calls: split callaudiod out and run it manually 2024-05-18 07:14:42 +00:00
ee36f2f052 sway: fix display names 2024-05-18 06:57:24 +00:00
09457bee5a sway: position gnome-calls on workspace 1 2024-05-18 06:55:39 +00:00
278631b59e calls: sandbox 2024-05-18 06:52:53 +00:00
4d09cce1aa calls: fix latency so moby doesnt underrun 2024-05-18 06:47:26 +00:00
b2f2f88dc6 calls: exit on UI close 2024-05-18 06:32:23 +00:00
cbbddee152 modules/programs: add ~/.config/FOO and ~/.local/share/FOO to the sandbox where applicable 2024-05-18 06:32:07 +00:00
68275eeb85 rmDbusServices: preserve package meta 2024-05-18 06:31:44 +00:00
7bb7a24b22 sanebox: tidy up the quoting in a few more edge-cases 2024-05-18 00:00:03 +00:00
795786f46b sanebox: prefer case statments over if/elif/elif... constructs 2024-05-17 23:32:51 +00:00
26aa68ee59 sanebox: replace short-circuit eval idiom with if/else 2024-05-17 23:21:36 +00:00
85c0e72bf1 sanebox: remove unnecessary quotes in case statement 2024-05-17 23:15:00 +00:00
bf98da0061 sanebox: remove extraneous quotes
probably some still remain
2024-05-17 23:01:24 +00:00
76434b6970 sanebox: make it more obvious what we substitute at build-time 2024-05-17 22:27:55 +00:00
0698d4be24 landlock-sandboxer: define meta.mainProgram 2024-05-17 22:26:55 +00:00
afb9d273ab servo: re-enable slskd 2024-05-17 22:00:46 +00:00
0003d79324 sane-tag-music: add a print-missing subcommand 2024-05-17 09:41:50 +00:00
e9bfc6cebd sane-tag-music: fix help message formatting 2024-05-17 09:20:33 +00:00
aeed9ffd5b sane-sync-music: prune directories left empty by sync 2024-05-17 08:59:36 +00:00
9c27b8e864 swaync: sort icons 2024-05-17 08:42:35 +00:00
af34d395fc swaync: fix Discord icon 2024-05-17 07:18:23 +00:00
008b659a10 swaync: reorder icons 2024-05-17 05:49:28 +00:00
1ce2839df9 swaync: clean up icons a bit more 2024-05-17 05:45:15 +00:00
022d15c2c7 swaync: increase font size of service icons 2024-05-17 03:42:32 +00:00
908a2ca6c3 swaync: fix a bug that i couldnt see all icons on the same row 2024-05-17 03:21:41 +00:00
614eebfdc0 todo.md: document a sandbox link cache bug 2024-05-17 03:21:11 +00:00
42fb79b025 swaync: improve gnome-calls icon 2024-05-17 00:49:40 +00:00
4265ea9b99 calls: auto-start 2024-05-17 00:41:32 +00:00
a7d376778e gnome-calls: re-enable 2024-05-17 00:36:56 +00:00
157af52112 feeds: add Grumpy.website 2024-05-16 19:25:22 +00:00
c7838486d3 nixpkgs: 2024-05-14 -> 2024-05-16, nixpkgs-wayland
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/a47743431bb52c25eecbeda1bb2350902478befe' (2024-05-14)
  → 'github:nixos/nixpkgs/1887e39d7e68bb191eb804c0f976ad25b3980595' (2024-05-16)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/18198ef6f41074a6b42318dacb6fa4712b893ba4' (2024-05-14)
  → 'github:nixos/nixpkgs/977a49df312d89b7dfbb3579bf13b7dfe23e7878' (2024-05-16)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/ce959368cbc8202181f37a464c825d54720b6b68' (2024-05-14)
  → 'github:nix-community/nixpkgs-wayland/5e2c5345f3204c867c9d4183cbb68069d0f7a951' (2024-05-16)
• Updated input 'nixpkgs-wayland/nix-eval-jobs':
    'github:nix-community/nix-eval-jobs/63154bdfb22091041b307d17863bdc0e01a32a00' (2024-05-09)
  → 'github:nix-community/nix-eval-jobs/bb95091f6c6f38f6cfc215a1797a2dd466312c8b' (2024-05-15)
```
2024-05-16 09:46:40 +00:00
1ac5b56f34 todo.md: task to fix ip netns sandboxing 2024-05-16 09:42:05 +00:00
5924d092f4 coturn: expand documentation 2024-05-16 09:41:53 +00:00
63cbcb0896 todo.md: add a few improvements to make 2024-05-16 04:39:35 +00:00
7cff078698 todo.md: remove completed items 2024-05-16 04:10:09 +00:00
a5f6aae6f5 desko: use stock systemd resolver
i need a backup system to use when things are broken, and this helps with debugging as well
2024-05-16 03:12:30 +00:00
fd94422982 distcc: purge 2024-05-16 02:51:38 +00:00
55a7119e3f ccache: purge 2024-05-16 02:51:03 +00:00
d258d4ddd5 desko: re-enable firewall 2024-05-16 02:49:03 +00:00
c39aab34e0 refactor: nix_serve_privkey -> nix_signing_key 2024-05-16 02:48:16 +00:00
9d725a0974 servo: disable unused nixcache.uninsane.org 2024-05-16 02:46:23 +00:00
4a15339e0e desko: re-introduce the nix_serve key, which is actually needed for SSH deployements, not just nix-serve 2024-05-16 02:43:32 +00:00
df4ef0ce5a desko: disable nix-serve 2024-05-16 02:35:27 +00:00
3bb5546aaf systemd-logind: fix to not sleep when i close the lid (again) 2024-05-16 02:13:02 +00:00
4de3c6d664 sanebox: fix tab typo when parsing the link cache 2024-05-16 00:15:57 +00:00
b5502ea401 sanebox: remove --sanebox-cache-symlink flag 2024-05-15 23:59:38 +00:00
1211023c55 modules/programs: remove dead code from per-user profiles 2024-05-15 23:58:10 +00:00
b4229ecb1e sanebox: load the link cache from a static /etc path instead of via CLI args 2024-05-15 23:55:15 +00:00
348837ff4a programs: sandboxing: replace profiles with raw CLI args 2024-05-15 09:13:20 +00:00
17eaa7446a sanebox: remove all profile-related features except for direct, path-based profile loading 2024-05-15 09:13:20 +00:00
530664294a programs: sandbox: always specify --sanebox-profile-dir instead of loading from XDG_DATA_DIRS 2024-05-15 08:54:16 +00:00
b649071d98 programs: sandboxing: make the profiles be generic across users
this is a step toward making the profile not even be dynamically loaded, since its content is no longer dynamic :)
2024-05-15 08:48:09 +00:00
ea2653b7ce programs: sandboxing: pass home- and runtime-relative paths to the sandboxer, instead of making absolute first 2024-05-15 08:20:09 +00:00
d97f0f7300 sanebox: implement --sanebox-home-path and --sanebox-run-path flags 2024-05-15 08:05:00 +00:00
ee43fcdb89 rename LG TV -> Cuddlevision 2024-05-15 07:50:38 +00:00
4c1b1282d6 modules/programs: sandbox: be compatible with systemd resolved again 2024-05-15 02:57:40 +00:00
bc73a16475 networkmanager: fix to be compatible when systemd-resolved is enabled 2024-05-15 02:57:40 +00:00
adfaa7f9c1 sane-sandboxed -> sanebox 2024-05-15 01:41:40 +00:00
f9a6873ee9 signal-desktop: remove NIXOS_OZONE_WL=1 hack (no longer required) 2024-05-15 00:10:00 +00:00
66f73c92bd trust-dns: asSystemResolver: listen also on ipv6 address 2024-05-14 23:38:01 +00:00
d5e8974a4a refactor: trust-dns: listenAddrs -> listenAddrsIpv4 2024-05-14 23:22:50 +00:00
e040a5b0c5 servo: trust-dns: remove hn-resolver
my hosts run their own recursive DNS resolvers now, so there's no need for the wireguard VPN to provide them with that
2024-05-14 23:20:19 +00:00
d2ac88d66d nixpatches: upstream the gnome-keyring cross compilation patch 2024-05-14 23:12:59 +00:00
b534af5203 signal-desktop: use nixpkgs' nodejs instead of the signal pin
it still seems stable
2024-05-14 23:12:41 +00:00
b06b75441c signal-desktop: 7.0.0 -> 7.8.0 2024-05-14 23:05:00 +00:00
1f405fb2ba element-desktop: update electron_28 -> electron_29 2024-05-14 22:32:56 +00:00
ffe9dcedf7 koreader: 2024.03 -> 2024.04 2024-05-14 22:12:23 +00:00
fc649de64c fractal: remove dead code 2024-05-14 20:56:50 +00:00
1210696e3a fractal: re-enable jpeg decoding 2024-05-14 20:56:37 +00:00
47ced34c84 fractal: 6-unstable-2024-01-31 -> 7 2024-05-14 20:15:27 +00:00
ae7034d942 nixpkgs: 2024-05-13 -> 2024-05-14; nixpkgs-wayland
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/eda36d7cf3391ad06097009b08822fb74acd5e00' (2024-05-13)
  → 'github:nixos/nixpkgs/a47743431bb52c25eecbeda1bb2350902478befe' (2024-05-14)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0a949cf2618e8eab83aa008f1f8e03db137ed36c' (2024-05-13)
  → 'github:nixos/nixpkgs/18198ef6f41074a6b42318dacb6fa4712b893ba4' (2024-05-14)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/ed18785b8816fa878bdd9df7f2e8722695401ef8' (2024-05-13)
  → 'github:nix-community/nixpkgs-wayland/ce959368cbc8202181f37a464c825d54720b6b68' (2024-05-14)
```
2024-05-14 18:04:22 +00:00
f3cf9e0bed trust-dns: set it to NOT be the system resolver for servo
trust-dns recursor is too beta for servo
2024-05-14 09:03:10 +00:00
3a7c9022af trust-dns: bump StartLimitBurst so systemd doesnt abort the service too early 2024-05-14 08:50:37 +00:00
2a199bf373 trust-dns: recursor: merge DHCP DNS servers from all non-downed connections
otherwise overwriting the toml configs gets messy, when interfaces come up in unpredictable order
2024-05-14 08:25:59 +00:00
53198128e8 trust-dns: hook NetworkManager for state changes
there may be some edgecases to sort out around e.g. first-run,
but so far it seems to be importing the DHCP search zones :)
2024-05-14 07:42:41 +00:00
bee3eea040 modules/programs: sandbox: remove no-longer-needed /run/systemd/resolve from sandbox 2024-05-14 04:18:29 +00:00
1e202baa8a networkmanager: tune config
mostly just pruning unused features
2024-05-14 04:18:29 +00:00
39eb1d150a dns: deploy trust-dns as the default recursive resolver
outstanding issues: native.uninsane.org doesn't resolve. appears possibly to be an issue with following CNAMEs
2024-05-14 04:18:29 +00:00
68e6666819 trust-dns: use my patched version 2024-05-14 04:18:29 +00:00
447e1feb9c sway: fix Super+L shortcut to actually lock 2024-05-14 04:17:05 +00:00
26e3c3e5b7 s6-rc: fix persist.byStore.persist typo 2024-05-14 04:16:50 +00:00
38c038f4f7 sane-sandboxed: fix typo in linkCache queries, which would otherwise break for paths containing spaces 2024-05-14 01:22:08 +00:00
3557994cbb gnome-clocks: fix sound an sandboxing artifacts 2024-05-14 01:21:37 +00:00
f3106ee316 programs: maxBuildCost: fix to actually build everything by default 2024-05-13 22:57:40 +00:00
bef0099eec scripts/clean: fix to cleanup more dangling result symlinks 2024-05-13 22:45:33 +00:00
67434caf45 scripts: add a script to clean the git dir 2024-05-13 22:45:33 +00:00
be84ab1f45 programs: set buildCost=1 for assorted low-priority programs 2024-05-13 22:45:33 +00:00
43d32641f3 programs: buildCost: introduce a new level between min and light 2024-05-13 22:45:33 +00:00
9bf0dbabae gnome.seahorse: disable 2024-05-13 22:45:33 +00:00
8c7880774e monero-gui: disable 2024-05-13 22:45:33 +00:00
5774aa4a8f zulip: dont ship 2024-05-13 22:45:33 +00:00
6c6d11578e cross: fix curl-impersonate-chome build 2024-05-13 22:45:33 +00:00
f33e960bdf cross: gnome-keyring: patch via nixpkgs patch instead of override 2024-05-13 22:45:33 +00:00
14202a5bcc neovim: wrap in such a way as to avoid cross-compilation-specific patching 2024-05-13 22:45:33 +00:00
3d2babf2bb overlays/cross: sync upstreaming status 2024-05-13 22:45:33 +00:00
9d51b2ecc7 nixpatches: stop applying patches i dont need 2024-05-13 22:45:33 +00:00
0b855efb5f nixpkgs: bump; nixpkgs-wayland: bump
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/6a217e9b1d39415076c7a6cfc44be5e935e7a839' (2024-05-13)
  → 'github:nixos/nixpkgs/eda36d7cf3391ad06097009b08822fb74acd5e00' (2024-05-13)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/6bc8c8a7ac13182ee24a5e2caab7ad739f1c55c5' (2024-05-13)
  → 'github:nixos/nixpkgs/0a949cf2618e8eab83aa008f1f8e03db137ed36c' (2024-05-13)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/5f7272dff81558143f93e2cb32189a52ef965892' (2024-05-13)
  → 'github:nix-community/nixpkgs-wayland/ed18785b8816fa878bdd9df7f2e8722695401ef8' (2024-05-13)
```
2024-05-13 22:45:33 +00:00
2ae286ff75 nixpkgs: 2024-05-08 -> 2024-05-13, nixpkgs-wayland, sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/c8e3f684443d7c2875ff169f6ef2533534105e7b' (2024-05-08)
  → 'github:nixos/nixpkgs/6a217e9b1d39415076c7a6cfc44be5e935e7a839' (2024-05-13)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/a751e2faa2fc94c1337c32aaf6a6e417afe90be9' (2024-05-08)
  → 'github:nixos/nixpkgs/6bc8c8a7ac13182ee24a5e2caab7ad739f1c55c5' (2024-05-13)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/7dc8fb2aa7db995ac1ce2a8f2f8d8784b2af591c' (2024-05-08)
  → 'github:nix-community/nixpkgs-wayland/5f7272dff81558143f93e2cb32189a52ef965892' (2024-05-13)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/26fabca301e1133abd3d9192b1bcb6fb45b30f1d' (2024-05-05)
  → 'github:nix-community/lib-aggregate/09883ca828e8cfaacdb09e29190a7b84ad1d9925' (2024-05-12)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/4b620020fd73bdd5104e32c702e65b60b6869426' (2024-05-05)
  → 'github:nix-community/nixpkgs.lib/58e03b95f65dfdca21979a081aa62db0eed6b1d8' (2024-05-12)
• Updated input 'nixpkgs-wayland/nix-eval-jobs':
    'github:nix-community/nix-eval-jobs/7b6640f2a10701bf0db16aff048070f400e8ea7c' (2024-04-23)
  → 'github:nix-community/nix-eval-jobs/63154bdfb22091041b307d17863bdc0e01a32a00' (2024-05-09)
• Updated input 'nixpkgs-wayland/nix-eval-jobs/nixpkgs':
    'github:NixOS/nixpkgs/1e1dc66fe68972a76679644a5577828b6a7e8be4' (2024-04-22)
  → 'github:NixOS/nixpkgs/ad7efee13e0d216bf29992311536fce1d3eefbef' (2024-05-06)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/893e3df091f6838f4f9d71c61ab079d5c5dedbd1' (2024-05-06)
  → 'github:Mic92/sops-nix/b6cb5de2ce57acb10ecdaaf9bbd62a5ff24fa02e' (2024-05-12)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/b980b91038fc4b09067ef97bbe5ad07eecca1e76' (2024-05-04)
  → 'github:NixOS/nixpkgs/8e47858badee5594292921c2668c11004c3b0142' (2024-05-11)
```
2024-05-13 22:45:33 +00:00
a05fa53ee1 curlftpfs: EXPERIMENT: double the connect timeout to see if this reduces dropped conns 2024-05-13 07:52:43 +00:00
46d95805e9 programs: simplify sandbox symlink closure code 2024-05-13 07:49:00 +00:00
9346a066d1 sane-sandboxed: fix typo in derefOnce 2024-05-13 06:49:43 +00:00
567531727e sane-sandboxed: fix typos in normPath 2024-05-13 06:32:13 +00:00
6c65e4b313 sane-sandboxed: be a little more careful with out vars 2024-05-13 04:00:15 +00:00
e6b13adb61 sane-open: associate rofi-applications.desktop with keyboard 2024-05-13 03:19:03 +00:00
bd3e06982b sane-sandboxed: tweak symlink caching to allow /run/current-system to be bind-mounted instead of symlinked 2024-05-13 02:11:47 +00:00
660ba94c7c sane-sandboxed: introduce a symlink cache to reduce readlink calls even more
it's all a bit silly. i still do a bunch of -L tests: i just avoid the costly readlink fork :|
2024-05-13 01:31:30 +00:00
11ddce043d sane-sandboxed: reduce forking (use out vars) 2024-05-12 22:35:05 +00:00
980fe6b33c sane-sandboxed: use local where applicable 2024-05-12 22:15:34 +00:00
016df3ff74 sane-open: launch some .desktop files even when they point outside ~/.local/share/applications
an unfortunate reality is that symlinks tend to get dereferenced too
early by other programs.
2024-05-12 22:13:28 +00:00
d827235d31 sane-sandboxed: be more strict internally about keeping paths var as absolute-paths 2024-05-12 21:44:33 +00:00
f7a25d1421 sane-sandboxed: bwrap: expose symlinks to the sandbox directly, instead of binding
some things (e.g. `sane-open`) require the symlink, and lose too much
info when working only with the bind. having the sandboxed environment
stay similar to the out env sould make debugging things simpler
2024-05-12 21:42:31 +00:00
d148b19767 sane-sandboxed: expand symlinks before binding them into the sandbox 2024-05-12 21:41:49 +00:00
89135d08cb rofi: file browser: include an entry to open the app launcher 2024-05-12 19:46:51 +00:00
15a5afd2c4 sane-open: special-case how i open .desktop files to be compatible with portals 2024-05-12 19:46:03 +00:00
e63e359417 sane-open: fix so we can launch read-only files 2024-05-12 17:50:11 +00:00
3c1a74998e applications: hide .desktop files which arent meant to be user-visible 2024-05-12 17:43:07 +00:00
eadf85f66d sane-open: associate as the default launcher for .desktop files 2024-05-12 17:41:00 +00:00
536eb2154a sane-open: add auto-keyboard action for a few more apps 2024-05-12 17:23:08 +00:00
e62365436c sane-cast: implement --device option to choose a specific device non-interactively 2024-05-11 00:40:38 +00:00
4b04c283b6 fcitx5: temporarily disable 2024-05-10 17:51:37 +00:00
def5816003 sane-vpn: fix "regions" printing to print all regions 2024-05-10 09:07:59 +00:00
6f2ae56126 sane-cast: add an --always-ask option 2024-05-10 07:01:16 +00:00
a40f05260a unl0kr: simplify the crash edge-case handling 2024-05-09 08:42:41 +00:00
2b539fafcd unl0kr: handle some crashy edgecases 2024-05-09 08:38:22 +00:00
954c5c8344 trust-dns: fix so it starts as part of boot 2024-05-09 07:19:17 +00:00
2a8ecf0423 nixpkgs: 2024-04-28 -> 2024-05-08; nixpkgs-wayland, sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/0e395f4da1693e39239ffac7abf73a0a6931c961' (2024-04-28)
  → 'github:nixos/nixpkgs/c8e3f684443d7c2875ff169f6ef2533534105e7b' (2024-05-08)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/93909e9c7b05634ad924ff97c259ae0859b81756' (2024-04-28)
  → 'github:nixos/nixpkgs/a751e2faa2fc94c1337c32aaf6a6e417afe90be9' (2024-05-08)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/4e58e2cf22d11426ed2f997551f3650de0639e3a' (2024-04-28)
  → 'github:nix-community/nixpkgs-wayland/7dc8fb2aa7db995ac1ce2a8f2f8d8784b2af591c' (2024-05-08)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/49d9b510614b9bd137e067eb31445a8feca83313' (2024-04-28)
  → 'github:nix-community/lib-aggregate/26fabca301e1133abd3d9192b1bcb6fb45b30f1d' (2024-05-05)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/ade4fb7bbf04cd52bc1705734d5dc67755d77ec9' (2024-04-28)
  → 'github:nix-community/nixpkgs.lib/4b620020fd73bdd5104e32c702e65b60b6869426' (2024-05-05)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f1b0adc27265274e3b0c9b872a8f476a098679bd' (2024-04-23)
  → 'github:Mic92/sops-nix/893e3df091f6838f4f9d71c61ab079d5c5dedbd1' (2024-05-06)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/74574c38577914733b4f7a775dd77d24245081dd' (2024-04-20)
  → 'github:NixOS/nixpkgs/b980b91038fc4b09067ef97bbe5ad07eecca1e76' (2024-05-04)
```
2024-05-09 05:26:23 +00:00
a056ca84be todo.md: fix multiple-schlocks bug 2024-05-07 15:26:08 +00:00
8d8bf00a34 s6-rc: use s6-rc stop instead of exiting 125 in the no-restart branch of "restartCondition = on-failure"
exiting 125 stops the service, but does NOT put it in the down state, preventing it from being re-started
2024-05-07 15:24:14 +00:00
f58bcb4767 swaylock, schlock: convert to services 2024-05-07 15:02:46 +00:00
4f56acc316 s6-rc: implement restartCondition to allow restarting of the service only on failure 2024-05-07 15:01:40 +00:00
fdf1b20368 s6-rc: propagate service status out of run script 2024-05-07 12:50:09 +00:00
c12691a3a0 todo.md: document multi-instance schlock issue 2024-05-06 17:31:54 +00:00
06bfa05ec1 todo.md: complete swaync modem toggle perm bug 2024-05-06 17:29:41 +00:00
32e06ce998 programs: gnome-disk-utility: grant sandbox access to ~/tmp 2024-05-06 05:15:28 +00:00
c0a7b831cd sane-open: more robust auto-application/file detection 2024-05-05 05:19:07 +00:00
8c04023eba sway: fix sane-open integration to not mistake it as a file 2024-05-05 05:04:25 +00:00
cf3cfc5249 sane-open: add debug logging 2024-05-05 05:03:22 +00:00
a1625ea41d programs: ship zulip 2024-05-04 08:28:48 +00:00
2cedd2beb4 readme: fix renamed users.nix -> users/default.nix 2024-05-02 10:30:41 +00:00
6544b9aca4 doc: dns: fix typo 2024-05-02 10:27:38 +00:00
08a9b838e5 sane-input-handler: fix log bog 2024-04-30 19:22:37 +00:00
b7dd40e558 sane-open-desktop -> sane-open and have it auto-open/close the keyboard based on what an app wants 2024-04-30 19:22:37 +00:00
7f2abf7e6e sane-input-handler: fix missing newline when logging 2024-04-30 15:30:39 +00:00
825812e511 sane-input-handler: reset rofi directory to ~ when using the app + fsbrowser 2024-04-30 15:29:00 +00:00
69e5495cc9 sane-input-handler: set keyboard as appropriate for file/app browser 2024-04-30 15:16:59 +00:00
b422f15b59 sane-input-handler: swap volup tap/hold actions 2024-04-30 14:38:17 +00:00
889b332ade trust-dns: split the parts which are generalizable into their own file
i can try to build this into a recursive resolver for *all* my hosts
2024-04-30 14:35:56 +00:00
46d1a49f0f servo: enable sane-cast program 2024-04-29 21:50:03 +00:00
1b156dcb0a networkmanager: fix eval error when not enabled 2024-04-29 05:58:32 +00:00
efd2f14a13 nixpkgs: 2024-04-27 -> 2024-04-28; nixpkgs-wayland
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/19c30e016f04874d60ed0922bf58be4aa9a15e53' (2024-04-27)
  → 'github:nixos/nixpkgs/0e395f4da1693e39239ffac7abf73a0a6931c961' (2024-04-28)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/77759bd39047f1b92f12b26b55029f0cc2c88093' (2024-04-27)
  → 'github:nixos/nixpkgs/93909e9c7b05634ad924ff97c259ae0859b81756' (2024-04-28)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/ff41a88e80aaf3ae1561cc6a54636fc46f9214de' (2024-04-27)
  → 'github:nix-community/nixpkgs-wayland/4e58e2cf22d11426ed2f997551f3650de0639e3a' (2024-04-28)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/3b32a98eb3053f8c8ca55497d1881443ef2996e6' (2024-04-21)
  → 'github:nix-community/lib-aggregate/49d9b510614b9bd137e067eb31445a8feca83313' (2024-04-28)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/6882347415e352cfc9c277cc01f73e0f5cb7b93c' (2024-04-21)
  → 'github:nix-community/nixpkgs.lib/ade4fb7bbf04cd52bc1705734d5dc67755d77ec9' (2024-04-28)
```
2024-04-29 04:16:33 +00:00
d4d06d037c replace pipewire ffadoSupport toggle with a patch to fix cross compilation 2024-04-28 15:07:28 +00:00
9525c09c41 cross: remove obsoleted gpodder patch 2024-04-27 17:10:50 +00:00
e5876a1e5b nixpkgs: 2024-04-26 -> 2024-04-27; nixpkgs-wayland -> 2024-04-27
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/7d3f4eadec32d447a5f20d87fa309f00986cb288' (2024-04-26)
  → 'github:nixos/nixpkgs/19c30e016f04874d60ed0922bf58be4aa9a15e53' (2024-04-27)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0b868df4ced96400774414f5baf30b696215b98f' (2024-04-26)
  → 'github:nixos/nixpkgs/77759bd39047f1b92f12b26b55029f0cc2c88093' (2024-04-27)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/ca9d278400c170935a95dd75e7e2537c2afd1cb7' (2024-04-26)
  → 'github:nix-community/nixpkgs-wayland/ff41a88e80aaf3ae1561cc6a54636fc46f9214de' (2024-04-27)
```
2024-04-27 16:18:28 +00:00
1757ea4492 cross: upstream eyeD3 patch 2024-04-27 13:31:47 +00:00
39d31c3ffd swaync-service-dispatcher: add -b to block on service state query, to avoid incorrect responses when run in parallel 2024-04-27 12:32:12 +00:00
c50ef59102 swaync: fix service state tracking for oneshot services 2024-04-27 12:13:34 +00:00
5fc4ca6dad modemmanager: ship udev rules 2024-04-27 12:01:01 +00:00
35c7527946 modemmanager: fix so it's active on boot 2024-04-27 11:54:08 +00:00
7e8a014f37 NetworkManager: use the upstream service file 2024-04-27 10:58:21 +00:00
4ce951bbed wpa_supplicant: re-enable 2024-04-27 10:34:25 +00:00
f784550b9b networkmanager: migrate from nixpkgs service to my own 2024-04-27 09:51:55 +00:00
1f2bbd4aec refactor: split modemmanager stuff into own file 2024-04-27 08:32:15 +00:00
2389757581 firefox-extensions.browserpass-extension: 3.7.2-2023-06-18 -> 3.8.0 2024-04-27 08:32:05 +00:00
9021ab9f05 s6: fix oneshot service runner
the runner previously couldn't find the 'live' directory, where the service state lives. now it can
2024-04-27 08:05:54 +00:00
547d71c19a nixpkgs: 2024-04-24 -> 2024-04-26, nixpkgs-wayland
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/acba655f267a49327f2cea95003f17b8540909c0' (2024-04-24)
  → 'github:nixos/nixpkgs/7d3f4eadec32d447a5f20d87fa309f00986cb288' (2024-04-26)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/1eb9a6980dee3970850f47ba8139c7402f54a9a0' (2024-04-24)
  → 'github:nixos/nixpkgs/0b868df4ced96400774414f5baf30b696215b98f' (2024-04-26)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/80659e4b2805654de851996e682b063a5d7eea5e' (2024-04-24)
  → 'github:nix-community/nixpkgs-wayland/ca9d278400c170935a95dd75e7e2537c2afd1cb7' (2024-04-26)
```
2024-04-27 06:33:24 +00:00
79bba42768 s6-rc: fix oneshot services to generate up, not run 2024-04-27 06:33:24 +00:00
8dd4fe06f3 s6: longshot -> longrun (typo) 2024-04-27 05:22:35 +00:00
19115dfb65 eg25-control: port to s6 (hopefully) 2024-04-26 21:44:13 +00:00
4c0ae75b00 todo.md: more context for the uosc volume issue 2024-04-26 17:21:32 +00:00
34842c00fe moby: make the modem powerable by the user, without root
this should allow migrating eg25-control to a user service
2024-04-26 17:19:38 +00:00
46a513b263 feeds: subscribe to SamuelDR 2024-04-26 17:19:38 +00:00
6129fbf2b3 lemmy: upstream the proxy headers 2024-04-26 16:44:43 +00:00
242541304e todo.md: document a few moby bugs around modem 2024-04-26 13:05:34 +00:00
f3d2dee470 lemmy: fix federation (broke due to invalid HTTP signatures) 2024-04-26 10:31:47 +00:00
3d207ab7bb coturn: allocate 256 ports instead of 16 2024-04-26 08:47:52 +00:00
95447eb765 goaccess: fix missing state dir 2024-04-26 08:47:09 +00:00
593268f620 coturn: run inside ovpns namespace 2024-04-26 08:01:34 +00:00
5c98a51cd6 dino: build without echo cancelation
this reduces CPU load on moby; it may also have implications for incoming call audio though, still sorting that out
2024-04-26 05:11:43 +00:00
4453bde815 dino: increase buffering 20ms -> 100ms (closer to 82ms, actually) 2024-04-25 11:28:22 +00:00
7843f9650a feeds: subscribe to The Amp Hour (podcast) 2024-04-25 05:54:10 +00:00
82dce71b9c feeds: add microarch.club podcast 2024-04-25 05:51:52 +00:00
8a981c3ca9 hackgregator: init at 2024-12-05
N.B.: it uses appstream/bwrap, and hence much be run with capsh --caps=
2024-04-25 03:56:57 +00:00
9c00c2c5cc zsh: add exit aliases: ecit, exi5 2024-04-25 01:51:45 +00:00
aad645f2c5 nixpkgs: 2024-04-22 -> 2024-04-24; nixpkgs-wayland; sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/fe2b7d6a922c875221671df6aa360b6e73d47e2f' (2024-04-22)
  → 'github:nixos/nixpkgs/acba655f267a49327f2cea95003f17b8540909c0' (2024-04-24)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8a3f95b79ba3083cfff90752296ef8a52a6bec9a' (2024-04-22)
  → 'github:nixos/nixpkgs/1eb9a6980dee3970850f47ba8139c7402f54a9a0' (2024-04-24)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/f01c36f09cc5c2d77cbab4475528e06d6641bff4' (2024-04-22)
  → 'github:nix-community/nixpkgs-wayland/80659e4b2805654de851996e682b063a5d7eea5e' (2024-04-24)
• Updated input 'nixpkgs-wayland/nix-eval-jobs':
    'github:nix-community/nix-eval-jobs/6b03a93296faf174b97546fd573c8b379f523a8d' (2024-01-14)
  → 'github:nix-community/nix-eval-jobs/7b6640f2a10701bf0db16aff048070f400e8ea7c' (2024-04-23)
• Updated input 'nixpkgs-wayland/nix-eval-jobs/flake-parts':
    'github:hercules-ci/flake-parts/34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5' (2023-12-01)
  → 'github:hercules-ci/flake-parts/9126214d0a59633752a136528f5f3b9aa8565b7d' (2024-04-01)
• Updated input 'nixpkgs-wayland/nix-eval-jobs/nix-github-actions':
    'github:nix-community/nix-github-actions/93e39cc1a087d65bcf7a132e75a650c44dd2b734' (2023-11-28)
  → 'github:nix-community/nix-github-actions/5163432afc817cf8bd1f031418d1869e4c9d5547' (2023-12-29)
• Updated input 'nixpkgs-wayland/nix-eval-jobs/nixpkgs':
    'github:NixOS/nixpkgs/d6863cbcbbb80e71cecfc03356db1cda38919523' (2023-12-21)
  → 'github:NixOS/nixpkgs/1e1dc66fe68972a76679644a5577828b6a7e8be4' (2024-04-22)
• Updated input 'nixpkgs-wayland/nix-eval-jobs/treefmt-nix':
    'github:numtide/treefmt-nix/2961375283668d867e64129c22af532de8e77734' (2023-12-19)
  → 'github:numtide/treefmt-nix/49dc4a92b02b8e68798abd99184f228243b6e3ac' (2024-04-01)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4371a1301c4d36cc791069d90ae522613a3a335e' (2024-04-22)
  → 'github:Mic92/sops-nix/f1b0adc27265274e3b0c9b872a8f476a098679bd' (2024-04-23)
```
2024-04-24 22:19:36 +00:00
d01e49f566 pipewire: switch back to bwrap sandboxing and document limitations 2024-04-24 13:14:35 +00:00
7447d4879e pipewire: man: link to docs 2024-04-24 10:33:23 +00:00
215864e3d4 pipewire: reduce realtime priority so it doesnt crash moby gpu driver 2024-04-24 09:36:22 +00:00
0cbb81cfea WIP: pipewire: trying to tune so lima doesnt crash 2024-04-24 09:20:13 +00:00
9d7816a1cd koreader: fix sandboxing so that i can open links again 2024-04-24 01:02:02 +00:00
461aa5ede0 htop: include "PRIORITY" column 2024-04-23 12:01:15 +00:00
b5874f4b49 sane-cast: fix casting for relative paths to mp4-only devices 2024-04-23 09:12:53 +00:00
10fc7bbb84 curlftpfs: document sandbox attempt 2024-04-23 09:08:05 +00:00
87e3f2a9ef pipewire: split rtkit into own file, and use defaults from pipewire project 2024-04-23 09:08:05 +00:00
5006692594 linux-megous: 6.7-20240306 -> 6.8-20240405 2024-04-23 09:08:05 +00:00
9481131daf pipewire: sandbox with landlock (so that rtkit integration works) and split rtkit into own file 2024-04-23 09:08:05 +00:00
ae418fb2d1 valgrind: mark as not sandboxable 2024-04-23 09:08:05 +00:00
c174eddddf wireplumber: sandbox such that it gets higher sched priority 2024-04-23 09:08:05 +00:00
6d74c6616c pipewire: shrink the mount sandbox 2024-04-23 09:08:05 +00:00
7db40fbf47 sane-cast: add a menu for choosing which device to cast to whenever there are multiple 2024-04-23 08:10:05 +00:00
152a5d4c92 sane-cast: integrate with mpv 2024-04-23 07:52:48 +00:00
e33b7d7701 sane-cast: init 2024-04-23 07:37:17 +00:00
01e176d902 libjxl: fix hash 2024-04-23 05:42:24 +00:00
fd771cdb2c fs: mount media/torrents instead of media/freeleech (the latter was removed) 2024-04-23 01:25:57 +00:00
243e8b831b libjxl cross patch: push upstream 2024-04-22 23:40:06 +00:00
9a8b4395f1 nixpkgs: 2024-04-19 -> 2024-04-22; nixpkgs-wayland, sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/6ad1fe08582fcdfedb2cb7c31b4a016a227bd38a' (2024-04-19)
  → 'github:nixos/nixpkgs/fe2b7d6a922c875221671df6aa360b6e73d47e2f' (2024-04-22)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/40d15ed86dd08eff6a29e0a9abc416001d19cd67' (2024-04-19)
  → 'github:nixos/nixpkgs/8a3f95b79ba3083cfff90752296ef8a52a6bec9a' (2024-04-22)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/ab0f8d391a960764348935e6497fc62ba0d2378d' (2024-04-19)
  → 'github:nix-community/nixpkgs-wayland/f01c36f09cc5c2d77cbab4475528e06d6641bff4' (2024-04-22)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/f347ed9a1cab12c27541ed4d173e2f2d5c9bc0bb' (2024-04-14)
  → 'github:nix-community/lib-aggregate/3b32a98eb3053f8c8ca55497d1881443ef2996e6' (2024-04-21)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/361d8a4f443bbfab20bd6d222f9022b8c6665906' (2024-04-14)
  → 'github:nix-community/nixpkgs.lib/6882347415e352cfc9c277cc01f73e0f5cb7b93c' (2024-04-21)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/b94c6edbb8355756c53efc8ca3874c63622f287a' (2024-04-18)
  → 'github:Mic92/sops-nix/4371a1301c4d36cc791069d90ae522613a3a335e' (2024-04-22)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/8494ae076b7878d61a7d2d25e89a847fe8f8364c' (2024-04-18)
  → 'github:NixOS/nixpkgs/74574c38577914733b4f7a775dd77d24245081dd' (2024-04-20)
```
2024-04-22 22:44:15 +00:00
4c7cd06212 go2tv: clarify compatibility 2024-04-22 12:45:55 +00:00
d0de6a9254 sftpgo: reduce the passive port range
hopefully this eases the load on the upstream firewall's UPNP service
2024-04-22 12:08:23 +00:00
12f2798140 servo: sftpgo: move to own directory 2024-04-22 12:05:16 +00:00
bd92076291 fontconfig: populate the cache directory even when cross compiling 2024-04-22 09:47:20 +00:00
9cbe774c5a sane-input-handler: fix power_hold -> power_tap_1_hold when inhibited by rofi 2024-04-22 06:27:33 +00:00
b4653b20a2 moby: button map: move vol{up,down}_hold to only act in power-off, else they may falsely trigger during other power-on actions 2024-04-22 05:13:29 +00:00
2c011df252 moby: tweak button mappings
- power hold: toggle media
- power x1 -> hold: kill

now nothing in screenoff uses power x2, which means we can get to
screen-on without waiting for any timeout.
2024-04-22 05:10:35 +00:00
9d472bb290 sane-input-handler: clean up suggestedPrograms 2024-04-22 04:13:56 +00:00
95b21cbed9 moby: update improve button mappings
- power + volup: screenshot
- power + voldown: camera
- volup_hold: file browser
- remove modal media controls
2024-04-22 04:05:52 +00:00
82007c9b40 bonsai: store the config in ~/.config to allow easier online editing 2024-04-22 04:05:15 +00:00
50c72de4f9 megapixels: fix folder icon to actually open ~/Pictures/Photos 2024-04-22 00:16:46 +00:00
36237a3201 megapixels: remove unnecessary ~/tmp directory from sandbox 2024-04-22 00:16:14 +00:00
eb9df628e6 megapixels: remove unnecessary ~/.local/share/applications from sandbox 2024-04-21 23:49:29 +00:00
6e04e288ea todo.md: document rofi crashes 2024-04-21 23:21:43 +00:00
a92960d778 megapixels: place photos in ~/Pictures/Photos instead of directly in ~/Pictures 2024-04-21 23:13:49 +00:00
ef9b0e9309 megapixels: fix .dng -> .jpg conversion 2024-04-21 21:59:05 +00:00
350e00e0cd firefox: decrease scrollbar width 20px -> 14px 2024-04-21 21:08:07 +00:00
e924363dfb sysvol: 2024-02-08 -> 2024-04-11
it no longer flashes the volume on init
2024-04-21 20:43:03 +00:00
b12f31652c todo.md: update blast items 2024-04-21 11:15:22 +00:00
b77e811ad4 blast-to-default: leverage sane-die-with-parent 2024-04-21 11:09:23 +00:00
a000a722ba mpv: fix so sane-sysvol doesnt hang exit 2024-04-21 10:08:46 +00:00
4dde01245e mpv: sane_sysvol: fix non_blocking_popen to use metatables and be more readable 2024-04-21 03:47:01 +00:00
f50c0a98c2 sane-sysvol -> sane_sysvol, sane-cast -> sane_cast
when a script contains a dash, mpv silently renames *parts* of it to _, which causes confusion
2024-04-21 00:27:30 +00:00
0625bfdd10 mpv: sane-cast: fix crash due to missing table.concat function 2024-04-21 00:24:46 +00:00
4dfee58d09 sops: fix sandbox path 2024-04-20 21:43:13 +00:00
a7b8eb179b pipewire: move the clock quantum config into sane.programs proper
this ensures it's available in the sandbox
2024-04-20 09:09:05 +00:00
f10bb6c86c sftpgo: adjust file mode to be compatible with Kodi 2024-04-20 08:07:00 +00:00
a59a7b5346 feeds: podcasts: add Tech Tales 2024-04-19 21:46:03 +00:00
1bd715e57e nixpkgs: 2024-04-18 -> 2024-04-19; nixpkgs-wayland, sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/19d2eb80a0e23daf1c4a8cf25b1011fbdb2260fb' (2024-04-18)
  → 'github:nixos/nixpkgs/6ad1fe08582fcdfedb2cb7c31b4a016a227bd38a' (2024-04-19)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/457c34178411e0072e59564ee7986e86255a6eff' (2024-04-18)
  → 'github:nixos/nixpkgs/40d15ed86dd08eff6a29e0a9abc416001d19cd67' (2024-04-19)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/7867aa617c6eb205b1ac1b71d98cd18a2561bb18' (2024-04-17)
  → 'github:nix-community/nixpkgs-wayland/ab0f8d391a960764348935e6497fc62ba0d2378d' (2024-04-19)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/cc535d07cbcdd562bcca418e475c7b1959cefa4b' (2024-04-15)
  → 'github:Mic92/sops-nix/b94c6edbb8355756c53efc8ca3874c63622f287a' (2024-04-18)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/c27f3b6d8e29346af16eecc0e9d54b1071eae27e' (2024-04-13)
  → 'github:NixOS/nixpkgs/8494ae076b7878d61a7d2d25e89a847fe8f8364c' (2024-04-18)
```
2024-04-19 20:33:48 +00:00
b7d2020f10 sane-tag-music: fix --help message 2024-04-19 07:29:20 +00:00
317996b609 clightning-sane: document the status command more 2024-04-19 07:29:20 +00:00
e197f6f54d clightning-sane: fix build 2024-04-19 07:29:20 +00:00
135f63480b clightning-sane: add a help message 2024-04-19 07:29:20 +00:00
d9ffa5bb5a wike: fix sandboxing for 3.0 2024-04-19 01:26:58 +00:00
f59f13588f jackett/transmission/slskd: validate public IP address before starting 2024-04-18 20:05:59 +00:00
c668a895d4 static-nix-shell: populate meta.mainProgram 2024-04-18 20:00:47 +00:00
9442a87311 sane-ip-check: add an --expect option to abort if IP address is not as expected 2024-04-18 19:46:16 +00:00
3bd56fb565 sane-ip-check: refactor: split out a main function 2024-04-18 19:42:16 +00:00
bdc3b1ed0e sane-ip-check: port argument parsing to argparse 2024-04-18 19:40:44 +00:00
40af93a7fb feeds: add apenwarr 2024-04-18 17:29:50 +00:00
cd4fc97bde nixpkgs: 2024-04-17 -> 2024-04-18; nixpkgs-wayland
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/73f2b40dfc3413958695ae66fca3a52ee68451d6' (2024-04-17)
  → 'github:nixos/nixpkgs/19d2eb80a0e23daf1c4a8cf25b1011fbdb2260fb' (2024-04-18)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/2528b053e7c482baa8cd93cdce81172c3f0a3cee' (2024-04-17)
  → 'github:nixos/nixpkgs/457c34178411e0072e59564ee7986e86255a6eff' (2024-04-18)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/b0260157fccc94f4fe5a09fb3a1b1f62a87ae397' (2024-04-17)
  → 'github:nix-community/nixpkgs-wayland/7867aa617c6eb205b1ac1b71d98cd18a2561bb18' (2024-04-17)
```
2024-04-18 06:56:13 +00:00
a36ff517e7 servo: slskd: disable 2024-04-18 06:55:56 +00:00
3642ead646 trust-dns: 0.24.0 -> 0.24.1 2024-04-18 06:03:34 +00:00
60c370df3f sftpgo: fix domain name in banner 2024-04-18 05:01:57 +00:00
d80852c6c1 sftpgo: re-enable password login 2024-04-18 04:58:59 +00:00
62b3047fff sftpgo: support FTPS 2024-04-18 04:34:41 +00:00
de2c3a30ff programs: ship lftp ftp client 2024-04-18 04:17:10 +00:00
c08280589d lsof: fix sandboxing 2024-04-17 23:43:42 +00:00
9a9ffcbea9 transmission: fix faulty "find" expression (thanks shellcheck!) 2024-04-17 23:32:00 +00:00
733efcfaf7 servo: nginx: forceSSL for anything media related 2024-04-17 22:49:24 +00:00
b34d984572 servo: transmission: remove noisy files upon torrent completion 2024-04-17 20:47:00 +00:00
e2b58e1b77 servo: transmission: be extra strict about requiring VPN 2024-04-17 19:52:11 +00:00
b7e5bc5972 servo: sftpgo: disable external access 2024-04-17 19:41:57 +00:00
831b4ad72a nixpkgs: 2024-04-16 -> 2024-04-17; nixpkgs-wayland -> 2024-04-17
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/097ced11fa37dec3146e0480026c0c10d7d35e6f' (2024-04-16)
  → 'github:nixos/nixpkgs/73f2b40dfc3413958695ae66fca3a52ee68451d6' (2024-04-17)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/7f1c8f1b9071c77b81b62e3be62ef5e3d0c578ad' (2024-04-16)
  → 'github:nixos/nixpkgs/2528b053e7c482baa8cd93cdce81172c3f0a3cee' (2024-04-17)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/a03b8253e5cedb72a0957f7d534ad2702d7a54f0' (2024-04-15)
  → 'github:nix-community/nixpkgs-wayland/b0260157fccc94f4fe5a09fb3a1b1f62a87ae397' (2024-04-17)
```
2024-04-17 09:54:45 +00:00
54cefa247a dino: record another bug 2024-04-17 09:53:08 +00:00
e3898449b7 sane-tag-music: allow manually specifying the track number 2024-04-17 09:45:10 +00:00
e5bad6a74c sane-tag-music: fixup track numbers 2024-04-17 07:56:52 +00:00
254343a6af todo.md: sync 2024-04-17 02:26:09 +00:00
28bfd75114 sane-tag-music: split into two operations 2024-04-17 02:25:54 +00:00
b7fd5e78cc swaync: show volume-per-app (TODO: stylize it better) 2024-04-17 01:37:03 +00:00
79985ff009 dino: docs: update notes about BUGS 2024-04-16 20:50:00 +00:00
62f5b9276f pwvucontrol: whitelist DRI inside the sandbox, for better perf 2024-04-16 20:49:33 +00:00
276844af0b sane-tag-music: update docs 2024-04-16 19:56:58 +00:00
13c1f01a6b servo: pleroma: migrate port 4000 -> 4040
port 4000 is used by NFS
2024-04-16 18:57:54 +00:00
5f281f57de servo: transmission: inline nested torrent directories 2024-04-16 18:25:41 +00:00
089e434e3f servo: transmission: fix group permissions of media when copying them to public dir 2024-04-16 16:31:10 +00:00
b068b50d7c sane-bt: require specifying a title when torrenting films 2024-04-16 16:05:39 +00:00
14911868e4 nixpkgs: 2024-04-14 -> 2024-04-16; nixpkgs-wayland, sops-nix, uninsane-dot-org
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/2d0506704b7d92cc610412b176b515fe1a782095' (2024-04-14)
  → 'github:nixos/nixpkgs/097ced11fa37dec3146e0480026c0c10d7d35e6f' (2024-04-16)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/bc59f72803cf40fb50f05cb73068d85b5ce21297' (2024-04-14)
  → 'github:nixos/nixpkgs/7f1c8f1b9071c77b81b62e3be62ef5e3d0c578ad' (2024-04-16)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/b816217ba4fc77d19ca033ab8f13b35ba0331e91' (2024-04-13)
  → 'github:nix-community/nixpkgs-wayland/a03b8253e5cedb72a0957f7d534ad2702d7a54f0' (2024-04-15)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/2737d0204685c3274390229a09eb8f7eaa1a9e89' (2024-04-07)
  → 'github:nix-community/lib-aggregate/f347ed9a1cab12c27541ed4d173e2f2d5c9bc0bb' (2024-04-14)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/3c62b6a12571c9a7f65ab037173ee153d539905f' (2024-04-07)
  → 'github:nix-community/nixpkgs.lib/361d8a4f443bbfab20bd6d222f9022b8c6665906' (2024-04-14)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/226062b47fe0e2130ba3ee9f4f1c880dc815cf87' (2024-04-14)
  → 'github:Mic92/sops-nix/cc535d07cbcdd562bcca418e475c7b1959cefa4b' (2024-04-15)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=b9502e6f190752d327f8cee7fa4b139094bd7c16' (2024-03-25)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=af8420d1c256d990b5e24de14ad8592a5d85bf77' (2024-04-15)
```
2024-04-16 04:59:59 +00:00
539fe48947 swaync: cleanup 2024-04-16 04:14:07 +00:00
259c3af526 swaync-fbcli: fix CPU pegging when canceling a phone ringer 2024-04-16 02:18:51 +00:00
6b5e0e57bc swaync: unify the *DEBUG variables 2024-04-15 21:29:17 +00:00
b55c903a81 todo.md: made it so unl0kr starts with keyboard 2024-04-15 21:11:20 +00:00
4f06f0dc5e unl0kr: disable animations 2024-04-15 21:10:55 +00:00
c0dde0e540 unl0kr: populate config file with upstream defaults 2024-04-15 21:05:21 +00:00
6779063578 todo.md: sync 2024-04-15 19:57:58 +00:00
2eea562d1f sandbox: remove unused "binMap" option 2024-04-15 19:56:33 +00:00
0385c09f23 sane-sandboxed: split out into an actual package 2024-04-15 18:57:22 +00:00
bd57b95598 swaync-fbcli: fix so that the child actually exits when killed (critical is to use SIGINT) 2024-04-15 18:32:50 +00:00
465da7c939 swaync-fbcli: migrate an "echo" to a "log" 2024-04-15 18:22:30 +00:00
44f76e656a swaync-fbcli: fix that pkill expression wouldn't work for wrapped binaries 2024-04-15 18:21:27 +00:00
824046aca1 swaync-fbcli: fix CPU pegging 2024-04-15 18:09:21 +00:00
827c50ff43 swaync: cleanup the swaync-fbcli helper 2024-04-15 18:00:51 +00:00
0230291bb2 swaync: move the pkill logic into swaync-fbcli 2024-04-15 17:46:40 +00:00
3d3618256d swaync: split the fbcli wrapper into its own file 2024-04-15 17:46:40 +00:00
590cb2dd7f feeds: sort the list 2024-04-15 16:21:31 +00:00
d9dcab544c feeds: unsubscribe from Profectus 2024-04-15 16:20:17 +00:00
4ee0f0c659 feeds: disable TheSideView 2024-04-15 14:59:50 +00:00
7692ab0b3e firefox-extensions.sidebery: build from source 2024-04-15 05:25:19 +00:00
2af5bb3d78 i-still-dont-care-about-cookies: enable 2024-04-15 03:36:49 +00:00
e72a0a4300 firefox extensions: support more manifest formats 2024-04-15 03:36:27 +00:00
6b0cbf684f sidebery: 5.2.0.1 -> 5.2.0.7 2024-04-15 03:36:03 +00:00
62af314238 firefox-extensions.i-still-dont-care-about-cookies: init at 1.1.4 2024-04-15 03:02:19 +00:00
e8745b4312 firefox-extensions: ublock, metamask -> latest 2024-04-15 02:35:49 +00:00
5a10173ba3 schlock: fix to run on modern sway 2024-04-15 02:07:20 +00:00
2d8fe1d3e5 bonsai: tune niceness to hopefully be more responsive 2024-04-15 01:46:32 +00:00
0741d87bcb rofi: theme so that i can read more text on narrow moby display 2024-04-15 00:04:10 +00:00
2587c27f89 font-manager: fix sandboxing 2024-04-14 21:55:52 +00:00
2d74d0725d feeds: podcasts: add Money Stuff 2024-04-14 20:39:53 +00:00
b0d1d2e1af coppwr: remove (it's been upstreamed into nixpkgs) 2024-04-14 16:16:46 +00:00
61dc79a2ea cross: remove upstreamed webkitgtk patch 2024-04-14 16:08:48 +00:00
7804236499 xdg-terminal-exec: remove upstreamed patched 2024-04-14 14:16:50 +00:00
f908762cf8 nixpkgs: 2024-04-06 -> 2024-04-14; nixpkgs-wayland, sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/7c74352f2f7eca1925729f5c9c80cb89df8e74a2' (2024-04-06)
  → 'github:nixos/nixpkgs/2d0506704b7d92cc610412b176b515fe1a782095' (2024-04-14)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/c58702222e0a29fd01cc42d70737d699995f6389' (2024-04-06)
  → 'github:nixos/nixpkgs/bc59f72803cf40fb50f05cb73068d85b5ce21297' (2024-04-14)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/9b77653338f52da4b498abdf4835efb6ff6e453e' (2024-04-04)
  → 'github:nix-community/nixpkgs-wayland/b816217ba4fc77d19ca033ab8f13b35ba0331e91' (2024-04-13)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/9c06929b83e57c18d125f1105ba6a423f24083d2' (2024-03-31)
  → 'github:nix-community/lib-aggregate/2737d0204685c3274390229a09eb8f7eaa1a9e89' (2024-04-07)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/90b1a963ff84dc532db92f678296ff2499a60a87' (2024-03-31)
  → 'github:nix-community/nixpkgs.lib/3c62b6a12571c9a7f65ab037173ee153d539905f' (2024-04-07)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/99b1e37f9fc0960d064a7862eb7adfb92e64fa10' (2024-03-31)
  → 'github:Mic92/sops-nix/226062b47fe0e2130ba3ee9f4f1c880dc815cf87' (2024-04-14)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/2b4e3ca0091049c6fbb4908c66b05b77eaef9f0c' (2024-03-30)
  → 'github:NixOS/nixpkgs/c27f3b6d8e29346af16eecc0e9d54b1071eae27e' (2024-04-13)
```
2024-04-14 14:15:02 +00:00
feb36d19ac programs: ship cups 2024-04-14 03:33:55 +00:00
06185ac870 todo.md: add a way to exit mpv fullscreen on moby 2024-04-13 20:30:30 +00:00
a8915661a7 style: refine the base pink color for mpv and sway/waybar
this matches swaync a little better. mpv had to be made lighter, i think because of transparency stuff. probably sway/waybar could be made normal lightness
2024-04-13 20:29:24 +00:00
d57aa473ac overlays/pkgs-debug: cleanup 2024-04-13 20:29:24 +00:00
a28b7d5616 todo.md: more mobile games, mpv improvements 2024-04-13 20:29:24 +00:00
dd58ba8b00 gvfs: enable as part of nautilus, not sway 2024-04-13 20:29:24 +00:00
a21508b6ba todo.md: fix schlock (moby) 2024-04-13 20:29:24 +00:00
94cff99f53 todo.md: ftps support 2024-04-13 20:29:24 +00:00
8aa8d773de cherry-pick orc update to fix Dino calls 2024-04-13 20:29:24 +00:00
0a888e205e programs: ship objdump 2024-04-13 20:29:24 +00:00
898dc89c8f overlays: add pkgsDebug for building packages with debug symbols and such 2024-04-13 20:29:24 +00:00
4b22fd95bf introduce 'moby-min' host variant for the quickest deployment (no webkitgtk) 2024-04-13 20:29:24 +00:00
527a9e7612 feeds: add The Side View 2024-04-10 04:47:34 +00:00
3686e6e508 feeds: subscribe to Future of Coding 2024-04-10 03:06:30 +00:00
cda50db23b loupe: associate with avif filetype 2024-04-09 19:22:59 +00:00
344e24fcd2 todo.md: ssh doesnt give the right linux capabilities 2024-04-09 18:38:04 +00:00
9be6960bbf sway: disable shortcuts for creating sub-splits
i'm just always accidentally triggering them
2024-04-09 16:24:02 +00:00
a45aabfb72 sway: todo: load background from a more traditional path 2024-04-09 16:19:56 +00:00
602bf59843 todo.md: disable sway sub-layouts 2024-04-09 16:15:27 +00:00
895d7f6f20 todo.md: note that mpv exit hangs because of sane-sysvol 2024-04-09 16:13:43 +00:00
876103ff7b mpv: remove legacy ao=alsa and volume-max config 2024-04-09 16:10:05 +00:00
46cda87d5e notejot: fix sandboxing 2024-04-09 15:44:01 +00:00
d728dfcd70 mpv: uosc: tweak the maximize button to actually act as a fullscreen toggle 2024-04-09 10:14:40 +00:00
19fcd0318c mpv: remove the double-click-to-fullscreen shortcut 2024-04-09 10:09:17 +00:00
030f6d1a99 mpv: fix so pseudo-gui mode doesnt break logging 2024-04-09 09:58:16 +00:00
86b495cb9f mpv: sane-sysvol: integrate with uosc mute button 2024-04-09 08:05:00 +00:00
c897f4fa4b mpv: sane-sysvol: fix pipewire mute to reflect onto uosc volume level
ideally it would actually show up as the mute parameter!
2024-04-09 08:05:00 +00:00
8181a0664d mpv: sane-sysvol: remove the unused id tracking 2024-04-09 08:05:00 +00:00
c37e94493f mpv: sane-sysvol: optimize 2024-04-09 08:05:00 +00:00
b9e107510d mpv: sane-sysvol: dont force system volume to zero on init 2024-04-09 08:05:00 +00:00
976ae65529 todo.md: remove deprecated use of 'crypt' 2024-04-09 08:05:00 +00:00
0f4c1ccfe3 mpv: update input.conf for sane-cast rename 2024-04-09 08:05:00 +00:00
9d9413c790 mpv: announce pipewire volume changes so uosc can listen for them 2024-04-09 08:05:00 +00:00
64c28ae657 mpv: don't need to force uosc volume state to 0 by default; nil is OK 2024-04-09 08:05:00 +00:00
d221625eb3 todo.md: add work around signal, mpv 2024-04-09 08:05:00 +00:00
1f4c885748 mpv: sane-sysvol script: init
it's a one-way volume control, but that's a start
2024-04-09 08:05:00 +00:00
0545b178af mpv: rename plugin: sane -> sane-cast 2024-04-09 08:04:51 +00:00
fe4b6c36c4 feeds: subscribe to jwz.org 2024-04-09 03:55:25 +00:00
fce3436c88 servo: expose Milkbags to the internet :) 2024-04-08 06:55:09 +00:00
327 changed files with 18998 additions and 34838 deletions

View File

@ -16,13 +16,12 @@ building [hosts/](./hosts/) will require [sops][sops].
you might specifically be interested in these files (elaborated further in #key-points-of-interest):
- ~~[`sxmo-utils`](./pkgs/additional/sxmo-utils/default.nix)~~
- ~~[example SXMO deployment](./hosts/modules/gui/sxmo/default.nix)~~
- these files will remain until my config settles down, but i no longer use or maintain SXMO.
- [my implementation of impermanence](./modules/persist/default.nix)
- my way of deploying dotfiles/configuring programs per-user:
- [modules/fs/](./modules/fs/default.nix)
- [modules/programs/](./modules/programs/default.nix)
- [modules/users.nix](./modules/users.nix)
- [modules/users/](./modules/users/default.nix)
[nixpkgs]: https://github.com/NixOS/nixpkgs
[sops]: https://github.com/Mic92/sops-nix
@ -109,9 +108,10 @@ i.e. you might find value in using these in your own config:
- `sane.programs.firefox.sandbox.whitelistWayland = true; # allow it to render a wayland window`
- `sane.programs.firefox.sandbox.extraHomePaths = [ "Downloads" ]; # allow it read/write access to ~/Downloads`
- integrated with `fs` and `persist` modules so that programs' config files and persisted data stores are linked into the sandbox w/o any extra involvement.
- `modules/users.nix`
- `modules/users/`
- convenience layer atop the above modules so that you can just write
`fs.".config/git"` instead of `fs."/home/colin/.config/git"`
- per-user services managed by [s6-rc](https://www.skarnet.org/software/s6-rc/)
some things in here could easily find broader use. if you would find benefit in
them being factored out of my config, message me and we could work to make that happen.

54
TODO.md
View File

@ -1,10 +1,33 @@
## BUGS
- `rmDbusServices` may break sandboxing
- e.g. if the package ships a systemd unit which references $out, then make-sandboxed won't properly update that unit.
- `rmDbusServicesInPlace` is not affected
- moby: touchscreen input is still enabled when screen is off
- when moby wlan is explicitly set down (via ip link set wlan0 down), /var/lib/trust-dns/dhcp-configs doesn't get reset
- `ip monitor` can detect those manual link state changes (NM-dispatcher it seems cannot)
- or try dnsmasq?
- trust-dns: can't recursively resolve api.mangadex.org
- and *sometimes* apple.com fails
- sandbox: link cache means that if i update ~/.config/... files inline, sandboxed programs still see the old version
- mpv: audiocast has mpv sending its output to the builtin speakers unless manually changed
- mpv: no way to exit fullscreen video on moby
- uosc hides controls on FS, and touch doesn't support unhiding
- Signal restart loop drains battery
- decrease s6 restart time?
- `ssh` access doesn't grant same linux capabilities as login
- ringer (i.e. dino incoming call) doesn't prevent moby from sleeping
- sway mouse/kb hotplug doesn't work
- `nix` operations from lappy hang when `desko` is unreachable
- could at least direct the cache to `http://desko-hn:5001`
- sysvol (volume overlay): when casting with `blast`, sysvol doesn't react to volume changes
- moby: kaslr is effectively disabled
- `dmesg | grep "KASLR disabled due to lack of seed"`
- fix by adding `kaslrseed` to uboot script before `booti`
- <https://github.com/armbian/build/pull/4352>
- not sure how that's supposed to work with tow-boot; maybe i should just update tow-boot
- moby: bpf is effectively disabled?
- `dmesg | grep 'systemd[1]: bpf-lsm: Failed to load BPF object: No such process'`
- `dmesg | grep 'hid_bpf: error while preloading HID BPF dispatcher: -22'`
## REFACTORING:
- add import checks to my Python nix-shell scripts
- consolidate ~/dev and ~/ref
- ~/dev becomes a link to ~/ref/cat/mine
- fold hosts/common/home/ssh.nix -> hosts/common/users/colin.nix
@ -21,13 +44,19 @@
### upstreaming
- add updateScripts to all my packages in nixpkgs
- REVIEW/integrate jellyfin dataDir config: <https://github.com/NixOS/nixpkgs/pull/233617>
#### upstreaming to non-nixpkgs repos
- gtk: build schemas even on cross compilation: <https://github.com/NixOS/nixpkgs/pull/247844>
## IMPROVEMENTS:
- systemd/journalctl: use a less shit pager
- there's an env var for it: SYSTEMD_PAGER? and a flag for journalctl
- kernels: ship the same kernel on every machine
- then i can tune the kernels for hardening, without duplicating that work 4 times
- zfs: replace this with something which doesn't require a custom kernel build
- mpv: add media looping controls (e.g. loop song, loop playlist)
### security/resilience
- validate duplicity backups!
- encrypt more ~ dirs (~/archives, ~/records, ..?)
@ -45,17 +74,19 @@
- <https://github.com/flatpak/xdg-dbus-proxy>
- remove `.ssh` access from Firefox!
- limit access to `~/knowledge/secrets` through an agent that requires GUI approval, so a firefox exploit can't steal all my logins
- port sane-sandboxed to a compiled language (hare?)
- port sanebox to a compiled language (hare?)
- it adds like 50-70ms launch time _on my laptop_. i'd hate to know how much that is on the pinephone.
- remove /run/wrappers from the sandbox path
- they're mostly useless when using no-new-privs, just an opportunity to forget to specify deps
- make dconf stuff less monolithic
- i.e. per-app dconf profiles for those which need it. possible static config.
- canaries for important services
- e.g. daily email checks; daily backup checks
- integrate `nix check` into Gitea actions?
#### sudo-free world
- `systemctl restart FOO`: needs `sudo`
### user experience
- rofi: sort items case-insensitively
- xdg-desktop-portal shouldn't kill children on exit
- *maybe* a job for `setsid -f`?
- replace starship prompt with something more efficient
@ -68,7 +99,7 @@
- offline docs viewer (gtk): <https://github.com/workbenchdev/Biblioteca>
- some type of games manager/launcher
- Gnome Highscore (retro games)?: <https://gitlab.gnome.org/World/highscore>
- better maps for mobile (Osmin (QtQuick)? Pure Maps (Qt/Kirigami)? Gnome Maps is improved in 45)
- better maps for mobile (Osmin (QtQuick)? Pure Maps (Qt/Kirigami)?
- note-taking app: <https://linuxphoneapps.org/categories/note-taking/>
- OSK overlay specifically for mobile gaming
- i.e. mock joysticks, for use with SuperTux and SuperTuxKart
@ -80,6 +111,8 @@
- numberlink (generic name for Flow Free). not packaged in Nix
- Neverball (https://neverball.org/screenshots.php). nix: as `neverball`
- blurble (https://linuxphoneapps.org/games/app.drey.blurble/). nix: not as of 2024-02-05
- Trivia Quiz (https://linuxphoneapps.org/games/io.github.nokse22.trivia-quiz/)
- sane-sync-music: remove empty dirs
#### moby
- fix cpuidle (gets better power consumption): <https://xnux.eu/log/077.html>
@ -95,6 +128,7 @@
- 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: port `freshen-agps` timer service to s6 (maybe i want some `s6-cron` or something)
- moby: show battery state on ssh login
- moby: improve gPodder launch time
- moby: theme GTK apps (i.e. non-adwaita styles)
@ -123,6 +157,10 @@
### perf
- debug nixos-rebuild times
- use `systemctl list-jobs` to show what's being waited on
- i think it's `systemd-networkd-wait-online.service` that's blocking this?
- i wonder what interface it's waiting for. i should use `--ignore=...` to ignore interfaces i don't care about.
- also `wireguard-wg-home.target` when net is offline
- 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!

View File

@ -24,11 +24,11 @@
]
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
@ -61,11 +61,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1711886936,
"narHash": "sha256-D2WENp9GuaCostvNcQ7vElekk0V5cuMdnFZ7NfRhVrQ=",
"lastModified": 1716725378,
"narHash": "sha256-bNTVDAVBLFSSTU+q54cJnntmFKBi+F/D8sSqlZwBGiM=",
"owner": "nix-community",
"repo": "lib-aggregate",
"rev": "9c06929b83e57c18d125f1105ba6a423f24083d2",
"rev": "dbc9130fe1455e0f6ee4d8f5f799f9be551f866b",
"type": "github"
},
"original": {
@ -99,11 +99,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1705242886,
"narHash": "sha256-TLj334vRwFtSym3m+NnKcNCnKKPNoTC/TDZL40vmOso=",
"lastModified": 1715804156,
"narHash": "sha256-GtIHP86Cz1kD9xZO/cKbNQACHKdoT9WFbLJAq6W2EDY=",
"owner": "nix-community",
"repo": "nix-eval-jobs",
"rev": "6b03a93296faf174b97546fd573c8b379f523a8d",
"rev": "bb95091f6c6f38f6cfc215a1797a2dd466312c8b",
"type": "github"
},
"original": {
@ -121,11 +121,11 @@
]
},
"locked": {
"lastModified": 1701208414,
"narHash": "sha256-xrQ0FyhwTZK6BwKhahIkUVZhMNk21IEI1nUcWSONtpo=",
"lastModified": 1703863825,
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "93e39cc1a087d65bcf7a132e75a650c44dd2b734",
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
"type": "github"
},
"original": {
@ -136,11 +136,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1703134684,
"narHash": "sha256-SQmng1EnBFLzS7WSRyPM9HgmZP2kLJcPAz+Ug/nug6o=",
"lastModified": 1715037484,
"narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d6863cbcbbb80e71cecfc03356db1cda38919523",
"rev": "ad7efee13e0d216bf29992311536fce1d3eefbef",
"type": "github"
},
"original": {
@ -152,11 +152,11 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1711846064,
"narHash": "sha256-cqfX0QJNEnge3a77VnytM0Q6QZZ0DziFXt6tSCV8ZSc=",
"lastModified": 1716684580,
"narHash": "sha256-sIbMJWJr4hl2PWd9/iWlh89QfVzBn1NJ3u5RjeZADuM=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "90b1a963ff84dc532db92f678296ff2499a60a87",
"rev": "d0d27192931680482081aa1c38389da2af84a651",
"type": "github"
},
"original": {
@ -167,11 +167,11 @@
},
"nixpkgs-next-unpatched": {
"locked": {
"lastModified": 1712383280,
"narHash": "sha256-YL8miM11o/jMqOwt5DsdyhPgh/JgCl1kOIzvX7ukniY=",
"lastModified": 1717243271,
"narHash": "sha256-M3VxP6DtREz5Lq6MKg1gQ2EeVdIbq6AEp/N1tDSrvoc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7c74352f2f7eca1925729f5c9c80cb89df8e74a2",
"rev": "f7de25c01e4c073c06e0525226a0c2311d530cee",
"type": "github"
},
"original": {
@ -183,11 +183,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1711819797,
"narHash": "sha256-tNeB6emxj74Y6ctwmsjtMlzUMn458sBmwnD35U5KIM4=",
"lastModified": 1716655032,
"narHash": "sha256-kQ25DAiCGigsNR/Quxm3v+JGXAEXZ8I7RAF4U94bGzE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2b4e3ca0091049c6fbb4908c66b05b77eaef9f0c",
"rev": "59a450646ec8ee0397f5fa54a08573e8240eb91f",
"type": "github"
},
"original": {
@ -199,11 +199,11 @@
},
"nixpkgs-unpatched": {
"locked": {
"lastModified": 1712398506,
"narHash": "sha256-oopwPeBKBXQEw2BlyK2jEs2farZ5uMjAZU7H4FpGuGE=",
"lastModified": 1717242134,
"narHash": "sha256-2X835ZESUaQ/KZEuG9HkoEB7h0USG5uvkSUmLzFkxAE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c58702222e0a29fd01cc42d70737d699995f6389",
"rev": "61c1d282153dbfcb5fe413c228d172d0fe7c2a7e",
"type": "github"
},
"original": {
@ -223,11 +223,11 @@
]
},
"locked": {
"lastModified": 1712237761,
"narHash": "sha256-NoMBBCADTms3yx5BL+sbc7vfDivNiYULO6t9GBAsPt0=",
"lastModified": 1717175759,
"narHash": "sha256-KiM5ue/UNQt8ktoqCV4yFqhHxM31U94Mf/piKW9dZ4c=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "9b77653338f52da4b498abdf4835efb6ff6e453e",
"rev": "93b225ddba91179248b378913a91defbc6aeb899",
"type": "github"
},
"original": {
@ -254,11 +254,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1711855048,
"narHash": "sha256-HxegAPnQJSC4cbEbF4Iq3YTlFHZKLiNTk8147EbLdGg=",
"lastModified": 1716692524,
"narHash": "sha256-sALodaA7Zkp/JD6ehgwc0UCBrSBfB4cX66uFGTsqeFU=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "99b1e37f9fc0960d064a7862eb7adfb92e64fa10",
"rev": "962797a8d7f15ed7033031731d0bb77244839960",
"type": "github"
},
"original": {
@ -291,11 +291,11 @@
]
},
"locked": {
"lastModified": 1702979157,
"narHash": "sha256-RnFBbLbpqtn4AoJGXKevQMCGhra4h6G2MPcuTSZZQ+g=",
"lastModified": 1711963903,
"narHash": "sha256-N3QDhoaX+paWXHbEXZapqd1r95mdshxToGowtjtYkGI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "2961375283668d867e64129c22af532de8e77734",
"rev": "49dc4a92b02b8e68798abd99184f228243b6e3ac",
"type": "github"
},
"original": {
@ -311,11 +311,11 @@
]
},
"locked": {
"lastModified": 1711371733,
"narHash": "sha256-+brjlMyLVnVADY31sN82Ap0IsPE2WZEwHUd94sY6BXI=",
"lastModified": 1715894399,
"narHash": "sha256-h1EdA/h74zgNPNEYbH+0mgOMlJgLVcxuZ8/ewsZlgEc=",
"ref": "refs/heads/master",
"rev": "b9502e6f190752d327f8cee7fa4b139094bd7c16",
"revCount": 237,
"rev": "e6f88f563bdd1700c04018951de4f69862646dd1",
"revCount": 240,
"type": "git",
"url": "https://git.uninsane.org/colin/uninsane"
},

View File

@ -108,20 +108,22 @@
nixpkgs' = patchNixpkgs "master" nixpkgs-unpatched;
nixpkgsCompiledBy = system: nixpkgs'.legacyPackages."${system}";
evalHost = { name, local, target, light ? false, nixpkgs ? nixpkgs' }: nixpkgs.lib.nixosSystem {
evalHost = { name, local, target, variant ? null, nixpkgs ? nixpkgs' }: nixpkgs.lib.nixosSystem {
system = target;
modules = [
{
nixpkgs.buildPlatform.system = local;
# nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
}
(optionalAttrs (local != target) {
# XXX(2023/12/11): cache.nixos.org uses `system = ...` instead of `hostPlatform.system`, and that choice impacts the closure of every package.
# so avoid specifying hostPlatform.system on non-cross builds, so i can use upstream caches.
nixpkgs.hostPlatform.system = target;
})
(optionalAttrs light {
sane.enableSlowPrograms = false;
(optionalAttrs (variant == "light") {
sane.maxBuildCost = 2;
})
(optionalAttrs (variant == "min") {
sane.maxBuildCost = 0;
})
(import ./hosts/instantiate.nix { hostName = name; })
self.nixosModules.default
@ -139,11 +141,13 @@
hosts = {
servo = { name = "servo"; local = "x86_64-linux"; target = "x86_64-linux"; };
desko = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; };
desko-light = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; light = true; };
desko-light = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; variant = "light"; };
lappy = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; };
lappy-light = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; light = true; };
lappy-light = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; variant = "light"; };
lappy-min = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; variant = "min"; };
moby = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; };
moby-light = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; light = true; };
moby-light = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; variant = "light"; };
moby-min = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; variant = "min"; };
rescue = { name = "rescue"; local = "x86_64-linux"; target = "x86_64-linux"; };
};
hostsNext = mapAttrs' (h: v: {
@ -285,7 +289,7 @@
# - sandbox friendliness (especially: `git` doesn't have to be run as root)
if [ -n "$addr" ]; then
sudo nix store sign -r -k /run/secrets/nix_serve_privkey "$storePath"
sudo nix store sign -r -k /run/secrets/nix_signing_key "$storePath"
# add more `-v` for more verbosity (up to 5).
# builders-use-substitutes false: optimizes so that the remote machine doesn't try to get paths from its substituters.
# we already have all paths here, and the remote substitution is slow to check and SERIOUSLY flaky on moby in particular.
@ -313,11 +317,8 @@
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}
set -x
env UPDATE_NIX_NAME=${pkg.name} UPDATE_NIX_PNAME=${pkg.pname} UPDATE_NIX_OLD_VERSION=${pkg.version} UPDATE_NIX_ATTR_PATH=${strAttrPath} ${command}
'');
};
mkUpdatersNoAliases = opts: basePath: pkgs.lib.concatMapAttrs
@ -408,14 +409,17 @@
desko-light = deployApp "desko-light" "desko" "switch";
lappy = deployApp "lappy" "lappy" "switch";
lappy-light = deployApp "lappy-light" "lappy" "switch";
lappy-min = deployApp "lappy-min" "lappy" "switch";
moby = deployApp "moby" "moby" "switch";
moby-light = deployApp "moby-light" "moby" "switch";
moby-min = deployApp "moby-min" "moby" "switch";
moby-test = deployApp "moby" "moby" "test";
servo = deployApp "servo" "servo" "switch";
# like `nixos-rebuild --flake . switch`
self = deployApp "$(hostname)" "" "switch";
self-light = deployApp "$(hostname)-light" "" "switch";
self = deployApp "$(hostname)" "" "switch";
self-light = deployApp "$(hostname)-light" "" "switch";
self-min = deployApp "$(hostname)-min" "" "switch";
type = "app";
program = builtins.toString (pkgs.writeShellScript "deploy-all" ''
@ -431,12 +435,16 @@
desko-light = deployApp "desko-light" "desko" null;
lappy = deployApp "lappy" "lappy" null;
lappy-light = deployApp "lappy-light" "lappy" null;
lappy-min = deployApp "lappy-min" "lappy" null;
moby = deployApp "moby" "moby" null;
moby-light = deployApp "moby-light" "moby" null;
moby-min = deployApp "moby-min" "moby" null;
servo = deployApp "servo" "servo" null;
type = "app";
program = builtins.toString (pkgs.writeShellScript "predeploy-all" ''
# copy the -light variants first; this might be run while waiting on a full build. or the full build failed.
# copy the -min/-light variants first; this might be run while waiting on a full build. or the full build failed.
nix run '.#preDeploy.moby-min' -- "$@"
nix run '.#preDeploy.lappy-min' -- "$@"
nix run '.#preDeploy.moby-light' -- "$@"
nix run '.#preDeploy.lappy-light' -- "$@"
nix run '.#preDeploy.desko-light' -- "$@"
@ -541,6 +549,9 @@
''
# build minimally-usable hosts first, then their full image.
# this gives me a minimal image i can deploy or copy over, early.
${checkHost "lappy-min"}
${checkHost "moby-min"}
${checkHost "desko-light"}
${checkHost "moby-light"}
${checkHost "lappy-light"}

View File

@ -1,39 +1,37 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
./fs.nix
];
sane.services.trust-dns.asSystemResolver = false; # TEMPORARY: TODO: re-enable trust-dns
# sane.programs.devPkgs.enableFor.user.colin = true;
# sane.guest.enable = true;
# services.distccd.enable = true;
# sane.programs.distcc.enableFor.user.guest = true;
# TODO: remove emulation, but need to fix nixos-rebuild to moby for that.
# sane.roles.build-machine.emulation = true;
# don't enable wifi by default: it messes with connectivity.
# systemd.services.iwd.enable = false;
# systemd.services.wpa_supplicant.enable = false;
sane.programs.wpa_supplicant.enableFor.user.colin = lib.mkForce false;
sane.programs.wpa_supplicant.enableFor.system = lib.mkForce false;
sops.secrets.colin-passwd.neededForUsers = true;
sane.ports.openFirewall = true; # for e.g. nix-serve
sane.roles.build-machine.enable = true;
sane.roles.client = true;
sane.roles.dev-machine = true;
sane.roles.pc = true;
sane.services.wg-home.enable = true;
sane.services.wg-home.ip = config.sane.hosts.by-name."desko".wg-home.ip;
sane.ovpn.addrV4 = "172.26.55.21";
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:20c1:a73c";
sane.services.duplicity.enable = true;
sane.services.nixserve.secretKeyFile = config.sops.secrets.nix_serve_privkey.path;
sane.nixcache.substituters.desko = false;
sane.nixcache.remote-builders.desko = false;
sane.programs.sway.enableFor.user.colin = true;
sane.programs.iphoneUtils.enableFor.user.colin = true;
sane.programs.steam.enableFor.user.colin = true;
# sane.programs.devPkgs.enableFor.user.colin = true;
sane.programs."gnome.geary".config.autostart = true;
sane.programs.signal-desktop.config.autostart = true;
@ -43,10 +41,6 @@
# needed to use libimobiledevice/ifuse, for iphone sync
services.usbmuxd.enable = true;
# 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:
# - hourly snapshots

View File

@ -9,15 +9,18 @@
sane.roles.pc = true;
sane.services.wg-home.enable = true;
sane.services.wg-home.ip = config.sane.hosts.by-name."lappy".wg-home.ip;
sane.ovpn.addrV4 = "172.23.119.72";
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:0332:aa96/128";
# sane.guest.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
sane.programs.stepmania.enableFor.user.colin = true;
sane.programs.sway.enableFor.user.colin = true;
sane.programs."gnome.geary".config.autostart = true;
sane.programs.signal-desktop.config.autostart = true;
sane.programs.stepmania.enableFor.user.colin = true;
sops.secrets.colin-passwd.neededForUsers = true;

View File

@ -1,7 +1,4 @@
# 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/>
@ -21,13 +18,11 @@
sane.roles.client = true;
sane.roles.handheld = true;
sane.zsh.showDeadlines = false; # unlikely to act on them when in shell
sane.programs.zsh.config.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;
# for some reason desko -> moby deploys are super flaky when desko is also a nixcache (not true of desko -> lappy deploys, though!)
# > unable to download 'http://desko:5001/<hash>.narinfo': Server returned nothing (no headers, no data) (52)
sane.nixcache.substituters.desko = false;
sane.ovpn.addrV4 = "172.24.87.255";
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:18cd:a72b";
# XXX colin: phosh doesn't work well with passwordless login,
# so set this more reliable default password should anything go wrong
@ -36,7 +31,6 @@
sops.secrets.colin-passwd.neededForUsers = true;
# sane.gui.sxmo.enable = true;
sane.programs.sway.enableFor.user.colin = true;
sane.programs.swaylock.enableFor.user.colin = false; #< not usable on touch
sane.programs.schlock.enableFor.user.colin = true;
@ -62,18 +56,8 @@
# HACK/TODO: make `programs.P.env.VAR` behave according to `mime.priority`
sane.programs.firefox.env = lib.mkForce {};
sane.programs.epiphany.env.BROWSER = "epiphany";
# 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
#
sane.programs.pipewire.config = {
# tune so Dino doesn't drop audio
# 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.
@ -84,11 +68,9 @@
# `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
}
'';
min-quantum = 2048;
max-quantum = 8192;
};
boot.loader.efi.canTouchEfiVariables = false;
# /boot space is at a premium. default was 20.
@ -126,15 +108,7 @@
'';
# enable rotation sensor
hardware.sensor.iio.enable = true;
# TODO: move elsewhere...
systemd.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" ];
};
# hardware.sensor.iio.enable = true;
services.udev.extraRules = let
chmod = "${pkgs.coreutils}/bin/chmod";

View File

@ -64,6 +64,5 @@
"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

@ -40,35 +40,213 @@ let
'';
in
{
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous;
# kernel compatibility (2024/05/22: 03dab630)
# - linux-megous: boots to ssh, desktop
# - camera apps: megapixels (no cameras found), snapshot (no cameras found)
# - linux-postmarketos: boots to ssh. desktop ONLY if "anx7688" is in the initrd.availableKernelModules.
# - camera apps: megapixels (both rear and front cameras work), `cam -l` (finds only the rear camera), snapshot (no cameras found)
# - linux-megous.override { withMegiPinephoneConfig = true; }: NO SSH, NO SIGNS OF LIFE
# - linux-megous.override { withFullConfig = false; }: boots to ssh, no desktop
#
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-postmarketos.override {
withModemPower = true;
});
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous;
# boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-megous.override {
# withFullConfig = false;
# });
# boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-megous.override {
# withMegiPinephoneConfig = true; #< N.B.: does not boot as of 2024/05/22!
# });
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-manjaro;
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
# 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 becomes stdenv.hostPlatform.linux-kernel
nixpkgs.hostPlatform.linux-kernel = {
# defaults:
name = "aarch64-multiplatform";
baseConfig = "defconfig";
DTB = true;
autoModules = true;
preferBuiltin = true;
# extraConfig = ...
# ^-- raspberry pi stuff: we don't need it.
# baseConfig: defaults to "defconfig";
# baseConfig = "pinephone_defconfig"; #< N.B.: ignored by `pkgs.linux-megous`
DTB = true; #< DTB: compile device tree blobs
# autoModules (default: true): for config options not manually specified, answer `m` to anything which supports it.
# - this effectively builds EVERY MODULE SUPPORTED.
autoModules = true; #< N.B.: ignored by `pkgs.linux-megous`
# preferBuiltin (default: false; true for rpi): for config options which default to `Y` upstream, build them as `Y` (overriding `autoModules`)
# preferBuiltin = false;
# build a compressed kernel image: without this i run out of /boot space in < 10 generations
# target = "Image"; # <-- default
target = "Image.gz"; # <-- compress the kernel image
# target = "zImage"; # <-- confuses other parts of nixos :-(
};
# boot.initrd.kernelModules = [
# "drm" #< force drm to be plugged
# ];
boot.initrd.availableKernelModules = [
# see <repo:postmarketOS/pmaports:device/main/device-pine64-pinephone/modules-initfs>
# - they include sun6i_mipi_dsi sun4i_drm pwm_sun4i sun8i_mixer anx7688 gpio_vibra pinephone_keyboard
"anx7688" #< required for display initialization and functional cameras
# full list of modules active post-boot with the linux-megous kernel + autoModules=true:
# - `lsmod | sort | cut -d ' ' -f 1`
# "8723cs"
# "axp20x_adc" #< NOT FOUND in megous-no-autoModules
# "axp20x_battery"
# "axp20x_pek"
# "axp20x_usb_power"
# "backlight"
# "blake2b_generic"
# "bluetooth"
# "bridge"
# "btbcm"
# "btqca"
# "btrfs"
# "btrtl"
# "cec"
# "cfg80211"
# "chacha_neon"
# "crc_ccitt"
# "crct10dif_ce"
# "crypto_engine"
# "display_connector" #< NOT FOUND in pmos
# "drm"
# "drm_display_helper"
# "drm_dma_helper"
# "drm_kms_helper"
# "drm_shmem_helper"
# "dw_hdmi"
# "dw_hdmi_cec" #< NOT FOUND in pmos
# "dw_hdmi_i2s_audio"
# "ecc"
# "ecdh_generic"
# "fuse"
# "gc2145" #< NOT FOUND in megous-no-autoModules
# "goodix_ts"
# "gpio_vibra" #< NOT FOUND in megous-no-autoModules
# "gpu_sched"
# "hci_uart"
# "i2c_gpio"
# "inv_mpu6050" #< NOT FOUND in megous-no-autoModules
# "inv_mpu6050_i2c" #< NOT FOUND in megous-no-autoModules
# "inv_sensors_timestamp" #< NOT FOUND in megous-no-autoModules
# "ip6t_rpfilter"
# "ip6_udp_tunnel"
# "ip_set"
# "ip_set_hash_ipport"
# "ip_tables"
# "ipt_rpfilter"
# "joydev"
# "led_class_flash" #< NOT FOUND in megous-no-autoModules
# "leds_sgm3140" #< NOT FOUND in megous-no-autoModules
# "ledtrig_pattern" #< NOT FOUND in megous-no-autoModules
# "libarc4"
# "libchacha"
# "libchacha20poly1305"
# "libcrc32c"
# "libcurve25519_generic"
# "lima"
# "llc"
# "mac80211"
# "macvlan"
# "mc"
# "modem_power"
# "mousedev"
# "nf_conntrack"
# "nf_defrag_ipv4"
# "nf_defrag_ipv6"
# "nf_log_syslog"
# "nf_nat"
# "nfnetlink"
# "nf_tables"
# "nft_chain_nat"
# "nft_compat"
# "nls_cp437"
# "nls_iso8859_1"
# "nvmem_reboot_mode"
# "ov5640"
# "panel_sitronix_st7703"
# "phy_sun6i_mipi_dphy"
# "pinctrl_axp209" #< NOT FOUND in pmos
# "pinephone_keyboard" #< NOT FOUND in megous-no-autoModules
# "poly1305_neon"
# "polyval_ce"
# "polyval_generic"
# "ppkb_manager" #< NOT FOUND in megous-no-autoModules
# "pwm_bl"
# "pwm_sun4i"
# "qrtr"
# "raid6_pq"
# "rfkill"
# "rtw88_8703b"
# "rtw88_8723cs"
# "rtw88_8723x"
# "rtw88_core"
# "rtw88_sdio"
# "sch_fq_codel"
# "sm4"
# "snd_soc_bt_sco"
# "snd_soc_ec25" #< NOT FOUND in megous-no-autoModules
# "snd_soc_hdmi_codec"
# "snd_soc_simple_amplifier"
# "snd_soc_simple_card"
# "snd_soc_simple_card_utils"
# "stk3310" #< NOT FOUND in megous-no-autoModules
# "st_magn"
# "st_magn_i2c"
# "st_magn_spi" #< NOT FOUND in pmos
# "stp"
# "st_sensors"
# "st_sensors_i2c"
# "st_sensors_spi" #< NOT FOUND in pmos
# "sun4i_drm"
# "sun4i_i2s"
# "sun4i_lradc_keys" #< NOT FOUND in megous-no-autoModules
# "sun4i_tcon"
# "sun50i_codec_analog"
# "sun6i_csi"
# "sun6i_dma"
# "sun6i_mipi_dsi"
# "sun8i_a33_mbus" #< NOT FOUND in megous-no-autoModules
# "sun8i_adda_pr_regmap"
# "sun8i_ce" #< NOT FOUND in pmos
# "sun8i_codec" #< NOT FOUND in megous-no-autoModules
# "sun8i_di" #< NOT FOUND in megous-no-autoModules
# "sun8i_drm_hdmi"
# "sun8i_mixer"
# "sun8i_rotate" #< NOT FOUND in megous-no-autoModules
# "sun8i_tcon_top"
# "sun9i_hdmi_audio" #< NOT FOUND in megous-no-autoModules
# "sunxi_wdt" #< NOT FOUND in pmos
# "tap"
# "typec" #< NOT FOUND in pmos
# "udp_tunnel"
# "uio" #< NOT FOUND in pmos
# "uio_pdrv_genirq"
# "v4l2_async"
# "v4l2_cci" #< NOT FOUND in pmos
# "v4l2_flash_led_class" #< NOT FOUND in megous-no-autoModules
# "v4l2_fwnode"
# "v4l2_mem2mem"
# "videobuf2_common"
# "videobuf2_dma_contig"
# "videobuf2_memops"
# "videobuf2_v4l2"
# "videodev"
# "wireguard"
# "xor"
# "x_tables"
# "xt_conntrack"
# "xt_LOG"
# "xt_nat"
# "xt_pkttype"
# "xt_set"
# "xt_tcpudp"
# "zram"
];
# disable proximity sensor.
# the filtering/calibration is bad that it causes the screen to go fully dark at times.
boot.blacklistedKernelModules = [ "stk3310" ];
# boot.blacklistedKernelModules = [ "stk3310" ];
boot.kernelParams = [
# without this some GUI apps fail: `DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory`
@ -78,14 +256,16 @@ in
#
# 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?
# bumped to 512M on 2023/01
# bumped to 1536M on 2024/05
# `cat /proc/meminfo` to see CmaTotal/CmaFree if interested in tuning this.
"cma=512M"
# kernel param mentioned here: <https://cateee.net/lkddb/web-lkddb/CMA_SIZE_PERCENTAGE.html>
# i think cma mem isn't exclusive -- it can be used as ordinary `malloc`, still. i heard someone suggest the OS default should just be 50% memory to CMA.
"cma=1536M"
# 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;
systemd.services.unl0kr.preStart = ensureHWReady;
}

View File

@ -15,20 +15,21 @@
};
sane.roles.build-machine.enable = true;
sane.zsh.showDeadlines = false; # ~/knowledge doesn't always exist
sane.programs.zsh.config.showDeadlines = false; # ~/knowledge doesn't always exist
sane.programs.consoleUtils.suggestedPrograms = [
"consoleMediaUtils" # notably, for go2tv / casting
"pcConsoleUtils"
"sane-scripts.stop-all-servo"
];
sane.services.dyn-dns.enable = true;
sane.services.trust-dns.asSystemResolver = false; # TODO: enable once it's all working well
sane.services.wg-home.enable = 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.ovpn.addrV4 = "172.23.174.114";
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:8df3:14b0";
sane.nixcache.remote-builders.desko = false;
sane.nixcache.remote-builders.servo = false;
# sane.services.duplicity.enable = true; # TODO: re-enable after HW upgrade

View File

@ -38,6 +38,39 @@ in
# FallbackDNS=1.1.1.1 9.9.9.9
# '';
# tun-sea config
sane.dns.zones."uninsane.org".inet.A."doof.tunnel" = "205.201.63.12";
sane.dns.zones."uninsane.org".inet.AAAA."doof.tunnel" = "2602:fce8:106::51";
networking.wireguard.interfaces.wg-doof = let
ip = "${pkgs.iproute2}/bin/ip";
in {
privateKeyFile = config.sops.secrets.wg_doof_privkey.path;
# wg is active only in this namespace.
# run e.g. ip netns exec doof <some command like ping/curl/etc, it'll go through wg>
# sudo ip netns exec doof ping www.google.com
interfaceNamespace = "doof";
ips = [
"205.201.63.12/32"
"2602:fce8:106::51/128"
];
peers = [
{
publicKey = "nuESyYEJ3YU0hTZZgAd7iHBz1ytWBVM5PjEL1VEoTkU=";
# TODO: configure DNS within the doof ns and use tun-sea.doof.net endpoint
# endpoint = "tun-sea.doof.net:53263";
endpoint = "205.201.63.44:53263";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
persistentKeepalive = 25; #< keep the NAT alive
}
];
preSetup = ''
${ip} netns add doof || (test -e /run/netns/doof && echo "doof already exists")
'';
postShutdown = ''
${ip} netns delete doof || echo "couldn't delete doof"
'';
};
# 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`.

View File

@ -24,7 +24,7 @@ lib.mkIf false
# services.calibre-web.options.calibreLibrary = svc-dir;
services.nginx.virtualHosts."calibre.uninsane.org" = {
addSSL = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://${ip}:${builtins.toString port}";

View File

@ -24,50 +24,64 @@
# 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.
# - there an old version which *half worked*, which is:
# - run the turn server in the root namespace.
# - bind the turn server to the veth connecting it to the VPN namespace (so it sends outgoing traffic to the right place).
# - NAT the turn port range from VPN into root namespace (so it receives incomming traffic).
# - this approach would fail the prosody conversations.im check, but i didn't notice *obvious* call routing errors.
#
# debugging:
# - log messages like 'usage: realm=<turn.uninsane.org>, username=<1715915193>, rp=14, rb=1516, sp=8, sb=684'
# - rp = received packets
# - rb = received bytes
# - sp = sent packets
# - sb = sent bytes
{ 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;
# TURN port range (inclusive).
# default coturn behavior is to use the upper quarter of all ports. i.e. 49152 - 65535.
# i believe TURN allocations expire after either 5 or 10 minutes of inactivity.
turnPortLow = 49152; # 49152 = 0xc000
turnPortHigh = turnPortLow + 256;
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
));
# the port definitions are only needed if running in the root net namespace
# 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; # forward traffic from the VPN to the root NS
# 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
@ -103,22 +117,28 @@ in
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";
#v disable to allow unauthenticated access (or set `services.coturn.no-auth = true`)
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.lt-cred-mech = true; #< XXX: use-auth-secret overrides lt-cred-mech
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"
# "Verbose" #< even MORE verbosity than "verbose" (it's TOO MUCH verbosity really)
"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" #< 2024/04/25: works, if running in root namespace
"listening-ip=185.157.162.178" "external-ip=185.157.162.178"
# old attempts:
# "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" (?)
];
systemd.services.coturn.serviceConfig.NetworkNamespacePath = "/run/netns/ovpns";
}

View File

@ -1,6 +1,22 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.pyln-client ])"
"""
clightning-sane: helper to perform common Lightning node admin operations:
- view channel balances
- rebalance channels
COMMON OPERATIONS:
- view channel balances: `clightning-sane status`
- rebalance channels to improve routability (without paying any fees): `clightning-sane autobalance`
FULL OPERATION:
- `clightning-sane status --full`
- `P$`: represents how many msats i've captured in fees from this channel.
- `COST`: rough measure of how much it's "costing" me to let my channel partner hold funds on his side of the channel.
this is based on the notion that i only capture fees from outbound transactions, and so the channel partner holding all liquidity means i can't capture fees on that liquidity.
"""
# pyln-client docs: <https://github.com/ElementsProject/lightning/tree/master/contrib/pyln-client>
# terminology:
# - "scid": "Short Channel ID", e.g. 123456x7890x0
@ -726,7 +742,7 @@ def main():
logging.basicConfig()
logger.setLevel(logging.INFO)
parser = argparse.ArgumentParser(description="rebalance lightning channel balances")
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--verbose", action="store_true", help="more logging")
parser.add_argument("--min-msat", default="999", help="min transaction size")
parser.add_argument("--max-msat", default="1000000", help="max transaction size")

View File

@ -20,7 +20,6 @@
./navidrome.nix
./nginx.nix
./nixos-prebuild.nix
./nixserve.nix
./ntfy
./pict-rs.nix
./pleroma.nix

View File

@ -2,7 +2,7 @@
{
imports = [
./nfs.nix
./sftpgo.nix
./sftpgo
];
users.groups.export = {};

View File

@ -15,6 +15,7 @@
# - could maybe be done with some mount option?
{ config, lib, ... }:
lib.mkIf false #< TODO: remove nfs altogether! it's not exactly the most secure
{
services.nfs.server.enable = true;

View File

@ -9,24 +9,33 @@
{ config, lib, pkgs, sane-lib, ... }:
let
sftpgo_external_auth_hook = pkgs.static-nix-shell.mkPython3Bin {
pname = "sftpgo_external_auth_hook";
external_auth_hook = pkgs.static-nix-shell.mkPython3Bin {
pname = "external_auth_hook";
srcRoot = ./.;
pyPkgs = [ "passlib" ];
};
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.
# 50000 is used by soulseek.
passiveStart = 50050;
passiveEnd = 50070;
in
{
sane.ports.ports = {
"21" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
# visibleTo.wan = true;
description = "colin-FTP server";
};
"990" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-FTPS server";
};
} // (sane-lib.mapToAttrs
(port: {
name = builtins.toString port;
@ -37,12 +46,32 @@ in
description = "colin-FTP server data port range";
};
})
(lib.range 50050 50100)
(lib.range passiveStart passiveEnd)
);
# use nginx/acme to produce a cert for FTPS
services.nginx.virtualHosts."ftp.uninsane.org" = {
addSSL = true;
enableACME = true;
};
sane.dns.zones."uninsane.org".inet.CNAME."ftp" = "native";
services.sftpgo = {
enable = true;
group = "export";
package = pkgs.sftpgo.overrideAttrs (upstream: {
patches = (upstream.patches or []) ++ [
# fix for compatibility with kodi:
# ftp LIST operation returns entries over-the-wire like:
# - dgrwxrwxr-x 1 ftp ftp 9 Apr 9 15:05 Videos
# however not all clients understand all mode bits (like that `g`, indicating SGID / group sticky bit).
# instead, only send mode bits which are well-understood.
# the full set of bits, from which i filter, is found here: <https://pkg.go.dev/io/fs#FileMode>
./safe_fileinfo.patch
];
});
settings = {
ftpd = {
bindings = [
@ -58,16 +87,33 @@ in
port = 21;
debug = true;
}
{
# binding this means any wireguard client can connect
address = "10.0.10.5";
port = 990;
debug = true;
tls_mode = 2; # 2 = "implicit FTPS": client negotiates TLS before any FTP command.
}
{
# binding this means any LAN client can connect (also WAN traffic forwarded from the gateway)
address = "10.78.79.51";
port = 990;
debug = true;
tls_mode = 2; # 2 = "implicit FTPS": client negotiates TLS before any FTP command.
}
];
# active mode is susceptible to "bounce attacks", without much benefit over passive mode
disable_active_mode = true;
hash_support = true;
passive_port_range = {
start = 50050;
end = 50100;
start = passiveStart;
end = passiveEnd;
};
certificate_file = "/var/lib/acme/ftp.uninsane.org/full.pem";
certificate_key_file = "/var/lib/acme/ftp.uninsane.org/key.pem";
banner = ''
Welcome, friends, to Colin's FTP server! Also available via NFS on the same host, but LAN-only.
@ -75,14 +121,14 @@ in
Username: "anonymous"
Password: "anonymous"
CONFIGURE YOUR CLIENT FOR "PASSIVE" mode, e.g. `ftp --passive uninsane.org`.
CONFIGURE YOUR CLIENT FOR "PASSIVE" MODE, e.g. `ftp --passive ftp.uninsane.org`.
Please let me know if anything's broken or not as it should be. Otherwise, browse and transfer freely :)
'';
};
data_provider = {
driver = "memory";
external_auth_hook = "${sftpgo_external_auth_hook}/bin/sftpgo_external_auth_hook";
external_auth_hook = "${external_auth_hook}/bin/external_auth_hook";
# track_quota:
# - 0: disable quota tracking
# - 1: quota is updated on every upload/delete, even if user has no quota restriction
@ -95,6 +141,7 @@ in
users.users.sftpgo.extraGroups = [
"export"
"media"
"nginx" # to access certs
];
systemd.services.sftpgo = {

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ])"
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.passlib ])"
# vim: set filetype=python :
#
# available environment variables:
@ -37,9 +37,9 @@
# - 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.
import crypt
import json
import os
import passlib.hosts
from hmac import compare_digest
@ -112,10 +112,8 @@ def isWireguard(ip: str) -> bool:
def isTrustedCred(password: str) -> bool:
for cred in TRUSTED_CREDS:
_, method, salt, hash_ = cred.split("$")
# assert method == "6", f"unrecognized crypt entry: {cred}"
if crypt.crypt(password, f"${method}${salt}") == cred:
return True
if passlib.hosts.linux_context.verify(password, cred):
return True
return False

View File

@ -0,0 +1,32 @@
diff --git a/internal/ftpd/handler.go b/internal/ftpd/handler.go
index 036c3977..33211261 100644
--- a/internal/ftpd/handler.go
+++ b/internal/ftpd/handler.go
@@ -169,7 +169,7 @@ func (c *Connection) Stat(name string) (os.FileInfo, error) {
}
return nil, err
}
- return fi, nil
+ return vfs.NewFileInfo(name, fi.IsDir(), fi.Size(), fi.ModTime(), false), nil
}
// Name returns the name of this connection
@@ -315,7 +315,17 @@ func (c *Connection) ReadDir(name string) (ftpserver.DirLister, error) {
}, nil
}
- return c.ListDir(name)
+ lister, err := c.ListDir(name)
+ if err != nil {
+ return nil, err
+ }
+ return &patternDirLister{
+ DirLister: lister,
+ pattern: "*",
+ lastCommand: c.clientContext.GetLastCommand(),
+ dirName: name,
+ connectionPath: c.clientContext.Path(),
+ }, nil
}
// GetHandle implements ClientDriverExtentionFileTransfer

View File

@ -90,6 +90,8 @@
];
};
services.openssh.settings.UsePAM = true; #< required for `git` user to authenticate
# hosted git (web view and for `git <cmd>` use
# TODO: enable publog?
services.nginx.virtualHosts."git.uninsane.org" = {

View File

@ -20,7 +20,7 @@
--ignore-panel=HOSTS \
--ws-url=wss://sink.uninsane.org:443/ws \
--port=7890 \
-o /var/lib/uninsane/sink/index.html
-o /var/lib/goaccess/index.html
'';
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Type = "simple";
@ -28,17 +28,19 @@
RestartSec = "10s";
# hardening
WorkingDirectory = "/tmp";
# TODO: run as `goaccess` user and add `goaccess` user to group `nginx`.
NoNewPrivileges = true;
PrivateDevices = "yes";
PrivateTmp = true;
ProtectHome = "read-only";
ProtectSystem = "strict";
SystemCallFilter = "~@clock @cpu-emulation @debug @keyring @memlock @module @mount @obsolete @privileged @reboot @resources @setuid @swap @raw-io";
ReadOnlyPaths = "/";
ReadWritePaths = [ "/proc/self" "/var/lib/uninsane/sink" ];
PrivateDevices = "yes";
ProtectKernelModules = "yes";
ProtectKernelTunables = "yes";
ProtectSystem = "strict";
ReadOnlyPaths = [ "/var/log/nginx" ];
ReadWritePaths = [ "/proc/self" "/var/lib/goaccess" ];
StateDirectory = "goaccess";
SystemCallFilter = "~@clock @cpu-emulation @debug @keyring @memlock @module @mount @obsolete @privileged @reboot @resources @setuid @swap @raw-io";
WorkingDirectory = "/var/lib/goaccess";
};
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
@ -49,7 +51,7 @@
addSSL = true;
enableACME = true;
# inherit kTLS;
root = "/var/lib/uninsane/sink";
root = "/var/lib/goaccess";
locations."/ws" = {
proxyPass = "http://127.0.0.1:7890";

View File

@ -1,5 +1,6 @@
{ ... }:
{ lib, pkgs, ... }:
lib.mkIf false #< TODO: re-enable once confident of sandboxing
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode? we only need this to save Indexer creds ==> migrate to config?
@ -12,6 +13,8 @@
systemd.services.jackett.serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
ExecStartPre = [ "${lib.getExe pkgs.sane-scripts.ip-check} --no-upnp --expect 185.157.162.178" ]; # abort if public IP is not as expected
# patch jackett to listen on the public interfaces
# ExecStart = lib.mkForce "${pkgs.jackett}/bin/Jackett --NoUpdates --DataFolder /var/lib/jackett/.config/Jackett --ListenPublic";
};

View File

@ -75,7 +75,7 @@
# Jellyfin multimedia server
# this is mostly taken from the official jellfin.org docs
services.nginx.virtualHosts."jelly.uninsane.org" = {
addSSL = true;
forceSSL = true;
enableACME = true;
# inherit kTLS;

View File

@ -12,7 +12,7 @@ in
services.komga.port = 11319; # chosen at random
services.nginx.virtualHosts."komga.uninsane.org" = {
addSSL = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString port}";

View File

@ -22,7 +22,7 @@ let
# # "Change commandline flag to allow disabling video, since it is enabled by default"
# postPatch = (upstream.postPatch or "") + ''
# substituteInPlace src/validate.rs \
# --replace 'if transcode_options.needs_reencode() {' 'if false {'
# --replace-fail 'if transcode_options.needs_reencode() {' 'if false {'
# '';
# });
in {

View File

@ -89,6 +89,16 @@ in
disable_symlinks on;
'';
};
locations."/share/Milkbags/" = {
alias = "/var/media/Videos/Milkbags/";
extraConfig = ''
# autoindex => render directory listings
autoindex on;
# don't follow any symlinks when serving files
# otherwise it allows a directory escape
disable_symlinks on;
'';
};
# allow matrix users to discover that @user:uninsane.org is reachable via matrix.uninsane.org
locations."= /.well-known/matrix/server".extraConfig =

View File

@ -1,21 +0,0 @@
{ config, ... }:
{
services.nginx.virtualHosts."nixcache.uninsane.org" = {
addSSL = true;
enableACME = true;
# inherit kTLS;
# serverAliases = [ "nixcache" ];
locations."/".extraConfig = ''
proxy_pass http://localhost:${toString config.services.nix-serve.port};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
'';
};
sane.dns.zones."uninsane.org".inet.CNAME."nixcache" = "native";
sane.services.nixserve.enable = true;
sane.services.nixserve.secretKeyFile = config.sops.secrets.nix_serve_privkey.path;
}

View File

@ -25,7 +25,7 @@ in
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "fed.uninsane.org", scheme: "https", port: 443],
http: [ip: {127, 0, 0, 1}, port: 4000]
http: [ip: {127, 0, 0, 1}, port: 4040]
# secret_key_base: "{secrets.pleroma.secret_key_base}",
# signing_salt: "{secrets.pleroma.signing_salt}"
@ -167,7 +167,7 @@ in
enableACME = true;
# inherit kTLS;
locations."/" = {
proxyPass = "http://127.0.0.1:4000";
proxyPass = "http://127.0.0.1:4040";
recommendedProxySettings = true;
# documented: https://git.pleroma.social/pleroma/pleroma/-/blob/develop/installation/pleroma.nginx
extraConfig = ''

View File

@ -7,7 +7,8 @@
# debugging:
# - soulseek is just *flaky*. if you see e.g. DNS errors, even though you can't replicate them via `dig` or `getent ahostsv4`, just give it 10 minutes to work out:
# - "Soulseek.AddressException: Failed to resolve address 'vps.slsknet.org': Resource temporarily unavailable"
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
{
sane.persist.sys.byStore.plaintext = [
{ user = "slskd"; group = "media"; path = "/var/lib/slskd"; method = "bind"; }
@ -68,12 +69,12 @@
# flags.volatile = true; # store searches and active transfers in RAM (completed transfers still go to disk). rec for btrfs/zfs
};
systemd.services.slskd = {
serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
Restart = lib.mkForce "always"; # exits "success" when it fails to connect to soulseek server
RestartSec = "60s";
};
systemd.services.slskd.serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
ExecStartPre = [ "${lib.getExe pkgs.sane-scripts.ip-check} --no-upnp --expect 185.157.162.178" ]; # abort if public IP is not as expected
Restart = lib.mkForce "always"; # exits "success" when it fails to connect to soulseek server
RestartSec = "60s";
};
}

View File

@ -26,6 +26,9 @@ let
torrent-done = pkgs.writeShellApplication {
name = "torrent-done";
runtimeInputs = with pkgs; [
acl
coreutils
findutils
rsync
util-linux
];
@ -52,12 +55,34 @@ let
destructive mkdir -p "$(dirname "$MEDIA_DIR")"
destructive rsync -arv "$TR_TORRENT_DIR/" "$MEDIA_DIR/"
# make the media rwx by anyone in the group
destructive find "$MEDIA_DIR" -type d -exec setfacl --recursive --modify d:g::rwx,o::rx {} \;
destructive find "$MEDIA_DIR" -type d -exec chmod g+rw,a+rx {} \;
# if there's a single directory inside the media dir, then inline that
subdirs=("$MEDIA_DIR"/*)
if [ ''${#subdirs} -eq 1 ]; then
dirname="''${subdirs[0]}"
if [ -d "$dirname" ]; then
mv "$dirname"/* "$MEDIA_DIR/" && rmdir "$dirname"
fi
fi
# remove noisy files:
find "$MEDIA_DIR/" -type f \(\
-iname 'www.YTS.*.jpg' \
-o -iname 'WWW.YIFY*.COM.jpg' \
-o -iname 'YIFY*.com.txt' \
-o -iname 'YTS*.com.txt' \
\) -exec rm {} \;
# dedupe the whole media library.
# yeah, a bit excessive: move this to a cron job if that's problematic.
destructive hardlink /var/media --reflink=always --ignore-time --verbose
'';
};
in
lib.mkIf false #< TODO: re-enable once confident of sandboxing
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode? we need this specifically for the stats tracking in .config/
@ -81,8 +106,8 @@ in
# DOCUMENTATION/options list: <https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md#options>
# 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";
# 10.0.1.6 => allow rpc only from the root servo ns. it'll tunnel things to the net, if need be.
rpc-bind-address = "10.0.1.6";
#rpc-host-whitelist = "bt.uninsane.org";
#rpc-whitelist = "*.*.*.*";
rpc-authentication-required = true;
@ -92,6 +117,10 @@ in
rpc-password = "{503fc8928344f495efb8e1f955111ca5c862ce0656SzQnQ5";
rpc-whitelist-enabled = false;
# force behind ovpns in case the NetworkNamespace fails somehow
bind-address-ipv4 = "185.157.162.178";
port-forwarding-enabled = false;
# hopefully, make the downloads world-readable
# umask = 0; #< default is 2: i.e. deny writes from world
@ -131,6 +160,8 @@ in
systemd.services.transmission.serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
ExecStartPre = [ "${lib.getExe pkgs.sane-scripts.ip-check} --no-upnp --expect 185.157.162.178" ]; # abort if public IP is not as expected
Restart = "on-failure";
RestartSec = "30s";
BindPaths = [ "/var/media" ]; #< so it can move completed torrents into the media library

View File

@ -2,19 +2,11 @@
{ config, lib, pkgs, ... }:
let
dyn-dns = config.sane.services.dyn-dns;
nativeAddrs = lib.mapAttrs (_name: builtins.head) config.sane.dns.zones."uninsane.org".inet.A;
bindOvpn = "10.0.1.5";
in lib.mkMerge [
in
{
services.trust-dns.enable = true;
# don't bind to IPv6 until i explicitly test that stack
services.trust-dns.settings.listen_addrs_ipv6 = [];
services.trust-dns.quiet = true;
# FIXME(2023/11/26): services.trust-dns.debug doesn't log requests: use RUST_LOG=debug env for that.
# - see: <https://github.com/hickory-dns/hickory-dns/issues/2082>
# services.trust-dns.debug = true;
sane.ports.ports."53" = {
protocol = [ "udp" "tcp" ];
visibleTo.lan = true;
@ -66,23 +58,6 @@ in lib.mkMerge [
services.trust-dns.settings.zones = [ "uninsane.org" ];
# 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;
users.groups.trust-dns = {};
users.users.trust-dns = {
group = "trust-dns";
isSystemUser = true;
};
# sane.services.dyn-dns.restartOnChange = [ "trust-dns.service" ];
networking.nat.enable = true;
networking.nat.extraCommands = ''
@ -107,98 +82,73 @@ in lib.mkMerge [
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.trust-dns.enable = true;
sane.services.trust-dns.instances = let
mkSubstitutions = flavor: {
"%AWAN%" = "$(cat '${dyn-dns.ipPath}')";
"%CNAMENATIVE%" = "servo.${flavor}";
"%ANATIVE%" = nativeAddrs."servo.${flavor}";
"%AOVPNS%" = "185.157.162.178";
};
in
{
wan = {
substitutions = mkSubstitutions "wan";
listenAddrsIpv4 = [
nativeAddrs."servo.lan"
bindOvpn
];
};
lan = {
substitutions = mkSubstitutions "lan";
listenAddrsIpv4 = [ nativeAddrs."servo.lan" ];
port = 1053;
};
hn = {
substitutions = mkSubstitutions "hn";
listenAddrsIpv4 = [ nativeAddrs."servo.hn" ];
port = 1053;
};
# hn-resolver = {
# # don't need %AWAN% here because we forward to the hn instance.
# listenAddrsIpv4 = [ nativeAddrs."servo.hn" ];
# extraConfig = {
# zones = [
# {
# zone = "uninsane.org";
# zone_type = "Forward";
# stores = {
# type = "forward";
# name_servers = [
# {
# socket_addr = "${nativeAddrs."servo.hn"}:1053";
# protocol = "udp";
# trust_nx_responses = true;
# }
# ];
# };
# }
# {
# # 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;
# }
# ];
# };
# }
# ];
# };
# };
};
sane.services.dyn-dns.restartOnChange = [
"trust-dns-wan.service"
@ -207,4 +157,3 @@ in lib.mkMerge [
# "trust-dns-hn-resolver.service" # doesn't need restart because it doesn't know about WAN IP
];
}
]

View File

@ -81,11 +81,15 @@ let
(fromDb "feeds.simplecast.com/xKJ93w_w" // uncat) # Atlas Obscura
(fromDb "feeds.transistor.fm/acquired" // tech)
(fromDb "fulltimenix.com" // tech)
(fromDb "futureofcoding.org/episodes" // tech)
(fromDb "hackerpublicradio.org" // tech)
(fromDb "lexfridman.com/podcast" // rat)
(fromDb "mapspodcast.libsyn.com" // uncat) # Multidisciplinary Association for Psychedelic Studies
(fromDb "microarch.club" // tech)
(fromDb "mintcast.org" // tech)
(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 "omny.fm/shows/money-stuff-the-podcast") # Matt Levine
(fromDb "omny.fm/shows/the-dollop-with-dave-anthony-and-gareth-reynolds") # The Dollop history/comedy
(fromDb "originstories.libsyn.com" // uncat)
(fromDb "podcast.posttv.com/itunes/post-reports.xml" // pol)
@ -101,6 +105,8 @@ let
(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 "theamphour.com" // tech)
(fromDb "techtalesshow.com" // tech) # Corbin Davenport
(fromDb "techwontsave.us" // pol) # rec by Cory Doctorow
(fromDb "wakingup.libsyn.com" // pol) # Sam Harris
(fromDb "werenotwrong.fireside.fm" // pol)
@ -124,11 +130,11 @@ let
(fromDb "acoup.blog/feed") # history, states. author: <https://historians.social/@bretdevereaux/following>
(fromDb "amosbbatto.wordpress.com" // tech)
(fromDb "anish.lakhwara.com" // tech)
(fromDb "apenwarr.ca/log/rss.php" // tech) # CEO of tailscale
(fromDb "applieddivinitystudies.com" // rat)
(fromDb "artemis.sh" // tech)
(fromDb "ascii.textfiles.com" // tech) # Jason Scott
(fromDb "austinvernon.site" // tech)
# (fromDb "balajis.com" // pol) # Balaji
(fromDb "ben-evans.com/benedictevans" // pol)
(fromDb "bitbashing.io" // tech)
(fromDb "bitsaboutmoney.com" // uncat)
@ -139,8 +145,6 @@ let
(fromDb "blog.thalheim.io" // tech) # Mic92
(fromDb "bunniestudios.com" // tech) # Bunnie Juang
(fromDb "capitolhillseattle.com" // pol)
# (fromDb "drewdevault.com" // tech)
# (fromDb "econlib.org" // pol)
(fromDb "edwardsnowden.substack.com" // pol // text)
(fromDb "fasterthanli.me" // tech)
(fromDb "gwern.net" // rat)
@ -151,9 +155,9 @@ let
(fromDb "interconnected.org/home/feed" // rat) # Matt Webb -- engineering-ish, but dreamy
(fromDb "jeffgeerling.com" // tech)
(fromDb "jefftk.com" // tech)
(fromDb "jwz.org/blog" // tech // pol) # DNA lounge guy, loooong-time blogger
(fromDb "kill-the-newsletter.com/feeds/joh91bv7am2pnznv.xml" // pol) # Matt Levine - Money Stuff
(fromDb "kosmosghost.github.io/index.xml" // tech)
# (fromDb "lesswrong.com" // rat)
(fromDb "linmob.net" // tech)
(fromDb "lwn.net" // tech)
(fromDb "lynalden.com" // pol)
@ -168,13 +172,13 @@ let
(fromDb "pomeroyb.com" // tech)
(fromDb "postmarketos.org/blog" // tech)
(fromDb "preposterousuniverse.com" // rat) # Sean Carroll
(fromDb "profectusmag.com" // uncat)
(fromDb "project-insanity.org" // tech) # shared blog by a few NixOS devs, notably onny
(fromDb "putanumonit.com" // rat) # mostly dating topics. not advice, or humor, but looking through a social lens
(fromDb "richardcarrier.info" // rat)
(fromDb "rifters.com/crawl" // uncat) # No Moods, Ads or Cutesy Fucking Icons
(fromDb "righto.com" // tech) # Ken Shirriff
(fromDb "rootsofprogress.org" // rat) # Jason Crawford
(fromDb "samuel.dionne-riel.com" // tech) # SamuelDR
(fromDb "sagacioussuricata.com" // tech) # ian (Sanctuary)
(fromDb "semiaccurate.com" // tech)
(fromDb "sideways-view.com" // rat) # Paul Christiano
@ -183,33 +187,41 @@ let
(fromDb "spectrum.ieee.org" // tech)
(fromDb "stpeter.im/atom.xml" // pol)
(fromDb "thediff.co" // pol) # Byrne Hobart
# (fromDb "theregister.com" // tech)
(fromDb "thisweek.gnome.org" // tech)
(fromDb "tuxphones.com" // tech)
(fromDb "uninsane.org" // tech)
(fromDb "unintendedconsequenc.es" // rat)
# (fromDb "vitalik.ca" // tech) # moved to vitalik.eth.limo
(fromDb "vitalik.eth.limo" // tech) # Vitalik Buterin
# (fromDb "webcurious.co.uk" // uncat) # link aggregator; defunct?
(fromDb "weekinethereumnews.com" // tech)
(fromDb "willow.phantoma.online") # wizard@xyzzy.link
(fromDb "xn--gckvb8fzb.com" // tech)
(mkSubstack "astralcodexten" // rat // daily) # Scott Alexander
# (mkSubstack "doomberg" // tech // weekly) # articles are all pay-walled
(mkSubstack "eliqian" // rat // weekly)
(mkSubstack "oversharing" // pol // daily)
(mkSubstack "samkriss" // humor // infrequent)
(mkText "http://benjaminrosshoffman.com/feed" // pol // weekly)
(mkText "http://boginjr.com/feed" // tech // infrequent)
(mkText "https://forum.merveilles.town/rss.xml" // pol // infrequent) #quality RSS list here: <https://forum.merveilles.town/thread/57/share-your-rss-feeds%21-6/>
# (mkText "https://github.com/Kaiteki-Fedi/Kaiteki/commits/master.atom" // tech // infrequent)
(mkText "https://jvns.ca/atom.xml" // tech // weekly) # Julia Evans
(mkText "https://linuxphoneapps.org/blog/atom.xml" // tech // infrequent)
(mkText "https://nixos.org/blog/announcements-rss.xml" // tech // infrequent) # more nixos stuff here, but unclear how to subscribe: <https://nixos.org/blog/categories.html>
(mkText "https://nixos.org/blog/stories-rss.xml" // tech // weekly)
(mkText "https://solar.lowtechmagazine.com/posts/index.xml" // tech // weekly)
(mkText "https://www.stratechery.com/rss" // pol // weekly) # Ben Thompson
# (fromDb "balajis.com" // pol) # Balaji
# (fromDb "drewdevault.com" // tech)
# (fromDb "econlib.org" // pol)
# (fromDb "lesswrong.com" // rat)
# (fromDb "profectusmag.com" // pol) # some conservative/libertarian think tank
# (fromDb "thesideview.co" // uncat) # spiritual journal; RSS items are stubs
# (fromDb "theregister.com" // tech)
# (fromDb "vitalik.ca" // tech) # moved to vitalik.eth.limo
# (fromDb "webcurious.co.uk" // uncat) # link aggregator; defunct?
# (mkSubstack "doomberg" // tech // weekly) # articles are all pay-walled
# (mkText "https://github.com/Kaiteki-Fedi/Kaiteki/commits/master.atom" // tech // infrequent)
# (mkText "https://til.simonwillison.net/tils/feed.atom" // tech // weekly)
# (mkText "https://www.bloomberg.com/opinion/authors/ARbTQlRLRjE/matthew-s-levine.rss" // pol // weekly) # Matt Levine (preview/paywalled)
(mkText "https://www.stratechery.com/rss" // pol // weekly) # Ben Thompson
];
videos = [
@ -221,18 +233,20 @@ let
(fromDb "youtube.com/@JackStauber")
(fromDb "youtube.com/@NativLang")
(fromDb "youtube.com/@PolyMatter")
# (fromDb "youtube.com/@rossmanngroup" // pol // tech) # Louis Rossmann
(fromDb "youtube.com/@TechnologyConnections" // tech)
(fromDb "youtube.com/@TheB1M")
(fromDb "youtube.com/@TomScottGo")
(fromDb "youtube.com/@Vihart")
(fromDb "youtube.com/@Vox")
(fromDb "youtube.com/@Vsauce")
# (fromDb "youtube.com/@rossmanngroup" // pol // tech) # Louis Rossmann
];
images = [
(fromDb "catandgirl.com" // img // humor)
(fromDb "davidrevoy.com" // img // art)
(fromDb "grumpy.website" // img // humor)
(fromDb "miniature-calendar.com" // img // art // daily)
(fromDb "pbfcomics.com" // img // humor)
(fromDb "poorlydrawnlines.com/feed" // img // humor)

View File

@ -107,7 +107,8 @@ let
ftp = common ++ fuseColin ++ [
# "ftpfs_debug=2"
"user=colin:ipauth"
"connect_timeout=10"
# connect_timeout=10: casting shows to T.V. fails partway through about half the time
"connect_timeout=20"
];
};
remoteHome = host: {
@ -225,10 +226,10 @@ lib.mkMerge [
(remoteServo "media/Books")
(remoteServo "media/collections")
# (remoteServo "media/datasets")
(remoteServo "media/freeleech")
(remoteServo "media/games")
(remoteServo "media/Music")
(remoteServo "media/Pictures/macros")
(remoteServo "media/torrents")
(remoteServo "media/Videos")
(remoteServo "playground")
]

View File

@ -80,14 +80,12 @@
# - query details with `sudo cpupower frequency-info`
powerManagement.cpuFreqGovernor = "ondemand";
services.logind.extraConfig = ''
# see: `man logind.conf`
# dont shutdown when power button is short-pressed (commonly done an accident, or by cats).
# but do on long-press: useful to gracefully power-off server.
HandlePowerKey=lock
HandlePowerKeyLongPress=poweroff
HandleLidSwitch=lock
'';
# see: `man logind.conf`
# dont shutdown when power button is short-pressed (commonly done an accident, or by cats).
# but do on long-press: useful to gracefully power-off server.
services.logind.powerKey = "lock";
services.logind.powerKeyLongPress = "poweroff";
services.logind.lidSwitch = "lock";
# services.snapper.configs = {
# root = {

View File

@ -7,6 +7,17 @@
"usb_storage" # rpi needed this to boot from usb storage, i think.
"nvme" # to boot from nvme devices
# efi_pstore evivars
# added (speculatively) 2024/05/21; these were implicitly being added by nixos/modules/system/boot/kernel.nix
# i've copied not all of them, but most
"mmc_block"
"dm_mod"
# USB keyboards
"uhci_hcd" "ehci_hcd" "ehci_pci" "ohci_hcd" "ohci_pci" "xhci_hcd" "xhci_pci" "usbhid" "hid_generic" "hid_lenovo" "hid_apple" "hid_roccat" "hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft" "hid_cherry" "hid_corsair"
# x86 keyboard stuff
"pcips2" "atkbd" "i8042"
# stage-2 init needs rtc?
"rtc_cmos"
];
hardware.cpu.amd.updateMicrocode = true; # desktop

View File

@ -50,7 +50,7 @@ let
localShareApplicationsPkg = (pkgs.symlinkJoin {
name = "user-local-share-applications";
paths = builtins.map
(p: "${p.package}")
(p: builtins.toString p.package)
(enabledProgramsWithPackage ++ [ { package=mimeappsListPkg; } ]);
}).overrideAttrs (orig: {
# like normal symlinkJoin, but don't error if the path doesn't exist

View File

@ -3,11 +3,15 @@
{
# XDG defines things like ~/Desktop, ~/Downloads, etc.
# these clutter the home, so i mostly don't use them.
# note that several of these are not actually standardized anywhere.
# some are even non-conventional, like:
# - XDG_PHOTOS_DIR: only works because i patch e.g. megapixels
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"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PHOTOS_DIR="$HOME/Pictures/Photos"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_PUBLICSHARE_DIR="$HOME/.xdg/Public"
XDG_SCREENSHOTS_DIR="$HOME/Pictures/Screenshots"
@ -19,11 +23,5 @@
# see <https://manpages.ubuntu.com/manpages/bionic/man5/user-dirs.conf.5.html>
sane.user.fs.".config/user-dirs.conf".symlink.text = "enabled=False";
sane.user.fs.".profile".symlink.text = ''
# configure XDG_<type>_DIR preferences (e.g. for downloads, screenshots, etc)
# surround with `set -o allexport` since user-dirs.dirs doesn't `export` its vars
set -a
source $HOME/.config/user-dirs.dirs
set +a
'';
sane.user.fs.".config/environment.d/30-user-dirs.conf".symlink.target = "../user-dirs.dirs";
}

View File

@ -4,6 +4,9 @@
{ ... }:
{
# partially supported in nixpkgs <repo:nixos/nixpkgs:nixos/modules/misc/ids.nix>
sane.ids.networkmanager.uid = 57; #< nixpkgs unofficially reserves this, to match networkmanager's gid
# legacy servo users, some are inconvenient to migrate
sane.ids.dhcpcd.gid = 991;
sane.ids.dhcpcd.uid = 992;
@ -18,7 +21,7 @@
sane.ids.matrix-appservice-irc.uid = 993;
sane.ids.matrix-appservice-irc.gid = 992;
# greetd (used by sway)
# greetd (legacy)
sane.ids.greeter.uid = 999;
sane.ids.greeter.gid = 999;
@ -78,6 +81,7 @@
# found on graphical hosts
sane.ids.nm-iodine.uid = 2101; # desko/moby/lappy
sane.ids.seat.gid = 2102;
# found on desko host
# from services.usbmuxd

View File

@ -60,8 +60,5 @@
networking.networkmanager.plugins = lib.mkForce [];
# keyfile.path = where networkmanager should look for connection credentials
networking.networkmanager.extraConfig = ''
[keyfile]
path=/var/lib/NetworkManager/system-connections
'';
networking.networkmanager.settings.keyfile.path = "/var/lib/NetworkManager/system-connections";
}

View File

@ -1,7 +1,6 @@
# things to consider when changing these parameters:
# - temporary VPN access (`sane-vpn up ...`)
# - servo `ovpns` namespace (it *relies* on /etc/resolv.conf mentioning 127.0.0.53)
# - jails: `firejail --net=br-ovpnd-us --noprofile --dns=46.227.67.134 ping 1.1.1.1`
#
# components:
# - /etc/nsswitch.conf:
@ -18,17 +17,22 @@
# - modern implementations hardcodes `127.0.0.53` and then systemd-resolved proxies everything (and caches).
#
# namespacing:
# - each namespace can use a different /etc/resolv.conf to specify different DNS servers (see `firejail --dns=...`)
# - nscd breaks namespacing: the host nscd is unaware of the guest's /etc/resolv.conf, and so direct's the guest's DNS requests to the host's servers.
# - this is fixed by either `firejail --blacklist=/var/run/nscd/socket`, or disabling nscd altogether.
{ lib, ... }:
# - each namespace may use a different /etc/resolv.conf to specify different DNS servers
# - nscd breaks namespacing: the host nscd is unaware of the guest's /etc/resolv.conf, and so directs the guest's DNS requests to the host's servers.
# - this is fixed by either removing `/var/run/nscd/socket` from the namespace, or disabling nscd altogether.
{ config, lib, ... }:
lib.mkMerge [
{
sane.services.trust-dns.enable = lib.mkDefault config.sane.services.trust-dns.asSystemResolver;
sane.services.trust-dns.asSystemResolver = lib.mkDefault true;
}
(lib.mkIf (!config.sane.services.trust-dns.asSystemResolver) {
# 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 servo's 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?)
# TODO: rework servo's netns to use `firejail`, which is capable of spoofing /etc/resolv.conf.
# TODO: improve trust-dns recursive resolver and then remove this
services.resolved.enable = true; #< to disable, set ` = lib.mkForce false`, as other systemd features default to enabling `resolved`.
# without DNSSEC:
# - dig matrix.org => works
@ -44,7 +48,8 @@
# 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.
@ -65,3 +70,4 @@
services.nscd.enable = false;
system.nssModules = lib.mkForce [];
}
]

View File

@ -7,50 +7,62 @@
{ config, lib, pkgs, ... }:
let
def-ovpn = name: { endpoint, publicKey, addrV4, id }: {
sane.vpn."ovpnd-${name}" = {
inherit endpoint publicKey addrV4 id;
privateKeyFile = config.sops.secrets."wg/ovpnd_${name}_privkey".path;
# N.B.: OVPN issues each key (i.e. device) a different IP (addrV4), and requires you use it.
# the IP it issues can be used to connect to any of their VPNs.
# effectively the IP and key map 1-to-1.
# it seems to still be possible to keep two active tunnels on one device, using the same key/IP address, though.
def-ovpn = name: { endpoint, publicKey, id }: let
inherit (config.sane.ovpn) addrV4;
in {
sane.vpn."ovpnd-${name}" = lib.mkIf (addrV4 != null) {
inherit addrV4 endpoint publicKey id;
privateKeyFile = config.sops.secrets."ovpn_privkey".path;
dns = [
"46.227.67.134"
"192.165.9.158"
# "2a07:a880:4601:10f0:cd45::1"
# "2001:67c:750:1:cafe:cd45::1"
];
};
sops.secrets."wg/ovpnd_${name}_privkey" = {
sops.secrets."ovpn_privkey" = lib.mkIf (addrV4 != null) {
# needs to be readable by systemd-network or else it says "Ignoring network device" and doesn't expose it to networkctl.
owner = "systemd-network";
};
};
in lib.mkMerge [
(def-ovpn "us" {
endpoint = "vpn31.prd.losangeles.ovpn.com:9929";
publicKey = "VW6bEWMOlOneta1bf6YFE25N/oMGh1E1UFBCfyggd0k=";
id = 1;
addrV4 = "172.27.237.218";
# addrV6 = "fd00:0000:1337:cafe:1111:1111:ab00:4c8f";
})
# TODO: us-atl disabled until i can give it a different link-local address and wireguard key than us-mi
# (def-ovpn "us-atl" {
# endpoint = "vpn18.prd.atlanta.ovpn.com:9929";
# publicKey = "Dpg/4v5s9u0YbrXukfrMpkA+XQqKIFpf8ZFgyw0IkE0=";
# address = [
# "172.21.182.178/32"
# "fd00:0000:1337:cafe:1111:1111:cfcb:27e3/128"
# ];
# })
(def-ovpn "us-mi" {
endpoint = "vpn34.prd.miami.ovpn.com:9929";
publicKey = "VtJz2irbu8mdkIQvzlsYhU+k9d55or9mx4A2a14t0V0=";
id = 2;
addrV4 = "172.21.182.178";
# addrV6 = "fd00:0000:1337:cafe:1111:1111:cfcb:27e3";
})
(def-ovpn "ukr" {
endpoint = "vpn96.prd.kyiv.ovpn.com:9929";
publicKey = "CjZcXDxaaKpW8b5As1EcNbI6+42A6BjWahwXDCwfVFg=";
id = 3;
addrV4 = "172.18.180.159";
# addrV6 = "fd00:0000:1337:cafe:1111:1111:ec5c:add3";
})
]
in {
options = with lib; {
sane.ovpn.addrV4 = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
ovpn issues one IP address per device.
set `null` to disable OVPN for this host.
'';
};
};
config = lib.mkMerge [
(def-ovpn "us" {
endpoint = "vpn31.prd.losangeles.ovpn.com:9929";
publicKey = "VW6bEWMOlOneta1bf6YFE25N/oMGh1E1UFBCfyggd0k=";
id = 1;
})
(def-ovpn "us-mi" {
endpoint = "vpn34.prd.miami.ovpn.com:9929";
publicKey = "VtJz2irbu8mdkIQvzlsYhU+k9d55or9mx4A2a14t0V0=";
id = 2;
})
(def-ovpn "ukr" {
endpoint = "vpn96.prd.kyiv.ovpn.com:9929";
publicKey = "CjZcXDxaaKpW8b5As1EcNbI6+42A6BjWahwXDCwfVFg=";
id = 3;
})
# TODO: us-atl disabled until i need it again, i guess.
# (def-ovpn "us-atl" {
# endpoint = "vpn18.prd.atlanta.ovpn.com:9929";
# publicKey = "Dpg/4v5s9u0YbrXukfrMpkA+XQqKIFpf8ZFgyw0IkE0=";
# id = 4;
# })
];
}

View File

@ -53,7 +53,7 @@
# allow `nix-shell` (and probably nix-index?) to locate our patched and custom packages.
# this is actually a no-op, and the real action happens in assigning `nix.settings.nix-path`.
nix.nixPath = (lib.optionals config.sane.enableSlowPrograms [
nix.nixPath = (lib.optionals (config.sane.maxBuildCost >= 2) [
"nixpkgs=${pkgs.path}"
]) ++ [
# note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root
@ -65,10 +65,10 @@
# ensure new deployments have a source of this repo with which they can bootstrap.
# this however changes on every commit and can be slow to copy for e.g. `moby`.
environment.etc."nixos" = lib.mkIf config.sane.enableSlowPrograms {
environment.etc."nixos" = lib.mkIf (config.sane.maxBuildCost >= 3) {
source = ../../..;
};
environment.etc."nix/registry.json" = lib.mkIf (!config.sane.enableSlowPrograms) {
environment.etc."nix/registry.json" = lib.mkIf (config.sane.maxBuildCost < 3) {
enable = false;
};

View File

@ -1,72 +1,159 @@
# strictly *decrease* the scope of the default nixos installation/config
{ lib, ... }:
{ lib, pkgs, ... }:
let
suidlessPam = pkgs.pam.overrideAttrs (upstream: {
# nixpkgs' pam hardcodes unix_chkpwd path to the /run/wrappers one,
# but i don't want the wrapper, so undo that.
# ideally i would patch this via an overlay, but pam is in the bootstrap so that forces a full rebuild.
# TODO: add a `package` option to the nixos' pam module and substitute it that way.
postPatch = (if upstream.postPatch != null then upstream.postPatch else "") + ''
substituteInPlace modules/pam_unix/Makefile.am --replace-fail \
"/run/wrappers/bin/unix_chkpwd" "$out/bin/unix_chkpwd"
'';
});
in
{
# disable non-required packages like nano, perl, rsync, strace
environment.defaultPackages = [];
# remove a few items from /run/wrappers we don't need.
options.security.wrappers = lib.mkOption {
apply = lib.filterAttrs (name: _: !(builtins.elem name [
# from <repo:nixos/nixpkgs:nixos/modules/security/polkit.nix>
"pkexec"
"polkit-agent-helper-1" #< used by systemd; without this you'll have to `sudo systemctl daemon-reload` instead of unauth'd `systemctl daemon-reload`
# from <repo:nixos/nixpkgs:nixos/modules/services/system/dbus.nix>
"dbus-daemon-launch-helper"
# from <repo:nixos/nixpkgs:nixos/modules/security/wrappers/default.nix>
"fusermount" #< only needed if you want to mount entries declared in /etc/fstab or mtab as unprivileged user
"fusermount3"
"mount" #< only needed if you want to mount entries declared in /etc/fstab or mtab as unprivileged user
"umount"
# from <repo:nixos/nixpkgs:nixos/modules/programs/shadow.nix>
"newgidmap"
"newgrp"
"newuidmap"
"sg"
"su"
# from: <repo:nixos/nixpkgs:nixos/modules/security/pam.nix>
# requires associated `pam` patch to not hardcode unix_chkpwd path
"unix_chkpwd"
]));
};
options.security.pam.services = lib.mkOption {
apply = services: let
filtered = lib.filterAttrs (name: _: !(builtins.elem name [
# from <repo:nixos/nixpkgs:nixos/modules/security/pam.nix>
"i3lock"
"i3lock-color"
"vlock"
"xlock"
"xscreensaver"
"runuser"
"runuser-l"
# from ??
"chfn"
"chpasswd"
"chsh"
"groupadd"
"groupdel"
"groupmems"
"groupmod"
"useradd"
"userdel"
"usermod"
# from <repo:nixos/nixpkgs:nixos/modules/system/boot/systemd/user.nix>
"systemd-user" #< N.B.: this causes the `systemd --user` service manager to not be started!
])) services;
in lib.mapAttrs (_serviceName: service: service // {
# replace references with the old pam_unix, which calls into /run/wrappers/bin/unix_chkpwd,
# with a pam_unix that calls into unix_chkpwd via the nix store.
# TODO: use `security.pam.package` instead once <https://github.com/NixOS/nixpkgs/pull/314791> lands.
text = lib.replaceStrings [" pam_unix.so" ] [ " ${suidlessPam}/lib/security/pam_unix.so" ] service.text;
}) filtered;
};
# remove all the non-existent default directories from XDG_DATA_DIRS, XDG_CONFIG_DIRS to simplify debugging.
# this is defaulted in <repo:nixos/nixpkgs:nixos/modules/programs/environment.nix>,
# without being gated by any higher config.
environment.profiles = lib.mkForce [
"/etc/profiles/per-user/$USER"
"/run/current-system/sw"
];
config = {
# disable non-required packages like nano, perl, rsync, strace
environment.defaultPackages = [];
# NIXPKGS_CONFIG defaults to "/etc/nix/nixpkgs-config.nix" in <nixos/modules/programs/environment.nix>.
# that's never existed on my system and everything does fine without it set empty (no nixpkgs API to forcibly *unset* it).
environment.variables.NIXPKGS_CONFIG = lib.mkForce "";
# XDG_CONFIG_DIRS defaults to "/etc/xdg", which doesn't exist.
# in practice, pam appends the values i want to XDG_CONFIG_DIRS, though this approach causes an extra leading `:`
environment.sessionVariables.XDG_CONFIG_DIRS = lib.mkForce [];
# XCURSOR_PATH: defaults to `[ "$HOME/.icons" "$HOME/.local/share/icons" ]`, neither of which i use, just adding noise.
# see: <repo:nixos/nixpkgs:nixos/modules/config/xdg/icons.nix>
environment.sessionVariables.XCURSOR_PATH = lib.mkForce [];
# remove all the non-existent default directories from XDG_DATA_DIRS, XDG_CONFIG_DIRS to simplify debugging.
# this is defaulted in <repo:nixos/nixpkgs:nixos/modules/programs/environment.nix>,
# without being gated by any higher config.
environment.profiles = lib.mkForce [
"/etc/profiles/per-user/$USER"
"/run/current-system/sw"
];
# disable nixos' portal module, otherwise /share/applications gets linked into the system and complicates things (sandboxing).
# instead, i manage portals myself via the sane.programs API (e.g. sane.programs.xdg-desktop-portal).
xdg.portal.enable = false;
xdg.menus.enable = false; #< links /share/applications, and a bunch of other empty (i.e. unused) dirs
# NIXPKGS_CONFIG defaults to "/etc/nix/nixpkgs-config.nix" in <nixos/modules/programs/environment.nix>.
# that's never existed on my system and everything does fine without it set empty (no nixpkgs API to forcibly *unset* it).
environment.variables.NIXPKGS_CONFIG = lib.mkForce "";
# XDG_CONFIG_DIRS defaults to "/etc/xdg", which doesn't exist.
# in practice, pam appends the values i want to XDG_CONFIG_DIRS, though this approach causes an extra leading `:`
environment.sessionVariables.XDG_CONFIG_DIRS = lib.mkForce [];
# XCURSOR_PATH: defaults to `[ "$HOME/.icons" "$HOME/.local/share/icons" ]`, neither of which i use, just adding noise.
# see: <repo:nixos/nixpkgs:nixos/modules/config/xdg/icons.nix>
environment.sessionVariables.XCURSOR_PATH = lib.mkForce [];
# xdg.autostart.enable defaults to true, and links /etc/xdg/autostart into the environment, populated with .desktop files.
# see: <repo:nixos/nixpkgs:nixos/modules/config/xdg/autostart.nix>
# .desktop files are a questionable way to autostart things: i generally prefer a service manager for that.
xdg.autostart.enable = false;
# disable nixos' portal module, otherwise /share/applications gets linked into the system and complicates things (sandboxing).
# instead, i manage portals myself via the sane.programs API (e.g. sane.programs.xdg-desktop-portal).
xdg.portal.enable = false;
xdg.menus.enable = false; #< links /share/applications, and a bunch of other empty (i.e. unused) dirs
# nix.channel.enable: populates `/nix/var/nix/profiles/per-user/root/channels`, `/root/.nix-channels`, `$HOME/.nix-defexpr/channels`
# <repo:nixos/nixpkgs:nixos/modules/config/nix-channel.nix>
# TODO: may want to recreate NIX_PATH, nix.settings.nix-path
nix.channel.enable = false;
# xdg.autostart.enable defaults to true, and links /etc/xdg/autostart into the environment, populated with .desktop files.
# see: <repo:nixos/nixpkgs:nixos/modules/config/xdg/autostart.nix>
# .desktop files are a questionable way to autostart things: i generally prefer a service manager for that.
xdg.autostart.enable = false;
# environment.stub-ld: populate /lib/ld-linux.so with an object that unconditionally errors on launch,
# so as to inform when trying to run a non-nixos binary?
# IMO that's confusing: i thought /lib/ld-linux.so was some file actually required by nix.
environment.stub-ld.enable = false;
# nix.channel.enable: populates `/nix/var/nix/profiles/per-user/root/channels`, `/root/.nix-channels`, `$HOME/.nix-defexpr/channels`
# <repo:nixos/nixpkgs:nixos/modules/config/nix-channel.nix>
# TODO: may want to recreate NIX_PATH, nix.settings.nix-path
nix.channel.enable = false;
# `less.enable` sets LESSKEYIN_SYSTEM, LESSOPEN, LESSCLOSE env vars, which does confusing "lesspipe" things, so disable that.
# it's enabled by default from `<nixos/modules/programs/environment.nix>`, who also sets `PAGER="less"` and `EDITOR="nano"` (keep).
programs.less.enable = lib.mkForce false;
environment.variables.PAGER = lib.mkOverride 900 ""; # mkDefault sets 1000. non-override is 100. 900 will beat the nixpkgs `mkDefault` but not anyone else.
environment.variables.EDITOR = lib.mkOverride 900 "";
# environment.stub-ld: populate /lib/ld-linux.so with an object that unconditionally errors on launch,
# so as to inform when trying to run a non-nixos binary?
# IMO that's confusing: i thought /lib/ld-linux.so was some file actually required by nix.
environment.stub-ld.enable = false;
# several packages (dconf, modemmanager, networkmanager, gvfs, polkit, udisks, bluez/blueman, feedbackd, etc)
# will add themselves to the dbus search path.
# i prefer dbus to only search XDG paths (/share/dbus-1) for service files, as that's more introspectable.
# see: <repo:nixos/nixpkgs:nixos/modules/services/system/dbus.nix>
# TODO: sandbox dbus? i pretty explicitly don't want to use it as a launcher.
services.dbus.packages = lib.mkForce [
"/run/current-system/sw"
# config.system.path
# pkgs.dbus
# pkgs.polkit.out
# pkgs.modemmanager
# pkgs.networkmanager
# pkgs.udisks
# pkgs.wpa_supplicant
];
# `less.enable` sets LESSKEYIN_SYSTEM, LESSOPEN, LESSCLOSE env vars, which does confusing "lesspipe" things, so disable that.
# it's enabled by default from `<nixos/modules/programs/environment.nix>`, who also sets `PAGER="less"` and `EDITOR="nano"` (keep).
programs.less.enable = lib.mkForce false;
environment.variables.PAGER = lib.mkOverride 900 ""; # mkDefault sets 1000. non-override is 100. 900 will beat the nixpkgs `mkDefault` but not anyone else.
environment.variables.EDITOR = lib.mkOverride 900 "";
# systemd by default forces shitty defaults for e.g. /tmp/.X11-unix.
# nixos propagates those in: <nixos/modules/system/boot/systemd/tmpfiles.nix>
# by overwriting this with an empty file, we can effectively remove it.
environment.etc."tmpfiles.d/x11.conf".text = "# (removed by Colin)";
# several packages (dconf, modemmanager, networkmanager, gvfs, polkit, udisks, bluez/blueman, feedbackd, etc)
# will add themselves to the dbus search path.
# i prefer dbus to only search XDG paths (/share/dbus-1) for service files, as that's more introspectable.
# see: <repo:nixos/nixpkgs:nixos/modules/services/system/dbus.nix>
# TODO: sandbox dbus? i pretty explicitly don't want to use it as a launcher.
services.dbus.packages = lib.mkForce [
"/run/current-system/sw"
# config.system.path
# pkgs.dbus
# pkgs.polkit.out
# pkgs.modemmanager
# pkgs.networkmanager
# pkgs.udisks
# pkgs.wpa_supplicant
];
# systemd by default forces shitty defaults for e.g. /tmp/.X11-unix.
# nixos propagates those in: <nixos/modules/system/boot/systemd/tmpfiles.nix>
# by overwriting this with an empty file, we can effectively remove it.
environment.etc."tmpfiles.d/x11.conf".text = "# (removed by Colin)";
# see: <nixos/modules/tasks/swraid.nix>
# it was enabled by default before 23.11
boot.swraid.enable = lib.mkDefault false;
# see: <nixos/modules/system/boot/kernel.nix>
# by default, it adds to boot.initrd.availableKernelModules:
# - SATA: "ahci" "sata_nv" "sata_via" "sata_sis" "sata_uli" "ata_piix" "pata_marvell"
# - "nvme"
# - scsi: "sd_mod" "sr_mod"
# - SD/eMMC: "mmc_block"
# - USB keyboards: "uhci_hcd" "ehci_hcd" "ehci_pci" "ohci_hcd" "ohci_pci" "xhci_hcd" "xhci_pci" "usbhid" "hid_generic" "hid_lenovo" "hid_apple" "hid_roccat" "hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft" "hid_cherry" "hid_corsair"
# - LVM: "dm_mod"
# - on x86 only: more keyboard stuff: "pcips2" "atkbd" "i8042"
boot.initrd.includeDefaultModules = lib.mkDefault false;
};
}

View File

@ -15,39 +15,33 @@ in
};
# upstream alsa ships with PinePhone audio configs, but they don't actually produce sound.
# see: <https://github.com/alsa-project/alsa-ucm-conf/pull/134>
# these audio files come from some revision of:
# - <https://gitlab.manjaro.org/manjaro-arm/packages/community/phosh/alsa-ucm-pinephone>
# - still true as of 2024-05-26
# - see: <https://github.com/alsa-project/alsa-ucm-conf/pull/134>
#
# alternative to patching is to plumb `ALSA_CONFIG_UCM2 = "${./ucm2}"` environment variable into the relevant places
# e.g. `systemd.services.pulseaudio.environment`.
# that leaves more opportunity for gaps (i.e. missing a service),
# on the other hand this method causes about 500 packages to be rebuilt (including qt5 and webkitgtk).
# we can substitute working UCM conf in two ways:
# 1. nixpkgs' override for the `alsa-ucm-conf` package
# - that forces a rebuild of ~500 packages (including webkitgtk).
# 2. set ALSA_CONFIG_UCM2 = /path/to/ucm2 in the relevant places
# - e.g. pulsewire service.
# - easy to miss places, though.
#
# note that with these files, the following audio device support:
# - headphones work.
# - "internal earpiece" works.
# - "internal speaker" doesn't work (but that's probably because i broke the ribbon cable)
# - "analog output" doesn't work.
packageUnwrapped = pkgs.alsa-ucm-conf.overrideAttrs (upstream: {
postPatch = (upstream.postPatch or "") + ''
cp ${./ucm2/PinePhone}/* ucm2/Allwinner/A64/PinePhone/
# alsa-ucm-pinephone-manjaro (2024-05-26):
# - headphones work
# - "internal earpiece" works
# - "internal speaker" is silent (maybe hardware issue)
# - 3.5mm connection is flapping when playing to my car, which eventually breaks audio and requires restarting wireplumber
# packageUnwrapped = pkgs.alsa-ucm-pinephone-manjaro.override {
# inherit (cfg.config) preferEarpiece;
# };
# alsa-ucm-pinephone-pmos (2024-05-26):
# - headphones work
# - "internal earpiece" works
# - "internal speaker" is silent (maybe hardware issue)
packageUnwrapped = pkgs.alsa-ucm-pinephone-pmos.override {
inherit (cfg.config) preferEarpiece;
};
# fix the self-contained ucm files i source from to have correct path within the alsa-ucm-conf source tree
substituteInPlace ucm2/Allwinner/A64/PinePhone/PinePhone.conf \
--replace-fail 'HiFi.conf' '/Allwinner/A64/PinePhone/HiFi.conf'
substituteInPlace ucm2/Allwinner/A64/PinePhone/PinePhone.conf \
--replace-fail 'VoiceCall.conf' '/Allwinner/A64/PinePhone/VoiceCall.conf'
'' + lib.optionalString cfg.config.preferEarpiece ''
# decrease the priority of the internal speaker so that sounds are routed
# to the earpiece by default.
# this is just personal preference.
substituteInPlace ucm2/Allwinner/A64/PinePhone/{HiFi.conf,VoiceCall.conf} \
--replace-fail 'PlaybackPriority 300' 'PlaybackPriority 100'
'';
});
sandbox.enable = false; #< only provides #out/share/alsa
sandbox.enable = false; #< only provides $out/share/alsa
# alsa-lib package only looks in its $out/share/alsa to find runtime config data, by default.
# but ALSA_CONFIG_UCM2 is an env var that can override that.

View File

@ -30,6 +30,8 @@
});
};
buildCost = 1;
sandbox.method = "bwrap";
sandbox.whitelistWayland = true;

View File

@ -34,6 +34,7 @@ in
];
sysadminUtils = declPackageSet [
"ausyscall"
"bridge-utils" # for brctl; debug linux "bridge" inet devices
"btrfs-progs"
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
@ -43,6 +44,7 @@ in
"dtc" # device tree [de]compiler
"e2fsprogs" # resize2fs
"efibootmgr"
"errno"
"ethtool"
"fatresize"
"fd"
@ -63,8 +65,11 @@ in
"jq"
"killall"
"less"
"lftp"
# "libcap_ng" # for `netcap`
"lsof"
"man-pages"
"man-pages-posix"
# "miniupnpc"
"nano"
# "ncdu" # ncurses disk usage. doesn't cross compile (zig)
@ -89,6 +94,7 @@ in
"tree"
"usbutils" # lsusb
"util-linux" # lsblk, lscpu, etc
"valgrind"
"wget"
"wirelesstools" # iwlist
# "xq" # jq for XML
@ -108,7 +114,6 @@ in
# - debugging?
consoleUtils = declPackageSet [
"alsaUtils" # for aplay, speaker-test
"strings"
# "cdrtools"
# "clinfo"
# "dmidecode"
@ -137,6 +142,7 @@ in
"nmon"
# "node2nix"
# "oathToolkit" # for oathtool
"objdump"
# "ponymix"
"pulsemixer"
"python3-repl"
@ -149,6 +155,7 @@ in
"sops" # for manually viewing secrets; outside `sane-secrets` (TODO: improve sane-secrets!)
"speedtest-cli"
# "ssh-to-age"
"strings"
"sudo"
# "tageditor" # music tagging
# "unar"
@ -173,6 +180,7 @@ in
"ffmpeg"
"go2tv" # cast videos to UPNP/DLNA device (i.e. tv).
"imagemagick"
"sane-cast" # cast videos to UPNP/DLNA, with compatibility
"sox"
"yt-dlp"
];
@ -203,6 +211,175 @@ in
# "tree-sitter"
];
gameApps = declPackageSet [
"animatch"
"gnome-2048"
"gnome.hitori" # like sudoku
];
pcGameApps = declPackageSet [
# "andyetitmoves" # TODO: fix build!
# "armagetronad" # tron/lightcycles; WAN and LAN multiplayer
"celeste64"
# "cutemaze" # meh: trivial maze game; qt6 and keyboard-only
# "cuyo" # trivial puyo-puyo clone
"endless-sky" # space merchantilism/exploration
# "factorio"
"frozen-bubble" # WAN + LAN + 1P/2P bubble bobble
"hase" # WAN worms game
# "hedgewars" # WAN + LAN worms game (5~10 people online at any moment; <https://hedgewars.org>)
# "libremines" # meh: trivial minesweeper; qt6
# "mario0" # SMB + portal
# "mindustry"
# "minesweep-rs" # CLI minesweeper
# "nethack"
# "osu-lazer"
# "pinball" # 3d pinball; kb/mouse. old sourceforge project
# "powermanga" # STYLISH space invaders derivative (keyboard-only)
"shattered-pixel-dungeon" # doesn't cross compile
"space-cadet-pinball" # LMB/RMB controls (bindable though. volume buttons?)
"superTux" # keyboard-only controls
"superTuxKart" # poor FPS on pinephone
"tumiki-fighters" # keyboard-only
"vvvvvv" # keyboard-only controls
# "wine"
];
guiApps = declPackageSet [
# package sets
"gameApps"
"guiBaseApps"
];
guiBaseApps = declPackageSet [
# "abaddon" # discord client
"alacritty" # terminal emulator
"calls" # gnome calls (dialer/handler)
"dbus"
"dconf" # required by many packages, but not well-documented :(
# "delfin" # Jellyfin client
"dialect" # language translation
"dino" # XMPP client
"dissent" # Discord client (formerly known as: gtkcord4)
# "emote"
# "evince" # PDF viewer
# "flare-signal" # gtk4 signal client
# "foliate" # e-book reader
"fractal" # matrix client
"g4music" # local music player
# "gnome.cheese"
# "gnome-feeds" # RSS reader (with claimed mobile support)
# "gnome.file-roller"
"gnome.geary" # adaptive e-mail client; uses webkitgtk 4.1
"gnome.gnome-calculator"
"gnome.gnome-calendar"
"gnome.gnome-clocks"
"gnome.gnome-maps"
# "gnome-podcasts"
# "gnome.gnome-system-monitor"
# "gnome.gnome-terminal" # works on phosh
"gnome.gnome-weather"
# "gnome.seahorse" # keyring/secret manager
"gnome-frog" # OCR/QR decoder
"gpodder"
"gst-device-monitor" # for debugging audio/video
# "gthumb"
# "lemoa" # lemmy app
"libcamera" # for `cam` binary (useful for debugging cameras)
"libnotify" # for notify-send; debugging
# "lollypop"
"loupe" # image viewer
"mate.engrampa" # archive manager
"mepo" # maps viewer
"mpv"
"networkmanagerapplet" # for nm-connection-editor: it's better than not having any gui!
"ntfy-sh" # notification service
# "newsflash" # RSS viewer
"pavucontrol"
"pwvucontrol" # pipewire version of pavu
# "picard" # music tagging
# "libsForQt5.plasmatube" # Youtube player
"signal-desktop"
"snapshot" # camera app
"spot" # Gnome Spotify client
# "sublime-music"
# "tdesktop" # broken on phosh
# "tokodon"
"tuba" # mastodon/pleroma client (stores pw in keyring)
"vulkan-tools" # vulkaninfo
# "whalebird" # pleroma client (Electron). input is broken on phosh.
"xdg-terminal-exec"
"zathura" # PDF/CBZ/ePUB viewer
];
handheldGuiApps = declPackageSet [
# "celluloid" # mpv frontend
# "chatty" # matrix/xmpp/irc client (2023/12/29: disabled because broken cross build)
"cozy" # audiobook player
"epiphany" # gnome's web browser
# "iotas" # note taking app
"komikku"
"koreader"
"megapixels" # camera app
"notejot" # note taking, e.g. shopping list
"planify" # todo-tracker/planner
"portfolio-filemanager"
"tangram" # web browser
"wike" # Wikipedia Reader
"xarchiver" # archiver, backup option for when engrampa UI overflows screen and is unusale (xarchiver UI fails in different ways)
];
pcGuiApps = declPackageSet [
# package sets
"pcGameApps"
"pcTuiApps"
####
"audacity"
# "blanket" # ambient noise generator
"brave" # for the integrated wallet -- as a backup
# "cantata" # music player (mpd frontend)
# "chromium" # chromium takes hours to build. brave is chromium-based, distributed in binary form, so prefer it.
# "cups"
"discord" # x86-only
"electrum"
"element-desktop"
"firefox"
"font-manager"
# "gajim" # XMPP client. cross build tries to import host gobject-introspection types (2023/09/01)
"gimp" # broken on phosh
# "gnome.dconf-editor"
# "gnome.file-roller"
"gnome.gnome-disk-utility"
"gnome.nautilus" # file browser
# "gnome.totem" # video player, supposedly supports UPnP
"handbrake"
"inkscape"
# "jellyfin-media-player"
"kdenlive"
# "kid3" # audio tagging
"krita"
"libreoffice" # TODO: replace with an office suite that uses saner packaging?
"losslesscut-bin" # x86-only
# "makemkv" # x86-only
# "monero-gui" # x86-only
# "mumble"
# "nheko" # Matrix chat client
# "nicotine-plus" # soulseek client. before re-enabling this make sure it's properly sandboxed!
# "obsidian"
# "openscad" # 3d modeling
# "rhythmbox" # local music player
# "slic3r"
"soundconverter"
"spotify" # x86-only
"steam"
"tor-browser" # x86-only
# "vlc"
"wireshark" # could maybe ship the cli as sysadmin pkg
# "xterm" # requires Xwayland
# "zecwallet-lite" # x86-only
# "zulip"
];
# INDIVIDUAL PACKAGE DEFINITIONS
@ -211,6 +388,7 @@ in
backblaze-b2 = {};
blanket.buildCost = 1;
blanket.sandbox.method = "bwrap";
blanket.sandbox.whitelistAudio = true;
# blanket.sandbox.whitelistDbus = [ "user" ]; # TODO: untested
@ -229,14 +407,6 @@ in
bridge-utils.sandbox.method = "bwrap"; #< bwrap, landlock: both work
bridge-utils.sandbox.net = "all";
brightnessctl.sandbox.method = "landlock"; # also bwrap, but landlock is more responsive
brightnessctl.sandbox.extraPaths = [
"/sys/class/backlight"
"/sys/class/leds"
"/sys/devices"
];
brightnessctl.sandbox.whitelistDbus = [ "system" ];
btrfs-progs.sandbox.method = "bwrap"; #< bwrap, landlock: both work
btrfs-progs.sandbox.autodetectCliPaths = "existing"; # e.g. `btrfs filesystem df /my/fs`
@ -263,13 +433,14 @@ in
ddrescue.sandbox.method = "landlock"; # TODO:sandbox: untested
ddrescue.sandbox.autodetectCliPaths = "existingOrParent";
# auth token, preferences
delfin.buildCost = 1;
delfin.sandbox.method = "bwrap";
delfin.sandbox.whitelistAudio = true;
delfin.sandbox.whitelistDbus = [ "user" ]; # else `mpris` plugin crashes the player
delfin.sandbox.whitelistDri = true;
delfin.sandbox.whitelistWayland = true;
delfin.sandbox.net = "clearnet";
# auth token, preferences
delfin.persist.byStore.private = [ ".config/delfin" ];
dig.sandbox.method = "bwrap";
@ -296,11 +467,7 @@ in
];
dtc.sandbox.method = "bwrap";
dtc.sandbox.autodetectCliPaths = true; # TODO:sandbox: untested
dtrx.sandbox.method = "bwrap";
dtrx.sandbox.whitelistPwd = true;
dtrx.sandbox.autodetectCliPaths = "existing"; #< for the archive
dtc.sandbox.autodetectCliPaths = "existingFile"; # TODO:sandbox: untested
duplicity = {};
@ -314,11 +481,13 @@ in
eg25-control = {};
electrum.buildCost = 1;
electrum.sandbox.method = "bwrap"; # TODO:sandbox: untested
electrum.sandbox.net = "all"; # TODO: probably want to make this run behind a VPN, always
electrum.sandbox.whitelistWayland = true;
electrum.persist.byStore.cryptClearOnBoot = [ ".electrum" ]; #< TODO: use XDG dirs!
endless-sky.buildCost = 1;
endless-sky.persist.byStore.plaintext = [ ".local/share/endless-sky" ];
endless-sky.sandbox.method = "bwrap";
endless-sky.sandbox.whitelistAudio = true;
@ -334,10 +503,9 @@ in
ethtool.sandbox.capabilities = [ "net_admin" ];
# eza `ls` replacement
# landlock is OK, only `whitelistPwd` doesn't make the intermediate symlinks traversable, so it breaks on e.g. ~/Videos/servo/Shows/foo
# eza.sandbox.method = "landlock";
eza.sandbox.method = "bwrap";
eza.sandbox.autodetectCliPaths = true;
eza.sandbox.method = "bwrap"; #< note that bwrap causes `/proc` files to be listed differently (e.g. `eza /proc/sys/net/ipv6/conf/`)
eza.sandbox.autodetectCliPaths = "existing";
eza.sandbox.whitelistPwd = true;
eza.sandbox.extraHomePaths = [
# so that e.g. `eza -l ~` can show which symlink exist
@ -349,7 +517,7 @@ in
fatresize.sandbox.autodetectCliPaths = "parent"; # /dev/sda1 -> needs /dev/sda
fd.sandbox.method = "landlock";
fd.sandbox.autodetectCliPaths = true;
fd.sandbox.autodetectCliPaths = "existing";
fd.sandbox.whitelistPwd = true;
fd.sandbox.extraHomePaths = [
# let it follow symlinks to non-sensitive data
@ -357,14 +525,15 @@ in
".persist/plaintext"
];
ffmpeg.buildCost = 1;
ffmpeg.sandbox.method = "bwrap";
ffmpeg.sandbox.autodetectCliPaths = "existingFileOrParent"; # it outputs uncreated files -> parent dir needs mounting
file.sandbox.method = "bwrap";
file.sandbox.autodetectCliPaths = true;
file.sandbox.autodetectCliPaths = "existing"; #< file OR directory, yes
findutils.sandbox.method = "bwrap";
findutils.sandbox.autodetectCliPaths = true;
findutils.sandbox.autodetectCliPaths = "existing";
findutils.sandbox.whitelistPwd = true;
findutils.sandbox.extraHomePaths = [
# let it follow symlinks to non-sensitive data
@ -374,16 +543,16 @@ in
fluffychat-moby.persist.byStore.plaintext = [ ".local/share/chat.fluffy.fluffychat" ];
font-manager.buildCost = 1;
font-manager.sandbox.method = "bwrap";
font-manager.sandbox.whitelistWayland = true;
font-manager.packageUnwrapped = pkgs.rmDbusServicesInPlace (pkgs.font-manager.override {
# build without the "Google Fonts" integration feature, to save closure / avoid webkitgtk_4_0
withWebkit = false;
});
forkstat.sandbox.method = "landlock"; #< doesn't seem to support bwrap
forkstat.sandbox.extraConfig = [
"--sane-sandbox-keep-namespace" "pid"
];
forkstat.sandbox.isolatePids = false;
forkstat.sandbox.extraPaths = [
"/proc"
];
@ -397,7 +566,7 @@ in
gawk.sandbox.method = "bwrap"; # TODO:sandbox: untested
gawk.sandbox.wrapperType = "inplace"; # /share/gawk libraries refer to /libexec
gawk.sandbox.autodetectCliPaths = true;
gawk.sandbox.autodetectCliPaths = "existingFile";
gdb.sandbox.enable = false; # gdb doesn't sandbox well. i don't know how you could.
# gdb.sandbox.method = "landlock"; # permission denied when trying to attach, even as root
@ -409,6 +578,7 @@ in
# TODO: we can populate gh's stuff statically; it even lets us use the same oauth across machines
gh.persist.byStore.private = [ ".config/gh" ];
gimp.buildCost = 1;
gimp.sandbox.method = "bwrap";
gimp.sandbox.whitelistX = true;
gimp.sandbox.whitelistWayland = true;
@ -428,32 +598,39 @@ in
"/tmp" # "Cannot open display:" if it can't mount /tmp 👀
];
"gnome.gnome-calculator".buildCost = 1;
"gnome.gnome-calculator".sandbox.method = "bwrap";
"gnome.gnome-calculator".sandbox.whitelistWayland = true;
"gnome.gnome-calendar".buildCost = 1;
# gnome-calendar surely has data to persist, but i use it strictly to do date math, not track events.
"gnome.gnome-calendar".sandbox.method = "bwrap";
"gnome.gnome-calendar".sandbox.whitelistWayland = true;
"gnome.gnome-clocks".sandbox.method = "bwrap";
"gnome.gnome-clocks".sandbox.whitelistWayland = true;
"gnome.gnome-clocks".suggestedPrograms = [ "dconf" ];
# gnome-disks
"gnome.gnome-disk-utility".buildCost = 1;
"gnome.gnome-disk-utility".sandbox.method = "bwrap";
"gnome.gnome-disk-utility".sandbox.whitelistDbus = [ "system" ];
"gnome.gnome-disk-utility".sandbox.whitelistWayland = true;
"gnome.gnome-disk-utility".sandbox.extraHomePaths = [
"tmp"
"use/iso"
# TODO: probably need /dev and such
];
# seahorse: dump gnome-keyring secrets.
"gnome.seahorse".buildCost = 1;
# N.B.: it can also manage ~/.ssh keys, but i explicitly don't add those to the sandbox for now.
"gnome.seahorse".sandbox.method = "bwrap";
"gnome.seahorse".sandbox.whitelistDbus = [ "user" ];
"gnome.seahorse".sandbox.whitelistWayland = true;
gnome-2048.buildCost = 1;
gnome-2048.sandbox.method = "bwrap";
gnome-2048.sandbox.whitelistWayland = true;
gnome-2048.persist.byStore.plaintext = [ ".local/share/gnome-2048/scores" ];
gnome-frog.buildCost = 1;
gnome-frog.sandbox.method = "bwrap";
gnome-frog.sandbox.whitelistWayland = true;
gnome-frog.sandbox.whitelistDbus = [ "user" ];
@ -480,11 +657,12 @@ in
# 1. no number may appear unshaded more than once in the same row/column
# 2. no two shaded tiles can be direct N/S/E/W neighbors
# - win once (1) and (2) are satisfied
"gnome.hitori".buildCost = 1;
"gnome.hitori".sandbox.method = "bwrap";
"gnome.hitori".sandbox.whitelistWayland = true;
gnugrep.sandbox.method = "bwrap";
gnugrep.sandbox.autodetectCliPaths = true;
gnugrep.sandbox.autodetectCliPaths = "existing";
gnugrep.sandbox.whitelistPwd = true;
gnugrep.sandbox.extraHomePaths = [
# let it follow symlinks to non-sensitive data
@ -492,7 +670,6 @@ in
".persist/plaintext"
];
# sed: there is an edgecase of `--file=<foo>`, wherein `foo` won't be whitelisted.
gnused.sandbox.method = "bwrap";
gnused.sandbox.autodetectCliPaths = "existingFile";
gnused.sandbox.whitelistPwd = true; #< `-i` flag creates a temporary file in pwd (?) and then moves it.
@ -509,6 +686,7 @@ in
grim.sandbox.autodetectCliPaths = "existingOrParent";
grim.sandbox.whitelistWayland = true;
hase.buildCost = 1;
hase.sandbox.method = "bwrap";
hase.sandbox.net = "clearnet";
hase.sandbox.whitelistAudio = true;
@ -517,7 +695,7 @@ in
# hdparm: has to be run as sudo. e.g. `sudo hdparm -i /dev/sda`
hdparm.sandbox.method = "bwrap";
hdparm.sandbox.autodetectCliPaths = true;
hdparm.sandbox.autodetectCliPaths = "existingFile";
host.sandbox.method = "landlock";
host.sandbox.net = "all"; #< technically, only needs to contact localhost's DNS server
@ -529,6 +707,7 @@ in
# N.B.: inetutils' `ping` is shadowed by iputils' ping (by nixos, intentionally).
inetutils.sandbox.method = "landlock"; # want to keep the same netns, at least.
inkscape.buildCost = 1;
inkscape.sandbox.method = "bwrap";
inkscape.sandbox.whitelistWayland = true;
inkscape.sandbox.extraHomePaths = [
@ -550,14 +729,17 @@ in
];
iotop.sandbox.capabilities = [ "net_admin" ];
# provides `ip`, `routel`, others
iproute2.sandbox.method = "landlock";
iproute2.sandbox.net = "all";
iproute2.sandbox.capabilities = [ "net_admin" ];
iproute2.sandbox.extraPaths = [
"/run/netns" # for `ip netns ...` to work
"/var/run/netns"
];
# provides `ip`, `routel`, `bridge`, others.
# landlock works fine for most of these, but `ip netns exec` wants to attach to an existing namespace
# and that means we can't use ANY sandboxer for it.
iproute2.sandbox.enable = false;
# iproute2.sandbox.net = "all";
# iproute2.sandbox.capabilities = [ "net_admin" ];
# iproute2.sandbox.extraPaths = [
# "/run/netns" # for `ip netns ...` to work, but maybe not needed anymore?
# "/sys/class/net" # for `ip netns ...` to work
# "/var/run/netns"
# ];
iptables.sandbox.method = "landlock";
iptables.sandbox.net = "all";
@ -580,6 +762,7 @@ in
"/proc"
];
krita.buildCost = 1;
krita.sandbox.method = "bwrap";
krita.sandbox.whitelistWayland = true;
krita.sandbox.autodetectCliPaths = "existing";
@ -595,11 +778,15 @@ in
"tmp"
];
libcamera = {};
libcap.sandbox.enable = false; #< for `capsh`, which i use as a sandboxer
libcap_ng.sandbox.enable = false; # there's something about /proc/$pid/fd which breaks `readlink`/stat with every sandbox technique (except capsh-only)
libnotify.sandbox.method = "bwrap";
libnotify.sandbox.whitelistDbus = [ "user" ]; # notify-send
losslesscut-bin.buildCost = 1;
losslesscut-bin.sandbox.method = "bwrap";
losslesscut-bin.sandbox.extraHomePaths = [
"Music"
@ -615,14 +802,19 @@ in
losslesscut-bin.sandbox.whitelistX = true;
lsof.sandbox.method = "capshonly"; # lsof doesn't sandbox under bwrap or even landlock w/ full access to /
lsof.sandbox.capabilities = [ "dac_override" "sys_ptrace" ];
lua = {};
man-pages.sandbox.enable = false;
man-pages-posix.sandbox.enable = false;
mercurial.sandbox.method = "bwrap"; # TODO:sandbox: untested
mercurial.sandbox.net = "clearnet";
mercurial.sandbox.whitelistPwd = true;
# actual monero blockchain (not wallet/etc; safe to delete, just slow to regenerate)
monero-gui.buildCost = 1;
# 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" ];
monero-gui.sandbox.method = "bwrap";
@ -631,6 +823,7 @@ in
"records/finance/cryptocurrencies/monero"
];
mumble.buildCost = 1;
mumble.persist.byStore.private = [ ".local/share/Mumble" ];
nano.sandbox.method = "bwrap";
@ -658,9 +851,15 @@ in
nixpkgs-review.sandbox.wrapperType = "inplace"; #< shell completions use full paths
nixpkgs-review.sandbox.net = "clearnet";
nixpkgs-review.sandbox.whitelistPwd = true;
nixpkgs-review.sandbox.extraHomePaths = [
".config/git" #< it needs to know commiter name/email, even if not posting
];
nixpkgs-review.sandbox.extraPaths = [
"/nix"
];
nixpkgs-review.persist.byStore.cryptClearOnBoot = [
".cache/nixpkgs-review" #< help it not exhaust / tmpfs
];
nmap.sandbox.method = "bwrap";
nmap.sandbox.net = "all"; # clearnet and lan
@ -689,6 +888,8 @@ in
# settings (electron app)
obsidian.persist.byStore.plaintext = [ ".config/obsidian" ];
passt.sandbox.enable = false; #< sandbox helper (netns specifically)
parted.sandbox.method = "landlock";
parted.sandbox.extraPaths = [
"/dev"
@ -720,9 +921,7 @@ in
# procps: free, pgrep, pidof, pkill, ps, pwait, top, uptime, couple others
procps.sandbox.method = "bwrap";
procps.sandbox.extraConfig = [
"--sane-sandbox-keep-namespace" "pid"
];
procps.sandbox.isolatePids = false;
pstree.sandbox.method = "landlock";
pstree.sandbox.extraPaths = [
@ -734,11 +933,14 @@ in
pulsemixer.sandbox.method = "landlock";
pulsemixer.sandbox.whitelistAudio = true;
pwvucontrol.buildCost = 1;
pwvucontrol.sandbox.method = "bwrap";
pwvucontrol.sandbox.whitelistAudio = true;
pwvucontrol.sandbox.whitelistDri = true; # else perf on moby is unusable
pwvucontrol.sandbox.whitelistWayland = true;
python3-repl.packageUnwrapped = pkgs.python3.withPackages (ps: with ps; [
psutil
requests
]);
python3-repl.sandbox.method = "bwrap";
@ -749,7 +951,7 @@ in
];
qemu.sandbox.enable = false; #< it's a launcher
qemu.slowToBuild = true;
qemu.buildCost = 2;
rsync.sandbox.method = "bwrap";
rsync.sandbox.net = "clearnet";
@ -757,17 +959,23 @@ in
rustc = {};
sane-open-desktop.sandbox.enable = false; #< trivial script, and all our deps are sandboxed
sane-open-desktop.suggestedPrograms = [
"gdbus"
];
sane-cast.sandbox.method = "bwrap";
sane-cast.sandbox.net = "clearnet";
sane-cast.sandbox.autodetectCliPaths = "existingFile";
sane-cast.suggestedPrograms = [ "go2tv" ];
sane-die-with-parent.sandbox.enable = false; #< it's a launcher; can't sandbox
sane-weather.sandbox.method = "bwrap";
sane-weather.sandbox.net = "clearnet";
screen.sandbox.enable = false; #< tty; needs to run anything
sequoia.sandbox.method = "bwrap"; # TODO:sandbox: untested
sequoia.sandbox.whitelistPwd = true;
sequoia.sandbox.autodetectCliPaths = true;
sequoia.sandbox.autodetectCliPaths = "existingFileOrParent"; # supports `-o <file-to-create>`
shattered-pixel-dungeon.buildCost = 1;
shattered-pixel-dungeon.persist.byStore.plaintext = [ ".local/share/.shatteredpixel/shattered-pixel-dungeon" ];
shattered-pixel-dungeon.sandbox.method = "bwrap";
shattered-pixel-dungeon.sandbox.whitelistAudio = true;
@ -775,6 +983,7 @@ in
shattered-pixel-dungeon.sandbox.whitelistWayland = true;
# printer/filament settings
slic3r.buildCost = 1;
slic3r.persist.byStore.plaintext = [ ".Slic3r" ];
slurp.sandbox.method = "bwrap";
@ -786,15 +995,20 @@ in
smartmontools.sandbox.autodetectCliPaths = "existing";
smartmontools.sandbox.capabilities = [ "sys_rawio" ];
# snapshot camera, based on libcamera
# TODO: enable dma heaps for more efficient buffer sharing: <https://gitlab.com/postmarketOS/pmaports/-/issues/2789>
snapshot = {};
sops.sandbox.method = "bwrap"; # TODO:sandbox: untested
sops.sandbox.extraHomePaths = [
".config/sops"
"dev/nixos"
"nixos"
# TODO: sops should only need access to knowledge/secrets,
# except that i currently put its .sops.yaml config in the root of ~/knowledge
"knowledge"
];
soundconverter.buildCost = 1;
soundconverter.sandbox.method = "bwrap";
soundconverter.sandbox.whitelistWayland = true;
soundconverter.sandbox.extraHomePaths = [
@ -812,6 +1026,7 @@ in
sox.sandbox.autodetectCliPaths = "existingFileOrParent";
sox.sandbox.whitelistAudio = true;
space-cadet-pinball.buildCost = 1;
space-cadet-pinball.persist.byStore.plaintext = [ ".local/share/SpaceCadetPinball" ];
space-cadet-pinball.sandbox.method = "bwrap";
space-cadet-pinball.sandbox.whitelistAudio = true;
@ -832,6 +1047,7 @@ in
subversion.sandbox.whitelistPwd = true;
sudo.sandbox.enable = false;
superTux.buildCost = 1;
superTux.sandbox.method = "bwrap";
superTux.sandbox.wrapperType = "inplace"; # package Makefile incorrectly installs to $out/games/superTux instead of $out/share/games
superTux.sandbox.whitelistAudio = true;
@ -850,12 +1066,14 @@ in
tdesktop.persist.byStore.private = [ ".local/share/TelegramDesktop" ];
tokodon.buildCost = 1;
tokodon.persist.byStore.private = [ ".cache/KDE/tokodon" ];
tree.sandbox.method = "landlock";
tree.sandbox.autodetectCliPaths = true;
tree.sandbox.autodetectCliPaths = "existing";
tree.sandbox.whitelistPwd = true;
tumiki-fighters.buildCost = 1;
tumiki-fighters.sandbox.method = "bwrap";
tumiki-fighters.sandbox.whitelistAudio = true;
tumiki-fighters.sandbox.whitelistDri = true; #< not strictly necessary, but triples CPU perf
@ -874,12 +1092,16 @@ in
"/sys/bus/usb"
];
valgrind.buildCost = 1;
valgrind.sandbox.enable = false; #< it's a launcher: can't sandbox
visidata.sandbox.method = "bwrap"; # TODO:sandbox: untested
visidata.sandbox.autodetectCliPaths = true;
# `vulkaninfo`, `vkcube`
vulkan-tools.sandbox.method = "landlock";
vvvvvv.buildCost = 1;
vvvvvv.sandbox.method = "bwrap";
vvvvvv.sandbox.whitelistAudio = true;
vvvvvv.sandbox.whitelistDri = true; #< playable without, but burns noticably more CPU
@ -900,6 +1122,7 @@ in
wget.sandbox.net = "all";
wget.sandbox.whitelistPwd = true; # saves to pwd by default
whalebird.buildCost = 1;
whalebird.persist.byStore.private = [ ".config/Whalebird" ];
# `wg`, `wg-quick`
@ -914,6 +1137,8 @@ in
wl-clipboard.sandbox.whitelistWayland = true;
wtype = {};
wtype.sandbox.method = "bwrap";
wtype.sandbox.whitelistWayland = true;
xwayland.sandbox.method = "bwrap";
xwayland.sandbox.wrapperType = "inplace"; #< consumers use it as a library (e.g. wlroots)
@ -932,7 +1157,44 @@ in
zfs = {};
};
programs.feedbackd = lib.mkIf config.sane.programs.feedbackd.enabled {
sane.persist.sys.byStore.plaintext = lib.mkIf config.sane.programs.guiApps.enabled [
# "/var/lib/alsa" # preserve output levels, default devices
{ path = "/var/lib/systemd/backlight"; method = "bind"; } # backlight brightness; bind because systemd T_T
];
systemd.services."systemd-backlight@" = lib.mkIf config.sane.programs.guiApps.enabled {
after = [
"ensure-var-lib-systemd-backlight.service"
];
wants = [
"ensure-var-lib-systemd-backlight.service"
];
};
hardware.opengl = lib.mkIf config.sane.programs.guiApps.enabled ({
enable = true;
driSupport = lib.mkDefault true;
} // (lib.optionalAttrs pkgs.stdenv.isx86_64 {
# for 32 bit applications
# upstream nixpkgs forbids setting driSupport32Bit unless specifically x86_64 (so aarch64 isn't allowed)
driSupport32Bit = lib.mkDefault true;
}));
system.activationScripts.notifyActive = lib.mkIf config.sane.programs.guiApps.enabled {
text = lib.concatStringsSep "\n" ([
''
tryNotifyUser() {
local user="$1"
local new_path="$PATH:${pkgs.sudo}/bin:${pkgs.libnotify}/bin"
local version="$(cat $systemConfig/nixos-version)"
PATH="$new_path" sudo -u "$user" \
env PATH="$new_path" NIXOS_VERSION="$version" /bin/sh -c \
'. $HOME/.profile; dbus_file="$XDG_RUNTIME_DIR/bus"; if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -e "$dbus_file" ]; then export DBUS_SESSION_BUS_ADDRESS="unix:path=$dbus_file"; fi ; if [ -n "$DBUS_SESSION_BUS_ADDRESS" ]; then notify-send "nixos activated" "version: $NIXOS_VERSION" ; fi'
}
''
] ++ lib.mapAttrsToList
(user: en: lib.optionalString en "tryNotifyUser ${user}")
config.sane.programs.guiApps.enableFor.user
);
};
}

View File

@ -14,10 +14,12 @@
};
};
buildCost = 1;
sandbox.method = "bwrap";
sandbox.whitelistAudio = true;
sandbox.whitelistWayland = true;
sandbox.autodetectCliPaths = true;
sandbox.autodetectCliPaths = "existingFile";
sandbox.extraHomePaths = [
# support media imports via file->open dir to some common media directories
"tmp"

View File

@ -0,0 +1,10 @@
# `ausyscall --dump`: lists all syscalls by number and name
{ pkgs, ... }:
{
sane.programs.ausyscall = {
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.audit "bin/ausyscall";
sandbox.method = "landlock";
};
}

View File

@ -87,7 +87,7 @@ let
in
{
sane.programs.bemenu = {
sandbox.method = "bwrap"; # landlock works, but requires *all* of /run/user/$ID to be granted.
sandbox.method = "bwrap"; # landlock works, but requires *all* of $XDG_RUNTIME_DIR to be granted.
sandbox.whitelistWayland = true;
sandbox.extraHomePaths = [
".cache/fontconfig" #< else it complains, and is *way* slower

View File

@ -2,10 +2,7 @@
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ])" -p blast-ugjka
# vim: set filetype=python :
import ctypes
import logging
import os
import signal
import socket
import subprocess
@ -16,53 +13,9 @@ logger = logging.getLogger(__name__)
# map from known devices -> required flags
DEVICE_MAP = {
"Theater TV": [],
"[LG] webOS TV OLED55C9PUA": [ "-usewav" ],
"Cuddlevision": [ "-usewav" ],
}
def set_pdeathsig(sig=signal.SIGTERM):
"""
helper function to ensure once parent process exits, its children processes will automatically die.
see: <https://stackoverflow.com/a/43152455>
see: <https://www.man7.org/linux/man-pages/man2/prctl.2.html>
"""
libc = ctypes.CDLL("libc.so.6")
return libc.prctl(1, sig)
MY_PID = None
def reap_children(sig=None, frame=None):
global MY_PID
# reset SIGTERM handler to avoid recursing
signal.signal(signal.SIGTERM, signal.Handlers.SIG_DFL)
logger.info("killing all children (of pid %d)", MY_PID)
os.killpg(MY_PID, signal.SIGTERM)
def reap_on_exit():
"""
catch when the parent exits, and map that to SIGTERM for this process.
when this process receives SIGTERM, also terminate all descendent processes.
this is done because:
1. mpv invokes this, but (potentially) via the sandbox wrapper.
2. when mpv exits, it `SIGKILL`s that sandbox wrapper.
3. bwrap does not pass SIGKILL or SIGTERM to its child.
4. hence, we neither receive that signal NOR can we pass it on simply by killing our immediate children
(since any bwrap'd children wouldn't pass that signal on...)
really, the proper fix would be on mpv's side:
- mpv should create a new process group when it launches a command, and kill that process group on exit.
or fix this in the sandbox wrapper:
- why *doesn't* bwrap forward the signals?
- there's --die-with-parent, but i can't apply that *system wide* and expect reasonably behavior
<https://github.com/containers/bubblewrap/issues/529>
"""
global MY_PID
MY_PID = os.getpid()
# create a new process group, pgid = gid
os.setpgid(MY_PID, MY_PID)
set_pdeathsig(signal.SIGTERM)
signal.signal(signal.SIGTERM, reap_children)
def get_ranked_ip_addrs():
"""
return the IP addresses most likely to be LAN addresses
@ -96,8 +49,6 @@ class BlastDriver:
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
# this pdeathsig isn't necessary; seems it might result in leaked pulse outputs
# preexec_fn=set_pdeathsig
)
self.blast_flags = list(blast_flags)
self.receiver_names = []
@ -202,15 +153,11 @@ def main():
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
reap_on_exit()
blast = try_blast()
if blast is not None:
logger.info("waiting until blast exits")
blast.blast.wait()
reap_children()
if __name__ == "__main__":
main()

View File

@ -39,12 +39,10 @@ in
sandbox.method = "bwrap";
sandbox.whitelistAudio = true;
sandbox.net = "clearnet";
sandbox.extraConfig = [
# else it fails to reap its children (or, maybe, it fails to hook its parent's death signal?)
# might be possible to remove this, but kinda hard to see a clean way.
"--sane-sandbox-keep-namespace" "pid"
];
suggestedPrograms = [ "blast-ugjka" ];
#v else it fails to reap its children (or, maybe, it fails to hook its parent's death signal?)
#v might be possible to remove this, but kinda hard to see a clean way.
sandbox.isolatePids = false;
suggestedPrograms = [ "blast-ugjka" "sane-die-with-parent" ];
};
networking.firewall.allowedTCPPorts = lib.mkIf cfg.enabled [ 9000 ];

View File

@ -99,28 +99,41 @@ in
type = types.listOf transitionType;
default = [];
};
configFile = mkOption {
type = types.path;
default = pkgs.writeText "bonsai_tree.json" (builtins.toJSON cfg.config.transitions);
description = ''
configuration file to pass to bonsai.
usually auto-generated from the sibling options; exposed mainly for debugging or convenience.
'';
};
};
};
};
packageUnwrapped = pkgs.bonsai.overrideAttrs (upstream: {
# patch to place the socket in a subdirectory where it can be sandboxed
postPatch = (upstream.postPatch or "") + ''
substituteInPlace cmd/{bonsaictl,bonsaid}/main.ha \
--replace-fail 'path::set(&buf, statedir, "bonsai")' 'path::set(&buf, statedir, "bonsai/bonsai")'
'';
});
fs.".config/bonsai/bonsai_tree.json".symlink.text = builtins.toJSON cfg.config.transitions;
sandbox.method = "bwrap";
sandbox.extraRuntimePaths = [
"/" #< just needs "bonsai", but needs to create it first...
"bonsai"
];
services.bonsaid = {
description = "bonsai: programmable input dispatcher";
dependencyOf = [ "sway" ]; # to ensure `$XDG_RUNTIME_DIR/bonsai` exists before sway binds it
partOf = [ "graphical-session" ];
command = "bonsaid -t ${cfg.config.configFile}";
cleanupCommand = "rm -f $XDG_RUNTIME_DIR/bonsai";
# nice -n -11 chosen arbitrarily. i hope this will allow for faster response to inputs, but without audio underruns (pipewire is -21, dino -15-ish)
command = pkgs.writeShellScript "bonsai-start" ''
# TODO: don't create the sway directory here!
# i do it for now because sway and bonsai call into eachother; circular dependency:
# - sway -> bonsai -> sane-input-handler -> swaymsg
mkdir -p $XDG_RUNTIME_DIR/{bonsai,sway}
exec nice -n -11 bonsaid -t $HOME/.config/bonsai/bonsai_tree.json
'';
cleanupCommand = "rm -f $XDG_RUNTIME_DIR/bonsai/bonsai";
readiness.waitExists = [
"$XDG_RUNTIME_DIR/bonsai/bonsai"
];
};
};
}

View File

@ -8,6 +8,9 @@
"dev" # for developing anything web-related
"tmp"
];
sandbox.extraPaths = [
"/tmp" # needed particularly if run from `sane-vpn do`
];
sandbox.whitelistAudio = true;
sandbox.whitelistDri = true;
sandbox.whitelistWayland = true;

View File

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.brightnessctl;
in
{
sane.programs.brightnessctl = {
sandbox.method = "landlock"; # also bwrap, but landlock is more responsive
sandbox.extraPaths = [
"/sys/class/backlight"
"/sys/class/leds"
"/sys/devices"
];
# sandbox.whitelistDbus = [ "system" ]; #< only necessary if not granting udev perms
};
services.udev.extraRules = let
chmod = "${pkgs.coreutils}/bin/chmod";
chown = "${pkgs.coreutils}/bin/chown";
in lib.mkIf cfg.enabled ''
# make backlight controllable by members of `video`
SUBSYSTEM=="backlight", RUN+="${chown} :video $sys$devpath/brightness", RUN+="${chmod} g+w $sys$devpath/brightness"
'';
}

View File

@ -0,0 +1,26 @@
# https://gitlab.com/mobian1/callaudiod
# device support:
# - moby:
# - mic muting works fine
# - speaker seems to have zero volume (maybe it's my alsa profiles?)
# - shows some failures when only the modem is online (no wifi)
# - gnome-calls doesn't even create an output audio stream, for example; and the other end of the call can't hear any mic.
# - desko: unsupported. no mic muting, etc.
# - "Card 'alsa_card.pci-0000_0b_00.1' lacks speaker and/or earpiece port, skipping"
# - "callaudiod-pulse-CRITICAL **: 07:45:48.092: No suitable card found, stopping here..."
{ pkgs, ... }:
{
sane.programs.callaudiod = {
packageUnwrapped = pkgs.rmDbusServices pkgs.callaudiod;
# probably more needed once i enable proper sandboxing, but for now this ensures the service isn't started too early!
sandbox.whitelistAudio = true;
sandbox.whitelistDbus = [ "user" ];
services.callaudiod = {
description = "callaudiod: dbus service to switch audio profiles and mute microphone";
partOf = [ "default" ];
command = "callaudiod";
};
};
}

View File

@ -1,20 +1,14 @@
# GNOME calls
# - <https://gitlab.gnome.org/GNOME/calls>
# - both a dialer and a call handler.
# - uses callaudiod dbus package.
# - uses callaudiod dbus service.
#
# 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, ... }:
# - now gnome-calls can do outbound calls. inbound calls can be routed by messaging the bot: "configure calls"
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.calls;
in
@ -25,31 +19,52 @@ in
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
default = true;
};
};
};
packageUnwrapped = pkgs.calls.overrideAttrs (upstream: {
patches = (upstream.patches or []) ++ [
(pkgs.fetchpatch {
# usability improvement... if the UI is visible, then i can receive calls. otherwise, i can't!
url = "https://git.uninsane.org/colin/gnome-calls/commit/a19166d85927e59662fae189a780eed18bf876ce.patch";
name = "exit on close (i.e. never daemonize)";
hash = "sha256-NoVQV2TlkCcsBt0uwSyK82hBKySUW4pADrJVfLFvWgU=";
})
];
});
sandbox.method = "bwrap";
sandbox.net = "clearnet";
sandbox.whitelistAudio = true;
sandbox.whitelistDbus = [ "user" ]; # necessary for secrets, at the minimum
sandbox.whitelistWayland = true;
persist.byStore.private = [
# ".cache/folks" # contact avatars?
# ".config/calls"
".local/share/calls" # call "records"
# .local/share/folks # contacts?
];
# this is only the username/endpoint: the actual password appears to be stored in gnome-keyring
secrets.".config/calls/sip-account.cfg" = ../../../secrets/common/gnome_calls_sip-account.cfg.bin;
suggestedPrograms = [
"callaudiod" # runtime dependency (optional, but probably needed for mic muting?)
"feedbackd" # needs `phone-incoming-call`, in particular
"gnome-keyring" # to remember the password
];
services.gnome-calls = {
# TODO: prevent gnome-calls from daemonizing when started manually
description = "gnome-calls daemon to monitor incoming SIP calls";
partOf = lib.mkIf cfg.config.autostart [ "graphical-session" ];
# add --verbose for more debugging
command = "env G_MESSAGES_DEBUG=all gnome-calls --daemon";
# add --daemon to avoid showing UI on launch.
# note that no matter the flags, it returns to being a daemon whenever the UI is manually closed,
# revealed when launched.
# default latency is 10ms, which is too low and i get underruns on moby.
# 50ms is copied from dino, not at all tuned.
command = "env G_MESSAGES_DEBUG=all PULSE_LATENCY_MSEC=50 gnome-calls";
};
};
programs.calls = lib.mkIf cfg.enabled {
enable = true;
};
}

View File

@ -1,6 +1,8 @@
{ ... }:
{
sane.programs.celeste64 = {
buildCost = 1;
sandbox.method = "bwrap";
sandbox.whitelistAudio = true;
sandbox.whitelistDri = true;

View File

@ -1,7 +1,18 @@
{ pkgs, ... }:
{
sane.programs.sane-battery-estimate = {
packageUnwrapped = pkgs.static-nix-shell.mkBash {
pname = "sane-battery-estimate";
srcRoot = ./.;
};
sandbox.method = "bwrap";
sandbox.extraPaths = [
"/sys/class/power_supply"
"/sys/devices"
];
};
sane.programs.conky = {
# TODO: non-sandboxed `conky` still ships via `sxmo-utils`, but unused
sandbox.method = "bwrap";
sandbox.net = "clearnet"; #< for the scripts it calls (weather)
sandbox.extraPaths = [
@ -12,18 +23,16 @@
];
sandbox.whitelistWayland = true;
fs.".config/conky/conky.conf".symlink.target =
let
# TODO: make this just another `suggestedPrograms`!
battery_estimate = pkgs.static-nix-shell.mkBash {
pname = "battery_estimate";
srcRoot = ./.;
};
in pkgs.substituteAll {
src = ./conky.conf;
bat = "${battery_estimate}/bin/battery_estimate";
weather = "timeout 20 ${pkgs.sane-weather}/bin/sane-weather";
};
suggestedPrograms = [
"sane-battery-estimate"
"sane-weather"
];
fs.".config/conky/conky.conf".symlink.target = pkgs.substituteAll {
src = ./conky.conf;
bat = "sane-battery-estimate";
weather = "timeout 20 sane-weather";
};
services.conky = {
description = "conky dynamic desktop background";

View File

@ -1,4 +1,3 @@
#!/bin/sh
#!/usr/bin/env nix-shell
#!nix-shell -i bash
@ -15,7 +14,7 @@ usage() {
echo " --percent-suffix <string>: use the provided string when displaying percents"
}
# these icons come from sxmo; they only render in nerdfonts
# these icons may only render in nerdfonts
icon_bat_chg=("󰢟" "󱊤" "󱊥" "󰂅")
icon_bat_dis=("󰂎" "󱊡" "󱊢" "󱊣")
suffix_icon="" # thin space

View File

@ -13,6 +13,8 @@
'';
});
buildCost = 1;
sandbox.method = "bwrap"; # landlock gives: _multiprocessing.SemLock: Permission Denied
sandbox.whitelistAudio = true;
sandbox.whitelistDbus = [ "user" ]; # mpris

View File

@ -0,0 +1,34 @@
# docs: <https://wiki.nixos.org/wiki/Printing>
# to add a printer:
# 1. <http://localhost:631/admin/>
# 2. click "find new printers" and follow prompts
# - prefer to use the "Generic IPP Everywhere Printer" driver
# alternatively, add/modify printers by running
# - `system-config-printer`
{ config, lib, ... }:
let
cfg = config.sane.programs.cups;
in
{
sane.programs.cups = {
suggestedPrograms = [
"system-config-printer"
];
};
sane.programs.system-config-printer = {};
services.printing = lib.mkIf cfg.enabled {
enable = true;
startWhenNeeded = false; #< a.k.a. socket activated?
# webInterface = false;
# logLevel = "debug"; # default: "info"
# extraConfig = "<lines ... >";
# drivers = [ <cups driver packages...> ]
};
# services.avahi = lib.mkIf cfg.enabled {
# # only needed for wireless printing
# enable = true;
# nssmdns4 = true;
# openFirewall = true;
# };
}

View File

@ -21,5 +21,15 @@
ln -s curlftpfs $out/bin/mount.curlftpfs
'';
});
# TODO: try to sandbox this better? maybe i can have fuse (unsandboxed) invoke curlftpfs (sandboxed)?
# - landlock gives EPERM
# - bwrap just silently doesn't mount it, maybe because of setuid stuff around fuse?
# sandbox.method = "capshonly";
# sandbox.net = "all";
# sandbox.capabilities = [
# "sys_admin"
# "sys_module"
# ];
};
}

View File

@ -0,0 +1,54 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.dissent;
in
{
sane.programs.dbus = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = true;
};
};
};
packageUnwrapped = (pkgs.dbus.override {
# remove features i don't want. mostly to avoid undesired interactions, but also it reduces the closure by 55 MB :)
enableSystemd = false;
x11Support = false;
}).overrideAttrs (upstream: {
postFixup = (upstream.postFixup or "") + ''
# the XML docs have a URI field which points to self,
# and that breaks the sandbox checker
substituteInPlace $out/share/xml/dbus-1/catalog.xml \
--replace-fail "$out" "/run/current-system/sw"
# conf file points to dbus-daemon-launch-helper by absolute path,
# which breaks sandboxing. i don't want dbus auto-launching stuff anyway though.
substituteInPlace $out/share/dbus-1/system.conf \
--replace-fail "$out/libexec/dbus-daemon-launch-helper" "false"
'';
});
sandbox.method = "bwrap";
sandbox.extraRuntimePaths = [
"/" #< it needs to create a file in the root. TODO: move the bus handle into a sandboxable subdirectory
];
sandbox.isolatePids = false; #< not actually sure *why* this is necessary, but it is
env.DBUS_SESSION_BUS_ADDRESS = "unix:path=$XDG_RUNTIME_DIR/bus";
# normally systemd would create a dbus session for us, but if you configure it not to do that
# then we can create our own. not sure if there's a dependency ordering issue here: lots
# of things depend on dbus but i don't do anything special to guarantee this is initialized
# before them.
services.dbus = {
description = "dbus user session";
partOf = lib.mkIf cfg.config.autostart [ "default" ];
command = "dbus-daemon --session --nofork --address=$DBUS_SESSION_BUS_ADDRESS";
readiness.waitExists = [ "$XDG_RUNTIME_DIR/bus" ];
};
};
}

View File

@ -34,7 +34,7 @@ in
services.dconf = {
description = "dconf configuration database/server";
partOf = [ "graphical-session" ];
partOf = [ "default" ];
command = "${lib.getLib cfg.package}/libexec/dconf-service";
};

View File

@ -9,11 +9,14 @@
./animatch.nix
./assorted.nix
./audacity.nix
./ausyscall.nix
./bemenu.nix
./blast-ugjka
./bonsai.nix
./brave.nix
./brightnessctl.nix
./bubblewrap.nix
./callaudiod.nix
./calls.nix
./cantata.nix
./catt.nix
@ -21,20 +24,24 @@
./chatty.nix
./conky
./cozy.nix
./cups.nix
./curlftpfs.nix
./dbus.nix
./dconf.nix
./deadd-notification-center
./dialect.nix
./dino.nix
./dissent.nix
./dtrx.nix
./eg25-control.nix
./element-desktop.nix
./engrampa.nix
./epiphany.nix
./errno.nix
./evince.nix
./fcitx5.nix
./feedbackd.nix
./firefox.nix
./firejail.nix
./flare-signal.nix
./fontconfig.nix
./fractal.nix
@ -45,6 +52,7 @@
./gdbus.nix
./geary.nix
./git.nix
./gnome-clocks.nix
./gnome-feeds.nix
./gnome-keyring
./gnome-maps.nix
@ -52,7 +60,9 @@
./go2tv.nix
./gpodder.nix
./grimshot.nix
./gst-device-monitor.nix
./gthumb.nix
./gvfs.nix
./handbrake.nix
./helix.nix
./htop
@ -62,6 +72,7 @@
./komikku.nix
./koreader
./less.nix
./lftp.nix
./libreoffice.nix
./lemoa.nix
./loupe.nix
@ -69,17 +80,22 @@
./megapixels.nix
./mepo.nix
./mimeo
./mmcli.nix
./modemmanager.nix
./mopidy.nix
./mpv
./msmtp.nix
./nautilus.nix
./neovim.nix
./networkmanager.nix
./newsflash.nix
./nheko.nix
./nicotine-plus.nix
./nix-index.nix
./nmcli.nix
./notejot.nix
./ntfy-sh.nix
./objdump.nix
./obsidian.nix
./offlineimap.nix
./open-in-mpv.nix
@ -90,12 +106,18 @@
./rhythmbox.nix
./ripgrep.nix
./rofi
./rtkit.nix
./s6-rc.nix
./sane-input-handler
./sane-open.nix
./sane-screenshot.nix
./sane-scripts.nix
./sane-theme.nix
./sanebox.nix
./schlock.nix
./seatd.nix
./sfeed.nix
./shadow.nix
./signal-desktop.nix
./splatmoji.nix
./spot.nix
@ -122,6 +144,7 @@
./wine.nix
./wireplumber.nix
./wireshark.nix
./wpa_supplicant.nix
./wvkbd.nix
./xarchiver.nix
./xdg-desktop-portal.nix
@ -132,6 +155,7 @@
./zathura.nix
./zeal.nix
./zecwallet-lite.nix
./zulip.nix
./zsh
];

View File

@ -1,15 +1,6 @@
{ pkgs, ... }:
{
sane.programs.dialect = {
sandbox.method = "bwrap";
sandbox.wrapperType = "inplace"; # share/search_providers/ calls back into the binary, weird wrap semantics
sandbox.whitelistWayland = true;
sandbox.net = "clearnet";
sandbox.extraHomePaths = [
".config/dconf" # won't start without it
];
suggestedPrograms = [ "dconf" ]; #< to persist settings
packageUnwrapped = pkgs.dialect.overrideAttrs (upstream: {
# TODO: send upstream
# TODO: figure out how to get audio working
@ -18,5 +9,17 @@
pkgs.glib-networking # for TLS
];
});
suggestedPrograms = [ "dconf" ]; #< to persist settings
buildCost = 1;
sandbox.method = "bwrap";
sandbox.wrapperType = "inplace"; # share/search_providers/ calls back into the binary, weird wrap semantics
sandbox.whitelistWayland = true;
sandbox.net = "clearnet";
sandbox.extraHomePaths = [
".config/dconf" # won't start without it
];
};
}

View File

@ -22,17 +22,17 @@
# - 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)
# - on lappy/desktop, right-clicking the mic button allows to toggle audio devices, but impossible to trigger this on moby/touch screen!
# - 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
# - `rtp-WARNING: 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.
# - dino *should* be able to use Pipewire directly for calls instead of going through pulse, but had trouble achieving that in actuality
#
{ config, lib, pkgs, ... }:
let
@ -50,16 +50,25 @@ in
};
};
packageUnwrapped = pkgs.dino.overrideAttrs (upstream: {
packageUnwrapped = (pkgs.dino.override {
# XXX(2024/04/24): build without echo cancelation (i.e. force WITH_VOICE_PROCESSOR to be undefined).
# this means that if the other end of the call is on speaker phone, i'm liable to hear my own voice
# leave their speaker, enter their mic, and then return to me.
# the benefit is a >50% reduction in CPU use. insignificant on any modern PC; make-or-break on a low-power Pinephone.
webrtc-audio-processing = null;
}).overrideAttrs (upstream: {
# i'm updating experimentally to see if it improves call performance.
# i don't *think* this is actually necessary; i don't notice any difference.
version = "0.4.3-unstable-2024-04-01";
version = "0.4.3-unstable-2024-04-28";
src = lib.warnIf (lib.versionOlder "0.4.3" upstream.version) "dino update: safe to remove sane patches" pkgs.fetchFromGitHub {
owner = "dino";
repo = "dino";
rev = "d9fa4daa6a7d16f5f0e2183a77ee2d07849dd9f3";
hash = "sha256-vJBIMsMLlK8Aw19fD2aFNtegXkjOqEgb3m1hi3fE5DE=";
rev = "657502955567dd538e56f300e075c7db52e25d74";
hash = "sha256-SApJy9FgxxLOB5A/zGtpdFZtSqSiS03vggRrCte1tFE=";
};
# avoid double-application of upstreamed patches
# https://github.com/NixOS/nixpkgs/pull/309265
patches = [];
checkPhase = ''
runHook preCheck
./xmpp-vala-test
@ -96,17 +105,29 @@ in
# 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.
# pipewire uses power-of-two buffering for the mic itself (by default), but this env var supports only whole numbers, which isn't quite reconcilable:
# - 1024/48000 = 21.33ms
# - 2048/48000 = 42.67ms
# - 4096/48000 = 85.33ms
# also, Dino's likely still doing things in 10ms batches internally.
#
# note that this number supposedly is just the buffer size which Dino asks Pulse (pipewire) to share with it.
# in theory, it's equivalent to adjusting pipewire's quanta setting, and so isn't additive to the existing pipewire buffers.
# (and would also be overriden by pipewire's quanta.min setting).
# but in practice, setting this seems to have some more effect beyond just the buffer sizes visible in `pw-top`.
#
# further: decrease the "niceness" of dino, so that it can take precedence over anything else.
# ideally this would target just the audio processing, rather than the whole program.
# pipewire is the equivalent of `nice -n -21`, so probably don't want to go any more extreme than that.
# nice -n -15 chosen arbitrarily; not optimized
# nice -n -15 chosen arbitrarily; not optimized (and seems to have very little impact in practice anyway).
# buffer size:
# - 1024 (PULSE_LATENCY_MSEC=20): `pw-top` shows several underruns per second.
# - 2048 (PULSE_LATENCY_MSEC=50): `pw-top` shows very few underruns: maybe 1-5 per minute. with voice processor disabled, this works well. with it enabled, i still get gaps in which the mic "disappears".
# - 4096 (PULSE_LATENCY_MSEC=100): `pw-top` shows 0 underruns. with voice processor disabled, i seem to be permanently muted. with it enabled, this works well.
#
# note that debug logging during calls produces so much journal spam that it pegs the CPU and causes dropped audio
# env G_MESSAGES_DEBUG = "all";
command = "env PULSE_LATENCY_MSEC=20 nice -n -15 dino";
command = "env PULSE_LATENCY_MSEC=50 nice -n -15 dino";
};
};
}

View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
sane.programs.dtrx = {
packageUnwrapped = pkgs.dtrx.override {
# `binutils` is the nix wrapper, which reads nix-related env vars
# before passing on to e.g. `ld`.
# dtrx probably only needs `ar` at runtime, not even `ld`.
binutils = pkgs.binutils-unwrapped;
# build without rpm support, since `rpm` package doesn't cross-compile.
rpm = null;
};
sandbox.method = "bwrap";
sandbox.whitelistPwd = true;
sandbox.autodetectCliPaths = "existing"; #< for the archive
};
}

View File

@ -0,0 +1,58 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.eg25-control;
in
{
sane.programs.eg25-control = {
suggestedPrograms = [ "modemmanager" ];
services.eg25-control-powered = {
description = "eg25-control-powered: power to the Qualcomm eg25 modem used by PinePhone";
startCommand = "eg25-control --power-on --verbose";
cleanupCommand = "eg25-control --power-off --verbose";
# depends = [ "ModemManager" ]
};
services.eg25-control-gps = {
# TODO: separate almanac upload from GPS enablement
# - don't want to re-upload the almanac everytime the GPS is toggled
# - want to upload almanac even when GPS *isn't* enabled, if we have internet connection.
description = "eg25-control-gps: background GPS tracking";
startCommand = "eg25-control --enable-gps --dump-debug-info --verbose";
cleanupCommand = "eg25-control --disable-gps --dump-debug-info --verbose";
depends = [ "eg25-control-powered" ];
};
persist.byStore.plaintext = [ ".cache/eg25-control" ]; #< for cached agps data
};
# TODO: port to s6
systemd.services.eg25-control-freshen-agps = lib.mkIf cfg.enabled {
description = "keep assisted-GPS data fresh";
serviceConfig = {
# XXX: this can have a race condition with eg25-control-gps
# - eg25-control-gps initiates DL of new/<agps>
# - eg25-control-gps tests new/<agps>: it works
# - eg25-control-freshen-agps initiates DL of new/<agps>
# - eg25-control-gps: moves new/<agps> into cache/
# - but it moved the result (possibly incomplete) of eg25-control-freshen-agps, incorrectly
# in practice, i don't expect much issue from this.
ExecStart = "${cfg.package}/bin/eg25-control --ensure-agps-cache --verbose";
Restart = "no";
User = "colin";
};
startAt = "hourly"; # this is a bit more than necessary, but idk systemd calendar syntax
after = [ "network-online.target" "nss-lookup.target" ];
requires = [ "network-online.target" ];
# wantedBy = [ "network-online.target" ]; # auto-start immediately after boot
};
services.udev.extraRules = let
chmod = "${pkgs.coreutils}/bin/chmod";
chown = "${pkgs.coreutils}/bin/chown";
in lib.optionalString cfg.enabled ''
# make Modem controllable by user
DRIVER=="modem-power", RUN+="${chmod} g+w /sys%p/powered", RUN+="${chown} :networkmanager /sys%p/powered"
'';
}

View File

@ -9,7 +9,7 @@
sane.programs.element-desktop = {
packageUnwrapped = (pkgs.element-desktop.override {
# use pre-built electron because otherwise it takes 4 hrs to build from source.
electron = pkgs.electron_28-bin;
electron = pkgs.electron-bin;
}).overrideAttrs (upstream: {
# fix to use wayland instead of Xwayland:
# - replace `NIXOS_OZONE_WL` non-empty check with `WAYLAND_DISPLAY`
@ -25,6 +25,8 @@
"gnome-keyring"
];
buildCost = 1;
sandbox.method = "bwrap";
sandbox.net = "clearnet";
sandbox.whitelistAudio = true;

View File

@ -23,6 +23,8 @@
"tmp"
];
buildCost = 2;
# 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:

View File

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
sane.programs.errno = {
# packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.moreutils "bin/errno";
# actually, don't build all of moreutils because not all of it builds for cross targets.
# some of this can be simplified after <https://github.com/NixOS/nixpkgs/pull/316446>
packageUnwrapped = pkgs.moreutils.overrideAttrs (base: {
makeFlags = (base.makeFlags or []) ++ [
"BINS=errno"
"MANS=errno.1"
"PERLSCRIPTS=errno" #< Makefile errors if empty, but this works :)
"INSTALL_BIN=install"
];
#v disable the perl-specific stuff
propagatedBuildInputs = [];
postInstall = "";
});
sandbox.method = "landlock";
};
}

View File

@ -1,8 +1,10 @@
{ ... }:
{
sane.programs.evince = {
buildCost = 1;
sandbox.method = "bwrap";
sandbox.autodetectCliPaths = true;
sandbox.autodetectCliPaths = "existingFile";
sandbox.whitelistWayland = true;
mime.associations."application/pdf" = "org.gnome.Evince.desktop";

View File

@ -207,6 +207,10 @@ in
package = pkgs.firefox-extensions.i2p-in-private-browsing;
enable = lib.mkDefault config.services.i2p.enable;
};
i-still-dont-care-about-cookies = {
package = pkgs.firefox-extensions.i-still-dont-care-about-cookies;
enable = lib.mkDefault false; #< obsoleted by uBlock Origin annoyances/cookies lists
};
open-in-mpv = {
# test: `open-in-mpv 'mpv:///open?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ'`
package = pkgs.firefox-extensions.open-in-mpv;
@ -222,7 +226,7 @@ in
};
ublacklist = {
package = pkgs.firefox-extensions.ublacklist;
enable = lib.mkDefault true;
enable = lib.mkDefault false;
};
ublock-origin = {
package = pkgs.firefox-extensions.ublock-origin;
@ -282,24 +286,35 @@ in
# 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)
# this configuration method is documented here:
# - <https://github.com/gorhill/uBlock/issues/2986#issuecomment-364035002>
# the specific attribute path is found via scraping ublock code here:
# - <https://github.com/gorhill/uBlock/blob/master/src/js/storage.js>
# - <https://github.com/gorhill/uBlock/blob/master/assets/assets.json>
fs."${cfg.browser.dotDir}/managed-storage/uBlock0@raymondhill.net.json".symlink.text = ''
{
"name": "uBlock0@raymondhill.net",
"description": "ignored",
"type": "storage",
"data": {
"toOverwrite": "{\"filterLists\": [\"fanboy-cookiemonster\"]}"
}
}
'';
# uBlock configuration:
fs."${cfg.browser.dotDir}/managed-storage/uBlock0@raymondhill.net.json".symlink.target = cfg.addons.ublock-origin.package.makeConfig {
# more filter lists are available here:
# - <https://easylist.to>
# - <https://github.com/easylist/easylist.git>
# - <https://github.com/yokoffing/filterlists>
filterFiles = let
getUasset = n: "${pkgs.uassets}/share/filters/${n}.txt";
in [
# default ublock filters:
(getUasset "ublock-filters")
(getUasset "ublock-badware")
(getUasset "ublock-privacy")
(getUasset "ublock-quick-fixes")
(getUasset "ublock-unbreak")
(getUasset "easylist")
(getUasset "easyprivacy")
# (getUasset "urlhaus-1") #< TODO: i think this is the same as urlhaus-filter-online
(getUasset "urlhaus-filter-online")
# (getUasset "plowe-0") #< TODO: where does this come from?
# (getUasset "ublock-cookies-adguard") #< TODO: where does this come from?
# filters i've added:
(getUasset "easylist-annoyances") #< blocks in-page popups, "social media content" (e.g. FB like button; improves loading time)
(getUasset "easylist-cookies") #< blocks GDPR cookie consent popovers (e.g. at stackoverflow.com)
# (getUasset "ublock-annoyances-others")
# (getUasset "ublock-annoyances-cookies")
];
};
# 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,
@ -310,8 +325,8 @@ in
// scrollbar configuration, see: <https://artemis.sh/2023/10/12/scrollbars.html>
// style=4 gives rectangular scrollbars
// could also enable "always show scrollbars" in about:preferences -- not sure what the actual pref name for that is
// note that too-large scrollbars (like 50px wide) tend to obscure content (and make buttons unclickable)
defaultPref("widget.non-native-theme.scrollbar.size.override", 20);
// note that too-large scrollbars (like 50px wide, even 20px) tend to obscure content (and make buttons unclickable)
defaultPref("widget.non-native-theme.scrollbar.size.override", 14);
defaultPref("widget.non-native-theme.scrollbar.style", 4);
// disable inertial/kinetic/momentum scrolling because it just gets in the way on touchpads
@ -323,6 +338,8 @@ in
defaultPref("widget.use-xdg-desktop-portal.open-uri", 1);
defaultPref("browser.toolbars.bookmarks.visibility", "never");
// configure which extensions are visible by default (TODO: requires a lot of trial and error)
// defaultPref("browser.uiCustomization.state", ...);
// auto-open mpv:// URIs without prompting.
// can do this with other protocols too (e.g. matrix?). see about:config for common handlers.
@ -347,7 +364,7 @@ in
# TODO: env.PASSWORD_STORE_DIR only needs to be present within the browser session.
env.PASSWORD_STORE_DIR = "/home/colin/knowledge/secrets/accounts";
# alternative to PASSWORD_STORE_DIR, but firejail doesn't handle this symlink well
# alternative to PASSWORD_STORE_DIR:
# fs.".password-store".symlink.target = lib.mkIf cfg.addons.browserpass-extension.enable "knowledge/secrets/accounts";
# flush the cache to disk to avoid it taking up too much tmp.

View File

@ -1,8 +0,0 @@
{ lib, config, ... }:
{
sane.programs.firejail = {};
programs.firejail = lib.mkIf config.sane.programs.firejail.enabled {
enable = true; #< install the suid binary
};
}

View File

@ -16,13 +16,11 @@ let
# - 󰍦 (message bubble)
# - 󰏲 (phone)
# -  (weather/sun-behind-clouds)
# used particularly by sxmo utilities, but also a few of my own (e.g. conky)
# i use these icons mostly in conky, swaync.
#
# 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
@ -30,6 +28,30 @@ let
nerdfontPkgs = builtins.map
(f: pkgs.nerdfonts.override { fonts = [ f ]; })
wantedNerdfonts;
# see: <repo:nixos/nixpkgs:nixos/modules/config/fonts/fontconfig.nix>
# and: <repo:nixos/nixpkgs:pkgs/development/libraries/fontconfig/make-fonts-cache.nix>
# nixpkgs creates a fontconfig cache, but only when *not* cross compiling.
# but the alternative is that fonts are cached purely at runtime, in ~/.cache/fontconfig,
# and that needs to either be added to the sandbox of *every* app,
# or font-heavy apps are several *seconds* slower to launch.
#
# TODO: upstream this into `make-fonts-cache.nix`?
cache = (pkgs.makeFontsCache { fontDirectories = config.fonts.packages; }).overrideAttrs (upstream: {
buildCommand = lib.replaceStrings
[ "fc-cache" ]
[ "${pkgs.stdenv.hostPlatform.emulator pkgs.buildPackages} ${pkgs.fontconfig.bin}/bin/fc-cache" ]
upstream.buildCommand
;
});
cacheConf = pkgs.writeTextDir "etc/fonts/conf.d/01-nixos-cache-cross.conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
<fontconfig>
<!-- Pre-generated font caches -->
<cachedir>${cache}</cachedir>
</fontconfig>
'';
in
{
sane.programs.fontconfig = {
@ -64,6 +86,8 @@ in
"DejaVu Sans"
];
};
# nixpkgs builds a cache file, but only for non-cross. i want it always, so add my own cache -- but ONLY for cross.
fontconfig.confPackages = lib.mkIf (pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform) [ cacheConf ];
#vvv enables dejavu_fonts, freefont_ttf, gyre-fonts, liberation_ttf, unifont, noto-fonts-emoji
enableDefaultPackages = false;
packages = with pkgs; [

View File

@ -24,8 +24,7 @@ in
{
sane.programs.fractal = {
packageUnwrapped = pkgs.fractal-nixified.optimized;
# packageUnwrapped = pkgs.fractal-latest;
# packageUnwrapped = pkgs.fractal-next;
# packageUnwrapped = pkgs.fractal;
sandbox.method = "bwrap";
sandbox.net = "clearnet";

View File

@ -2,11 +2,6 @@
{ pkgs, ... }:
{
sane.programs.frozen-bubble = {
sandbox.method = "bwrap";
sandbox.net = "clearnet"; # net play
sandbox.whitelistAudio = true;
sandbox.whitelistWayland = true;
packageUnwrapped = pkgs.frozen-bubble.overrideAttrs (upstream: {
# patch so it stores its dot-files not in root ~.
postPatch = (upstream.postPatch or "") + ''
@ -14,6 +9,12 @@
--replace-fail '$FBHOME = "$ENV{HOME}/.frozen-bubble"' '$FBHOME = "$ENV{HOME}/.local/share/frozen-bubble"'
'';
});
buildCost = 1;
sandbox.method = "bwrap";
sandbox.net = "clearnet"; # net play
sandbox.whitelistAudio = true;
sandbox.whitelistWayland = true;
persist.byStore.plaintext = [
".local/share/frozen-bubble" # preferences, high scores

View File

@ -8,6 +8,8 @@
{ ... }:
{
sane.programs.g4music = {
buildCost = 1;
sandbox.method = "bwrap";
sandbox.whitelistAudio = true;
sandbox.whitelistDbus = [ "user" ]; # mpris

View File

@ -37,7 +37,7 @@ in
# fs.".config/geary".dir = {};
# fs.".local/share/folks".dir = {};
slowToBuild = true; # uses webkitgtk 4.1
buildCost = 3; # uses webkitgtk 4.1
persist.byStore.private = [
# attachments, and email -- contained in a sqlite db
".local/share/geary"

View File

@ -0,0 +1,24 @@
{ pkgs, ... }: {
sane.programs."gnome.gnome-clocks" = {
packageUnwrapped = pkgs.gnome.gnome-clocks.overrideAttrs (upstream: {
# TODO: upstream this
buildInputs = upstream.buildInputs ++ (with pkgs; [
# gnome-clocks needs `playbin` (gst-plugins-base) and `scaletempo` (gst-plugins-good)
# to play the alarm when a timer expires
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
]);
});
buildCost = 1;
sandbox.method = "bwrap";
sandbox.whitelistAudio = true;
sandbox.whitelistDbus = [ "user" ]; #< required (alongside .config/dconf) to remember timers
sandbox.whitelistWayland = true;
sandbox.extraPaths = [
".config/dconf" # required (alongside dbus) to remember timers
];
suggestedPrograms = [ "dconf" ];
};
}

View File

@ -3,6 +3,8 @@
{ ... }:
{
sane.programs."gnome.gnome-weather" = {
buildCost = 1;
sandbox.method = "bwrap";
sandbox.wrapperType = "inplace"; #< /share/org.gnome.Weather/org.gnome.Weather file refers to bins by full path
sandbox.whitelistWayland = true;

View File

@ -2,8 +2,20 @@
# - turn the tv off and on again (no, really...)
#
# SANITY CHECKS:
# - `go2tv -u 'https://uninsane.org/share/AmenBreak.mp4'`
# - `go2tv -u 'https://uninsane.org/share/Milkbags/AmenBreak.mp4'`
# - LGTV: works, but not seekable
# - Samsung: "Cannot play video."
# - `go2tv -v /mnt/servo/media/Videos/Milkbags/AmenBreak.mp4`
# - Samsung: works
# - `go2tv -v /mnt/servo/media/Videos/Milkbags/COLIN.webm`
# - Samsung: works
# - `go2tv -v /mnt/servo/media/Videos/Shows/Lucky.Star/S01/S01E01-The.Girl.who.Dashes.Off.mkv`
# - Samsung: error 500
# - `go2tv -tc -v /mnt/servo/media/Videos/Shows/Lucky.Star/S01/S01E01-The.Girl.who.Dashes.Off.mkv`
# - Samsung: error 500
# - note that it still advertized .mkv to the TV
# - `cp /mnt/servo/media/Videos/Shows/Lucky.Star/S01/S01E01-The.Girl.who.Dashes.Off.mkv S01E01-The.Girl.who.Dashes.Off.mp4 && go2tv -v S01E01-The.Girl.who.Dashes.Off.mp4`
# - Samsung: WORKS
# - `go2tv -u 'https://youtu.be/p3G5IXn0K7A'`
# - LGTV: FAILS ("this file cannot be recognized")
# - no fix via transcoding, altering the URI, etc.
@ -17,6 +29,8 @@
# - LGTV: works
#
# WHEN TO TRANSCODE:
# - mkv container + *:
# - Samsung: rename to .mp4 and cast that: no need to transcode
# - mkv container + mpeg-2 video + AC-3/48k stereo audio:
# - LGTV: no transcoding needed
# - mkv container + H.264 video + AAC/48k 5.1 audio:
@ -27,6 +41,7 @@
# - LGTV: no transcoding needed
# - mkv container + H.265 video + E-AC-3/48k stereo audio:
# - LGTV: no transcoding needed
#
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.go2tv;
@ -35,7 +50,7 @@ in
sane.programs.go2tv = {
sandbox.method = "bwrap";
sandbox.net = "clearnet";
sandbox.autodetectCliPaths = true;
sandbox.autodetectCliPaths = "existingFile";
# for GUI invocation, allow the common media directories
sandbox.extraHomePaths = [
"Music"

View File

@ -0,0 +1,24 @@
# gst-device-monitor: gstreamer debugging tool.
# - `gst-device-monitor-1.0 Audio/Sink` #< show all audio sinks
# - `gst-device-monitor-1.0 Audio/Source` #< show all audio sources (microphones)
# - `gst-device-monitor-1.0 Video/Source` #< show all video sources (cameras)
{ pkgs, ... }:
{
sane.programs.gst-device-monitor = {
packageUnwrapped = (pkgs.linkIntoOwnPackage pkgs.gst_all_1.gst-plugins-base [
"bin/gst-device-monitor-1.0"
"share/man/man1/gst-device-monitor-1.0.1.gz"
]).overrideAttrs (base: {
# XXX the binaries need `GST_PLUGIN_SYSTEM_PATH_1_0` set to function,
# but nixpkgs doesn't set those (TODO: upstream this!)
nativeBuildInputs = (base.nativeBuildInputs or []) ++ [
pkgs.wrapGAppsNoGuiHook
];
buildInputs = (base.buildInputs or []) ++ [
pkgs.gst_all_1.gst-plugins-base #< required to find Audio/Sink
pkgs.gst_all_1.gst-plugins-good #< required to find Audio/Source and Video/Source
pkgs.pipewire #< required for Video/Source (video4linux)
];
});
};
}

View File

@ -0,0 +1,20 @@
# gvfs is used by e.g. nautilus to mount remote filesystems (ftp://, etc)
# TODO: gvfs depends on udisks, depends on gnupg,
# and as part of this `keyboxd` gpg daemon gets started and does background work every minute even though i totally don't use it.
{ config, pkgs, ... }:
let
cfg = config.sane.programs.gvfs;
in
{
sane.programs.gvfs = {
packageUnwrapped = pkgs.gvfs.override {
# i don't need to mount samba shares, and samba build is expensive/flaky (mostly for cross, but even problematic on native)
samba = null;
};
};
services.gvfs = {
inherit (cfg) package;
enable = cfg.enabled;
};
}

View File

@ -1,6 +1,8 @@
{ pkgs, ... }:
{
sane.programs.handbrake = {
buildCost = 1;
sandbox.method = "landlock"; #< also supports bwrap, but landlock ensures we don't write to non-mounted tmpfs dir
sandbox.whitelistDbus = [ "user" ]; # notifications
sandbox.whitelistWayland = true;
@ -15,7 +17,7 @@
# disable expensive sambda dependency; i don't use it.
packageUnwrapped = pkgs.handbrake.override {
ffmpeg-full = pkgs.ffmpeg-full.override {
ffmpeg_7-full = pkgs.ffmpeg_7-full.override {
withSamba = false;
};
};

View File

@ -45,7 +45,7 @@ sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER TTY NICE M_RESIDENT M_PRIV STATE PERCENT_CPU PERCENT_MEM TIME Command
screen:Main=PID USER TTY PRIORITY NICE M_RESIDENT M_PRIV STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view_always_by_pid=0

View File

@ -1,6 +1,8 @@
{ pkgs, ... }:
{
sane.programs.imagemagick = {
buildCost = 1;
sandbox.method = "bwrap";
sandbox.wrapperType = "inplace"; # /etc/ImageMagick-7/delegates.xml refers to bins by absolute path
sandbox.whitelistPwd = true;

View File

@ -1,6 +1,15 @@
{ pkgs, ... }:
{
sane.programs.kdenlive = {
packageUnwrapped = pkgs.kdenlive.override {
ffmpeg-full = pkgs.ffmpeg-full.override {
# avoid expensive samba build for a feature i don't use
withSamba = false;
};
};
buildCost = 1;
sandbox.method = "bwrap";
sandbox.extraHomePaths = [
"Music"
@ -14,12 +23,5 @@
sandbox.whitelistDbus = [ "user" ]; # notifications
sandbox.whitelistDri = true;
sandbox.whitelistWayland = true;
packageUnwrapped = pkgs.kdenlive.override {
ffmpeg-full = pkgs.ffmpeg-full.override {
# avoid expensive samba build for a feature i don't use
withSamba = false;
};
};
};
}

View File

@ -16,6 +16,8 @@
sandbox.whitelistDri = true; #< required
sandbox.whitelistWayland = true;
buildCost = 2;
secrets.".local/share/komikku/keyrings/plaintext.keyring" = ../../../secrets/common/komikku_accounts.json.bin;
# downloads end up here, and without the toplevel database komikku doesn't know they exist.
persist.byStore.plaintext = [

View File

@ -47,6 +47,7 @@ in {
packageUnwrapped = pkgs.koreader-from-src;
sandbox.method = "bwrap"; # sandboxes fine under landlock too, except for FTP
sandbox.net = "clearnet";
sandbox.whitelistDbus = [ "user" ]; # for opening the web browser via portal
sandbox.whitelistDri = true; # reduces startup time and subjective page flip time
sandbox.whitelistWayland = true;
sandbox.extraHomePaths = [

View File

@ -1,6 +1,7 @@
{ ... }:
{
sane.programs.lemoa = {
buildCost = 1;
sandbox.method = "bwrap";
sandbox.net = "clearnet";
sandbox.whitelistDbus = [ "user" ]; # for clicking links

View File

@ -0,0 +1,13 @@
{ ... }:
{
sane.programs.lftp = {
sandbox.method = "bwrap";
sandbox.net = "all";
sandbox.extraPaths = [
"Music"
"Videos/local"
"Videos/servo"
"tmp"
];
};
}

View File

@ -8,7 +8,7 @@
packageUnwrapped = pkgs.libreoffice-fresh;
sandbox.method = "bwrap";
sandbox.whitelistWayland = true;
sandbox.autodetectCliPaths = true;
sandbox.autodetectCliPaths = "existingFile";
sandbox.extraHomePaths = [
# allow a spot to save files.
# with bwrap sandboxing, saving to e.g. ~/ succeeds but the data is inaccessible outside the sandbox,
@ -16,7 +16,7 @@
"tmp"
];
slowToBuild = true;
buildCost = 3;
# disable first-run stuff
fs.".config/libreoffice/4/user/registrymodifications.xcu".symlink.text = ''

View File

@ -30,6 +30,7 @@
];
mime.associations = {
"image/avif" = "org.gnome.Loupe.desktop";
"image/gif" = "org.gnome.Loupe.desktop";
"image/heif" = "org.gnome.Loupe.desktop"; # apple codec
"image/png" = "org.gnome.Loupe.desktop";

View File

@ -1,6 +1,23 @@
{ ... }:
# config is loaded from the first one found:
# - $PWD/config/%model.conf
# - /etc/megapixels/config/%model.conf (SYSCONFDIR)
# - /usr/share/megapixels/config/%model.conf (DATADIR -- maybe this is the package's own directory?)
# debug with:
# - LIBMEGAPIXELS_DEBUG=2 megapixels
# 2 = log level debug. no higher values signify anything
{ pkgs, ... }:
{
sane.programs.megapixels = {
packageUnwrapped = pkgs.megapixels.overrideAttrs (upstream: {
postPatch = (upstream.postPatch or "") + ''
# 2024/04/21: patch it to save photos in a more specific directory
substituteInPlace src/process_pipeline.c \
--replace-fail 'XDG_PICTURES_DIR' 'XDG_PHOTOS_DIR'
# 2024/04/21: patch it so the folder button works
substituteInPlace src/main.c \
--replace-fail 'g_get_user_special_dir(G_USER_DIRECTORY_PICTURES)' 'getenv("XDG_PHOTOS_DIR")'
'';
});
# megapixels sandboxing is tough:
# if misconfigured, preview will alternately be OK, black, or only 1/4 of it will be rendered -- with no obvious pattern.
# adding all of ~ to the sandbox will sometimes (?) fix the flakiness, even when `strace` doesn't show it accessing any files...
@ -16,10 +33,8 @@
sandbox.extraHomePaths = [
".config/dconf" #< else it segfaults during post-process
# ".config/megapixels"
".local/share/applications" #< needed for viewing photos, until i can sort out the portal stuff
".cache/mesa_shader_cache" # loads way faster
"tmp"
"Pictures" #< TODO: make this Pictures/Photos and save photos there
"Pictures/Photos"
# also it addresses a lot via relative path.
];
sandbox.extraPaths = [
@ -37,6 +52,10 @@
sandbox.extraRuntimePaths = [
"dconf" #< else it's very spammy, and slow
];
# XXX(2024/04/21): without this it fails to convert .dng -> .jpg.
# "bwrap: open /proc/34/ns/ns failed: No such file or directory"
sandbox.isolatePids = false;
suggestedPrograms = [ "dconf" ]; #< not sure if necessary
};
}

View File

@ -57,6 +57,7 @@ in
desktopName = "Mimeo";
exec = "mimeo %U";
comment = "Open files by MIME-type or file name using regular expressions.";
noDisplay = true;
})
];

View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
sane.programs.mmcli = {
packageUnwrapped = pkgs.modemmanager-split.mmcli.overrideAttrs (upstream: {
meta = upstream.meta // {
mainProgram = "mmcli";
};
});
# TODO: sandbox
};
}

View File

@ -0,0 +1,80 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.modemmanager;
in
{
sane.programs.modemmanager = {
packageUnwrapped = pkgs.modemmanager-split.daemon.overrideAttrs (upstream: {
postInstall = (upstream.postInstall or "") + ''
sed 's/"root"/"networkmanager"/g' $out/share/dbus-1/system.d/org.freedesktop.ModemManager1.conf \
> $out/share/dbus-1/system.d/networkmanager-org.freedesktop.ModemManager1.conf
'';
meta = upstream.meta // {
mainProgram = "ModemManager";
};
});
# mmcli needs /run/current-system/sw/share/dbus-1 files to function
enableFor.system = lib.mkIf (builtins.any (en: en) (builtins.attrValues cfg.enableFor.user)) true;
suggestedPrograms = [ "mmcli" ];
# bwrap sandboxing works, but requires the real user to be root.
# landlock sandboxing works, and allows the real user to be someone else (like `networkmanager`).
# non-root is very important, because of how many things in e.g. /dev are r/w based on uid=0.
# TODO: have the services run as `networkmanager` user
sandbox.method = "bwrap";
# sandbox.method = "landlock";
sandbox.wrapperType = "inplace"; #< .pc files, GIR files with absolute paths,
sandbox.net = "all"; #< needed for modem bringup
# sandbox.isolatePids = false;
sandbox.capabilities = [
"net_admin"
"net_raw"
];
sandbox.extraPaths = lib.warn "TODO: modemmanager: sandbox more aggressively" [
# "/"
"/dev" #v modem-power + net are not enough
# "/dev/modem-power"
# "/dev/net"
"/proc"
# /run #v can likely be reduced more
"/run/dbus"
"/run/NetworkManager"
"/run/resolvconf"
"/run/systemd"
"/run/udev"
"/sys"
# "/var"
];
};
systemd.services.ModemManager = lib.mkIf cfg.enabled {
aliases = [ "dbus-org.freedesktop.ModemManager1.service" ];
after = [ "polkit.service" ];
requires = [ "polkit.service" ];
wantedBy = [ "network.target" ];
path = [ "/run/current-system/sw" ]; #< so it can find `sanebox`
serviceConfig.Type = "dbus";
serviceConfig.BusName = "org.freedesktop.ModemManager1";
# only if started with `--debug` does mmcli let us issue AT commands like
# `mmcli --modem any --command=<AT_CMD>`
serviceConfig.ExecStart = "${lib.getExe cfg.package} --debug";
# --debug sets DEBUG level logging: so reset
serviceConfig.ExecStartPost = "${lib.getExe config.sane.programs.mmcli.package} --set-logging=INFO";
serviceConfig.Restart = "on-abort";
serviceConfig.StandardError = "null";
serviceConfig.CapabilityBoundingSet = "CAP_SYS_ADMIN CAP_NET_ADMIN";
serviceConfig.ProtectSystem = true;
serviceConfig.ProtectHome = true;
serviceConfig.PrivateTmp = true;
serviceConfig.RestrictAddressFamilies = "AF_NETLINK AF_UNIX AF_QIPCRTR";
serviceConfig.NoNewPrivileges = true;
};
# so that ModemManager can discover when the modem appears
services.udev.packages = lib.mkIf cfg.enabled [ cfg.package ];
}

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