Compare commits

..

2219 Commits

Author SHA1 Message Date
989344f87e geoclue: integrate with gps-share, via avahi
N.B.: this doesn't actually work on moby -- yet. need to fix avahi DNS lookups
2024-06-26 11:22:04 +00:00
90f8d1e042 gps-share: specify /dev path to GPS device 2024-06-26 11:22:04 +00:00
d8ca5f91c3 sane-sysload: add an option to query battery *percent* charged 2024-06-26 10:56:08 +00:00
167bb4d8de servo: transmission: torrent-done: fix typo 2024-06-26 09:21:51 +00:00
6b117fa9bf servo: transmission: torrent-done: implement a TR_NO_HARDLINK option 2024-06-26 09:05:51 +00:00
4b9dcd50fb WIP: ship gps-share on moby 2024-06-26 09:05:27 +00:00
84e6d536d6 gps-share: init at 0.3.1 2024-06-26 08:43:37 +00:00
4c74e53052 servo: transmission: torrent-done: log destructive ops when TR_DEBUG=1 2024-06-26 08:27:16 +00:00
5def8f30ad servo: transmission: torrent-done: fix typos and add a TR_DEBUG option 2024-06-26 08:20:03 +00:00
45dd144b24 servo: transmission: torrent-done: fix dry-run; ensure all destructive ops are actually marked as destructive 2024-06-26 08:09:57 +00:00
66d4b380da servo: transmission: torrent-done: remove more noisy files 2024-06-26 08:01:58 +00:00
8e7da2c956 servo: transmission: split torrent-done script into own file 2024-06-26 07:59:20 +00:00
0f11b9a7b7 mpv: associate with YouTube Shorts videos 2024-06-25 21:17:27 +00:00
d9437bf4aa listparser: switch from buildPythonPackage -> stdenv.mkDerivation 2024-06-24 21:12:38 +00:00
5d1c52d0bc feeds: add buttondown.email 2024-06-24 17:05:10 +00:00
a0dfdb5125 init-feed: lift out of pkgs/ and into scripts/ where its easier to invoke 2024-06-24 17:04:23 +00:00
cbc2ba02a4 python3Packages.listparser: grab from nixpkgs patch instead 2024-06-24 15:07:19 +00:00
ef0adb5689 nixpkgs-wayland: 2024-06-21 -> 2024-06-23 2024-06-24 14:21:48 +00:00
b1bd4399f1 nixpkgs: 2024-06-21 -> 2024-06-24 2024-06-24 14:21:19 +00:00
2b252e3ede sops-nix: 2024-06-16 -> 2024-06-23 2024-06-24 14:20:58 +00:00
9aaf89408a uassets: 2024-06-21 -> 2024-06-23 2024-06-24 14:20:37 +00:00
283ca45c5d sponsorblock: 5.6.1 -> 5.6 ; ublacklist: 8.8.1 -> 8.8.2 2024-06-24 14:19:14 +00:00
7955d90f8d python3Packages.listparser: 0.18 -> 0.20 2024-06-24 12:48:43 +00:00
a06481fbef python3Packages.listparser: fetch from GitHub instead of PyPi" 2024-06-24 12:40:09 +00:00
5db4d73ad6 gpodder: lift listparser out of gnome-feeds
it's being removed in https://github.com/NixOS/nixpkgs/pull/320801 i.e. when i next update nixpkgs
2024-06-24 12:35:52 +00:00
304c8f8e3e docs: eg25-control: elaborate on Almanac v.s. Ephemeris 2024-06-24 00:25:54 +00:00
5a09a2665b secrets: net: add new home wifi creds 2024-06-23 18:16:10 +00:00
209545fc41 refactor: split satellite program into own file
mainly so i have a place to document its GUI :)
2024-06-23 12:44:50 +00:00
1e12566207 moby: disable gpsd
1. i wasn't actually relying on it for anything. 2. it's 100k LoC which runs as root (?), in a totally un-secured systemd service.

i may be enabling something similar like this in the future, to prevent geoclue from deciding to disable the GPS. i'll probably be going with the simpler gps-share or gnss-share for that
2024-06-23 03:53:24 +00:00
9a53cbc833 docs: geoclue: link to forums, git, API docs 2024-06-23 03:53:07 +00:00
439bb5263f switchboard: sandbox 2024-06-22 03:43:23 +00:00
845dba3ca5 modules/vpn: fix deprecation warnings 2024-06-22 03:35:41 +00:00
5e7fe850ec blast-ugjka: 0.6.2 -> 0.7.0 2024-06-22 01:25:26 +00:00
832338488d firefox-extensions.ether-metamask: 11.16.12 -> 11.16.13 2024-06-22 01:24:58 +00:00
86ee95f607 uassets: intra-day bump 2024-06-22 01:24:46 +00:00
5f5e55c98b nixpkgs-wayland: 2024-06-20 -> 2024-06-21 2024-06-22 01:24:26 +00:00
7d59782005 nixpkgs: intra-day bump 2024-06-22 01:24:09 +00:00
62b541012b blast-ugjka: add an updateScript 2024-06-21 19:14:47 +00:00
514197a17f docs: mmcli: include notes for how to enable the gps 2024-06-21 19:11:07 +00:00
143bdf672b ship satellite program
really this only belongs on devices which have a gps unit (i.e. moby).
maybe i'll tune that in the future.
2024-06-21 19:09:43 +00:00
a6c48eda71 geoclue2: remove extraneous appConfig where-am-i whitelisting
it's included by the default nixos service (which whitelists 'geoclue-demo-agent'
2024-06-21 17:49:15 +00:00
a603c3e6bc ols: synthesize cell tower data when no exact match is found 2024-06-21 16:24:13 +00:00
1f48f41927 ols: ship static cell tower position database from opencellid.org 2024-06-21 13:48:28 +00:00
c0d9f05575 python3Packages.ols: point to my own repo, 2023-06-15 -> 2024-06-21 2024-06-21 13:42:02 +00:00
7f46b034f9 opencellid: init at 0-unstable-2024-06-20 2024-06-21 12:55:38 +00:00
ba66378bc0 docs: ols: point to wigle docs and api limits 2024-06-21 11:54:38 +00:00
dcc8168aa0 nixpkgs: update sysvol patch 2024-06-07 -> 2024-06-20 2024-06-21 11:54:07 +00:00
f7d3c26d12 servo: irc: add wigle.net 2024-06-21 11:48:47 +00:00
3d871e8d7c scripts/check-nur: fix (linux-exynos5-mainline was invalid in default eval) 2024-06-21 07:43:33 +00:00
78f4cd9be2 sysvol: 2024-06-13 -> 2024-06-20 2024-06-21 07:25:15 +00:00
f83bac3c2b firefox-extensions -> latest 2024-06-21 07:25:15 +00:00
58de5d661f uassets: 2024-06-15 -> 2024-06-21 2024-06-21 07:25:15 +00:00
599832d59c 2024-06-11 -> 2024-06-16 2024-06-21 07:25:15 +00:00
625cb0992b nixpkgs-wayland: 2024-06-14 -> 2024-06-20 2024-06-21 07:25:15 +00:00
a02f221628 nixpkgs: 2024-06-19 -> 2024-06-21 2024-06-21 07:25:15 +00:00
ad8bcfc09e scripts/deploy: build all hosts before building all variants 2024-06-21 07:25:15 +00:00
815ce6287f scripts/update: fix that the script wasnt building the update scripts before trying to invoke them 2024-06-21 07:25:15 +00:00
0d1d56870f default.nix: copy everything to the nix store before evaluating any of my config 2024-06-21 07:25:15 +00:00
2445b882c2 scripts/update: more debug logging 2024-06-20 22:54:16 +00:00
12465e111e nixpkgs: update xsimd patch 2024-06-20 21:54:06 +00:00
65a0914828 fastcluster/ols: fix cross compilation to moby 2024-06-20 13:33:18 +00:00
dab60e79c1 moby: remove gps.nix 2024-06-20 12:01:10 +00:00
fe57f186cd gpsd: deploy via sane.programs interface 2024-06-20 11:57:09 +00:00
78d66a8b09 ols: pipe stderr > stdout 2024-06-20 11:52:35 +00:00
b2955c9c9d geoclue2: use nixpkgs' service 2024-06-20 11:52:13 +00:00
b0e184b0f0 geoclue: integrate ols/wigle as backend
the wigle API limits are *strict*. probably too strict to actually be useful
2024-06-20 11:35:26 +00:00
3cd97b522c ols: enable
still some more work to do to really integrate this with geoclue
2024-06-20 11:05:15 +00:00
c91681c77c python3Packages.ols: init at at 0.1.0-unstable-2023-06-15 2024-06-20 11:05:15 +00:00
d0d623da15 programs: ship geoclue2 as an actual program
moby probably needs its gps.nix file removed. also this is incomplete due to Mozilla terminating their location services API
2024-06-20 08:40:36 +00:00
0db86d8c86 moby: sway: use Alt as the modifier key 2024-06-20 05:55:12 +00:00
b74dfe7578 crappy: sway: use Alt as the mod key 2024-06-20 05:55:12 +00:00
d1843b6b3d refactor: sway-config -> config, to match its installed name 2024-06-20 05:55:12 +00:00
b482a1dfd6 swaync: disable debug, to un-break DND mode
i'm sick of G_MESSAGES_DEBUG breaking stuff. i must be parsing cli output that gets broken by that, somewhere
2024-06-20 05:24:53 +00:00
5ba74a4055 doc: swaync: fix typo in notify-send example 2024-06-20 05:17:51 +00:00
b3b77e3e62 nwg-panel: stylize with the goal that it uses a bit less space on moby 2024-06-20 02:39:45 +00:00
63bc58a56f playerctl: patch missing refcount tracking to avoid a crash in nwg-panel 2024-06-20 00:46:31 +00:00
efcf8639dc gdb: ship a python-capable gdbinit 2024-06-19 23:03:17 +00:00
90b86dc7fc servo: re-enable transmission and jackett 2024-06-19 21:29:32 +00:00
8bf8d31c5f nwg-panel: record the URL to the upstream PR 2024-06-19 21:28:18 +00:00
2e44abc55d scripts/deploy: fix off-by-one in runOnTarget 2024-06-19 21:05:37 +00:00
9e92069ba3 nwg-panel: migrate the mediaPrevNext patch to something suitable for upstream 2024-06-19 21:04:15 +00:00
2a592a4a15 nwg-panel: disable the music-note icon in playerctl 2024-06-19 20:35:50 +00:00
8ca357ea7f scripts/deploy: add a --reboot option 2024-06-19 20:31:43 +00:00
4f4c05a922 nwg-panel: fix playerctl patch for newest nwg-panel, and also hide the label
hopefully the label is the part which includes the music note icon
2024-06-19 19:40:23 +00:00
7c4be0f4e9 hosts: fix that -min and -light variants were actually identical to the full versions 2024-06-19 11:25:30 +00:00
afea7fe5e7 scripts/deploy: implement a dry-run mode 2024-06-19 11:24:33 +00:00
294f0061bd sxmo-utils: add a deprecation warning 2024-06-19 11:20:49 +00:00
4efe159933 nixpkgs: 2024-06-15 -> 2024-06-19 2024-06-19 10:35:58 +00:00
b7f99c022b nwg-panel: enable sysload by default 2024-06-19 02:04:33 +00:00
b3c5e53156 sane-sysload: implement CPU measurement 2024-06-19 01:58:21 +00:00
91c2b04ab4 sane-sysload: make the format CLI args friendlier 2024-06-19 01:20:36 +00:00
27efb10a27 refactor: rename sane-sysinfo -> sane-sysload 2024-06-19 01:04:06 +00:00
e4e32f46fe nwg-panel: integrate optional sysload executor (WIP; disabled by default) 2024-06-19 01:01:03 +00:00
64b169069a nwg-panel: fix issue that playerctl was being pushed off the bar 2024-06-19 00:47:43 +00:00
c2c15e1ac3 networkmanager_dmenu: sandbox 2024-06-19 00:44:35 +00:00
0b3156c4c7 nmcli: sandbox 2024-06-19 00:44:24 +00:00
1c8551c842 rofi: add a shortcut for configuring WiFi 2024-06-18 23:44:21 +00:00
2755d98b99 sane-open: make sure networkmanager_dmenu shows the keyboard when activated 2024-06-18 23:44:21 +00:00
543108a5dd networkmanager_dmenu: ship 2024-06-18 23:44:21 +00:00
b32d02dc3f programs: add pidof from procps
used by things like networkmanager-dmenu, which i plan to add soon
2024-06-18 23:44:20 +00:00
0bd92ef77e swaync: make the backlight/mpris items configurable 2024-06-18 21:41:15 +00:00
a7df4cc125 lint: swaync: sort config properties 2024-06-18 21:34:04 +00:00
09a615ee62 netns: factor the netns setup/teardown into distinct services, rather than trying to piggyback network-local-commands
idk what network-local-commands is about, nor network-pre.target.
network-pre.target doesn't seem to actually be wanted by anything (?)
2024-06-18 10:36:08 +00:00
8523b406ad todo.md: note that swaync brightness slider does not work 2024-06-18 09:48:35 +00:00
6021da072c replace builtins.toJSON with writers.writeJSON where possible
it gives pretty-printed JSON that's easier to work with
2024-06-18 09:33:17 +00:00
a49abbd123 hosts: add pubkeys for $host-hn 2024-06-18 09:33:17 +00:00
f9091c0b0c netns: ensure that network.target depends on network-pre.target (why doesnt it by default?)
this should fix that servo tries to start wg-ovpns before the netns is configured
2024-06-18 09:07:40 +00:00
bbf8fd5b20 servo: disable almost all WAN stuff (leave only wireguard, as a fallback) 2024-06-18 09:04:13 +00:00
be84747ffc check-uninsane: test FTP over doof (and simplify) 2024-06-18 08:09:06 +00:00
478b443430 doc: sftpgo: note that "/README.md" doesnt work 2024-06-18 07:56:26 +00:00
ded5f6560d check-uninsane: fix ftp test to work when invoked from the wan 2024-06-18 07:55:11 +00:00
c1b3629dcf swaync: fix segfault under load 2024-06-18 07:52:02 +00:00
5879499924 swaync-service-dispatcher: simplify quoting 2024-06-18 06:40:44 +00:00
5a63f294c0 servo: sftpgo: allow fully-anonymous www read access to /pub
this will help me write automated tests for its availability
2024-06-18 05:44:20 +00:00
891a29feeb nwg-panel: fix commands (like lock, shutdown) to not run through swaymsg 2024-06-18 02:51:58 +00:00
0863505877 wifi: add new network 2024-06-18 02:34:27 +00:00
0c922bd63a nwg-panel: fix reboot/shutdown commands to not assume systemd 2024-06-18 02:32:04 +00:00
e04ec4c706 nwg-panel: fix the "lock" button to use the correct screen locker 2024-06-18 02:31:46 +00:00
b0f9733ac8 sway: fix that Super+L didnt have sandbox access to start the screen locker 2024-06-18 02:26:57 +00:00
e2babfc076 nwg-panel: fix clock to always be centered, even if that means overlapped rendering 2024-06-18 01:08:02 +00:00
ef29b569e5 nwg-panel: fix clock size to actually be larger on lappy/desko 2024-06-18 01:07:43 +00:00
6f0a455d0b scripts/check-uninsane: implement --verbose flag 2024-06-17 23:36:52 +00:00
7d6a420c52 sane-vpn: allow sane-vpn do -- [COMMAND] 2024-06-17 23:26:28 +00:00
259143b87e scripts/check-uninsane: fix so ssh servo systemctl --failed actually works on servo, even when ssh key is locked 2024-06-17 23:24:34 +00:00
fce426c318 servo: trust-dns: expose the hn DNS server on port 53
nothing i had was *expecting* it to be on port 1053, and it was just never working (?)
2024-06-17 23:16:00 +00:00
9b794777b5 servo: trust-dns: have the ovpns DNS provider return doof-based addresses instead of WAN-based addresses 2024-06-17 23:14:21 +00:00
3ada668366 servo: expose all wan services also to the doof tunnel 2024-06-17 23:08:08 +00:00
39a39e763d trust-dns: hack to substitute ANATIVE before anything else 2024-06-17 22:44:43 +00:00
50353280d3 servo: port ANATIVE over the doof interface to return the doof IP address 2024-06-17 22:37:50 +00:00
72b8211029 servo: switch ns2.uninsane.org from ovpns -> doof 2024-06-17 22:19:36 +00:00
dbf719b59b scripts/check-uninsane: fix the git.uninsane.org check to work even w/o access to SSH keys 2024-06-17 22:16:23 +00:00
57d7d3821f scripts/check-uninsane: dont rely on ovpns.uninsane.org bootstrap DNS: directly test the known IPv4 address 2024-06-17 22:12:34 +00:00
e86e9fc079 scripts/check-uninsane: add a check for DNS via doofnet 2024-06-17 22:11:02 +00:00
d708b78ebe scripts/check-uninsane: fix ftp check, to not error if README.md exists in the current directory 2024-06-17 22:10:47 +00:00
075418eda1 git: add alias git com to commit 2024-06-17 22:01:58 +00:00
9fc5b83b61 refactor: servo: hardcode OVPN-related IP addresses in far fewer places 2024-06-17 22:00:39 +00:00
4b99607f7b scripts/check-uninsane: annotate the OVPNS/DOOF checks 2024-06-17 09:25:10 +00:00
0d99293b2f servo: split the doof/ovpns netns config into its own module
a big thing this gets me is that the attributes (like IP addresses) are now accessible via 'config' an i won't have to hardcode them so much
2024-06-17 09:25:10 +00:00
b3890b82dc servo: http/https: expose to doof 2024-06-17 07:55:53 +00:00
3fc96a3e32 check-uninsane: also test http://uninsane.org, over OVPN connection 2024-06-17 07:50:15 +00:00
1af7b613bd servo: doof: respond to DNS queries 2024-06-17 07:39:52 +00:00
4c8695aae8 servo: fix missing route table for doof 2024-06-17 07:31:28 +00:00
d45e3fda5e servo: trust-dns: enable on doof-net 2024-06-17 07:20:23 +00:00
456e0de872 servo: doof net: add the capability to forward ports 2024-06-17 07:20:23 +00:00
7825ddc123 servo: split out a "bridgedWireguardNamespace" helper for configuring ovpns VPN
i can re-use this to forward traffic over doof
2024-06-17 07:20:23 +00:00
dd47a5083c servo: only forward ports to OVPN which are actually marked for visiblity 2024-06-17 06:29:09 +00:00
14d5d9eb5a servo: net: remove dead Hurricane Electric code 2024-06-17 06:04:29 +00:00
1f6f2399d6 nwg-panel: fix swaync icon 2024-06-16 06:35:32 +00:00
b0ee12ba7b modules/users: export HOME in environment.d because some services (nwg-panel) need it 2024-06-16 06:01:20 +00:00
a6d268ca72 nwg-panel: disable the brightness indicator 2024-06-16 05:42:58 +00:00
1ecc033ff5 nwg-panel: re-add missing style.css 2024-06-16 05:27:32 +00:00
c87dab93b3 scripts/deploy: allow specifying multiple hosts or multiple variants 2024-06-16 05:15:12 +00:00
53139a7cdf nwg-panel: address some TODOs 2024-06-16 04:59:23 +00:00
f37014a856 nwg-panel: minor tweaks & simplifications 2024-06-15 22:52:52 +00:00
0237d3a144 nwg-panel: fix broken JSON generation
heh, whoops
2024-06-15 22:24:41 +00:00
656ad76f25 nwg-panel/config: sort keys 2024-06-15 22:04:08 +00:00
b7c71dc67b nwg-panel: add a few comments/TODOs to the config 2024-06-15 21:56:41 +00:00
aaa40eae04 nwg-panel: port config to Nix
this makes it easier to plumb config into it, and also to comment it
2024-06-15 21:52:38 +00:00
d8ed82cfdf cross: remove upstreamed libvpx patch 2024-06-15 11:37:20 +00:00
0e73f95ab1 nixpkgs: 2024-06-14 -> 2024-06-15 2024-06-15 11:16:40 +00:00
b1ba0cad03 nixpkgs-wayland: minor bump 2024-06-15 11:16:32 +00:00
4bcbfbc8aa uassets: 2024-06-14 -> 2024-06-15 2024-06-15 11:16:16 +00:00
0f6c9f3cde sane-sysinfo: add a way to render memory use 2024-06-15 11:12:45 +00:00
f4d806c0c2 sane-sysinfo: handle the case of no battery 2024-06-15 10:35:32 +00:00
6963998519 refactor: sane-sysinfo: more cleanups 2024-06-15 10:34:39 +00:00
a63f6281c5 refactor: sane-sysinfo: clean up a bit more 2024-06-15 10:26:22 +00:00
df0a8cf900 refactor: sane-sysinfo: split out a BatteryInfo class 2024-06-15 09:46:58 +00:00
a4f5343fb5 sane-sysinfo: port to Python
it's a pretty literal port; probably has some bugs
2024-06-15 08:59:50 +00:00
c50a4d1d71 static-nix-shell: fix mkBash scripts to actually be invokable from the CLI
they need the `bash` package! how did this work before?
2024-06-15 07:42:04 +00:00
aadbeab3ac doc: nwg-panel: point out that it really is ok to build w/o wlr-randr 2024-06-15 06:53:38 +00:00
aafcf7b478 lift sane-battery-estimate out of conky, rename to sane-sysinfo 2024-06-15 06:52:54 +00:00
a78b840215 nwg-panel: enable per-app volume controls 2024-06-15 03:59:36 +00:00
3c2347faba nwg-panel: fixup the formatting
especially, make it fit on moby
2024-06-15 03:49:01 +00:00
ebff35a378 add missing sane-nix-files
hmm. not great that i could deploy even without this being checked into git....
2024-06-15 03:37:19 +00:00
1515f01384 zsh: add alias: :fg -> fg 2024-06-15 03:26:36 +00:00
60a5c61500 default.nix: pass through host config and fs 2024-06-15 03:18:16 +00:00
417b85450c tod.md: notes about nwg-panel cleanup 2024-06-15 00:54:01 +00:00
2e0a3dc8ef nwg-panel: fix cross-compiled result to not ship build-time dependencies 2024-06-15 00:52:31 +00:00
3165c95d0f sysvol: 2024-06-09 -> 2024-06-13 2024-06-15 00:28:03 +00:00
6dd4d9da3e uassets: 2024-06-12 -> 2024-06-14 2024-06-15 00:19:40 +00:00
5a086b359d nixpkgs-wayland: 2024-06-12 -> 2024-06-14 2024-06-15 00:19:25 +00:00
a204f0a987 nixpkgs: 2024-06-12 -> 2024-06-14 2024-06-15 00:18:41 +00:00
317251338c todo.md: note that s6 is not re-entrant 2024-06-14 20:26:30 +00:00
01cfed2438 scripts/deploy: swap the iteration order: build all hosts at -min variant, then -light, etc; then also do the -next variants 2024-06-14 20:24:50 +00:00
ba0524d193 scripts/update: dont update feeds by default 2024-06-14 18:29:06 +00:00
26a4f20f6c scripts/deploy: factor out a deployHelper to make variant=all usable *without* host=all 2024-06-14 18:28:52 +00:00
46f5a7e37d nwg-panel: patch it to cross compile (by purging bluetooth/randr) 2024-06-14 09:34:17 +00:00
88a487f565 /etc/nixos: link in such a way that i dont pick up a whole bunch of garbage
it seemed to also be causing some non-determinism when deploying to crappy

ideally i would seal the whole nix build, by only evaluating all this config *after* building 'sane-nix-files'
2024-06-14 09:18:15 +00:00
d037afd75c sane-nix-files: define this repo as a package
setup as a dirty git repo, intentionally
2024-06-14 09:18:15 +00:00
654858f8ff nwg-panel: theme the calendar 2024-06-14 09:17:46 +00:00
5abcc7d399 nwg-panel: fix @workspaceNumbers typo 2024-06-14 08:50:28 +00:00
65823507ad nwg-panel: make workspace numbers/hiding configurable 2024-06-14 08:47:24 +00:00
63a88da3b4 moby: switch from waybar -> nwg-panel 2024-06-14 08:47:24 +00:00
734da36639 nwg-panel: make configurable through nix 2024-06-14 08:47:24 +00:00
49ccf95fb3 nwg-panel: style.css: fix line endings?
idk, i just copied + pasted the contents back, and now the file is 200B smaller and i dont see ^M in git
2024-06-14 08:47:24 +00:00
e70d0f3c8e nwg-panel: style.css: fix indentation 2024-06-14 08:47:24 +00:00
c00cccd429 nwg-panel: disable the green border hover for *all* items 2024-06-14 08:47:24 +00:00
02fdc91237 sway: switch from waybar -> nwg-panel (except for moby) 2024-06-14 08:47:24 +00:00
14616f9b61 nwg-panel: stylize 2024-06-14 08:47:24 +00:00
f9d856b3bb waybar: fix typo 2024-06-14 08:47:24 +00:00
d52db06ffe nwg-panel: implement, but dont ship by default 2024-06-14 08:47:24 +00:00
Shelvacu
dc2c31f220 gitea: keep login session alive for 30 days 2024-06-14 03:34:42 +00:00
52322e3207 switchboard: fix cross compilation 2024-06-14 03:29:02 +00:00
26f1f2b581 remove unused flake.lock file 2024-06-14 03:08:07 +00:00
74c188012a todo.md: install folio 2024-06-13 20:53:16 +00:00
e0c741427e ship "switchboard" program, for configuring bluetooth/network/sound 2024-06-13 19:51:19 +00:00
999a173001 sane-tag-music: --trackno "" fix-tags FOO can be used to clear FOOs track number field 2024-06-13 08:22:57 +00:00
330a64d820 feeds: add xorvoid.com 2024-06-13 04:46:12 +00:00
2e2f5dd373 scripts/sync: remove unnecessary sudo calls when mounting 2024-06-13 03:15:58 +00:00
5561dde31d readme: update for a flake-free world 2024-06-13 03:14:27 +00:00
c3ae60d71b flake.nix: remove (no longer used) 2024-06-13 03:09:45 +00:00
1c79209e23 scripts/sync: lift out of flake 2024-06-13 03:09:02 +00:00
6d1db1ee67 feeds: update metadata 2024-06-13 03:03:15 +00:00
88d462764f feeds: fix to work with scripts/update 2024-06-13 02:18:30 +00:00
8f634d9bb0 todo.md: address the sudo-related items 2024-06-13 01:30:44 +00:00
3e35210e4b systemd: allow wheel users to start/stop any service 2024-06-13 01:30:18 +00:00
04f4d330a8 programs: enable free 2024-06-13 01:09:48 +00:00
ce60e53b9a programs: add ps 2024-06-13 01:04:24 +00:00
3ff9f974a6 programs: enable watch 2024-06-13 00:59:34 +00:00
11e9ad5eca unl0kr.conf: fix formatting 2024-06-13 00:13:33 +00:00
bf99a64b89 unl0kr: fix that unl0kr wasnt always visible (so, wait for /dev/fb0 to appear before launch) 2024-06-13 00:13:19 +00:00
3b43562841 todo.md: address completed moby input-still-enabled-when-screen-off issue 2024-06-13 00:12:26 +00:00
131e43e975 scripts/deploy: avoid ssh-based copies to self 2024-06-13 00:12:00 +00:00
e34a9957e3 hosts/common/nix: migrate the nixpkgs-overlay integration point (part 2) 2024-06-12 23:32:18 +00:00
ea1a0b72b5 hosts/common/nix: migrate the nixpkgs-overlay integration point (part 1)
this has to be done in two steps to avoid nix-daemon bugs
2024-06-12 23:20:37 +00:00
aab9ed0d35 zsh: switch: pass through args 2024-06-12 23:09:35 +00:00
f477370e4c scripts/deploy: add more logging 2024-06-12 23:09:32 +00:00
b5fc8cfd4e scripts/deploy: when deploying all machines, dont let one failed deployment abort the whole job 2024-06-12 23:09:27 +00:00
4fdaacf8ad nit: use pkg.extend in place of pkgs.appendOverlays where applicable 2024-06-12 23:09:16 +00:00
f1705686b8 fix: dont double-apply overlays
previous behavior was that overlays were *implicitly* applied when i
imported nixpkgs, and then explicitly applied again later in the config.

for some reason i can't remove (or adjust?) the implicit application
without causing evals to hang w/o so much as any error message.
2024-06-12 23:08:04 +00:00
0d0fa8b37f nixpkgs: 2024-06-11 -> 2024-06-12 2024-06-12 09:42:55 +00:00
b5b39d1500 scripts/deploy: add the equivalent of my "pre-deploy" functionality 2024-06-12 09:04:17 +00:00
86482e922c scripts/update: add a --dry-run option 2024-06-12 08:44:02 +00:00
111c69b368 firefox.extensions.metamask: 11.16.8 -> 11.16.9 2024-06-12 08:37:59 +00:00
60c13d34a7 nixpkgs-wayland: 2024-06-08 -> 2024-06-12 2024-06-12 08:37:35 +00:00
823d064ab0 sops-nix: 2024-06-03 -> 2024-06-11 2024-06-12 08:35:54 +00:00
3f88d750c6 uassets: 2024-06-08 -> 2024-06-12 2024-06-12 08:35:34 +00:00
05f29ba01e sysvol: 2024-06-07 -> 2024-06-09 2024-06-12 08:35:22 +00:00
2b11bac1eb scripts: add an "update" script to update all my packages
it probably doesnt update feeds yet, though
2024-06-12 08:29:45 +00:00
86adc38537 zsh: fix switch alias for a post-flake world 2024-06-12 08:29:08 +00:00
b787289b39 scripts/deploy: if no host is specified, then deploy to the current host 2024-06-12 07:44:21 +00:00
63f3b8e89b handbrake: disable until i fix the build 2024-06-12 07:40:29 +00:00
448b8007ca scripts: remove outdated flake update script 2024-06-12 07:11:41 +00:00
9fc4119275 mesa-demos: deploy 2024-06-12 07:11:41 +00:00
8f1332797d crappy: dont auto-start messengers 2024-06-12 07:11:41 +00:00
368184e24f flake: add a crappy-min-next deploy target 2024-06-12 07:11:41 +00:00
c8e73d3f76 crappy: add user to "render" group 2024-06-12 07:11:41 +00:00
43da4955b7 crappy: deploy linux-exynos5-mainline kernel 2024-06-12 07:11:41 +00:00
46e9d5f758 programs: fix s6 deps when dbus isnt enabled 2024-06-12 07:11:41 +00:00
66a012b555 nixpkgs: 2024-06-08 -> 2024-06-11
i haven't actually deployed this yet: i'm pulling it for crappy-staging, but had to update all branches because the trust-dns patch didn't apply cleanly
2024-06-12 07:11:41 +00:00
fff965ab9b linux-postmarketos-exynos5: build with LIMA/MALI enabled as well (experimental) 2024-06-12 07:11:41 +00:00
406adde549 scripts/deploy: skip the signing step if we have no signing key 2024-06-12 07:11:14 +00:00
c9b2699c9f nixpkgs: fix sysvol patch hash 2024-06-12 07:03:23 +00:00
f91d3e35f3 flake: port deploy script to its own thing 2024-06-12 05:48:03 +00:00
4712ba9f2d check-nur: extract from the flake 2024-06-12 02:50:51 +00:00
03b2f2a433 rename health-check -> check-uninsane so i can expand the checks 2024-06-12 02:35:07 +00:00
51b1a6e679 default.nix: define attributes necessary to build any of my hosts or their packages 2024-06-12 02:21:50 +00:00
f148e5a580 pkgs: fix infinite recursion when evaluating nix-build -A MY_PKG 2024-06-12 01:18:17 +00:00
079f945f38 unl0kr: 2.0.0 -> 3.2.0 2024-06-12 00:49:26 +00:00
29cc7e4676 flake: add targets to deploy to crappy 2024-06-12 00:49:14 +00:00
11c97fd4c0 crappy: actually enable landlock 2024-06-11 00:47:30 +00:00
a5cb989c59 hosts/common: add remote /mnt/crappy/home mount 2024-06-11 00:36:18 +00:00
3d77a7cbc9 secrets/common: allow crappy to access these secrets 2024-06-11 00:27:37 +00:00
8e7401955f hosts/common: add crappy's pubkey/lan IP 2024-06-11 00:27:14 +00:00
fa605768e7 hosts/common: enable ALL firmware -- not just the "redistributable" stuff 2024-06-11 00:26:52 +00:00
3c279edd31 feeds: unsubscribe from Vsauce 2024-06-11 00:26:17 +00:00
a736d6d77b crappy: get it to load the firmware required for its wifi chipset (mwifiex_sdio) 2024-06-11 00:26:02 +00:00
8ad118162e doc: how to recover or add new hosts 2024-06-11 00:25:00 +00:00
5c13bb20d7 crappy: test (but dont deploy) a linux_latest kernel w/ panel patch
it doesn't boot, not sure why
2024-06-10 21:26:59 +00:00
170d36fc05 crappy: fix u-boot boot order to include usb 2024-06-10 06:07:53 +00:00
b828edf3c7 hal/samsung: remove some dead code 2024-06-10 03:49:43 +00:00
e10dfaefe9 hal/samsung: test a bunch of different kernels; enable linux_latest which works if i patch it 2024-06-10 03:48:31 +00:00
49e1a85afb linux-postmarketos-exynos5: test some patches for enabling graphics output on later kernels 2024-06-10 03:47:35 +00:00
56dfe8baa8 linux-exynos5-mainline: init
it builds, but is not bootable on samsung chromebook
2024-06-09 20:35:13 +00:00
95685fe91f linux-postmarketos-*: factor out a sane-kernel-tools helper set 2024-06-09 19:34:07 +00:00
8f6b4cc551 refactor/rename: linux-postmarketos -> linux-postmarketos-allwinner 2024-06-09 18:43:38 +00:00
89c9733ed2 linux-postmarketos-exynos5: add "optimizeForSize" option 2024-06-09 18:40:38 +00:00
ec29ec76f0 swayidle: fix that input events werent suppressed during screen-off 2024-06-09 18:36:57 +00:00
0f97e3d7ed sane-input-handler: fix that input events werent suppressed during screen-off
note that this doesn't fix input gating during the
screenoff-after-inactivity case.
2024-06-09 18:28:31 +00:00
6fb5cedd69 linux-postmarketos-exynos5: allow overriding the linux version 2024-06-09 17:48:46 +00:00
0382af1fae linux-postmarketos-exynos5: actually, i dont need to build with CC_OPTIMIZE_FOR_SIZE=y 2024-06-09 07:00:26 +00:00
b24b68a6bd mpv: switch to mainline mpv 2024-06-09 06:48:43 +00:00
952da0f314 sysvol: build via the package as it will appear in nixpkgs 2024-06-09 06:34:09 +00:00
cb32dc99cd sysvol: fix background transparency 2024-06-09 01:50:39 +00:00
5e7a05c183 sysvol: remove unused finalAttrs 2024-06-09 01:11:54 +00:00
656b478cc0 nixpkgs: remove ancient commented-out patches 2024-06-09 00:55:28 +00:00
fbbc0eb294 nixpkgs: cleanup patching implementation 2024-06-09 00:52:01 +00:00
502c9d1db3 nixpkgs: 24.05-unstable-2024-06-xx -> 24.05-unstable-2024-06-08 2024-06-09 00:48:52 +00:00
36934eedfd nixpkgs-wayland: 0-unstable-2024-06-xx -> 0-unstable-2024-06-08 2024-06-09 00:48:26 +00:00
56f982e214 delfin: remove
it's in nixpkgs now, and the co-maintainer is doing a very good job with it
2024-06-09 00:17:04 +00:00
54c4cd53b3 firefox-extensions: ether-metamask, sponsorblock, ublacklist -> latest 2024-06-09 00:01:12 +00:00
1c4fc335b3 uassets: 0-unstable-2024-05-27 -> 0-unstable-2024-06-08 2024-06-09 00:00:44 +00:00
21d3f41b38 signal-desktop-from-src: 7.8.0 -> 7.11.1 2024-06-09 00:00:27 +00:00
031ce236f3 firefox-extensions: fix the update script to not grab betas for u-block 2024-06-08 23:43:35 +00:00
a4eb073918 signal-desktop-from-src: fix the update script to ignore betas 2024-06-08 23:13:56 +00:00
75ae868bde nixpkgs: don't fail build if a patch has already been applied 2024-06-08 22:49:55 +00:00
b6d9d58a14 firefox-extensions.bypass-paywalls-clean: disable updateScript 2024-06-08 22:08:25 +00:00
14a5b8d9f2 nixpkgs: get the updateScripts to be populated into me update.pkgs.* attrs 2024-06-08 22:01:33 +00:00
ede68b563e nixpkgs-{staging,next}: add an update script 2024-06-08 21:15:47 +00:00
33f4db254d nixpkgs: add an update script
this only updates the master branch -- for now
2024-06-08 20:44:23 +00:00
6e8cb1bbb2 nixpkgs-wayland: add an update script 2024-06-08 20:24:56 +00:00
b00fb22137 sops-nix: add an update script 2024-06-08 20:22:04 +00:00
4d74c2ede6 sysvol: 0-unstable-2024-04-11 -> 0-unstable-2024-06-07 2024-06-08 20:11:07 +00:00
c4c5a640ce sysvol: add an update script 2024-06-08 19:58:29 +00:00
514fbca3f1 gitea: enable push-to-create for new repositories 2024-06-08 03:46:52 +00:00
71a19e247f fix check.nur (dont use builtin fetchers when stdenv ones are available) 2024-06-08 03:28:47 +00:00
Shelvacu
bcab89dbfb gitea: enable push-to-create for new repositories 2024-06-07 20:27:43 -07:00
f219c59ad5 nixpkgs: acquire via builtins.fetchGit instead of flake
i'll probably delete this toplevel flake at some point as well
2024-06-08 01:37:47 +00:00
197df696be uninsane-dot-org: acquire by fetchFromGitea instead of flake 2024-06-07 22:52:07 +00:00
c9b7f58f3d sops-nix: acquire via fetchFromGitHub instead of flake
i don't like the hacks i have to do to mix `fetchFromGitHub` and nixos
modules though.
2024-06-07 22:40:53 +00:00
6b8371c32b nixpkgs-wayland: import by fetchFromGitHub instead of via flake 2024-06-07 21:29:45 +00:00
11cdac0357 mobile-nixos: import by fetchFromGitHub instead of via flake 2024-06-07 21:15:54 +00:00
8b607ddefd nixpkgs: 2024-06-05 ->2024-06-07; nixpkgs-wayland
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/f1f4d07f9015e5da5fe416e87c6bbd9f569a5c60' (2024-06-05)
  → 'github:nixos/nixpkgs/5aa86ae5585cd46299ee46682fda8a9b76baf2ae' (2024-06-07)
• Updated input 'nixpkgs-staging-unpatched':
    'github:nixos/nixpkgs/d7993cebbcd4f9f3a07a8d418853b586d301be56' (2024-06-05)
  → 'github:nixos/nixpkgs/da9d22446697971278edcd4af92f63221f7d21f6' (2024-06-07)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/c3759101288ea92aec42ab7b8aed4e967cfb8eb3' (2024-06-04)
  → 'github:nixos/nixpkgs/716a7056386dcc67eb3b813289499d6329d4befc' (2024-06-07)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/93b225ddba91179248b378913a91defbc6aeb899' (2024-05-31)
  → 'github:nix-community/nixpkgs-wayland/8e2d180329f4009ac06042b50ca0a356722aea19' (2024-06-07)
• Updated input 'nixpkgs-wayland/flake-compat':
    'github:nix-community/flake-compat/8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c' (2023-06-29)
  → 'github:nix-community/flake-compat/38fd3954cf65ce6faf3d0d45cd26059e059f07ea' (2024-06-02)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/dbc9130fe1455e0f6ee4d8f5f799f9be551f866b' (2024-05-26)
  → 'github:nix-community/lib-aggregate/64d43e2bbc6eab8d1cbdfba96d90a71e15a847d7' (2024-06-02)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/d0d27192931680482081aa1c38389da2af84a651' (2024-05-26)
  → 'github:nix-community/nixpkgs.lib/e090cb30ae82f4b4461aafdb808847c6c97b08c2' (2024-06-02)
• Updated input 'nixpkgs-wayland/nix-eval-jobs':
    'github:nix-community/nix-eval-jobs/bb95091f6c6f38f6cfc215a1797a2dd466312c8b' (2024-05-15)
  → 'github:nix-community/nix-eval-jobs/b6169e08e76e10b673d1b54f944cddb1e7cbea97' (2024-06-06)
```
2024-06-07 09:08:24 +00:00
10158bb444 rename snowy -> crappy
get it? it's the crappy version of lappy
2024-06-07 08:04:57 +00:00
1dd10450f2 modules/image: remove extraneous sane.image.enable option 2024-06-07 07:42:47 +00:00
e104499636 modules/hal/samsung: cleanup 2024-06-07 07:39:30 +00:00
56cd1f211c scripts/update: expand 2024-06-07 07:34:51 +00:00
14f4f1e80d hosts: add snowy
the Samsung Chromebook thing
2024-06-07 07:34:35 +00:00
52a0e8cf53 modules/hal/samsung: init
this can be used to get baseline support for samsung exynos5 chromebook

i should probably rename it, in time
2024-06-07 07:33:46 +00:00
50450fe7fe brave: fix eval error on armv7l 2024-06-07 07:32:24 +00:00
4a4ffadc64 fractal-nixified: fix cross to armv7l 2024-06-07 07:32:08 +00:00
8807140c83 neovim: fix cross to armv7l 2024-06-07 07:31:44 +00:00
adc811efa1 libvpx: fix cross to armv7l 2024-06-07 07:31:27 +00:00
d8fed884d0 programs: steam: move from pcGuiApps -> pcGameApps 2024-06-07 07:30:56 +00:00
d75f59ba06 modules/image: increase the default boot partition size from 512 MiB -> 1024 MiB 2024-06-07 07:29:50 +00:00
aa0a395353 nit: fix image output to be a file, not an item inside a folder 2024-06-07 07:28:56 +00:00
56d84dea4d hosts: remove unused (defaulted) option: boot.loader.efi.canTouchEfiVariables 2024-06-07 07:27:34 +00:00
3aa2ece59b modules/programs: convert lib.optionalAttrs to mkIf
this allows stuff to be lazier
2024-06-07 07:26:07 +00:00
07239d2a75 nixpatches: link to outstanding libvpx fix 2024-06-07 07:25:36 +00:00
3fd5e15e93 linux-postmarketos-exynos5: init
i'll need this for a default chromebook install
2024-06-07 07:24:48 +00:00
97d56b0314 flake: add a pkgs.python template 2024-06-07 07:23:35 +00:00
c18554dfbd depthcharge-tools: init at 0.6.2 2024-06-07 07:22:18 +00:00
8105e00b39 refactor: make system.stateVersion common across all hosts.
otherwise it's hairy to share nixos configs/modules between them

note that this alters the stateVersion for desko/lappy/rescue, but unlikely to matter
2024-06-04 15:58:53 +00:00
7e32fab5d4 refactor: moby: split more stuff out of the toplevel config and hide behind roles/etc 2024-06-04 15:58:51 +00:00
25298c9be6 lappy: remove unused xkb_mobile_normal_buttons 2024-06-04 14:40:03 +00:00
e61549d917 moby: split remaining polyfill into roles.handheld 2024-06-04 14:38:32 +00:00
eca14a644b refactor: moby: lift some of the polyfill out to pine64 hal 2024-06-04 14:36:46 +00:00
3937121522 refactor: moby: split pinephone-specific stuff into sane.hal.pine64 2024-06-04 14:35:34 +00:00
b334db28c6 refactor: hide x86_64-specific host config in a module 2024-06-04 14:26:24 +00:00
b52057e317 refactor: split "quirks.nix" out of hosts/common/hardware/default.nix 2024-06-04 14:14:22 +00:00
414ab85e20 refactor: move hosts/common/hardware/default.nix into hosts/common/boot.nix 2024-06-04 14:12:28 +00:00
82133a8f16 refactor: move logind config into systemd.nix 2024-06-04 14:09:58 +00:00
43a63d4f6e hosts/modules: remove unused yggdrasil 2024-06-04 13:58:49 +00:00
9f9fc7d65b moby: also sync books from servo 2024-06-04 10:08:25 +00:00
79d395e01c nixpkgs: 2024-06-03 -> 2024-06-04, sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/c987c730bbf2121264ebd68921b443db5bb28543' (2024-06-03)
  → 'github:nixos/nixpkgs/6a56765581a4dcf961a90faf54d32edb991bd315' (2024-06-04)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/77a51024c0f953d503eb3ed364aa4bff378649f8' (2024-06-03)
  → 'github:nixos/nixpkgs/c3759101288ea92aec42ab7b8aed4e967cfb8eb3' (2024-06-04)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/ab2a43b0d21d1d37d4d5726a892f714eaeb4b075' (2024-06-02)
  → 'github:Mic92/sops-nix/d4555e80d80d2fa77f0a44201ca299f9602492a0' (2024-06-03)
```
2024-06-04 06:35:29 +00:00
394259fe21 modemmanager: harden systemd service 2024-06-03 16:41:51 +00:00
8c256c629b networkmanager: harden further with NoNewPrivileges and PrivateTmp 2024-06-03 16:23:22 +00:00
0e2d86ac96 NetworkManager-dispatcher: note why we cant use DynamicUser 2024-06-03 15:57:41 +00:00
e2a1e6730d NetworkManager-dispatcher: harden systemd service 2024-06-03 15:44:22 +00:00
a1e923f999 networkmanager: tighten ProtectSystem to "strict" 2024-06-03 15:10:14 +00:00
09333c992c wpa_supplicant: harden systemd service 2024-06-03 15:09:32 +00:00
80eb385c64 networkmanager: restrict service (using systemd options) 2024-06-03 14:27:00 +00:00
f6725f60b9 networkmanager: re-introduce my polkit patches 2024-06-03 13:04:48 +00:00
2f1592376d document more sandbox limitations 2024-06-03 11:59:44 +00:00
42fed64b75 NetworkManager: split specific config options out of my main net/default.nix file 2024-06-03 11:24:38 +00:00
682143d47f NetworkManager: 1.46.0 -> 1.48.0
mostly so i can review the PR and get this update mainlined sooner :)
2024-06-03 11:23:33 +00:00
1448cb4444 sane-reboot: fix operation on servo 2024-06-03 09:33:35 +00:00
2d07ff966b health-check: mention failed systemd services 2024-06-03 09:30:02 +00:00
83404f6769 nixos/networkmanager patch: grab via PR 2024-06-03 07:49:53 +00:00
c6bb6e2e3c megapixels-next: fix broken eval of metadata 2024-06-03 05:35:09 +00:00
9d109644b7 nixpkgs: 2024-06-01 -> 2024-06-03; sops-nix -> 2024-06-02
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/f7de25c01e4c073c06e0525226a0c2311d530cee' (2024-06-01)
  → 'github:nixos/nixpkgs/c987c730bbf2121264ebd68921b443db5bb28543' (2024-06-03)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/61c1d282153dbfcb5fe413c228d172d0fe7c2a7e' (2024-06-01)
  → 'github:nixos/nixpkgs/77a51024c0f953d503eb3ed364aa4bff378649f8' (2024-06-03)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/962797a8d7f15ed7033031731d0bb77244839960' (2024-05-26)
  → 'github:Mic92/sops-nix/ab2a43b0d21d1d37d4d5726a892f714eaeb4b075' (2024-06-02)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/59a450646ec8ee0397f5fa54a08573e8240eb91f' (2024-05-25)
  → 'github:NixOS/nixpkgs/3b1b4895b2c5f9f5544d02132896aeb9ceea77bc' (2024-06-01)
```
2024-06-03 05:31:28 +00:00
0050403b31 scripts: add an update helper
someday i can extend this for updating packages and feeds too
2024-06-03 05:30:03 +00:00
e4bcbab224 hosts: networking: switch to using nixos NetworkManager/ModemManager/etc, just patched for hardening 2024-06-02 11:22:03 +00:00
1b85aa0441 networkmanager/modemmanager: get closer to nixpkgs upstream
i've seen enough, that there's a path toward getting nixos proper to sandbox this in a way i'm happy with -- in time
2024-06-02 08:56:38 +00:00
f5e5d1bcc4 networkmanager: fix polkit integrations when running not as root
now nmcli/etc work
2024-06-02 05:10:11 +00:00
30d41f82f2 refactor: networkmanager: use substitute instead of sed when patching 2024-06-01 22:16:18 +00:00
62dbad3486 polyunfill: remove a few more default systemPackages 2024-06-01 21:06:40 +00:00
4287ecf0ed polyfill: don't ship unused mtools package 2024-06-01 20:15:04 +00:00
b13ca92b72 polyfill: remove boot.{enableContainers,bcache} 2024-06-01 20:14:49 +00:00
45e121eb1c make-sandboxed: preserve meta.mainProgram 2024-06-01 20:01:24 +00:00
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
03bec6aab2 coppwr: init at 1.5.1-unstable-2024-03-28 (4e7239d4bd5b2f24f7ebec0a02c1054648a4425c) 2024-04-06 23:42:25 +00:00
3aba91b360 mpv: fix race condition in uosc/ao-volume monitoring 2024-04-06 23:41:59 +00:00
907933612d htop: statically populate config 2024-04-06 23:41:59 +00:00
0db546bf82 nixpkgs: 2024-04-05 -> 2024-04-06
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/9a0c25978d78416219718437fd7e618668d9ad74' (2024-04-05)
  → 'github:nixos/nixpkgs/7c74352f2f7eca1925729f5c9c80cb89df8e74a2' (2024-04-06)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/3541c7628de9414f999ced044c95a284584f4ec1' (2024-04-05)
  → 'github:nixos/nixpkgs/c58702222e0a29fd01cc42d70737d699995f6389' (2024-04-06)
```
2024-04-06 10:20:03 +00:00
b4877a488e discord: add media into sandbox 2024-04-06 09:36:55 +00:00
4b3975367a fix warnings: remove xdg-desktop-portal patch; fix mautrix-meta enable logic 2024-04-05 21:40:42 +00:00
38c8d96e5a nixpkgs: 2024-04-04 -> 2024-04-05; nixpkgs-wayland -> 2024-04-04
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/1ea9e4ecab5010d29f557f7a1f8bb26ad3afd686' (2024-04-04)
  → 'github:nixos/nixpkgs/9a0c25978d78416219718437fd7e618668d9ad74' (2024-04-05)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e52ada4e6beea931c244bf8cc4a75d8a07d62373' (2024-04-04)
  → 'github:nixos/nixpkgs/3541c7628de9414f999ced044c95a284584f4ec1' (2024-04-05)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/30aa5f8c558cd8a699f9a9227cf7310f291f1e29' (2024-04-03)
  → 'github:nix-community/nixpkgs-wayland/9b77653338f52da4b498abdf4835efb6ff6e453e' (2024-04-04)
```
2024-04-05 09:28:25 +00:00
28110c3e85 fix system hang during vim ctrl+z (disable io_uring in libuv) 2024-04-05 07:29:55 +00:00
43aa498ff9 mpv: fix uosc touch controls 2024-04-05 07:29:15 +00:00
f7e4504764 pict-rs: remove no-transcoding patch (it doesnt apply anymore) 2024-04-04 19:09:12 +00:00
4942fa8a38 nixpkgs: 2024-04-02 -> 2024-04-04
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/7a5ee8d0c786f9fd789b5bb07245d2a8b12193a4' (2024-04-02)
  → 'github:nixos/nixpkgs/1ea9e4ecab5010d29f557f7a1f8bb26ad3afd686' (2024-04-04)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/7ab59131642a42b92f4d6554173ef9a35cbb39f0' (2024-04-02)
  → 'github:nixos/nixpkgs/e52ada4e6beea931c244bf8cc4a75d8a07d62373' (2024-04-04)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/8c4df2153c615554b516ba698f5f7bd64f7bf520' (2024-03-31)
  → 'github:nix-community/nixpkgs-wayland/30aa5f8c558cd8a699f9a9227cf7310f291f1e29' (2024-04-03)
```
2024-04-04 06:27:24 +00:00
7ab148ea58 servo: migrate /var/media to be 100% on zfs pool 2024-04-04 06:20:50 +00:00
0dfeec3260 mpv-uosc: 5.2.0 -> 5.2.0-unstable-2024-03-13 2024-04-04 06:19:15 +00:00
eb2317a743 mpv: 0.37.0 -> 0.37.0-unstable-2024-03-31 2024-04-04 06:19:15 +00:00
1a0ef28377 sane-bt-add: document how to *move* a torrent 2024-04-03 11:00:54 +00:00
7c3ad85d75 sane-bt-add: fix sandboxing 2024-04-03 09:48:21 +00:00
7766e1cec1 sane_bt: save torrents to /var/media/torrents by default 2024-04-03 09:48:21 +00:00
158e674f83 sane_bt.py: fix dict typo 2024-04-03 09:48:21 +00:00
410097480f docs: servo: fs: fix setfacl typo 2024-04-03 09:48:10 +00:00
f5fadbe4cf transmission: place torrents in a separate directory, and copy them to the main media directory on completion 2024-04-03 09:48:10 +00:00
a0550660e7 feeds: add The Corresponding Source podcast 2024-04-02 22:10:36 +00:00
bad6c353ed sane-bt: refactor 2024-04-02 20:53:01 +00:00
a814832e48 feeds: add Hacker Public Radio podcast 2024-04-02 19:34:42 +00:00
a4312f1494 nixpkgs: 2024-04-01 -> 2024-04-02
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/409234ba0c73ce2cee676f14b68a88e2b5a52af8' (2024-04-01)
  → 'github:nixos/nixpkgs/7a5ee8d0c786f9fd789b5bb07245d2a8b12193a4' (2024-04-02)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e7de14ea98fe984aa73a5a6b2f540ca817471106' (2024-04-01)
  → 'github:nixos/nixpkgs/7ab59131642a42b92f4d6554173ef9a35cbb39f0' (2024-04-02)
```
2024-04-02 09:46:40 +00:00
747032d9a4 dino: run with higher scheduling priority 2024-04-02 09:02:44 +00:00
9b2e35b93f pipewire: ship rtkit and unlock better scheduling priority 2024-04-02 09:02:06 +00:00
d2751237c1 xdg-desktop-portal-wlr: propery document its dependency on pipewire 2024-04-02 09:01:35 +00:00
ae87160de3 dino: 0.4.3 -> 0.4.3-unstable-2024-04-01 2024-04-02 04:57:11 +00:00
a90a213cc0 apps: gui: disable under-used "blanket" noise generator 2024-04-02 04:18:53 +00:00
24c04b8fc0 docs: xdg-desktop-portal: link to Door Knocker debugging tool 2024-04-02 04:18:53 +00:00
d0b022d1c6 libnice: 0.1.21 -> 0.1.22 2024-04-02 04:18:35 +00:00
9d9791814a audacity: fix sandboxing 2024-04-02 02:56:51 +00:00
b85d4b20f8 nixpkgs: 2024-03-31 -> 2024-04-01, nixpkgs-wayland
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/6b7b5776bef8eed645f63725ce31fa0946f997ff' (2024-03-31)
  → 'github:nixos/nixpkgs/409234ba0c73ce2cee676f14b68a88e2b5a52af8' (2024-04-01)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/7848d6f048d38c42a8aeeff7fe7d36916ffb8284' (2024-03-31)
  → 'github:nixos/nixpkgs/e7de14ea98fe984aa73a5a6b2f540ca817471106' (2024-04-01)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/11544449e6b696e209463aae094e736368eef757' (2024-03-30)
  → 'github:nix-community/nixpkgs-wayland/8c4df2153c615554b516ba698f5f7bd64f7bf520' (2024-03-31)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/120535dff702c551ec76a125a181d90131407264' (2024-03-24)
  → 'github:nix-community/lib-aggregate/9c06929b83e57c18d125f1105ba6a423f24083d2' (2024-03-31)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/b2a1eeef8c185f6bd27432b053ff09d773244cbc' (2024-03-24)
  → 'github:nix-community/nixpkgs.lib/90b1a963ff84dc532db92f678296ff2499a60a87' (2024-03-31)
```
2024-04-01 07:42:47 +00:00
331e673589 common/fs: mount /mnt/servo/media/* directories more granularly
this benefits sandboxing
2024-04-01 07:31:25 +00:00
bbb93600b7 /mnt/servo/*: mount in a way which doesn't block sandboxes 2024-04-01 06:00:17 +00:00
c0de54c11a curlftpfs: exit on timeout error 2024-04-01 04:02:32 +00:00
0d29722443 common/fs: refactor and DRY 2024-04-01 02:12:06 +00:00
1c2a375b6d common/fs: split curlftpfs into sane.programs
this makes it easier to build outside of /etc/fstab context, and opens a future path to sandboxing
2024-04-01 00:50:14 +00:00
b6840a3ed4 curlftpfs: build via my own repo 2024-04-01 00:43:07 +00:00
74e994598e feeds: add David Revoy 2024-03-31 20:28:41 +00:00
856b6fcd7a feeds: add Willow 2024-03-31 18:20:49 +00:00
2404fb66f3 nixpkgs: 2024-03-26 -> 2024-0-31; nixpkgs-wayland, sops
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/c904e6bf24e582e4fe28e988b7cdb7e9fda595c3' (2024-03-26)
  → 'github:nixos/nixpkgs/6b7b5776bef8eed645f63725ce31fa0946f997ff' (2024-03-31)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/da0502af1164c4fd04ebcd3acde1e378a861bd19' (2024-03-26)
  → 'github:nixos/nixpkgs/7848d6f048d38c42a8aeeff7fe7d36916ffb8284' (2024-03-31)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/7274c73cf5708ed3a814edc9605463ec4a116619' (2024-03-25)
  → 'github:nix-community/nixpkgs-wayland/11544449e6b696e209463aae094e736368eef757' (2024-03-30)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/405987a66cce9a4a82f321f11b205982a7127c88' (2024-03-24)
  → 'github:Mic92/sops-nix/99b1e37f9fc0960d064a7862eb7adfb92e64fa10' (2024-03-31)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/ac6bdf6181666ebb4f90dd20f31e2fa66ede6b68' (2024-03-23)
  → 'github:NixOS/nixpkgs/2b4e3ca0091049c6fbb4908c66b05b77eaef9f0c' (2024-03-30)
```
2024-03-31 06:30:10 +00:00
cd6a91e995 sway: tune sandboxing 2024-03-31 05:59:10 +00:00
89d4b0ae0b s6-rc: don't tee to /dev/stderr, as i don't want any logs going to the console and interfering with text entry 2024-03-31 05:20:33 +00:00
ade680d9d2 unl0kr: remove legacy wayland stuff (it's handled by s6 now) 2024-03-31 05:20:33 +00:00
6d4a43fa0d sway: warn when needed runtime dirs dont exist 2024-03-31 05:20:20 +00:00
d3ad661970 servo: zfs: enable reflink support 2024-03-31 03:48:34 +00:00
c9632b05f9 linux-megous: fix config so that it boots to graphics again
see: <https://github.com/NixOS/nixpkgs/pull/298332>
2024-03-31 03:24:33 +00:00
1e7de43da8 docs: sway: mention that hotplugging is broken 2024-03-31 03:24:33 +00:00
eff37765ae sane.image: fix so imgs.moby includes a working bootloader 2024-03-31 03:24:33 +00:00
a65673847a superTux, superTuxKard: don't ship on moby
i don't use it there; it wastes deploy time
2024-03-31 03:24:33 +00:00
930c5e2412 delfin: don't ship
i don't use it; it wastes deploy time
2024-03-31 03:24:33 +00:00
aff2a78ec3 sane-reclaim-boot-space: fix "self.format_attr" typo 2024-03-31 03:23:49 +00:00
f01758503c linux-megous: orange-pi-6.7-20240211-1928 -> orange-pi-6.7-20240306-2359
still getting PHY issues with it, but it boots to ssh
2024-03-29 18:18:37 +00:00
e855be4796 hosts/common: port /mnt/servo/* from NFS -> FTP
fuse ftp seems to be easier to debug than kernel nfs so far
2024-03-28 23:15:05 +00:00
701e10b121 hosts/common/fs: optimize NFS options 2024-03-28 23:15:05 +00:00
eadb2057d9 sane-wipe: port from systemd -> s6 2024-03-28 23:15:05 +00:00
5ed29ceb47 servo: /var/media: fixup permissions so everything is r/w by "media" group, including sftpgo 2024-03-28 23:14:40 +00:00
725ab13628 servo: nfs: allow UDP NFSv3 connections 2024-03-27 00:54:58 +00:00
32e691b85b feeds: add Hardcore Software by Steven Sinofsky 2024-03-26 14:08:13 +00:00
0108502055 feedbackd: fix so it depends on pipewire before launch 2024-03-26 13:48:13 +00:00
6c5b32aac2 s6-rc: fix so the service manager knows about readiness notifications again 2024-03-26 13:34:38 +00:00
f59dd99470 s6-rc: init services in the "down" state 2024-03-26 12:55:40 +00:00
55c8a98c33 s6-rc: pre-compute more stuff as nix exprs; don't even run s6-rc-init 2024-03-26 12:36:46 +00:00
7bb67391ae nixpkgs: remove obsoleted patches 2024-03-26 11:16:43 +00:00
c6a1f310a0 servo: net: actually assert that ovpns exists if we fail to add it 2024-03-26 11:13:10 +00:00
1d494513a9 slskd: document common errors/flakiness 2024-03-26 11:04:21 +00:00
fb79ca4c8e programs: iproute: use a less restrictive sandbox 2024-03-26 10:54:29 +00:00
3cf42db7dc slskd: fix for more recent nixpkgs 2024-03-26 10:47:20 +00:00
aba5eee837 nixpkgs: 2024-03-25 -> 2024-03-26; others
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/8794d573a4fdd15b0002135cebf65a8f5d9adb6c' (2024-03-25)
  → 'github:nixos/nixpkgs/c904e6bf24e582e4fe28e988b7cdb7e9fda595c3' (2024-03-26)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0d2dc20762f21c3e43fc2acc03f9552adbc392bc' (2024-03-25)
  → 'github:nixos/nixpkgs/da0502af1164c4fd04ebcd3acde1e378a861bd19' (2024-03-26)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/59f7ad2c27737a7ea7ad16a48c95631f159ef822' (2024-03-24)
  → 'github:nix-community/nixpkgs-wayland/7274c73cf5708ed3a814edc9605463ec4a116619' (2024-03-25)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=9a3b2d74c3e6d177fd1317d03f4e3eecca7beb7b' (2024-03-19)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=b9502e6f190752d327f8cee7fa4b139094bd7c16' (2024-03-25)
```
2024-03-26 09:44:45 +00:00
5cd9f34884 s6-rc: remove more unnecessarily files from live dir 2024-03-26 00:45:24 +00:00
2cabe51956 s6-rc: remove a couple more unused files from the live dir 2024-03-26 00:22:14 +00:00
cb8e9b7a23 s6-rc: make it so, once started, other programs can start/stop services but NOT edit/create them 2024-03-26 00:11:02 +00:00
4eb6b5735e users/s6-rc: allow startS6 "" 2024-03-25 16:46:51 +00:00
5d3899959b users/s6-rc: split out compiled var 2024-03-25 14:56:41 +00:00
ad951ad919 users/s6-rc: add symlink capabilities to my fs abstraction 2024-03-25 14:46:43 +00:00
5ecabc57bf feeds: add low<-tech magazine 2024-03-25 13:13:41 +00:00
48a4c1bd26 feeds: add nixpkgs.news 2024-03-25 13:13:03 +00:00
1f47c5ba2e nixpkgs: 2024-03-23 -> 2024-03-25; nixpkgs-wayland; sops-nix
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/f4a0cee9233d6db356a0bdab307e865327a9b96b' (2024-03-23)
  → 'github:nixos/nixpkgs/8794d573a4fdd15b0002135cebf65a8f5d9adb6c' (2024-03-25)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/499583c00280ed90686b058e38a68fc9be2f4c4c' (2024-03-23)
  → 'github:nixos/nixpkgs/0d2dc20762f21c3e43fc2acc03f9552adbc392bc' (2024-03-25)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/0d291a959d01bb5d2bd2e20689b78258fa842cca' (2024-03-23)
  → 'github:nix-community/nixpkgs-wayland/59f7ad2c27737a7ea7ad16a48c95631f159ef822' (2024-03-24)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/f890211817b941d9ed9de48d62ba8553fa2c20f3' (2024-03-17)
  → 'github:nix-community/lib-aggregate/120535dff702c551ec76a125a181d90131407264' (2024-03-24)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/fa827dda806c5aa98f454da4c567991ab8ce422c' (2024-03-17)
  → 'github:nix-community/nixpkgs.lib/b2a1eeef8c185f6bd27432b053ff09d773244cbc' (2024-03-24)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/83b68a0e8c94b72cdd0a6e547a14ca7eb1c03616' (2024-03-17)
  → 'github:Mic92/sops-nix/405987a66cce9a4a82f321f11b205982a7127c88' (2024-03-24)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/6dc11d9859d6a18ab0c5e5829a5b8e4810658de3' (2024-03-16)
  → 'github:NixOS/nixpkgs/ac6bdf6181666ebb4f90dd20f31e2fa66ede6b68' (2024-03-23)
```
2024-03-25 00:23:58 +00:00
febedb9323 nits: update --replace uses to --replace-{fail,quiet} as appropriate 2024-03-24 12:49:18 +00:00
aed5ea4b2e static-nix-shell: dont fail build if "nix-shell" occurs in the file as a non-directive 2024-03-24 12:28:23 +00:00
4e74ba5bab swaync-service-dispatcher: fix start/stop inversion 2024-03-24 12:22:54 +00:00
03fbb780b2 sane.programs: sandbox: refactor extraRuntimePaths computation 2024-03-24 12:03:38 +00:00
9c0b175260 swaync: allow toggling of s6 services 2024-03-24 11:54:12 +00:00
e62be121e2 users/services: s6: fix so s6-rc stop can actually kill processes 2024-03-24 11:48:41 +00:00
774066e53c swaync: factor out a "service-dispatcher" 2024-03-24 09:21:07 +00:00
86400f45d6 swaync: port to s6 2024-03-24 08:56:06 +00:00
ddef2d0bfc swaync: rename: print-is-active -> print-systemd-active 2024-03-24 08:54:27 +00:00
0172aa0b69 swaync: refactor 2024-03-24 08:54:27 +00:00
ce991c8887 swaync: refactor 2024-03-24 08:54:27 +00:00
92d8d42997 swaync: split the buttons out of the main config file 2024-03-24 08:54:27 +00:00
1c4ef84ec7 swaync: remove legacy sxmo-specific notification visibility rules 2024-03-24 08:54:27 +00:00
a820ae57c0 swaync: remove sxmo timer rules 2024-03-24 08:54:27 +00:00
89f913cadc xdg-desktop-portal: 1.18.2 -> 1.18.2-unstable-2024-03-11
this will *hopefully* improve stability
2024-03-24 08:08:48 +00:00
d14fda2e62 engrampa: remove custom patch (upstream released a new version) 2024-03-24 07:46:22 +00:00
f680a4a25c engrampa: patch the package via sane.programs, not nixpkgs overlay 2024-03-24 07:44:30 +00:00
7c461cee2f pkgs: remove gnome-control-center (unused) 2024-03-24 07:38:22 +00:00
47d37b4ce5 xdg-desktop-portal: enable logging 2024-03-24 07:19:33 +00:00
a1cc045837 waybar: update persistent_workspaces -> persistent-workspaces
the former is deprecated
2024-03-24 06:17:43 +00:00
72dd556b72 assorted: fix meta.homepage URLs for nur packages 2024-03-24 03:54:09 +00:00
ff9e1111b3 nixpkgs: 2024-03-22 -> 2024-03-23
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/5132e88bc7caad27f4cf28cbaa7b04c915e2c261' (2024-03-22)
  → 'github:nixos/nixpkgs/f4a0cee9233d6db356a0bdab307e865327a9b96b' (2024-03-23)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/e5d75daa715cbaee8b989f58884a31c0be00a8a0' (2024-03-22)
  → 'github:nixos/nixpkgs/499583c00280ed90686b058e38a68fc9be2f4c4c' (2024-03-23)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/61e42f8f6c9b0c2b557a4c978ea11874d3761083' (2024-03-22)
  → 'github:nix-community/nixpkgs-wayland/0d291a959d01bb5d2bd2e20689b78258fa842cca' (2024-03-23)
```
2024-03-23 21:49:57 +00:00
7f8cae42ff s6: migrate to /run/user/$id/s6 2024-03-23 21:33:08 +00:00
5b83d4d944 s6-rc: patch to use /run/user/$id/s6 as the default live dir 2024-03-23 20:52:42 +00:00
f16a68f5bb element-desktop: use native wayland, not Xwayland 2024-03-23 18:51:41 +00:00
6646a21089 nixpatches: fix handbrake hash 2024-03-23 18:02:45 +00:00
4bf43d884a nixpkgs: minor bump
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/86b5ff8306a63bb266590018b21d2ae502a74880' (2024-03-22)
  → 'github:nixos/nixpkgs/5132e88bc7caad27f4cf28cbaa7b04c915e2c261' (2024-03-22)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/6e147dce88054c47dd90c0be8c33500e023f8261' (2024-03-22)
  → 'github:nixos/nixpkgs/e5d75daa715cbaee8b989f58884a31c0be00a8a0' (2024-03-22)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/7d053c33b7a130ddada43ba09b089244390b3a23' (2024-03-19)
  → 'github:nix-community/nixpkgs-wayland/61e42f8f6c9b0c2b557a4c978ea11874d3761083' (2024-03-22)
```
2024-03-23 18:01:51 +00:00
46fe6c690b sway: fix WAYLAND_DISPLAY to be relative 2024-03-23 17:59:37 +00:00
dd7b1dae5f sway: remove unnecessary pidspace sandbox exception
i guess this was from when SWAYSOCK was named after the pid?
2024-03-23 17:35:39 +00:00
2e58353b0e refactor: users/services: have waitExists support waiting on multiple paths 2024-03-23 17:28:29 +00:00
f65d3d04dc sway: do the WAYLAND_DISPLAY moving inside sway config itself 2024-03-23 17:09:57 +00:00
6102a0301d sway: move $WAYLAND_DISPLAY into a subdir to make it easier to sandbox 2024-03-23 16:37:22 +00:00
39de5b84c2 sway: fix readiness check 2024-03-23 15:54:20 +00:00
5205251f6f programs: xwayland: sandbox it without exposing net access 2024-03-23 15:33:23 +00:00
8c48adefa5 pipewire: move sockets into a subdirectory for easier sandboxing 2024-03-23 13:34:13 +00:00
db2801c652 sway: don't launch s6 from within the sway session 2024-03-23 13:11:14 +00:00
4418c16967 users/services: s6: push bundle dependencies down onto the actual atomic services 2024-03-23 13:04:12 +00:00
8008fd35cb modules/users: allow readiness.pathExists 2024-03-23 13:03:11 +00:00
36ea5b53ad sway: place SWAYSOCK in a subdirectory 2024-03-23 11:33:58 +00:00
552d14b1b5 nixpatches: fix hashes 2024-03-23 09:29:34 +00:00
c404c8b2ae xdg-terminal-exec: fix bad interaction with TERMINAL 2024-03-23 09:28:26 +00:00
d129ae2c03 koreader-from-src: remove a bunch of old cruft
this is beginning to look upstream-ready :)
2024-03-22 20:16:33 +00:00
58341b75f2 koreader-from-src: popen-noshell,turbo: populate more directly 2024-03-22 20:05:22 +00:00
373388c5b8 koreader-from-src: mupdf: populate more directly 2024-03-22 19:54:13 +00:00
8d45aad534 xdg-dirs: populate env vars at login
otherwise i believe they dont actually take effect?
2024-03-22 19:31:04 +00:00
a783bc9577 koreader-from-src: minizip: populate in a simpler manner 2024-03-22 19:24:19 +00:00
267d374b19 xdg-dirs: specify XDG_SCREENSHOTS_DIR 2024-03-22 19:23:14 +00:00
e67ce7576b koreader-from-src: lunasvg: populate in a simpler way 2024-03-22 19:16:45 +00:00
ce770dbea9 koreader: lodepng: provide in a more direct manner 2024-03-22 18:59:17 +00:00
e7a65abd0b koreader-from-src: libk2pdfopt: populate in a more direct manner 2024-03-22 18:53:23 +00:00
702a6cc7fa koreader: kobo-usbms: link into build environment in a simpler fashion 2024-03-22 18:28:19 +00:00
f889543aa5 koreader-from-src: fbink: provide the sources more directly 2024-03-22 18:21:26 +00:00
98073f5e19 koreader-from-src: inject tesseract sources via make args 2024-03-22 17:58:41 +00:00
96c330813f xterm: remove
xdg-terminal-exec updated recently, and it seems to prefer xterm over alacritty for some reason
2024-03-22 17:28:26 +00:00
a6d9c62bcf lemonade: 2023.10.29 -> 2024.03.20
not much changed
2024-03-22 17:27:20 +00:00
8ff34d8518 koreader: migrate leptonica dep away from the sources hack
i hope that by using the makefile vars i can eventually get rid of the
"stamp" nonsense.
2024-03-22 17:16:19 +00:00
e11dd0ecb0 firefox-extensions: update to latest 2024-03-22 16:27:23 +00:00
3b6dfea2d0 koreader-from-src: notes about updating leptonica 2024-03-22 15:53:17 +00:00
22254db74c koreader-from-src: cleanup (remove unused "machineAgnostic" and "package" third-party dependency options) 2024-03-22 14:42:37 +00:00
a316c87db6 koreader-from-src: use nixpkgs nanosvg (or, most of it) 2024-03-22 14:29:23 +00:00
fe2fb40565 koreader-from-src: don't vendor lj-wpaclient (unused) 2024-03-22 13:40:09 +00:00
cd63fdb510 koreader: cleanup 2024-03-22 12:12:14 +00:00
1e25f37774 nixpkgs: 2024-03-21 -> 2024-03-22
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/33cddc79aa062e243c59d3ac36b8b938f267748a' (2024-03-21)
  → 'github:nixos/nixpkgs/86b5ff8306a63bb266590018b21d2ae502a74880' (2024-03-22)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/783b241f949bea90e3347ce516ad8af84bde3126' (2024-03-21)
  → 'github:nixos/nixpkgs/6e147dce88054c47dd90c0be8c33500e023f8261' (2024-03-22)
```
2024-03-22 11:56:51 +00:00
cdac23211c nixpkgs: 2024-03-13 -> 2024-03-21; others
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/4ee0840ba2ecc50458ab1677d108afcd691f4815' (2024-03-13)
  → 'github:nixos/nixpkgs/33cddc79aa062e243c59d3ac36b8b938f267748a' (2024-03-21)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/2dbc8f62d8af7a1ab962e4b20d12b25ddcb86ced' (2024-03-13)
  → 'github:nixos/nixpkgs/783b241f949bea90e3347ce516ad8af84bde3126' (2024-03-21)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/771cb198c281db6918829651f194bf4db32e342d' (2024-03-13)
  → 'github:nix-community/nixpkgs-wayland/7d053c33b7a130ddada43ba09b089244390b3a23' (2024-03-19)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/45b75bf534592c0c1c881a1c447f7fdb37a87eaf' (2024-03-11)
  → 'github:nix-community/lib-aggregate/f890211817b941d9ed9de48d62ba8553fa2c20f3' (2024-03-17)
• Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/630ebdc047ca96d8126e16bb664c7730dc52f6e6' (2024-03-10)
  → 'github:nix-community/nixpkgs.lib/fa827dda806c5aa98f454da4c567991ab8ce422c' (2024-03-17)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/e52d8117b330f690382f1d16d81ae43daeb4b880' (2024-03-11)
  → 'github:Mic92/sops-nix/83b68a0e8c94b72cdd0a6e547a14ca7eb1c03616' (2024-03-17)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/b17375d3bb7c79ffc52f3538028b2ec06eb79ef8' (2024-03-10)
  → 'github:NixOS/nixpkgs/6dc11d9859d6a18ab0c5e5829a5b8e4810658de3' (2024-03-16)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=bb10cd8853d05191e4d62947d93687c462e92c30' (2024-02-15)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=9a3b2d74c3e6d177fd1317d03f4e3eecca7beb7b' (2024-03-19)
```
2024-03-21 18:03:37 +00:00
e6c00e6215 users/services: implement dbus readiness checks for s6-rc 2024-03-21 17:16:11 +00:00
fff9d69e3e users/services: s6-rc: implement readiness polling 2024-03-21 17:16:11 +00:00
4fa7e6113d users/services: s6: exec into the run/finish commands 2024-03-21 17:16:11 +00:00
16ca71188f users/services: simplify the before/after/wantedBy criteria, to match s6 concepts 2024-03-21 17:16:11 +00:00
c5c37e79ac users/services: actually remove the systemd backend 2024-03-21 17:16:11 +00:00
d2f6648bce users/services: refactor: replace ExecStart/ExecStopPost with command/cleanupCommand
note that this completely breaks the systemd backend (though easily fixable if wanted)
2024-03-21 17:16:11 +00:00
5c9c7f8073 modules/users/s6-rc: add per-service logging 2024-03-21 17:16:11 +00:00
218072b2fe refactor: modules/users/s6-rc.nix 2024-03-21 17:16:11 +00:00
d4f217a4f5 refactor: modules/users/s6-rc.nix 2024-03-21 17:16:11 +00:00
40f6f88a64 users/services: s6: remove broken log stuff
apparently the /log shorthand is only applicable to base `s6-supervise`,
and not `s6-rc`. "pipeline"s are the s6-rc equivalent:
<https://wiki.gentoo.org/wiki/S6-rc#Longrun_pipelining>
2024-03-21 17:16:11 +00:00
fbbb09322a users/services: s6-rc: support ExecStopPost option 2024-03-21 17:16:11 +00:00
e7153ce4a1 users/services: remove ExecStartPre option 2024-03-21 17:16:11 +00:00
b13e7c38c7 users/services: remove script option 2024-03-21 17:16:11 +00:00
058c95bb2c sysvol: remove autostart option (assume true) 2024-03-21 17:16:11 +00:00
9b793ef4b8 programs: services: no need to fully-qualify paths anymore (s6 doesn't require) 2024-03-21 17:16:11 +00:00
1417497001 users/services: remove serviceConfig.Type option 2024-03-21 17:16:11 +00:00
db12e03f64 users/services: remove oneshot service type 2024-03-21 17:16:11 +00:00
dee4866737 users/services: remove ConditionEnvironment option 2024-03-21 17:16:11 +00:00
81a6c53c26 users/services: remove RemainAfterExit option 2024-03-21 17:16:11 +00:00
9afd9725d1 users: services: remove no-longer-needed Restart and RestartSec options 2024-03-21 17:16:11 +00:00
384bc9e816 xdg-desktop-portal: fix to not over-escape $HOME in s6 service definition 2024-03-21 17:16:11 +00:00
452619dbfc s6: log when a service starts up
it still seems to be all logging into a single file though?
2024-03-21 17:16:11 +00:00
6c6e10e470 s6: install manpages 2024-03-21 17:16:11 +00:00
dcdf58e1ab sway: simplify wrapper 2024-03-21 17:16:11 +00:00
48b2280f2e feedbackd: fix over-escaping of $HOME 2024-03-21 17:16:11 +00:00
8bedc860ae s6: add some minimal logging
the root s6 call seems to be doing some logging, notably feedbackd; still don't know where the other logs are going
2024-03-21 17:16:11 +00:00
cbecdc4a95 s6: use exec in the run trampoline, to forward file descriptors and keep a cleaner process tree 2024-03-21 17:16:11 +00:00
e1001f57c5 modules/users: remove no-longer-need environment option 2024-03-21 17:16:11 +00:00
291e704477 programs: replace systemd-specific 'environment' option with generic 'env'
note, these services no longer work with systemd, because systemd expects absolute paths
2024-03-21 17:16:11 +00:00
d199e9df99 programs: wob (and wob-audio): remove
i don't use it, and its service file was no longer compatible with s6 (it used 'environment')
2024-03-21 17:16:11 +00:00
2336767059 port service manager to s6
still a lot of cleanup to do (e.g. support dbus service types), but it boots to a usable desktop
2024-03-21 17:16:11 +00:00
63af94383b sane-input-handler: only inhibit controls if screen is on 2024-03-21 17:16:11 +00:00
05b37669e3 s6-rc: fix service run file to have expected format 2024-03-21 17:16:11 +00:00
ea9768c6ab modules/users: prototype s6 integration: ~/.config/s6/{sources,compiled} 2024-03-21 17:16:11 +00:00
38353dbc29 modules/users: remove unused requiredBy service option 2024-03-21 17:16:11 +00:00
ef4a8e1989 modules: users: split services -> fs mapping into own systemd.nix file 2024-03-21 17:16:11 +00:00
acc9a9cb48 modules/users: make it a directory 2024-03-21 17:16:11 +00:00
0335b89a12 fractal: stop persisting old directories 2024-03-21 17:16:01 +00:00
0a6b0cbec7 gtkcord4: rename to dissent 2024-03-21 17:16:01 +00:00
df2310d590 gnome-keyring: ensure the keyring directory is created before entering the sandbox 2024-03-21 17:16:01 +00:00
70b5c57b50 modules/programs: enforce (or rather document) a stricter schema
this should make it easier to switch to a different service manager
2024-03-21 17:16:01 +00:00
c28ac38652 modules/users: refactor to remove inherits 2024-03-21 17:16:01 +00:00
52133fde30 delfin: 0.4.1 -> 0.4.2 2024-03-21 13:51:46 +00:00
098cd2051e sftpgo: expose to the WAN 2024-03-14 13:11:44 +00:00
691a7d7ff7 sftpgo: configure for credential-gated r/w access 2024-03-14 13:11:44 +00:00
c7c2785ad8 sftpgo_external_auth_hook: refactor 2024-03-14 13:11:44 +00:00
4c1a7fc910 sftpgo: port auth program to python 2024-03-14 13:11:44 +00:00
3c43fba878 feeds: add NativLang per Ben's rec 2024-03-14 07:53:19 +00:00
7904957544 give self cap_sys_nice 2024-03-14 07:02:57 +00:00
b25df1d997 sane-sandboxed: fix capabilities example 2024-03-14 01:36:46 +00:00
d08f318e4b pmos: move to correct section 2024-03-13 23:51:24 +00:00
f655c31d77 Merge branch 'dev' 2024-03-13 23:48:48 +00:00
288d57e5d5 feeds: subscribe to pmOS blog 2024-03-13 23:20:45 +00:00
f669f2bfe8 procmail: merged into staging-next 2024-03-13 23:12:37 +00:00
5554ad9fe2 nixpkgs: 2024-03-12 -> 2024-03-13
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/2e2cc05898bbe54a8004801ea300525b231d24e2' (2024-03-12)
  → 'github:nixos/nixpkgs/4ee0840ba2ecc50458ab1677d108afcd691f4815' (2024-03-13)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/21adc4f16a8ab151fec83b9d9368cd62d9de86bc' (2024-03-12)
  → 'github:nixos/nixpkgs/2dbc8f62d8af7a1ab962e4b20d12b25ddcb86ced' (2024-03-13)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/0f9388d3a9daa597ad87b870de236fb45e24ba63' (2024-03-12)
  → 'github:nix-community/nixpkgs-wayland/771cb198c281db6918829651f194bf4db32e342d' (2024-03-13)
```
2024-03-13 15:37:50 +00:00
6595d177be gimp: fix sandboxing 2024-03-13 11:36:57 +00:00
d194abb4bf swaync: stylize the actual notifications 2024-03-13 11:29:05 +00:00
eaf45e2366 swaync: re-theme (pink/black) 2024-03-13 11:07:17 +00:00
66e04857b6 swaync: fix dimensions to be compatible with pinephone 2024-03-13 08:29:23 +00:00
fa0dcdc5be swaync: splie style.css out to own file 2024-03-13 08:18:34 +00:00
23b87a283a swaync: move to own directory 2024-03-13 08:17:14 +00:00
849ca59f68 swaync: fix styling of toggle buttons 2024-03-13 08:16:47 +00:00
5e1a6062af swaync: ensure it starts *after* pipewire-pulse so that the mpris plugin can function 2024-03-13 07:53:45 +00:00
8dacb93861 fontconfig: remove no-longer-needed cache; disable Font Awesome (emoji seem well-covered by Noto Color Emoji) 2024-03-13 05:28:57 +00:00
eafabe87c4 xdg-desktop-portal: tell systemd the BusName of the service so that it won't consider it started until after said bus name is acquired
this partially fixes an error in sandboxed gtk apps where they would try to connect to org.freedesktop.portal to query settings, and then fall back to bad default fonts when the endpoint errored (because xdp-gtk wasn't ready)
2024-03-13 05:27:43 +00:00
4510352c07 sane-sandboxed: implement --sane-sandbox-no-portal flag 2024-03-13 04:49:48 +00:00
430592632c sane-sandboxed: add a help message 2024-03-13 04:49:48 +00:00
ac22b36d78 dconf: invoke it ourselves instead of letting dbus do it for us 2024-03-13 04:49:48 +00:00
4439491bf0 dconf: fix over-restrictive sandboxing (because previously it was being run unsandboxed...) 2024-03-13 04:49:48 +00:00
56aca78d84 make-sandboxed: also sandbox the .lib output of a package 2024-03-13 04:49:48 +00:00
546482dc80 dconf: disable GIO_EXTRA_MODULES patch 2024-03-13 02:41:39 +00:00
2f07fff084 dconf: migrate to sane.programs 2024-03-13 02:33:02 +00:00
294563c655 dbus: fix to only search /run/current-system/sw/share/dbus-1 for service files 2024-03-13 02:04:02 +00:00
f6c3557b8c nixpkgs: 2024-03-11 -> 2024-03-12
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/ec7a981885b5ede88eabf9bb3516706107de00b2' (2024-03-11)
  → 'github:nixos/nixpkgs/2e2cc05898bbe54a8004801ea300525b231d24e2' (2024-03-12)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0fbcc4b2e8571f4af39be41752581ea09dd9ab06' (2024-03-11)
  → 'github:nixos/nixpkgs/21adc4f16a8ab151fec83b9d9368cd62d9de86bc' (2024-03-12)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/27a56d7435094f141bf5adfe9cfe155932597935' (2024-03-11)
  → 'github:nix-community/nixpkgs-wayland/0f9388d3a9daa597ad87b870de236fb45e24ba63' (2024-03-12)
• Updated input 'nixpkgs-wayland/lib-aggregate':
    'github:nix-community/lib-aggregate/b8a148b163687c9be602b63c6b0b7bc81eecb015' (2024-03-10)
  → 'github:nix-community/lib-aggregate/45b75bf534592c0c1c881a1c447f7fdb37a87eaf' (2024-03-11)
• Updated input 'nixpkgs-wayland/lib-aggregate/flake-utils':
    'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28)
  → 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f8d5c8baa83fe620a28c0db633be9db3e34474b4' (2024-03-10)
  → 'github:Mic92/sops-nix/e52d8117b330f690382f1d16d81ae43daeb4b880' (2024-03-11)
```
2024-03-12 12:46:24 +00:00
7513811111 blast: minor cleanups 2024-03-12 12:06:57 +00:00
eabd113262 mpv: blast: shut it down properly even when sandboxed
it only cost everything. also, blast doesnt reliably clean up its pseudo devices
2024-03-12 11:51:15 +00:00
01fa9919fd mpv: route casting through a lua script
this lets me use `subcprocess` instead of `run`, and so the command terminate alongside mpv
2024-03-12 05:01:45 +00:00
56a2c4e49f mpv: split conf files out of main nix code 2024-03-12 03:32:07 +00:00
bf953fbdb5 mpv: move to own dir 2024-03-12 03:27:20 +00:00
4f2d0f2e56 mpv: tune uosc options 2024-03-12 03:05:56 +00:00
500c989e61 nixpkgs: 2024-03-10 -> 2024-03-11
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/85e4390bb2db2543b65a61a6fb601819ba331399' (2024-03-10)
  → 'github:nixos/nixpkgs/ec7a981885b5ede88eabf9bb3516706107de00b2' (2024-03-11)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/c916d4cbac62b2d8b70a3940d3471dbd0c57d2f4' (2024-03-10)
  → 'github:nixos/nixpkgs/0fbcc4b2e8571f4af39be41752581ea09dd9ab06' (2024-03-11)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/8af78a7dfb3a2041235c116cc9cc92f5a6d3a20c' (2024-03-11)
  → 'github:nix-community/nixpkgs-wayland/27a56d7435094f141bf5adfe9cfe155932597935' (2024-03-11)
```
2024-03-11 12:23:03 +00:00
08ee0375cc mpv: blast-to-default: remove unnecessary xdg-terminal-exec indirection 2024-03-11 12:07:08 +00:00
afd1a42ec7 mpv: refer to xdg-terminal-exec by name, not full path 2024-03-11 11:56:53 +00:00
21691fc2fd mpv: add a menu option to cast just the audio, via Blast 2024-03-11 11:43:53 +00:00
c1edf96ce0 blast-ugjka: introduce a helper blast-to-default program 2024-03-11 11:43:29 +00:00
21714849cf sway: get Celeste to run in fullscreen again 2024-03-11 08:04:21 +00:00
379f3ef9e0 zsh: deref alias: make the result writable 2024-03-11 08:01:27 +00:00
c07c23a9f8 ibus: remove cross patches (i don't use the package anymore) 2024-03-11 07:55:53 +00:00
f44a4c84ee moby: don't ship fcitx5 (doesn't cross compile) 2024-03-11 07:54:49 +00:00
6822dad9c0 splatmoji: remove from config 2024-03-11 07:53:48 +00:00
9f8e42ef92 fcitx5: enable 2024-03-11 07:44:21 +00:00
bda374db13 sway: ship the nightly version 2024-03-11 05:53:14 +00:00
180a217744 cleanup: remove unnecessary config = { ... } scope 2024-03-11 04:31:11 +00:00
f13ece2212 sway: tune resize more shortcuts; enable natural scrolling 2024-03-11 04:30:28 +00:00
00ab28fcac delfin: 0.4.0 -> 0.4.1 2024-03-11 00:13:13 +00:00
bb18f7355a firefox-extensions: update to latest 2024-03-11 00:00:49 +00:00
0905a658ad rofi: cherry-pick my patches instead of pinning to a fork
wayland upstream released 1.7.5+wayland3, which is compatible with my patches
2024-03-10 23:43:34 +00:00
90b9d00f37 swaync: remove mpris icon patch (upstreamed) 2024-03-10 23:16:33 +00:00
40effc08d6 fractal-nixified: 6 -> 6-unstable-2024-01-31
brings ability to enable/disable read and typing receipts
2024-03-10 23:15:02 +00:00
73a2c9d923 nixpkgs: update ~10hrs to remove now-upstreamed conky patch
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/32f638e62d638c9a0011c0162ed1be4a13d00ea9' (2024-03-10)
  → 'github:nixos/nixpkgs/85e4390bb2db2543b65a61a6fb601819ba331399' (2024-03-10)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/9fc2bd0eef6d2651638656c82fbe0b7a40478c3b' (2024-03-10)
  → 'github:nixos/nixpkgs/c916d4cbac62b2d8b70a3940d3471dbd0c57d2f4' (2024-03-10)
```
2024-03-10 22:31:33 +00:00
d93380938d nixpkgs: 2024-03-09 -> 2024-03-10; sops-nix -> 2024-03-10
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/8baf388f460b92102ea1a8e2ece55f1f1260fbfa' (2024-03-09)
  → 'github:nixos/nixpkgs/32f638e62d638c9a0011c0162ed1be4a13d00ea9' (2024-03-10)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/52d9c7906c26317adc3524d44bdd98b953e20ba1' (2024-03-09)
  → 'github:nixos/nixpkgs/9fc2bd0eef6d2651638656c82fbe0b7a40478c3b' (2024-03-10)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/25dd60fdd08fcacee2567a26ba6b91fe098941dc' (2024-03-06)
  → 'github:Mic92/sops-nix/f8d5c8baa83fe620a28c0db633be9db3e34474b4' (2024-03-10)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/66d65cb00b82ffa04ee03347595aa20e41fe3555' (2024-03-03)
  → 'github:NixOS/nixpkgs/b17375d3bb7c79ffc52f3538028b2ec06eb79ef8' (2024-03-10)
```
2024-03-10 13:36:58 +00:00
573a50fedc doc: pipewire: mention some debug env vars 2024-03-10 04:59:51 +00:00
f8797a77ff blast: ship it!
TODO: integrate into mpv :)
2024-03-10 04:09:34 +00:00
92115709f6 blast-ugjka: init at 0.6.2
it works! at least, with the Sony TV, LG TV is detected but might need some finessing
2024-03-10 02:35:10 +00:00
e6111c9d5e firefox: hide the bookmarks menuabar 2024-03-10 01:59:46 +00:00
975df698a4 pa-dlna: init at 0.7
it detects my TVs and adds them as sinks, but i can't the TVs to actually output anything
2024-03-10 01:55:29 +00:00
ce8c4a4f6f remove dead binfmt code 2024-03-10 01:05:33 +00:00
df33576090 todo.md: remove completed xdg-desktop-portal item 2024-03-10 01:03:23 +00:00
4d6eb705eb mpv: link to some useful extensions 2024-03-10 01:02:54 +00:00
fd70b6acbf rofi: tune maximum height 2024-03-09 23:34:43 +00:00
1d3576b892 sxmo-utils: mark as broken/unmaintained 2024-03-09 21:09:32 +00:00
30d49dc3c3 feeds: update Anish's URL 2024-03-09 20:51:15 +00:00
8e0031e770 feeds: update Byrne Hobart's feed URL 2024-03-09 20:49:01 +00:00
7a50fcf566 feeds: unsubscribe webcurious.co.uk (defunct) 2024-03-09 20:46:08 +00:00
c453dbac8e lwn.net: update feed URL 2024-03-09 20:42:03 +00:00
053b8cf737 nixpkgs: 2024-03-08 -> 2024-03-09
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/f391672e1727b933cf6933154817fe236c6f84c7' (2024-03-08)
  → 'github:nixos/nixpkgs/8baf388f460b92102ea1a8e2ece55f1f1260fbfa' (2024-03-09)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/baf89057836e5f9928696526b85774ea529c749d' (2024-03-08)
  → 'github:nixos/nixpkgs/52d9c7906c26317adc3524d44bdd98b953e20ba1' (2024-03-09)
```
2024-03-09 08:54:18 +00:00
8af962c3a6 mpv: auto-populate internal playlist with other files in the same directory, on launch
so now i can listen to whole albums by opening any file from within them.
and for shows the next episode will automatically launch.
2024-03-09 03:02:09 +00:00
9ea39799a5 zsh: fix c alias 2024-03-09 03:01:37 +00:00
e695459b40 geary-gtk4: init (broken!) 2024-03-09 00:58:44 +00:00
f2e760710d sysvol: tune its position 2024-03-08 23:06:37 +00:00
dc70ed8bd8 pipewire: wait for sockets to appear before considering it active
this fixes race around consumers like sysvol starting too early
2024-03-08 22:44:59 +00:00
b41c249830 disable vlc
i don't use it; it forces a bunch of extra qt builds
2024-03-08 18:53:25 +00:00
8f986e4616 nixpkgs: 2024-03-07 -> 2024-03-08
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/5e0cda94371075bead6d953e8a60a717ec022524' (2024-03-07)
  → 'github:nixos/nixpkgs/f391672e1727b933cf6933154817fe236c6f84c7' (2024-03-08)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/90714b18a06ddad90159cc312814f1871509e10e' (2024-03-07)
  → 'github:nixos/nixpkgs/baf89057836e5f9928696526b85774ea529c749d' (2024-03-08)
```
2024-03-08 13:15:25 +00:00
2b73ebb4c1 sysvol: don't start until after pipewire is ready 2024-03-08 12:55:33 +00:00
bffcaa668e sysvol: wrap with required gtk4 environment variables 2024-03-08 12:54:41 +00:00
ebb037bd48 sysvol: fix cross compilation 2024-03-08 12:25:32 +00:00
df98ef30e0 sysvol: integrate as a service (sane.programs) 2024-03-08 11:53:13 +00:00
e45d4d6ae7 sysvol: init at 0-unstable-2024-02-08 2024-03-08 10:10:50 +00:00
f3568b3ffc sway: port volume controls: pulse -> pipewire 2024-03-08 09:56:15 +00:00
9eaf4d71b2 sway: use simpler assign notation where applicable 2024-03-08 09:53:07 +00:00
3200188a32 sway: factor/generalize the TV workspace/output assignment 2024-03-08 09:50:35 +00:00
a4ab60b836 sway: auto-fullscreen everything on the TV 2024-03-08 09:42:07 +00:00
3282b40e9b doc: sway: consider how to auto-fullscreen mpv on external display 2024-03-08 09:31:08 +00:00
39411164af zsh: add deref function to turn a symlink into a real file 2024-03-08 08:50:28 +00:00
c0a94995a5 docs: note limitations of schlock 2024-03-08 08:16:11 +00:00
f4b5d3a70a sway: position certain apps (mpv, Celeste) on external displays by default 2024-03-08 06:27:16 +00:00
07373b5e6b sway: configure TV output 2024-03-08 06:23:33 +00:00
7281b94e23 deadd-notification-center: add to sane.programs
this is the bare, nearly-default config. i may come back to this,
or explore fixing swaync up into shape. deadd looks possibly a bit more
limited; needs much more effort to style.
2024-03-08 04:06:18 +00:00
0e83742096 sway: allow config reloading 2024-03-08 03:44:33 +00:00
7d8205352c moby: use screen scale of 2.0 in portrait AND landscape 2024-03-08 02:21:47 +00:00
c4994162e1 mpv: fix go2tv sandbox interaction 2024-03-08 02:06:23 +00:00
24a211bd3d sane-input-handler: remove keyboard launch fallback
it'll never work, because of sandboxing
2024-03-08 01:18:39 +00:00
3cf651b212 nixpkgs: 2024-03-06 -> 2024-03-07
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/09c267dae0dae6585ddbc98bd2301bd8153ac177' (2024-03-06)
  → 'github:nixos/nixpkgs/5e0cda94371075bead6d953e8a60a717ec022524' (2024-03-07)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/a85303aef29c6a9000a259ed21c9c14a1aa3859e' (2024-03-06)
  → 'github:nixos/nixpkgs/90714b18a06ddad90159cc312814f1871509e10e' (2024-03-07)
```
2024-03-08 01:12:05 +00:00
cb1c76a0db wvkbd-mk: init 2024-03-08 01:06:13 +00:00
27c12edec0 wvkbd: change default key border 2 -> 1 px
since moby is scaled 2x, it's actually 2 px *in practice*
2024-03-08 00:45:45 +00:00
b41320ffb3 megapixels: fix sandbox-related crash 2024-03-08 00:16:29 +00:00
ac41cfcd42 wvkbd: tune height (by guess) 2024-03-08 00:01:23 +00:00
62cbc65f12 epiphany: fix sandboxing 2024-03-07 23:24:33 +00:00
ccb856faf5 sane-input-handler: power -> vol to rotate display 2024-03-07 23:22:07 +00:00
d7f4438371 nixpatches: update procmail cross hash 2024-03-07 23:21:38 +00:00
f44c3f2e1f moby: auto-screenoff: bump timeout from 150s -> 300s 2024-03-07 23:14:03 +00:00
bb300a4eb5 swayidle: dont enable screenoff action by default 2024-03-07 11:18:34 +00:00
fd4842ab5b swayidle: auto screenoff 2024-03-07 10:59:44 +00:00
1cdc3b8bda moby: enable schlock screen locker 2024-03-07 10:37:18 +00:00
531ea11b3d schlock: fix cross build 2024-03-07 10:36:51 +00:00
041ce0654e schlock: sandbox + auto-launch via .desktop file 2024-03-07 10:32:40 +00:00
526a02bb73 schlock: ship a .desktop file 2024-03-07 10:25:41 +00:00
1d0458ab10 schlock: ship as sane.programs 2024-03-07 10:10:39 +00:00
4358f9471e schlock: init
it works! super jank; doesn't accept keyboard input, fails-open on
crash.
2024-03-07 09:36:53 +00:00
cb3a1fb3fe swaylock-mobile: init (i won't likely use it though) 2024-03-07 01:42:43 +00:00
72d52f9239 sxmo_swaylock: init at unstable-2023-04-26 (but i won't likely use it) 2024-03-07 01:34:53 +00:00
219fe67f34 systemd: reduce shutdown timeout from "20" to "10" sec (40s IRL) 2024-03-07 01:01:06 +00:00
b36d224b85 swaylock-plugin: init (but i likely won't be using it) 2024-03-07 01:00:44 +00:00
90e3c33536 feeds: subscribe to slatecave.net 2024-03-06 22:40:57 +00:00
a9419b7351 swayidle: sandbox 2024-03-06 21:33:11 +00:00
f0d0343b32 sway: lappy: fix output name 2024-03-06 21:18:43 +00:00
bd27f3a015 swayidle: enable; pair with swaylock 2024-03-06 20:55:01 +00:00
6a3e632335 sway: remove config for old external displays i no longer use 2024-03-06 19:03:13 +00:00
a4c4b0575c sway: map touch inputs to their correct display 2024-03-06 19:02:23 +00:00
4730a65008 nixpkgs: 2024-03-05 -> 2024-03-06
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/16bca48d251761297746d5bb7b9e47a3c6564c5a' (2024-03-05)
  → 'github:nixos/nixpkgs/09c267dae0dae6585ddbc98bd2301bd8153ac177' (2024-03-06)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/b3ed737064bc4cc0312081b6937fa2bb48d62afa' (2024-03-05)
  → 'github:nixos/nixpkgs/a85303aef29c6a9000a259ed21c9c14a1aa3859e' (2024-03-06)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/291aad29b59ceda517a06e59809f35cb0bb17c6b' (2024-03-04)
  → 'github:Mic92/sops-nix/25dd60fdd08fcacee2567a26ba6b91fe098941dc' (2024-03-06)
```
2024-03-06 09:54:23 +00:00
63d95edcbe zsh: fix c alias 2024-03-06 09:47:33 +00:00
687e72897b xdg-desktop-portal: don't always prompt the user for how to open every file 2024-03-06 06:25:36 +00:00
0e84744115 todo.md: xdg-desktop-portal improvements 2024-03-06 06:25:14 +00:00
1ee38d3aec todo.md: remove completed items 2024-03-06 05:28:18 +00:00
5f4e421ab9 sane-wipe: fix sandboxing 2024-03-06 05:11:24 +00:00
471339d237 hosts (all): remove sxmo-related polyfills 2024-03-06 05:07:30 +00:00
085232f18c wvkbd: configure layers 2024-03-06 05:07:30 +00:00
18c7fc17fd alacritty: configure font size per-host 2024-03-06 05:07:30 +00:00
a7567dfbe6 ship celeste64 2024-03-06 04:56:39 +00:00
bc0660b623 PDF viewer: evince -> zathura 2024-03-06 04:51:01 +00:00
cf86b4a67c xterm: move to pcGuiApps 2024-03-06 04:38:05 +00:00
d39bed46b5 rofi: allow access to Books 2024-03-06 01:39:48 +00:00
525450e21a fix backlight persistence 2024-03-06 00:58:11 +00:00
a4ee820921 /var/lib/colord: don't persist
files haven't changed in over a year; i assume it's legacy
2024-03-05 23:53:41 +00:00
4b5d6b16e1 alacritty: ignore media keys 2024-03-05 23:25:31 +00:00
41a141dba6 servo: disable navidrome 2024-03-05 18:48:25 +00:00
d5811f142d notifyActive activation script -> apply only to GUI systems
else i get warnings on every servo activation
2024-03-05 18:46:43 +00:00
4d6d79cc81 servo: /var/lib/uninsane/media -> /var/media 2024-03-05 18:44:30 +00:00
53d76920e4 servo: persist more specifically the /var/lib/uninsane/media directory 2024-03-05 18:39:23 +00:00
db892273ac nixpatches: fix imagemagick cross fix hash 2024-03-05 18:37:09 +00:00
65e206afde nixpkgs: 2024-03-04 -> 2024-03-05
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/1a3380fec6e3c2d539e58c4be6a4a094d7d14aea' (2024-03-04)
  → 'github:nixos/nixpkgs/16bca48d251761297746d5bb7b9e47a3c6564c5a' (2024-03-05)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/4c0862ebf8e474315767c5210c3d0a336625f318' (2024-03-04)
  → 'github:nixos/nixpkgs/b3ed737064bc4cc0312081b6937fa2bb48d62afa' (2024-03-05)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/075df9d85ee70cfb53e598058045e1738f05e273' (2024-03-03)
  → 'github:Mic92/sops-nix/291aad29b59ceda517a06e59809f35cb0bb17c6b' (2024-03-04)
```
2024-03-05 10:09:39 +00:00
6765fe8d7d wob: rename sxmo.wobsock -> wob.sock 2024-03-05 10:00:45 +00:00
955119e07b wob-audio: fix, by finishing the port to pipewire
also rewrote it in Python because bash can't do floating point math
2024-03-05 09:32:37 +00:00
daddf9314a gpodder: fix .desktop file(s) 2024-03-05 02:58:21 +00:00
e59123fd62 cozy: fix patch hash 2024-03-05 02:58:14 +00:00
d43cc6c61c alsa-ucm-conf: fold the Pinephone patches into sane.programs.alsa-ucm-conf & distribute to all hosts 2024-03-05 00:28:07 +00:00
a8bc77d40c nixpkgs sourceInfo patching: move to nixpatches/
previously i was using the sourceInfo of the flake, which is kinda wrong: and it would force a _new_ nixpkgs for every time i commit to my own repo -- not just when i bump it
2024-03-05 00:06:08 +00:00
dfc768e2e6 flake: place builds strictly in build/ directory 2024-03-04 23:47:31 +00:00
3544b4b132 nixpkgs: 2024-03-03 -> 2024-03-04
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/6a2985393fcc1dfabc6d36af148ca761a807e002' (2024-03-03)
  → 'github:nixos/nixpkgs/1a3380fec6e3c2d539e58c4be6a4a094d7d14aea' (2024-03-04)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/286977c08ddf540b4c6bebd8cd96fe30070bcb46' (2024-03-03)
  → 'github:nixos/nixpkgs/4c0862ebf8e474315767c5210c3d0a336625f318' (2024-03-04)
```
2024-03-04 09:41:23 +00:00
c86afca795 cozy: patch via sane.programs, not overlay 2024-03-04 09:26:25 +00:00
5f3ef37050 cozy: 1.2.1 -> 1.3.0 2024-03-04 08:57:52 +00:00
3b8252fe43 delfin: doc improvements 2024-03-04 08:28:50 +00:00
1e6e4d2644 cozy: doc improvements 2024-03-04 08:28:35 +00:00
60c447b6c4 signal-desktop: 6.44.0 -> 7.0.0 2024-03-04 08:26:59 +00:00
4fc2ffef56 koreader-from-src: 2024.01 -> 2024.03 2024-03-04 08:19:41 +00:00
9416ef1ff6 firefox-extensions: update 2024-03-04 08:18:48 +00:00
b1dff9bfa8 steam: fix controllers to work in the sandbox 2024-03-03 20:03:20 +00:00
0003acc091 nixpkgs: 2024-03-02 -> 2024-03-03
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/aefac840b87e8e0ab658fa5080539e292ad8a9ba' (2024-03-02)
  → 'github:nixos/nixpkgs/6a2985393fcc1dfabc6d36af148ca761a807e002' (2024-03-03)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/df41961bd4b7e838cb997543ea1297f4cbd7da15' (2024-03-02)
  → 'github:nixos/nixpkgs/286977c08ddf540b4c6bebd8cd96fe30070bcb46' (2024-03-03)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/a1c8de14f60924fafe13aea66b46157f0150f4cf' (2024-02-26)
  → 'github:Mic92/sops-nix/075df9d85ee70cfb53e598058045e1738f05e273' (2024-03-03)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/89a2a12e6c8c6a56c72eb3589982c8e2f89c70ea' (2024-02-25)
  → 'github:NixOS/nixpkgs/66d65cb00b82ffa04ee03347595aa20e41fe3555' (2024-03-03)
```
2024-03-03 10:11:16 +00:00
0630037f86 steam: sandbox
controllers are untested, probably need to be added; graphics and sound work fine
2024-03-03 10:10:14 +00:00
9513680538 sway: enable net access in the sandbox (for Xwayland) 2024-03-03 10:09:29 +00:00
0affeb098a rofi: optimize sizing 2024-03-03 07:36:33 +00:00
979d07d693 wob: port pulseaudio -> pipewire 2024-03-03 07:22:03 +00:00
fd072883dc sane-input-handler: port pulseaudio -> pipewire native 2024-03-03 07:13:23 +00:00
ed87792f9b sed: sandbox 2024-03-03 07:06:00 +00:00
8821b3ca7d procps: sandbox 2024-03-03 06:55:17 +00:00
5e5a1fbaae rofi: allow to use more space on moby when keyboard is active 2024-03-03 04:46:12 +00:00
d2f470dc74 wvkbd: sandbox 2024-03-03 04:44:23 +00:00
7933ef41a2 unl0kr: simplify this code 2024-03-03 04:43:44 +00:00
6b45589e54 wireplumber: ensure ALSA_UCM_CONF2 env var is on PATH
this is critical for pipewire/wireplumber to work on moby
2024-03-03 04:43:11 +00:00
b04357c9de nix.conf: dont ship NIX_PATH for light deploys
it's like 150 MiB
2024-03-03 03:53:13 +00:00
4b04cbc078 mpv: couple app volume to system volume 2024-03-03 03:22:28 +00:00
1498e364b2 doc: mimeo: mention jaro as alternative 2024-03-03 03:16:10 +00:00
0aaa3eaaeb mpv: remove legacy vo=wlshim hack 2024-03-02 23:46:52 +00:00
3ac6b92c18 /etc/nix/registry.json: don't generate for -light builds (it links back to src) 2024-03-02 23:42:58 +00:00
c747855810 bonsai: sandbox 2024-03-02 22:34:38 +00:00
711865018d /etc/nixos: don't link on '*-light' builds 2024-03-02 22:13:04 +00:00
f33fcc2018 nixpatches: update hashes 2024-03-02 21:23:44 +00:00
96ec0106ee sane-input-handler: leverage sane-open-desktop instead of making direct gdbus calls 2024-03-02 21:20:47 +00:00
0c4d7761d3 sane-input-handler: sandbox 2024-03-02 21:20:47 +00:00
fe10640821 wob-pulse: sandbox 2024-03-02 20:57:44 +00:00
1f208083be mpvScripts.uosc: 5.1.1 -> 5.2.0 2024-03-02 20:39:04 +00:00
6ec3126321 moby: fix display driver reload check to run before unl0kr
this should fix the no-graphics-on-boot bug i'm seeing. it was previously fixed for lightdm and greetd: just not unl0kr
2024-03-02 19:50:50 +00:00
8029744c90 modules/programs: don't expose *all* of /run/secrets/home to every program
this was actually causing a lot of bwrap errors because that directory's not user-readable

turns out any program which already uses programs.xyz.secrets gets the /run/secrets mounts for free via symlink following
2024-03-02 18:51:39 +00:00
1fcf0bfcb1 swaync: fix signal-desktop check to be --user 2024-03-02 18:33:35 +00:00
a3ae650273 dialect: fix so it works inside a sandbox 2024-03-02 18:25:13 +00:00
7e0bef549f nixpkgs: 2024-03-01 -> 2024-03-02
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/ee743c92310804de4b4505ff0ac40b4f3f4f49de' (2024-03-01)
  → 'github:nixos/nixpkgs/aefac840b87e8e0ab658fa5080539e292ad8a9ba' (2024-03-02)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/f7fca9d98b0ec282f4b0d63f1fc2e38caf4ea55a' (2024-03-01)
  → 'github:nixos/nixpkgs/df41961bd4b7e838cb997543ea1297f4cbd7da15' (2024-03-02)
```
2024-03-02 07:52:21 +00:00
3b603519ff fuzzel: sandbox (well, i probably dont even have it on my system anymore :P) 2024-03-02 07:43:42 +00:00
f69ca166f4 sway: sandbox 2024-03-02 07:41:51 +00:00
a45e42910d make-sandboxed: generalize runCommand patch to handle any derivation, called with or without callPackage 2024-03-02 07:11:45 +00:00
3dd1d18dcd less: sandbox 2024-03-02 07:11:45 +00:00
28cb705bd4 grim: sandbox 2024-03-02 07:11:45 +00:00
7fa1dbc5d5 slurp: sandbox 2024-03-02 07:11:45 +00:00
8b7575c205 swappy: sandbox 2024-03-02 07:11:45 +00:00
52e9902fa1 sane-screenshot: give it permissions to my screenshots dir (derp) 2024-03-02 06:14:05 +00:00
ab765a81af sway: integrate sane-screenshot as the PrintScreen shortcut 2024-03-02 06:14:05 +00:00
a7bd831ad8 sane-screenshot: port to sane.programs 2024-03-02 06:14:05 +00:00
063d99dd73 todo.md: task to remove /run/wrappers 2024-03-02 05:42:26 +00:00
0d48c462cb sane-screenshot: init 2024-03-02 02:04:48 +00:00
f4ec09f010 rofi: remember the last selected directory 2024-03-02 00:35:29 +00:00
a7ef9fc0b8 todo.md: task for better app integrations 2024-03-02 00:21:56 +00:00
a40cefc8a5 pipewire: speculatively add /dev/video* 2024-03-02 00:14:47 +00:00
f55bb3518f wireplumber: add missing /dev/video2 which is on moby 2024-03-02 00:14:21 +00:00
3d16aa62ea sway: let the pinephone default to it's normal scaling
it's actually pretty nice at 2.0 scaling with my current apps. i'll need to tweak swaync, conky, wvkbd, etc. later.
2024-03-01 23:53:31 +00:00
2548cfeadc xdg-desktop-portal-wlr: fix crashing due to over-restrictive sandbox 2024-03-01 21:17:31 +00:00
90acbf716d Videos/gPodder: allow access from mpv and rofi 2024-03-01 21:02:04 +00:00
4d98593b3f todo.md: sync 2024-03-01 20:48:56 +00:00
db89ac88f0 sane-sandboxed: add new --sane-sandbox-keep-namespace all option 2024-03-01 20:48:56 +00:00
bba149c670 zsh: new c helper to change into a dir and list it 2024-03-01 20:09:20 +00:00
c056984003 zsh: alias exiy -> exit 2024-03-01 19:56:09 +00:00
2324d75165 switch psmisc -> killall
otherwise a really shitty `pstree` makes its way onto my PATH
2024-03-01 18:50:20 +00:00
9296b7731b rofi: add a .desktop file to rofi-snippets 2024-03-01 18:07:52 +00:00
75e9ce509e static-nix-shell: add support for extra nativeBuildInputs 2024-03-01 18:07:07 +00:00
95c95d6f53 splatmoji: actually install the .desktop files 2024-03-01 18:03:45 +00:00
fca23e661a xdg-desktop-portal: disable debug logging 2024-03-01 17:50:49 +00:00
9a7ebbd9d3 rofi: configure window height/location 2024-03-01 17:18:40 +00:00
56b00d998e rofi: theme
i still need to figure out how to make it wider for moby
2024-03-01 16:40:09 +00:00
01ef182073 waybar: theme the indicator style
i don't know if it's perfect, but it is better
2024-03-01 15:32:52 +00:00
b6daeddfa2 waybar: show different modules for moby v.s. others 2024-03-01 15:25:42 +00:00
c6e956f3d2 waybar: fix button.urgent color to match sway's client.urgent 2024-03-01 15:03:14 +00:00
f9510e5d24 nixpkgs: 2024-02-29 -> 2024-03-01
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/e894afb6c101fea0771b47d7827bef022e89ee1e' (2024-02-29)
  → 'github:nixos/nixpkgs/ee743c92310804de4b4505ff0ac40b4f3f4f49de' (2024-03-01)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/d29fabd630000579f744d04639d625828ba412bf' (2024-02-29)
  → 'github:nixos/nixpkgs/f7fca9d98b0ec282f4b0d63f1fc2e38caf4ea55a' (2024-03-01)
```
2024-03-01 07:31:58 +00:00
2e737c2ab1 moby: sxmo -> sway
still several things need to be improved, but the groundwork is there
2024-03-01 07:26:26 +00:00
82368eb45a sway: desko: fix monitor layout
i guess my monitor's name changed... 👀
2024-03-01 07:19:00 +00:00
65fb9e1d57 rofi: allow access to more servo media paths 2024-03-01 07:14:41 +00:00
b02ae7ef74 moby: polyfill an OK sway layout 2024-03-01 05:20:28 +00:00
37ddb2ae17 waybar: fix font size to be more usable on moby 2024-03-01 04:46:06 +00:00
81e02e2885 sway: moby: fix layout/scale preferences 2024-03-01 04:38:26 +00:00
4a3f59468c sway: launch gui apps via sane-open-desktop instead of inline
this will allow for sandboxing, in the future
2024-03-01 04:19:19 +00:00
daab5939e7 rofi: split sane-open-desktop out as a helper 2024-03-01 04:19:19 +00:00
e7430c41f9 refactor: sway-config: for readability 2024-03-01 03:29:52 +00:00
5849e75577 sway-config: remove dead window specializations 2024-03-01 03:21:47 +00:00
296123651c sway: fold sway-config.nix into default.nix 2024-03-01 03:18:37 +00:00
7f0d5e7810 sane-input-handler: explain why i setsid 2024-03-01 03:11:06 +00:00
7af928a6d2 sway: direct inputs to bonsai WITHOUT swallowing them 2024-03-01 03:10:44 +00:00
b73569d675 wvkbd: fix service typo 2024-02-29 22:04:42 +00:00
50ee15ef2b send sway-related cross patches upstream 2024-02-29 21:35:02 +00:00
9764d5f095 sway/waybar: decrease cross-specific patches
cava cross compiles now (yay); sndio is actually required by waybar if cava is enabled, so remove the disable
2024-02-29 18:56:54 +00:00
43386f3ba5 nixpkgs: update; couple cross-compiling patches have merged upstream
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/0852bff4370133e3a62b0cc7d14d193b928a7c59' (2024-02-29)
  → 'github:nixos/nixpkgs/e894afb6c101fea0771b47d7827bef022e89ee1e' (2024-02-29)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/9f21aa90cb8c078969543956d88c19696b646743' (2024-02-29)
  → 'github:nixos/nixpkgs/d29fabd630000579f744d04639d625828ba412bf' (2024-02-29)
```
2024-02-29 18:22:35 +00:00
a3a6278a59 notifyActive: don't depend on sway
it was a little silly to be shipping sway on headless systems
2024-02-29 17:32:19 +00:00
083f743c1f remove nixpkgs less defaults and manage PAGER myself
this lets me avoid the lesspipe cross failures, notably
2024-02-29 15:18:51 +00:00
626ad97005 nixpkgs: 2024-02-27 -> 2024-02-29
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/6daf4de0662e1d895d220a4a4ddb356eb000abe9' (2024-02-27)
  → 'github:nixos/nixpkgs/0852bff4370133e3a62b0cc7d14d193b928a7c59' (2024-02-29)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/5bd8df40204f47a12263f3614c72cd5b6832a9a0' (2024-02-27)
  → 'github:nixos/nixpkgs/9f21aa90cb8c078969543956d88c19696b646743' (2024-02-29)
```
2024-02-29 06:42:18 +00:00
6253d1799a port sxmo_hook_inputhandler.sh -> sane-input-handler
this one can run outside the SXMO environment.
major thing missing at the moment is that rofi doesn't get volume
control inputs because bonsai out-competes it for exclusive control.
2024-02-29 01:26:38 +00:00
d8a8038cae xdg-terminal-exec: define a .desktop file 2024-02-29 00:17:26 +00:00
7fd56b63cb rofi: better patch for the DT_UNKNOWN edgecase 2024-02-28 21:41:59 +00:00
7a65bd36c7 rofi: patch the filebrowser to reliably list entries on remote filesystems
see: <https://github.com/davatorium/rofi/issues/1954>
2024-02-28 21:18:19 +00:00
bd4eeeeb3b nixpatches: imagemagick closure fix: mark as merged upstream 2024-02-28 18:27:15 +00:00
7c22b59b9d sane-which: handle relative symlinks 2024-02-28 18:16:08 +00:00
9e504676bd sane-which: only print the first 30 lines for text files 2024-02-28 18:09:38 +00:00
b515127101 sane-which: follow nix wrappers 2024-02-28 18:09:24 +00:00
40e30cf2f8 programs: make sandbox.wrapperType default to "wrappedDerivation" and remove everywhere i manually set that 2024-02-28 17:39:00 +00:00
812c0c8029 packages: reduce the number of packages which are using inplace sandbox wrapping 2024-02-28 17:35:40 +00:00
7ca5ae84b7 flake: deploy: abort on error 2024-02-28 17:34:45 +00:00
a4248fd5cc make-sandboxed: don't try to wrap directories
whoops. test -x is true for directories
2024-02-28 16:28:25 +00:00
70229e0839 rofi: persist the filebrowsercache 2024-02-28 15:41:52 +00:00
cd303a76bc rofi: disable "run" from combi
they wouldn't work, since i only 'xdg-open' the entries
2024-02-28 15:32:12 +00:00
e43aa3bb8b splatmoji: fix sandboxing so rofi can read its config/cache 2024-02-28 15:19:53 +00:00
6c2d80715c rofi-snippets: fix sandboxing so rofi can read its config/cache 2024-02-28 15:15:02 +00:00
db8456f152 flake: provide a "benchmark" target 2024-02-28 15:10:45 +00:00
d912190db5 sway: split snippets into own program (rofi-snippets) 2024-02-28 14:44:05 +00:00
c380f61bea fix "rescue" host to eval again 2024-02-28 14:19:45 +00:00
ff8cfc9372 flake: fix check.nur target 2024-02-28 13:47:51 +00:00
b302113fc0 modules/programs: require manual definition; don't auto-populate attrset
this greatly decreases nix eval time
2024-02-28 13:35:09 +00:00
9749ff0442 sane.gui.phosh: remove 2024-02-28 13:35:05 +00:00
0d97191f74 sane-wipe-browser: dont call pkill with sudo 2024-02-28 13:35:00 +00:00
3816393e06 rofi: try integrating rofi-emoji (failed) 2024-02-28 01:28:05 +00:00
4c6c470c86 sway: snippets: port from fuzzel -> rofi 2024-02-28 01:26:22 +00:00
409a4db232 splatmoji: use rofi instead of fuzzel
will be best if i can port everything to one dmenu helper
2024-02-28 01:18:51 +00:00
c73684557e overlays: remove dead optimizations overlay (old ccache stuff) 2024-02-28 00:19:29 +00:00
44067f6570 cross: document the state of gnome-keyring 2024-02-28 00:05:23 +00:00
466e7a9ecd cross: libshumate: push patch upstream 2024-02-27 23:58:49 +00:00
6b2d189771 cross: graphicsmagick: push patch upstream 2024-02-27 23:46:05 +00:00
6ef729bbaf assorted: prefer runCommandLocal over runCommand where it makes sense 2024-02-27 22:26:56 +00:00
8f424dcd5a programs: sandboxing: link /etc into sandboxed programs
this is crucial for e.g. swaync, to find its resource files.
maybe a good idea to link *every* package directory which i also link
into /run/current-system.
2024-02-27 22:25:17 +00:00
7fb7f72bc0 cross: remove modemmanager patch; it compiles OOTB :)
thanks Cole!
2024-02-27 22:08:12 +00:00
67536e3c1f programs: assorted: correct sandbox paths now that Pictures/Videos/Books are categorized
i don't like this Pictures/ approach though. i may reconsolidate some of those
2024-02-27 21:37:20 +00:00
715de37954 rofi: fix files to be opened with xdg-open 2024-02-27 21:20:12 +00:00
c8035abddf fs: Books: persist subdirectories individually
TODO: KOReader will need to be updated for this
2024-02-27 20:48:38 +00:00
ef1cdac6b4 fs: split Pictures into separate persisted directory
TODO: update camera and screenshot apps to be aware of these directories
2024-02-27 20:46:25 +00:00
e37a7d85b3 ~/Videos: don't persist ALL videos: just ~/Videos/local
otherwise, ~/Videos/servo is a symlink which the programs module doesn't know how to traverse (and hence, sandbox).
2024-02-27 20:45:56 +00:00
36f6c72183 rofi: sandbox, and launch apps via xdg-open or gdbus 2024-02-27 18:35:15 +00:00
20a1aeb5b3 programs: add gdbus as a standalone program, separate from the rest of glib 2024-02-27 18:28:24 +00:00
9ba0833d5f todo.md: remove completed/obsoleted tasks 2024-02-27 17:40:42 +00:00
15f353f883 overlays: remove disable-flakey-tests: everything there only applied to emulated builds, which i no longer do 2024-02-27 17:34:22 +00:00
27af0002c8 nixpatches: remove obsoleted j4-menu-desktop build fix 2024-02-27 17:32:56 +00:00
9265252e04 nixpatches: remove stale commented-out patches 2024-02-27 17:29:17 +00:00
11a53c402d nixpatches: procure procmail cross fix from nixpkgs PR 2024-02-27 17:24:20 +00:00
464f439f4a nixpatches: remove ccache cross fix
i assume this was only needed when i was using binfmt?? anyways it doesn't apply cleanly
2024-02-27 17:04:44 +00:00
a4dbf18d7a nixpatches: remove upstreamed "allow i2p to build on aarch64" patch 2024-02-27 17:04:40 +00:00
1579e089e9 cross: remove superfluous spandsp fix
it was upstreamed to nixpkgs 2.5 years ago:
<https://github.com/NixOS/nixpkgs/pull/134698>

meanwhile, my patch was added in 46dabcd33f
2023-03-07: "cross compilation: speculatively compile spandsp with ac_cv_func_malloc_0_nonnull"

this was at a time when nixpkgs spandsp had version 3 and 0.0.6,
and *possibly* only 0.0.6 had the fix.
the fix was added to version 3 in nixpkgs
88cbe74d05cac6e037e934ee7fbe8b1f0d164f25, dated 2023-02-26.
2024-02-27 16:54:59 +00:00
4ce0c23c19 cross: comment out/remove a few more cross fixes for packages i don't plan to use 2024-02-27 16:44:47 +00:00
9710d55c6a cross: comment out/remove cross fixes for packages i don't plan to use anytime soon 2024-02-27 16:20:55 +00:00
4b014af4b1 cross: disable unneeded libei patch 2024-02-27 16:11:59 +00:00
4379addf9e plumb my configured sway through to everywhere that wants pkgs.sway.
kinda ugly. this lets me avoid having multiple versions of sway on my
system.
2024-02-27 16:11:10 +00:00
5c7eceeb55 grimshot: move to own file 2024-02-27 14:54:53 +00:00
50aa16df81 cross compilation: remove unused patches; note upstreaming status 2024-02-27 14:53:26 +00:00
b1e943c9bb swaynotificationcenter: push cross fix upstream 2024-02-27 11:59:36 +00:00
be5fae369f swaynotificationcenter: fix cross compilation 2024-02-27 11:32:48 +00:00
40e22533fb swaynotificationcenter: update config/patches to be compatible with 0.10.0 2024-02-27 11:19:29 +00:00
03c5f82dbf flake: fix sourceInfo propagation (and hence, nixosConfiguration naming!) 2024-02-27 10:34:20 +00:00
e90bbfe551 nixpkgs: 2024-02-25 -> 2024-02-27
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/f42891a2fa716dcab10336a1b7313993430568ea' (2024-02-25)
  → 'github:nixos/nixpkgs/6daf4de0662e1d895d220a4a4ddb356eb000abe9' (2024-02-27)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8e474340ed0592ca21c1398d88dd89bf7100e881' (2024-02-25)
  → 'github:nixos/nixpkgs/5bd8df40204f47a12263f3614c72cd5b6832a9a0' (2024-02-27)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2874fbbe4a65bd2484b0ad757d27a16107f6bc17' (2024-02-25)
  → 'github:Mic92/sops-nix/a1c8de14f60924fafe13aea66b46157f0150f4cf' (2024-02-26)
```
2024-02-27 01:24:07 +00:00
92033c8414 rofi: place druncache into rofi cache dir 2024-02-27 01:21:27 +00:00
16f0424631 rofi: patch so that i can use -run-command "my-launcher {app_id}.desktop"
this plus xdg-desktop-portal's DynamicLauncher should provide a way to sandbox everything
2024-02-27 01:03:21 +00:00
6fd1ce1f61 rofi: port cache from plaintext to cryptClearOnBoot
because i don't think it has any invalidation logic
2024-02-26 23:04:50 +00:00
a7c325c8e1 xdg-desktop-portal: link applications so that DynamicLauncher portal can work 2024-02-26 22:31:48 +00:00
fc7814e6cd docs: mime: document gio launch 2024-02-26 22:29:15 +00:00
245e6c93cd docs: xdg-desktop-portal: document notable dbus endpoints 2024-02-26 22:29:03 +00:00
ec073592ed sway: use rofi app launcher instead of fuzzel 2024-02-26 21:22:03 +00:00
617525a317 programs: add rofi (dmenu-style launcher/file browser) 2024-02-26 21:21:30 +00:00
1098d121b4 firefox-extensions.sidebery: 5.0.0 -> 5.1.1.7 2024-02-26 18:07:45 +00:00
821c631b1d firefox-extensions.sponsorblock: 5.5.5 -> 5.5.6 2024-02-26 18:03:44 +00:00
96347ad7ac firefox-extensions.bypass-paywalls-clean: 3.5.5.0 -> 3.5.7.0 2024-02-26 18:02:10 +00:00
4f933cc0fa fix "update.pkgs" script 2024-02-26 18:01:47 +00:00
03615ce244 nixpkgs: 2024-02-24 -> 2024-02-25; sops-nix -> 2024-02-25
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/a3e2b0de906a8fe0143c2783199abdc132dee56a' (2024-02-24)
  → 'github:nixos/nixpkgs/f42891a2fa716dcab10336a1b7313993430568ea' (2024-02-25)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/b66514c14e85cd7d853d6dbbf1a421ba232eff10' (2024-02-24)
  → 'github:nixos/nixpkgs/8e474340ed0592ca21c1398d88dd89bf7100e881' (2024-02-25)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f6b80ab6cd25e57f297fe466ad689d8a77057c11' (2024-02-21)
  → 'github:Mic92/sops-nix/2874fbbe4a65bd2484b0ad757d27a16107f6bc17' (2024-02-25)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/69405156cffbdf2be50153f13cbdf9a0bea38e49' (2024-02-17)
  → 'github:NixOS/nixpkgs/89a2a12e6c8c6a56c72eb3589982c8e2f89c70ea' (2024-02-25)
```
2024-02-26 17:35:34 +00:00
7d613d90d8 nixcache: disable my own substituters by default 2024-02-26 17:35:34 +00:00
afd52014d1 sane-reclaim-disk-space: note to run as root 2024-02-26 15:25:12 +00:00
dd6e1c5e38 flake: fix "deploy" commands to bypass substituters, and address deprecated nix path signing 2024-02-26 15:01:14 +00:00
d0d7994c2f sxmo: remove 'greeter' option 2024-02-26 07:27:33 +00:00
b5da7a86fa libkiwix: 12.1.1 -> 13.1.0 2024-02-26 06:10:37 +00:00
f2e1bb6b86 programs: python3-repl: sandbox 2024-02-25 18:52:55 +00:00
fe0f6988bd programs: disable wine (unused) 2024-02-25 18:42:25 +00:00
c402a265cd programs: stepmania: sandbox 2024-02-25 18:26:32 +00:00
d5643a6a5d assorted static-nix-shell packages: use srcRoot 2024-02-25 17:37:38 +00:00
e757e35065 static-nix-shell: add a srcRoot argument which allows more precisely specifying the source files and avoiding unnecessary rebuilds 2024-02-25 17:37:10 +00:00
953dd98b0f refactor: static-nix-shell: remove unused options 2024-02-25 17:28:00 +00:00
c9c1181242 programs: wireplumber: sandbox 2024-02-25 17:11:48 +00:00
f9888fe8d6 programs: sane-private-init: sandbox 2024-02-25 16:46:10 +00:00
036145e6ba programs: sane-private-change-passwd: sandbox
note that this is entirely untested
2024-02-25 16:35:13 +00:00
5b647a1a90 programs: sane-private-change-passwd: rewrite based on how my system looks today
i haven't tested this
2024-02-25 16:28:57 +00:00
7c486492c8 programs: pipewire: port sandbox to bwrap and restrict further 2024-02-25 15:19:57 +00:00
890b41f563 programs: pipewire: sandbox
still need to sandbox wireplumber
2024-02-25 14:34:11 +00:00
ca36fe1b96 programs: gnome.seahorse: sandbox 2024-02-25 12:03:42 +00:00
d2df668c9e modules/programs: sane-sandboxed: replace --sane-sandbox-keep-pidspace with --sane-sandbox-keep-namespace <pid|cgroup|ipc|uts> 2024-02-25 12:00:00 +00:00
b7921ac41b refactor: programs: sort 2024-02-25 11:53:49 +00:00
c304367e21 programs: gnome-maps: sandbox 2024-02-25 11:51:50 +00:00
2ad33a49df refactor: pipewire: remove dead code 2024-02-25 10:38:42 +00:00
0b4efd2ab2 pipewire: migrate services to sane.programs to completely disable socket activation
see: https://github.com/NixOS/nixpkgs/issues/291318
2024-02-25 10:36:21 +00:00
0745e9fc06 refactor: programs: split gnome-maps into own file 2024-02-25 09:06:32 +00:00
e0267b5669 programs: pipewire: disable socket activation 2024-02-25 08:55:59 +00:00
b3c7aac8c5 programs: wike: sandbox: enable DRI to fix graphical glitches 2024-02-25 08:38:10 +00:00
c788596c45 programs: sane-private-do: grant net access
crucial for e.g. sane-private-do git push
2024-02-25 08:25:13 +00:00
f807d7c0a2 modules/programs: sane-sandboxed: bwrap: don't virtualize {/dev,/proc,/tmp} if explicitly asked to bind them instead
this is necessary for some programs which want a near-maximial sandbox, like
launchers or shells, or more specifically, `sane-private-do`.
2024-02-25 08:15:39 +00:00
6ab5dd8a8f modules/persist: ensure that the mountpoint for the private store is created at boot 2024-02-25 07:51:24 +00:00
52b8cd0209 modules/persist: ensure backing directory is created *before* we mount 2024-02-25 07:22:50 +00:00
6865331b48 programs: sandbox sane-scripts.private-do 2024-02-25 05:41:27 +00:00
dd00a2fe6e sane-private-do: run a shell by default, and leave the mount in its original state on exit 2024-02-25 05:41:27 +00:00
4ee02151f4 sane-private-{lock,unlock}: just defer to mount 2024-02-25 05:19:44 +00:00
00bf2f79cc ssh: clean up /etc/ssh/host_keys persistence 2024-02-25 05:19:44 +00:00
04a6055d06 remove /libexec from environment.pathsToLink 2024-02-25 05:12:44 +00:00
15a7793f0d bonsai: 1.0.2 -> 1.1.0 2024-02-25 01:59:01 +00:00
f714bd8281 programs: jq: sandbox 2024-02-25 01:59:01 +00:00
73b2594d9b programs: sandboxing: distinguish between "existingFileOrParent" and "existingOrParent" 2024-02-25 01:59:01 +00:00
a55dc5332d modules/programs: sane-sandboxed: introduce "existingOrParent" autodetect-cli option
some programs will want this, to create directories by name; e.g. archive managers
2024-02-25 01:48:10 +00:00
86108518da modules/programs: sane-sandboxed: add a new "existingFile" option for the cli autodetect 2024-02-25 01:43:39 +00:00
0f1ad0f3c9 fs: auto-mount /mnt/<host>/home and enable "follow_symlinks" option 2024-02-24 16:04:04 +00:00
bcd7a6f646 nixpkgs: 2024-02-22 -> 2024-02-24
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/024149d718e25378f4decfeeb614b88208c2f700' (2024-02-22)
  → 'github:nixos/nixpkgs/a3e2b0de906a8fe0143c2783199abdc132dee56a' (2024-02-24)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/a7fa133a1e973c127e9c83e2c8e3407ae3797099' (2024-02-22)
  → 'github:nixos/nixpkgs/b66514c14e85cd7d853d6dbbf1a421ba232eff10' (2024-02-24)
```
2024-02-24 12:21:27 +00:00
92c2eb8383 nixpatches: update the icu cross fix 2024-02-24 12:14:29 +00:00
879d01ac2e modules/ssh: note that theres a better store to place the ssh host_keys in 2024-02-24 12:14:14 +00:00
0448df51e3 modules/programs: sane-sandboxed: add a --sane-sandbox-dry-run flag 2024-02-24 12:00:58 +00:00
8e3eed7d51 modules/programs: sane-sandboxed: factor out the actual execution of the sandbox/program into the toplevel
this will make it easier to intercept
2024-02-24 11:57:42 +00:00
88a70b41f1 modules/programs: handle more symlink forms when calculating a program's sandbox closure 2024-02-24 11:47:39 +00:00
6f59254a22 modules/programs: fix symlink following 2024-02-24 05:36:44 +00:00
4023960dc0 README: MANUAL MIGRATION: move "plaintext" store to /nix/persist/plaintext
to migrate the data:
```sh
$ sudo mkdir /nix/persist/plaintext
$ sudo mv /nix/persist/{etc,home,var} /nix/persist/plaintext
$ sudo ln -s plaintext/etc /nix/persist/etc  #< temporarily; if deploying over ssh
$ switch
$ reboot
$ sudo rm /nix/persist/etc  #< if you did the symlink earlier
```
2024-02-23 18:02:17 +00:00
fff9f9d49a README: MANUAL MIGRATION: move "private" store to /nix/persist/private
to migrate the data, first unmount `~/private` (`sane-private-lock`), then:
```sh
$ sudo mv /nix/persist/home/colin/private /nix/persist
$ switch
$ reboot
```
2024-02-23 16:01:09 +00:00
eecb98e2ee programs: bonsai: fix eval error 2024-02-23 16:00:32 +00:00
5838603953 programs: sane-private-unlock: unbreak
it still doesn't work inside a sandbox, because 'mount' requires suid
2024-02-23 15:59:56 +00:00
c6ebcfe66e servo: port legacy /var/lib users over to "method = bind" persistence
i may wittle these down in the future
2024-02-23 15:49:54 +00:00
d7402ae170 persist: stores: make naming more consistent 2024-02-23 14:57:20 +00:00
bd7ca20361 desko: fs: remove dead code 2024-02-23 14:45:57 +00:00
f5ef1e96ca lappy: fs: remove dead code 2024-02-23 14:44:49 +00:00
6267e7f966 tidy up small persist/private nitpicks 2024-02-23 14:44:38 +00:00
120a41b169 persistence: split /var/log persistence into dedicated "initrd" store 2024-02-23 14:42:47 +00:00
aa0991bd6c persistence: cleanup so it all works well with symlink-based stores 2024-02-23 13:09:44 +00:00
af2f97d61e fs: ensure-file: don't error if the file already exists 2024-02-23 11:29:14 +00:00
5b8f13d9cc fs: notice when a fs entry is set to two incompatible types (e.g. symlink + dir) and error 2024-02-23 11:24:32 +00:00
62b39bf01e firefox: integrate the "persist" config into "sane.programs" 2024-02-23 11:23:41 +00:00
0d8307e877 programs: gnome-keyring: sandbox
and now secrets are readable again. they were broken for the last ~10 commits :)
2024-02-23 09:49:35 +00:00
9b1a2ae9bb programs: mpv: remove useless "extraRuntimePaths = []" override 2024-02-23 09:32:19 +00:00
b8b805765b programs: gnome-keyring-daemon: remove the SUID wrapper
it's not actually mandated. just, when enabled, gkd will `mlock` its
secrets into memory. but i don't use swap anyway. plus, i'll enable that
momentarily anyway (though systemd will probably not understand the
capablity)
2024-02-23 09:28:41 +00:00
84eae20765 gnome-keyring: don't integrate with PAM
PAM integration is only required if the keyring is encrypted on-disk
2024-02-23 09:15:30 +00:00
4a10c5f729 gnome-keyring: start as systemd service explicitly, not as implicit dbus service 2024-02-23 09:09:54 +00:00
c2696c1cd9 gnome-keyring: use sane.fs abstractions to write out the keyrings 2024-02-23 08:57:41 +00:00
c23e4dc9c7 servo: note why i use file.text instead of symlink.text here 2024-02-23 08:14:27 +00:00
ea6f45555c gnome-keyring: simplify the scripts (untested) 2024-02-23 08:14:09 +00:00
687db545b4 gnome-keyring: move persistence and init script to sane.programs 2024-02-23 07:22:07 +00:00
24d1d13d0a programs: simplify sandboxing of file browsers/etc now that private data lives on a different mount 2024-02-23 07:06:29 +00:00
2ada436634 home: remove ~/private symlink; move to .persist/private and add related aliases 2024-02-23 07:06:29 +00:00
e5ad0862fb refactor: move ~/ fs definitions into hosts/common/home, not users/ 2024-02-23 07:06:29 +00:00
057b9e3fed replace links/references to ~/private/FOO with just ~/FOO 2024-02-23 07:06:29 +00:00
1bcfccf7e3 refactor: persist ~/knowledge formally instead of relying on the symlink 2024-02-23 07:06:29 +00:00
170eeeacc4 programs: dereference not just the leaf, but any part of the path, when determining a program's sandbox closure 2024-02-23 07:06:29 +00:00
a402822084 move "private" store to /mnt/persist/private instead of ~/private
this will allow me to add all of ~ to a sandbox without giving all of ~/private
2024-02-23 07:06:29 +00:00
80ecdcc4f9 persist: plaintext: consider "/mnt/persist/plaintext" as the logical root, and abstract away "/nix/persist" 2024-02-23 07:06:29 +00:00
0864790bb7 docs: modules/persist: document the "origin" store parameter 2024-02-23 07:06:29 +00:00
478747a96e modules/persist: change default mounting method to symlink
this changes the plaintext and cryptClearOnBoot stores: private was already symlink-based.
this isn't strictly necessary: the rationale is:
1. `mount` syscall *requires* CAP_SYS_ADMIN (i.e. superuser/suid).
   that's causing problems with sandboxing, particularly ~/private.
   that doesn't affect other stores *yet*, but it may in the future.
2. visibility. i.e. it makes *clear* where anything is persisted.
   if `realpath` doesn't evaluate to `/nix/persist`, then it's not
   persisted.
2024-02-23 07:06:29 +00:00
771dc2e1ce fs: allow common /mnt points to be mounted by me without sudo 2024-02-23 07:06:29 +00:00
4a316d4b91 bonsai: lift out of sxmo 2024-02-23 07:06:29 +00:00
0ff8154e96 icu: fix cross compilation 2024-02-23 07:04:39 +00:00
af03b3f6e8 xwayland: sandbox 2024-02-23 01:05:24 +00:00
5819f07181 programs: xwayland: sandbox 2024-02-22 22:12:03 +00:00
122f3fa5cc sway: remove xwayland-specific placement of Signal
it breaks non-xwayland sway config parsing, and Signal is native Wayland now anyway even with Xwayland running'
2024-02-22 22:01:48 +00:00
ece612ea70 nixpkgs: 2024-02-21 -> 2024-02-22
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/97c19bdc7ecbe44755084a52acf38e17bdf2bc71' (2024-02-21)
  → 'github:nixos/nixpkgs/024149d718e25378f4decfeeb614b88208c2f700' (2024-02-22)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260' (2024-02-21)
  → 'github:nixos/nixpkgs/a7fa133a1e973c127e9c83e2c8e3407ae3797099' (2024-02-22)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/acfcce2a36da17ebb724d2e100d47881880c2e48' (2024-02-20)
  → 'github:Mic92/sops-nix/f6b80ab6cd25e57f297fe466ad689d8a77057c11' (2024-02-21)
```
2024-02-22 07:07:29 +00:00
f27f994090 systemd: fix the timeout for the user service manager 2024-02-22 00:24:05 +00:00
473999c001 sway: re-enable networkmanager 2024-02-21 23:46:25 +00:00
d1de9efde1 sway: port xwayland use to sane.programs API 2024-02-21 23:32:10 +00:00
50c3f04714 pipewire: remove dead alsa comments 2024-02-21 23:26:40 +00:00
49bad8f186 sway: split pipewire persisted file into pipewire.nix 2024-02-21 23:26:25 +00:00
fd9f500e97 sway: split pipewire config into separate sane.programs.pipewire 2024-02-21 23:23:52 +00:00
386651044e sway: port to sane.programs API 2024-02-21 23:18:57 +00:00
55a6c828f2 sway: lift portal/menu reset into polyunfill.nix 2024-02-21 22:09:53 +00:00
7ecebd7521 sway: treat fontconfig as an ordinary sane.programs 2024-02-21 22:08:45 +00:00
7b299176e3 sway: simplify the wrapper 2024-02-21 22:06:10 +00:00
4da9cb5ac8 sway: simplify the wrapper... slightly 2024-02-21 21:42:48 +00:00
f068da709f sway: compile with xwayland only if we plan to use it at runtime
else it's just extra weight
2024-02-21 21:05:41 +00:00
5b21257e4f gui: sway: remove useGreeter option (provide a greeter always, via suggestedPrograms) 2024-02-21 20:59:34 +00:00
d77a12ce7b unl0kr: remove the "afterLogin" option and choose automatically which desktop to launch 2024-02-21 20:47:48 +00:00
153d2a1047 GSK_RENDERER: don't set globally, but just for the apps which _actually_ require it
this way i can avoid conflicts around apps which don't expect this to be set (e.g. delfin)
2024-02-21 16:56:56 +00:00
2a528a5d8e sane-sandboxed: leave a note about future mount work 2024-02-21 16:08:42 +00:00
b8f090be93 programs: delfin: add required mpris permissions 2024-02-21 13:27:19 +00:00
b16902bec1 delfin: downgrade 0.4.1 -> 0.4.0
0.4.1 doesn't cross compile because of rust requirement. 0.4.0 does
2024-02-21 13:26:54 +00:00
c919372324 delfin: add option to build in debug mode, and with debug patches 2024-02-21 12:09:48 +00:00
60371585e4 delfin: 0.4.0 -> 0.4.1 2024-02-21 09:04:49 +00:00
20cb850fb5 nixpkgs: 2024-02-18 -> 2024-02-21
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/d076cde70cbceca9315a11bdc609ddfcec9dfbca' (2024-02-18)
  → 'github:nixos/nixpkgs/97c19bdc7ecbe44755084a52acf38e17bdf2bc71' (2024-02-21)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/9511a7b219df1f8d8f5c2a58c4870fde169fe397' (2024-02-18)
  → 'github:nixos/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260' (2024-02-21)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/ffed177a9d2c685901781c3c6c9024ae0ffc252b' (2024-02-18)
  → 'github:Mic92/sops-nix/acfcce2a36da17ebb724d2e100d47881880c2e48' (2024-02-20)
```
2024-02-21 00:35:14 +00:00
c6470918de types.string -> types.str 2024-02-21 00:25:44 +00:00
c0f374bd80 programs: sane-secrets-dump: don't leak secrets onto proc/cmdline 2024-02-21 00:24:31 +00:00
5a0760a571 programs: sandbox oathtools 2024-02-21 00:03:48 +00:00
757ab79724 programs: dconf: sandbox 2024-02-20 23:43:25 +00:00
81148b7b42 programs: explicitly depend on dconf instead of manually persisting dconf's dirs 2024-02-20 23:39:27 +00:00
429d0c53e7 programs: ripgrep: sandbox with bwrap instead of landlock
this provides network isolation
2024-02-20 23:32:54 +00:00
6cf1bc5a28 programs: grep: sandbox 2024-02-20 23:32:28 +00:00
768b340c93 findutils: sandbox
use bwrap instead of landlock for the dumb preference that i can disable
net
2024-02-20 23:31:58 +00:00
d9901aa161 programs: sane-secrets-*: sandbox 2024-02-20 23:31:39 +00:00
be2098c18a programs: sane-vpn: sandbox 2024-02-20 23:05:24 +00:00
ee7d99289a sane-vpn: allow shorthands like "sane-vpn up us" instead of full ovpnd-us 2024-02-20 23:01:53 +00:00
bb569b1668 sane-vpn: port away from systemd so that i can use it as an ordinary user (no sudo) 2024-02-20 22:21:02 +00:00
34524ea3e4 modules/vpn: fix the vpn-* systemd services 2024-02-20 20:40:46 +00:00
71025329e7 programs: sane-dev-cargo-loop: sandbox 2024-02-20 19:26:38 +00:00
ca4d1e3b9d programs: sane-tag-music: sandbox 2024-02-20 19:26:18 +00:00
284b698015 sane-reclaim-boot-space: fix, and sandbox
well i didn't get to test this thoroughly: might still have problems
2024-02-20 19:16:36 +00:00
bc50daf685 nix.settings: port to structured attrs 2024-02-20 18:35:03 +00:00
47dcfb9cba fix nix.settings.nix-path to actually take effect
now i can `nix-shell` again! nix-path takes precedence over `NIX_PATH`
env var.
2024-02-20 17:54:25 +00:00
2bd99f6e51 remove no-longer-needed nix trusted-users setting
well, it *seems* to work, at least!
2024-02-20 13:43:41 +00:00
8beac8df2f programs: sandbox sane-shutdown, sane-reboot 2024-02-20 13:43:05 +00:00
58db553c84 programs: unl0kr: sandbox 2024-02-20 13:29:56 +00:00
2ea3776d84 programs: sane-sync-from-servo: remove
this was obsoleted by the top-level flake `sync` scripts
2024-02-20 13:16:21 +00:00
d596d005ca systemd: configure a 25s stop timeout for the user manager too (hopefully) 2024-02-20 13:11:47 +00:00
e92db138ef systemd: allow ordinary users to invoke shutdown/reboot 2024-02-20 12:25:04 +00:00
5fed127c23 refactor: split systemd config into own file 2024-02-20 12:18:28 +00:00
db49f0461c refactor: move nix stuff out of common/default.nix -> common/nix/default.nix 2024-02-20 12:16:00 +00:00
73bb7827c0 refactor: nix-path/ -> nix/ 2024-02-20 12:13:52 +00:00
a624571b22 move glib program recommendation into programs/assorted.nix 2024-02-20 12:11:26 +00:00
53cbe5c8da dconf: split into own sane.programs definition 2024-02-20 12:09:52 +00:00
46de7b7e0d move environment.defaultPackages clearing into polyunfill.nix 2024-02-20 11:54:39 +00:00
d7be5da483 warnings.nix: port to a proper module 2024-02-20 11:19:12 +00:00
902e351085 hack: silence the warning about using hashedPasswordFile *and* initialPassword
see: <https://github.com/NixOS/nixpkgs/pull/287506>

i'll factor this into something more general, later
2024-02-20 11:11:07 +00:00
9e8e1d82a6 flake: add a deploy.self-light target 2024-02-20 10:24:33 +00:00
a05184f956 programs: neovim: fix nvim-treesitter typo 2024-02-20 10:23:52 +00:00
36ad2d5421 programs: unl0kr: auto-derive the user option 2024-02-20 07:21:22 +00:00
b0f62830a5 unl0kr: port to sane.programs 2024-02-20 07:14:30 +00:00
f970679266 sxmo: remove symlinks for legacy sxmo_hook_{poweroff,reboot}.sh 2024-02-20 06:49:42 +00:00
c7f4661c1c programs: htop: persist config 2024-02-20 05:38:45 +00:00
e8306831c5 programs: qemu: mark as slowToBuild 2024-02-20 05:34:47 +00:00
41b1a013d7 programs: sane-sudo-redirect: disable sandbox 2024-02-19 17:09:27 +00:00
f785ccd351 programs: sane-reclaim-disk-space: sandbox 2024-02-19 17:06:22 +00:00
48744dcaaa programs: sane-ip-reconnect: remove (unused) 2024-02-19 17:05:27 +00:00
9373864b60 programs: sane-git-init: remove (unused) 2024-02-19 16:53:59 +00:00
c16c9dfe0b programs: sandbox a bunch of sane scripts 2024-02-19 16:51:53 +00:00
292a411fb3 linux-megous: 6.7.2 (20240127-1717) -> 6.7.4 (20240211-1928) 2024-02-19 16:37:11 +00:00
2d17826731 programs: eza: sandbox with bwrap instead of landlock 2024-02-19 15:32:40 +00:00
34dedcff57 modules/programs: sane-sandboxed: fix normPath handling of paths containing special characters like [ 2024-02-19 15:32:23 +00:00
de297f22be programs: split sane-scripts out of assorted.nix 2024-02-19 14:19:10 +00:00
4b47b76461 programs: sfeed: sandbox 2024-02-19 14:14:59 +00:00
3effd59c9b xdg-desktop-portal-{gtk,wlr}: start via service manager, with ordered deps, instead of letting dbus activate it for us
that gets more reliable environment importing, etc
2024-02-19 13:44:23 +00:00
a3d0691d99 trivial-builders: add rmDbusServicesInPlace for when the symlink method isnt applicable 2024-02-19 13:43:22 +00:00
44647e0d36 programs: forkstat: sandbox 2024-02-19 13:15:15 +00:00
da1053d635 programs: configure auto-launching programs to only start *after* graphical-session.target
this ensures they really have their environment
2024-02-19 12:58:08 +00:00
273b1b84e3 systemd: reduce the stop job timeout 2024-02-19 12:58:08 +00:00
0b6b98bba6 sway: add a safeguard to catch if the systemd environ race condition is re-introduced 2024-02-19 12:58:08 +00:00
8886177c23 xdg-desktop-portal: fix it to find all the portal configs again
maybe i broke this when i simplified XDG_CONFIG_DIRS? not sure
2024-02-19 12:58:08 +00:00
7e343bfc05 sway: fix race condition around dbus/systemd environment importing 2024-02-19 10:52:51 +00:00
f72bdb6f3a activationScripts: notify on deploy: fix to work with new SWAYSOCK name 2024-02-19 08:21:23 +00:00
5666a05ef0 strip out a bunch of unused nixpkgs defaults 2024-02-19 06:20:13 +00:00
05daf738fc nixpkgs: 2024-02-17 -> 2024-02-18
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/6caa6affcc4774c81467ed08fa3ec35da40fd1d9' (2024-02-17)
  → 'github:nixos/nixpkgs/d076cde70cbceca9315a11bdc609ddfcec9dfbca' (2024-02-18)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/28d6a724f54085377102db7c3278ba82a0a5255f' (2024-02-17)
  → 'github:nixos/nixpkgs/9511a7b219df1f8d8f5c2a58c4870fde169fe397' (2024-02-18)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/48afd3264ec52bee85231a7122612e2c5202fa74' (2024-02-13)
  → 'github:Mic92/sops-nix/ffed177a9d2c685901781c3c6c9024ae0ffc252b' (2024-02-18)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/d8cd80616c8800feec0cab64331d7c3d5a1a6d98' (2024-02-10)
  → 'github:NixOS/nixpkgs/69405156cffbdf2be50153f13cbdf9a0bea38e49' (2024-02-17)
```
2024-02-18 19:05:04 +00:00
35b4cc779f megapixels: switch to bwrap, to support Loupe image viewer 2024-02-18 18:46:37 +00:00
c7d111a318 megapixels: 1.7.0 -> 1.8.0 2024-02-18 18:27:47 +00:00
7e5eb6324d megapixels: sandbox
it's iffy... 1.8.0 is released, which can be sandboxed w/o sys/dev/char or ~/.local/share/applications, but seems to be even flakier
2024-02-18 17:44:49 +00:00
95cb5624ca modules/programs: sane-sandboxed: fix but that --sane-sandbox-path / wasnt being canonicalized 2024-02-18 13:53:53 +00:00
55c305812d WIP: megapixels: sandbox 2024-02-18 13:53:18 +00:00
600f6eb56c modules/programs: sane-sandboxed: remove all remaining forks/subshells
launchtime for firefox in bwrap is about 65ms; 35ms for --sane-sandbox-method none
2024-02-18 13:15:04 +00:00
fd6f8493a7 modules/programs: sane-sandboxed: remove all forking from normPath
reduces time for librewolf benchmark from 90ms -> 65ms. there's still _some_ forking in this script, but it's constant now.
2024-02-18 12:25:03 +00:00
f10f1ee7b1 modules/programs: sane-sandboxed: optimize "normPath" to not invoke subshells
each subshell causes like 5ms just on my laptop, which really adds up.
this implementation still forks internally, but doesn't exec.
runtime decreases from 150ms -> 90ms for
`time librewolf --sane-sandbox-replace-cli true`
2024-02-18 12:08:23 +00:00
67395bdcd3 programs: ship forkstat 2024-02-18 11:58:30 +00:00
90ceeede74 programs: flare-signal: disable (unused) 2024-02-18 07:07:29 +00:00
32a704b1b8 moby: disable unused "calls" program
i may have future use for it, but as-is currently it's not worth the difficulty of sandboxing
2024-02-18 07:07:29 +00:00
a591be98d4 programs: portfolio-filemanager: sandbox 2024-02-18 07:07:29 +00:00
82e028e37d programs: nautilus: assign a mime priority 2024-02-18 07:07:29 +00:00
a531676d0d mime: include an error message when two file associations have identical mime priority 2024-02-18 07:07:29 +00:00
7f7543ee78 programs: planify: sandbox 2024-02-18 07:07:29 +00:00
8d0e3e0db3 programs: notejot: sandbox 2024-02-18 07:07:29 +00:00
bf352d184c programs: tangram: sandbox 2024-02-18 07:07:29 +00:00
81a6600f54 programs: xarchiver: sandbox 2024-02-18 07:07:29 +00:00
9fde167e71 firefox-extensions.open-in-mpv: build from source
this ensures that the extension and the native component stay in sync
2024-02-18 06:14:49 +00:00
4e180e11df open-in-mpv: update the non-browser component to 2.2.0
i _suppose_ i should keep these in sync... hmm
2024-02-18 06:02:00 +00:00
902166e45a sxmo-utils: 2024-01-01 -> 2024-02-05 2024-02-18 04:57:20 +00:00
797bc4e188 delfin: 0.3.0 -> 0.4.0
i can't upstream this until i figure out why both versions fail to open media for me (portal stuff?)
2024-02-18 04:54:35 +00:00
536f0aedc3 open-in-mpv: remove my patch which has been upstreamed, previously required to use xdg-open 2024-02-18 04:52:27 +00:00
b855df902f firefox-extensions: metamask,open-in-mpv,sponsorblock,ublacklist: update to latest 2024-02-18 04:50:03 +00:00
80ce49c579 firefox-extensions.bypass-paywalls-clean: 3.5.3.0 -> 3.5.5.0 2024-02-18 04:49:18 +00:00
408059420d snippets: prefer the repology link which specifically shows my outdated packages 2024-02-18 04:15:05 +00:00
a3102c9395 pkgs overlay: prefer my own packages, if theyre newer than whats in nixpkgs
this gives me an easier way to test updates for the packages i maintain than a workflow based on patching nixpkgs
2024-02-18 04:07:23 +00:00
6760fcf1f4 snippets: remove home-manager; add repology 2024-02-18 03:43:32 +00:00
a90898491e flake: fix "preDeploy" action mishandling null 2024-02-18 01:24:05 +00:00
059940d8e7 nixpkgs: 2024-02-16 -> 2024-02-17
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/0ec5bef772dc12003df7a55f7be1f7b8809f8b48' (2024-02-16)
  → 'github:nixos/nixpkgs/6caa6affcc4774c81467ed08fa3ec35da40fd1d9' (2024-02-17)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/1225df86908f6f5b23553e9d77da4df4bfdd58ef' (2024-02-16)
  → 'github:nixos/nixpkgs/28d6a724f54085377102db7c3278ba82a0a5255f' (2024-02-17)
```
2024-02-17 17:18:38 +00:00
98aafead94 programs: wob: add missing "coreutils" dep
it *should* be acquired via user's PATH, but wob-pulse can start before sway imports PATH to systemd
2024-02-17 16:38:22 +00:00
cef2591425 modules/programs: sane-sandboxed: capshonly/landlock: don't request capabilities we know won't be granted 2024-02-17 16:30:18 +00:00
f8663cd827 programs: monero-gui: sandbox 2024-02-17 16:06:58 +00:00
af1ee1734d programs: wireguard-tools: sandbox 2024-02-17 15:54:16 +00:00
5375cab716 programs: ntfy-sh: sandbox 2024-02-17 15:47:47 +00:00
162b3f5674 imagemagick: don't add 'ghostscript' package to path 2024-02-17 15:45:50 +00:00
a729f91d21 programs: jq: add working sandbox criteria, but don't enable yet
i need to handle the extremely common `cat foo | jq .` without adding
`.` to the sandbox
2024-02-17 15:36:41 +00:00
a273b559e2 programs: gnome-disk-utility: sandbox 2024-02-17 15:36:28 +00:00
785b375671 programs: smartmontools (smartctl): sandbox 2024-02-17 15:36:13 +00:00
24cba0c856 programs: xq: remove 2024-02-17 15:30:23 +00:00
df1db5d01c programs: sox: sandbox 2024-02-17 15:27:22 +00:00
6749b64bca programs: nautilus: add mounted media to the sandbox 2024-02-17 15:26:49 +00:00
d3e4bdfcd5 programs: gdisk: fix sandboxing 2024-02-17 15:26:16 +00:00
799cd4373f programs: socat: disable 2024-02-17 15:11:12 +00:00
2efa6d1e27 programs: mepo: sandbox 2024-02-17 15:08:21 +00:00
a1470956a5 programs: gdisk: sandbox 2024-02-17 14:57:33 +00:00
556c20bc04 programs: vulkan-tools: sandbox 2024-02-17 14:53:22 +00:00
cf5f58dda6 programs: nmap: sandbox 2024-02-17 14:51:26 +00:00
fd30f7abbc dev-machines: disable broken ldd-aarch64 program 2024-02-17 14:47:28 +00:00
6f8c299c69 programs: xdg-desktop-portal: log more 2024-02-17 14:40:56 +00:00
bbf7aac062 programs: gnome-frog: sandbox 2024-02-17 14:40:42 +00:00
7d1fd2f30a programs: nvme-cli: sandbox 2024-02-17 14:40:29 +00:00
472987f164 programs: gimp: fix sandboxing failure 2024-02-17 13:43:35 +00:00
784c2145f3 programs: iputils: sandbox 2024-02-17 03:33:05 +00:00
4ced02b0b2 modules/programs: make-sandboxed: fix incorrect "priority" attribute 2024-02-17 03:32:49 +00:00
0000afb315 programs: make nixosBuiltins package set more precise 2024-02-17 03:08:14 +00:00
31fa21bd20 programs: host/iproute2/iw/nettools/wirelesstools: sandbox 2024-02-17 03:05:58 +00:00
9510817604 programs: document nixosBuiltins programs 2024-02-17 02:40:28 +00:00
4a84de3ee4 programs: inetutils/iptables: sandbox 2024-02-17 02:32:57 +00:00
ab42a4cc5a programs: qemu: disable sandbox 2024-02-17 01:43:58 +00:00
f6537b083a programs: discord: add dbus to sandbox 2024-02-17 01:42:22 +00:00
5ff1d014b8 servo: transmission: fix user agent 2024-02-17 01:35:40 +00:00
fa41e6c402 nixpkgs: 2024-02-14 -> 2024-02-16; uninsane-dot-org -> 2024-02-15
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/52e165035c897a7b41ff26bc235f8d841e9d3850' (2024-02-14)
  → 'github:nixos/nixpkgs/0ec5bef772dc12003df7a55f7be1f7b8809f8b48' (2024-02-16)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/c0a130d16b170f4820c3d2ed294a7aaabf451bfd' (2024-02-14)
  → 'github:nixos/nixpkgs/1225df86908f6f5b23553e9d77da4df4bfdd58ef' (2024-02-16)
• Updated input 'uninsane-dot-org':
    'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=4a1fa488e64e6c87c6c951e3fafb2684692f64d3' (2024-01-01)
  → 'git+https://git.uninsane.org/colin/uninsane?ref=refs/heads/master&rev=bb10cd8853d05191e4d62947d93687c462e92c30' (2024-02-15)
```
2024-02-16 15:34:19 +00:00
1b4306e649 programs: switch bridge-utils, btrfs-progs from landlock -> bwrap
landlock can't isolate net yet, so bwrap gives better sandboxing
2024-02-16 15:32:41 +00:00
af8a8358bd programs: hdparm: sandbox 2024-02-16 15:32:41 +00:00
464c6c56c5 programs: btrfs-progs: sandbox 2024-02-16 15:32:41 +00:00
8e314e8b73 programs: bridge-utils: sandbox 2024-02-16 15:32:41 +00:00
198029f95f programs: netcat: sandbox 2024-02-16 15:32:41 +00:00
1d646459ab programs: pulsemixer: sandbox 2024-02-16 15:32:41 +00:00
8f3bab3636 programs: sort 2024-02-16 15:32:41 +00:00
a909a93c29 programs: strings: fix sandboxing 2024-02-16 15:32:41 +00:00
6aaa724abf programs: strings: sandbox 2024-02-16 14:57:25 +00:00
a1c721d5b4 programs: binutils-unwrapped -> strings: distribute just the binary i care about 2024-02-16 14:57:25 +00:00
4002a57e03 servo: transmission: advertise as 3.00 to deal with old trackers 2024-02-16 12:58:08 +00:00
74a0b0d125 gitea: serve phone-case-cq/ build files as proper html/js content type 2024-02-16 12:07:28 +00:00
cd3b4dde7b programs: nix-index: sandbox 2024-02-16 11:39:05 +00:00
a9d384688a programs: alsaUtils: sandbox 2024-02-16 11:28:43 +00:00
fffd6f4204 programs: pciutils: sandbox 2024-02-16 11:12:47 +00:00
324485d105 programs: networkmanagerapplet: sandbox 2024-02-16 11:07:24 +00:00
7cb8b144b2 programs: sandbox fatresize 2024-02-16 10:45:56 +00:00
c2bb97e7e6 programs: ethtool: sandbox 2024-02-16 10:38:39 +00:00
3cbdc03369 programs: zeal: disable sandboxing 2024-02-16 10:32:49 +00:00
5c7fa591a0 programs: sandbox: dtrx/e2fsprogs/efibootmgr/electrum 2024-02-16 10:32:18 +00:00
18c54e8b04 programs: sandbox cryptsetup and ddrescue (latter is untested, probably lacking!) 2024-02-16 10:05:24 +00:00
1416856fb6 programs: blueberry: sandbox 2024-02-16 07:58:00 +00:00
2a5bc6f612 programs: util-linux: disable sandbox 2024-02-16 07:37:59 +00:00
c56a6a8c24 programs: disable libcap_ng since it cant sandbox 2024-02-16 07:32:34 +00:00
f5a4bdedaf programs: libcap_ng (netcap): disable sandbox 2024-02-16 07:32:05 +00:00
114a45f347 programs: pstree: sandbox 2024-02-16 06:57:45 +00:00
d53344d527 programs: killall: sandbox 2024-02-16 06:57:32 +00:00
561447de70 programs: shattered-pixel-dungeon: sandbox 2024-02-16 06:57:03 +00:00
b6f918c32f TODO.md: update sandboxing tasks 2024-02-16 06:18:11 +00:00
9cc12fab5d programs: gpodder: fix to work in sandbox (add dbus) 2024-02-16 06:07:46 +00:00
5cda3b2805 programs: firefox/fractal: document portal filechooser limitations 2024-02-16 05:49:56 +00:00
4afd56ff4c programs: powertop: fix capabilities typo in sandbox definition 2024-02-16 05:49:13 +00:00
029ba43bd6 modules/programs: sane-sandboxed: invoke "capsh" with the --no-new-privs argument 2024-02-16 05:48:50 +00:00
00e4078300 programs: disable lemoa. it's broken and development doesn't seem to be progressing 2024-02-16 05:34:24 +00:00
94b4f78e39 programs: lemoa: sandbox 2024-02-16 05:32:22 +00:00
3fd89ec91b programs: sandbox powertop 2024-02-16 05:28:17 +00:00
4085828575 programs: sandbox parted 2024-02-16 05:28:07 +00:00
1a972927b6 programs: sandbox nethogs, nmon, nixpkgs-review 2024-02-16 05:27:50 +00:00
5f3ec42f57 programs: sandbox lsof with capsh only
can't get it to sandbox any more aggressively with either landlock or
bwrap
2024-02-16 04:55:18 +00:00
28aaeb051f programs: disable sandboxing for strace and screen 2024-02-16 04:51:52 +00:00
9d252d095e programs: htop/iotop/iftop: sandbox 2024-02-16 04:51:18 +00:00
4e5e4219ec programs: usbutils: sandbox 2024-02-16 04:03:47 +00:00
824dd7c1f5 programs: endless-sky: sandbox with bwrap 2024-02-16 04:00:27 +00:00
b840a0d61c programs: space-cadet-pinball: sandbox w/ bwrap 2024-02-16 03:58:09 +00:00
36bcecfd68 programs: sort 2024-02-16 03:53:53 +00:00
c3a5fb9394 programs: wdisplays: sandbox with bwrap 2024-02-16 03:53:27 +00:00
30507c3564 programs: soundconverter: sandbox with bwrap 2024-02-16 03:51:23 +00:00
2b66ffc58a programs: feedbackd: sandbox w/ bwrap 2024-02-16 03:49:59 +00:00
48d96c1f36 programs: hase: sandbox with bwrap
couldn't test the net feature, because hase servers have since gone
offline :((
2024-02-16 03:48:59 +00:00
cdf61755a3 programs: splatmoji: document the sandboxing approach 2024-02-16 03:46:48 +00:00
dd1dc69530 packages: remove unused kid3 2024-02-16 03:39:45 +00:00
481f54ea2f packages: disable unused packages: makemkv, mumble, openscad 2024-02-16 03:20:17 +00:00
511752fab5 programs: xdg-desktop-portal{-gtk,-wlr}: enable sandbox 2024-02-16 03:17:19 +00:00
40ed7cff1b programs: git: fix failing sandbox build 2024-02-16 03:16:46 +00:00
5e7f914354 programs: superTux: fix failing sandbox build 2024-02-16 03:16:28 +00:00
8c9c6ec979 modules/programs: make-sandboxed: support /libexec binaries 2024-02-16 03:15:45 +00:00
0dec8b6d5b programs: fontconfig: sandbox 2024-02-15 18:26:45 +00:00
7eaffc9fa0 programs: w3m: enable sandbox 2024-02-15 18:25:48 +00:00
b7c1a6331d programs: mate.engrampa: enable sandbox 2024-02-15 18:24:27 +00:00
d6868d58e6 xdg-desktop-portal: disable sandbox 2024-02-15 18:23:40 +00:00
1edb1fc8b6 modules/programs: sane-sandboxed: avoid adding the sandbox implementation to $PATH 2024-02-15 17:58:22 +00:00
52d768a162 programs: xterm: mark as not needing a sandbox 2024-02-15 17:26:55 +00:00
7a685d8de9 programs: inkscape: sandbox with bwrap 2024-02-15 17:26:37 +00:00
838c6d7dc8 programs: swaync: sandbox 2024-02-15 16:38:38 +00:00
8d20dcadd1 modules/programs: sane-sandboxed: add --sane-sandbox-keep-pidspace flag 2024-02-15 15:05:28 +00:00
9d706df5b5 programs: waybar: narrow the /run/user paths to just sway-ipc.sock 2024-02-15 14:40:01 +00:00
06f1f1e9ea sway: give SWAYSOCK a consistent name 2024-02-15 14:38:54 +00:00
2fbbe7fd78 sway: remove unused "sane.gui.sway.package" option 2024-02-15 14:38:10 +00:00
24d23f7903 programs: bemenu: fix sandboxing 2024-02-15 14:33:20 +00:00
0394aa65e9 sway: simplify config 2024-02-15 14:25:45 +00:00
5090c4e88c sway: define without using nixos "programs.sway"
motivation was to leverage 'sane.programs.sway.env' to statically configure SWAYSOCK. i think that's still the right way: we'll see
2024-02-15 14:25:27 +00:00
081114da65 programs: waybar: sandbox in a way that works well for moby too 2024-02-15 13:16:18 +00:00
c943442c94 modules/programs: sane-sandboxed: add --sane-sandbox-method none for benchmarking 2024-02-15 13:13:39 +00:00
02b7586ffa programs: komikku: add dbus to the sandbox to fix it 2024-02-15 11:58:08 +00:00
02dd629616 modules/programs: sane-sandboxed: rework so portal env vars arent set when sandbox is disabled
and by setting them only at launch time we aid introspectability/debugging
2024-02-15 11:57:36 +00:00
25dcb7f89a programs: open-in-mpv: document that upstream merged my PR 2024-02-15 11:38:37 +00:00
88f1d63b6e firefox: properly integrate xdg-desktop-portal for opening media 2024-02-15 11:36:50 +00:00
d36e269edd programs: loupe: remove the dbus services to make it work with Firefox 2024-02-15 11:36:24 +00:00
40af8b95fd pkgs.rmDbusServices: also remove dbus properties from .desktop files 2024-02-15 11:35:52 +00:00
582a003739 programs: waybar: fix battery indicator within sandbox 2024-02-15 10:35:24 +00:00
df60be8c61 open-in-mpv: sandbox with bwrap 2024-02-15 09:49:03 +00:00
e8b4c36442 programs: nautilus: specify inode/directory mime association 2024-02-15 09:48:26 +00:00
2f699737f5 firefox: fix open-in-mpv integration
two parts: add open-in-mpv's config to firefox's sandbox; patch open-in-mpv to forward to xdg-open
2024-02-15 09:14:57 +00:00
4a3d24be3f waybar: migrate all config to "sane.programs" 2024-02-15 07:18:12 +00:00
10feb319fe sway: lift waybar to own file and sandbox it 2024-02-15 02:33:40 +00:00
fde1e5d872 README: add a graphic 2024-02-15 01:01:31 +00:00
b2fcf6fdfd programs: messengers (fractal, signal, dino, tuba): add media libraries to the sandbox 2024-02-15 00:49:24 +00:00
dcc2eb265d programs: re-enable sandbox for tumiki-fighters and losslesscut (X applications) 2024-02-15 00:09:40 +00:00
5f1036118f modules/programs: sandboxing: add a "whitelistX" option 2024-02-15 00:09:16 +00:00
8ac4869f10 gpodder-adaptive: fix meta.position and thereby fix NUR eval
idk why it broke. seems that attrset members (passthru.*) don't preserve their position anymore
2024-02-14 23:39:18 +00:00
226425bbef nixpkgs: 2024-02-13 -> 2024-02-14; sops-nix -> 2024-02-13
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/013603a52da98fe4abf15a5700479a58fa5899a5' (2024-02-13)
  → 'github:nixos/nixpkgs/52e165035c897a7b41ff26bc235f8d841e9d3850' (2024-02-14)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/40a7b182e0a00245d69f6b8c1dfd3ea4bfc6257c' (2024-02-13)
  → 'github:nixos/nixpkgs/c0a130d16b170f4820c3d2ed294a7aaabf451bfd' (2024-02-14)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/695275c349bb27f91b2b06cb742510899c887b81' (2024-02-12)
  → 'github:Mic92/sops-nix/48afd3264ec52bee85231a7122612e2c5202fa74' (2024-02-13)
```
2024-02-14 22:50:47 +00:00
518c3afd07 programs: sandbox: disable losslesscut/tumiki-fighters sandbox until i can figure out Xwayland 2024-02-14 14:37:59 +00:00
90dee85664 programs: sort alphabetically 2024-02-14 14:28:22 +00:00
26fc283fd9 programs: losslesscut: sandbox 2024-02-14 14:26:56 +00:00
d0430ce1e9 programs: pavucontrol/pwvucontrol: enable audio devices inside the sandbox 2024-02-14 14:26:56 +00:00
368a52b91e programs: speedtest-cli: sandbox with bwrap 2024-02-14 14:26:56 +00:00
d90dacee1f programs: grimshot: sandbox with bwrap 2024-02-14 14:17:41 +00:00
a6e2b3bc5c programs: xdg-terminal-exec: disable sandbox 2024-02-14 14:11:35 +00:00
8863a3c674 programs: wob: sandbox with bwrap 2024-02-14 14:10:20 +00:00
fa8d6dbb9f programs: wob: fix config substitution 2024-02-14 14:04:54 +00:00
e5e79a6b60 programs: FileMimeInfo: disable sandbox 2024-02-14 13:54:21 +00:00
95f7eeeb5c programs: libnotify: sandbox with bwrap 2024-02-14 13:49:48 +00:00
29d638c68b programs: dig: sandbox with bwrap 2024-02-14 13:47:44 +00:00
7d22a5466f programs: zsh: fix "switch" function to be friendly to sandboxing 2024-02-14 13:45:56 +00:00
b747742e23 flake: implement "deploy.self" app as replacement for nixos-rebuild switch 2024-02-14 13:45:15 +00:00
5907d9fa42 Revert "xdg-desktop-portal-gtk: build without support for notifications"
This reverts commit c9e02bfd8a.

disable notifications at this level did not cause fractal (gtk app) to
send its notifications to swaync. instead, it still tried to deliver to
the Portal, where the Portal wasn't expecting anything and just returned
an error to fractal.

setting `GNOTIFICATION_BACKEND = "freedesktop"` seems to be the correct
way to get gtk apps to behave as desired with their notifications.
2024-02-14 11:09:37 +00:00
67fe8d4666 swaync: propagate GNOTIFICATION_BACKEND = "freedesktop" to all users 2024-02-14 11:09:20 +00:00
22ca253ae0 modules/programs: better document the env option 2024-02-14 11:08:43 +00:00
c9e02bfd8a xdg-desktop-portal-gtk: build without support for notifications 2024-02-14 10:51:18 +00:00
03b58b3cab programs: vim: support system copy/paste inside of sandbox 2024-02-14 09:11:31 +00:00
ae01c17c05 programs: splatmoji: fix to work inside a sandbox again 2024-02-14 09:11:12 +00:00
677e6e679b programs: sandbox {s,}waylock lockscreen 2024-02-14 08:48:03 +00:00
3eb47a9a8d programs: swaylock: *partially* sandbox with capsh 2024-02-14 05:46:36 +00:00
f11e443678 programs: waylock: *partially* sandbox with capsh 2024-02-14 05:46:28 +00:00
9faf1bb52c README: document the sandboxing feature of my "programs" module 2024-02-14 05:24:48 +00:00
e599724811 README: use consistent tab width (2 spaces) 2024-02-14 05:18:43 +00:00
c0b03950dc README: format links to local files in a way that markdown will render them 2024-02-14 05:16:59 +00:00
8f8ec090c4 programs: add "waylock" 2024-02-14 05:01:33 +00:00
e174eaeff0 programs: loupe: fix sandboxing 2024-02-14 04:32:10 +00:00
8b32f2f231 modules/programs: add support for 'autodetectCliPaths = parent' 2024-02-14 04:31:59 +00:00
f12b7afa1e programs: mimeo: dont sandbox 2024-02-14 01:51:26 +00:00
080bd856ec programs: sandboxing: only permit wayland socket access to those specific apps which require it 2024-02-14 01:49:49 +00:00
548a95a7e1 modules/programs: sandboxing: unshare ipc/cgroup/uts by default 2024-02-14 01:48:59 +00:00
2d7c5b9fa5 programs: mpv: explicitly add Videos/servo, Books/servo to sandbox 2024-02-13 15:38:57 +00:00
e696cb96b6 nixpkgs: 2024-02-12 -> 2024-02-13
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/f176844192a0b4ab719dffd91fcf356fc24ccbff' (2024-02-12)
  → 'github:nixos/nixpkgs/013603a52da98fe4abf15a5700479a58fa5899a5' (2024-02-13)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/b05b56d24858cfbc2064bda18d00a242bed5ddfb' (2024-02-12)
  → 'github:nixos/nixpkgs/40a7b182e0a00245d69f6b8c1dfd3ea4bfc6257c' (2024-02-13)
```
2024-02-13 12:54:00 +00:00
83cb29aeeb xdg-utils: re-add mimetype package 2024-02-13 12:31:04 +00:00
34b148f6cc modules/programs: allow specifying perlPackages members as programs, as i do with python3Packages, etc 2024-02-13 12:31:04 +00:00
44c2f8bcc0 cross: xdg-utils: build xdg-screensaver, and simplify a bit 2024-02-13 12:31:04 +00:00
9c18aa2765 cross: fix xdg-utils 2024-02-13 12:31:04 +00:00
4458a74e4c nixpkgs: 2024-02-09 -> 2024-02-12; sops-nix -> 2024-02-12
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/b38903da74d4fa07bd7045e89bb31e6d4cc13548' (2024-02-09)
  → 'github:nixos/nixpkgs/f176844192a0b4ab719dffd91fcf356fc24ccbff' (2024-02-12)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/410b90f31644cc71ffc145261d76a351012aac66' (2024-02-09)
  → 'github:nixos/nixpkgs/b05b56d24858cfbc2064bda18d00a242bed5ddfb' (2024-02-12)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2168851d58595431ee11ebfc3a49d60d318b7312' (2024-02-08)
  → 'github:Mic92/sops-nix/695275c349bb27f91b2b06cb742510899c887b81' (2024-02-12)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/bc6cb3d59b7aab88e967264254f8c1aa4c0284e9' (2024-02-08)
  → 'github:NixOS/nixpkgs/d8cd80616c8800feec0cab64331d7c3d5a1a6d98' (2024-02-10)
```
2024-02-13 12:31:04 +00:00
1a18ed533b programs: don't include dbus in the sandbox by default 2024-02-13 11:58:33 +00:00
18eec98cae programs: brightnessctl: switch to landlock 2024-02-13 11:58:33 +00:00
82c386a6a4 programs: tor-browser-bundle-bin -> tor-browser
they're the same (aliased), only my programs API expects 'tor-browser' specifically
2024-02-13 11:58:33 +00:00
634dc318cd programs: spotify: remove old/unused firejail config 2024-02-13 11:15:30 +00:00
6eaaeeb91a programs: remove audio from the sandbox by default 2024-02-13 11:14:38 +00:00
94be4a7551 programs: wob: fix service definition (Exec -> ExecStart) 2024-02-13 11:03:18 +00:00
b4a20da78a programs: brightnessctl: sandbox 2024-02-13 10:55:44 +00:00
bb68506839 modules/programs: add separate "user" v.s. "system" options for whitelistDbus 2024-02-13 10:55:10 +00:00
77e2af0ed9 programs: krita: enable sandbox 2024-02-13 10:36:42 +00:00
126f3e4922 programs: sandboxing: restrict /run/user dir to just dbus/pipewire/pulse/wayland, by default 2024-02-13 10:28:30 +00:00
73afceb8c6 modules/programs: sandbox: add whitelistWayland option 2024-02-13 10:24:35 +00:00
371af5939e programs: mpv: tighten the /run/user portion of the sandbox 2024-02-12 15:24:07 +00:00
27fd81ad80 modules/programs: add new options for whitelisting audio/dbus 2024-02-12 15:23:35 +00:00
d82b4b0f62 modules/programs: sane-sandboxed: reorder the --sane-sandbox-profile-dir arg so it takes precedence 2024-02-12 14:56:48 +00:00
7b28023e08 modules/programs: re-introduce the "withEmbeddedSandboxer" passthru attr 2024-02-12 14:27:48 +00:00
2b9db897a1 implement sane.defaultUser attr 2024-02-12 14:27:32 +00:00
6124cb9b36 modules/programs: sane-sandboxed: search for profiles in XDG_DATA_DIRS, not NIX_PROFILES 2024-02-12 13:16:48 +00:00
b0394d877d modules/programs: rename allowedRootPaths -> allowedPaths
now that allowedHomePaths doesn't exist
2024-02-12 13:00:10 +00:00
14d8230821 modules/programs: sane-sandboxed: remove --sane-sandbox-home-path argument and plumbing
no longer needed, and mixing this with root paths is liable to cause troubles at this point, around symlink dereferencing/canonicalization/etc
2024-02-12 12:57:54 +00:00
e94e338040 programs: handbrake: remove unneeded Pictures/servo-macros from sandbox 2024-02-12 12:54:41 +00:00
354ce378f6 programs: assorted: convert /mnt/servo "extraPaths" into "extraHomePaths" where possible 2024-02-12 12:54:16 +00:00
a90b5b53db modules/programs: sandboxing: dereference symlinks and also include those in the sandbox 2024-02-12 12:48:02 +00:00
eee3e138ff modules/programs: sandboxing: allow specifying individual /run/user/$uid paths to expose to the sandbox 2024-02-12 12:18:59 +00:00
f61cd17e99 modules/programs: sandboxing: specialize profiles per-user by expanding $HOME 2024-02-12 12:08:58 +00:00
3e0b0a0f02 modules/programs: make-sandboxed: lift profile creation logic out to the toplevel 2024-02-12 11:52:33 +00:00
2ee34e9af3 modules/profiles: remove sandbox.embedProfile option
with upcoming refactors, this setting would force a different package to be installed per user, which doesn't mesh with the existing sane.programs infra
2024-02-12 11:35:59 +00:00
f9a998eb92 programs: koreader: remove "sandbox.embedProfile = true"
i guess this was set while i was debugging
2024-02-12 11:33:55 +00:00
7c05d221d6 modules/programs: split "make-sandbox-profile" out of "make-sandboxed" 2024-02-12 11:20:40 +00:00
93012664e5 modules/programs: simplify how sandbox profiles make it into system packages 2024-02-12 10:52:44 +00:00
c424f7ac3b sane-sandboxed: load all profiles, not just the first one we find
this allows some amount of overriding, or splitting profiles between system and user dirs
2024-02-12 10:40:15 +00:00
088b6f1b9a sane-sandboxed: load profiles via $NIX_PROFILES env var 2024-02-12 10:37:26 +00:00
96575acf3a programs: sane-sandboxed: move parseArgsExtra to outer scope; improve docs 2024-02-12 10:28:14 +00:00
1e05119adc mpv: fix loading of album art within sandbox 2024-02-12 08:59:46 +00:00
e81df0ac86 modules/programs: enforce that user services don't accidentally override PATH 2024-02-12 08:44:55 +00:00
b19492ba23 programs: mpv: add .config/mpv to sandbox paths 2024-02-12 08:26:51 +00:00
8b26fa1303 programs: wob: split the script into an actual package 2024-02-12 08:26:51 +00:00
c0883dc777 sway: refactor: store sway-portals.conf in the user dir instead of system-wide
it's a user service, so prefer to configure it via user/home conf dirs
2024-02-12 07:13:39 +00:00
6b3a71aadf programs: xdg-desktop-portal: dont show app chooser for apps which are the default association 2024-02-12 07:12:04 +00:00
8d0d20757e gui: fold xdg-desktop-portal.nix back into sway config 2024-02-12 01:38:05 +00:00
66ca822ac1 remove xdg-desktop-portal-gtk service; xdg-desktop-portal knows how to start that itself 2024-02-12 01:33:34 +00:00
db7a414030 xdg-desktop-portal(s): dont install globally 2024-02-12 01:16:17 +00:00
87050a0500 feeds: add "FullTimeNix" podcast :) 2024-02-12 00:09:49 +00:00
bf53e3628a xdg-utils: cleanup 2024-02-11 23:57:50 +00:00
d35f938806 mime.nix: fix cross build 2024-02-11 23:44:55 +00:00
d719eb0f11 programs: gPodder: enable Videos/gPodder in sandbox 2024-02-11 23:37:16 +00:00
0861edd7f9 modules/programs: remove ~/.config/mimeo from sandbox defaults 2024-02-11 23:35:27 +00:00
b6bf8720c9 modules/programs: implement --sane-sandbox-portal flag for apps which want to use the portal to open other apps 2024-02-11 23:32:24 +00:00
0fbc10fce3 mime: store mime associations in ~/.local/share/applications instead of /run/current-system/sw/share/applications to facilitate sandboxing 2024-02-11 23:31:43 +00:00
772f1070e7 xdg-desktop-portal: configure myself, to unblock future portal-related work 2024-02-11 23:29:07 +00:00
50c6e406bc programs: disable zecwallet-lite 2024-02-09 20:23:56 +00:00
41020b2c0d nixpkgs: 2024-02-08 -> 2024-02-09
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/74098fff8838394e2cdf78012bbc7f5bf835197e' (2024-02-08)
  → 'github:nixos/nixpkgs/b38903da74d4fa07bd7045e89bb31e6d4cc13548' (2024-02-09)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/075bf9cffe5b04d39874747239022de9aec5cdcd' (2024-02-08)
  → 'github:nixos/nixpkgs/410b90f31644cc71ffc145261d76a351012aac66' (2024-02-09)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/23f61b897c00b66855074db471ba016e0cda20dd' (2024-02-04)
  → 'github:Mic92/sops-nix/2168851d58595431ee11ebfc3a49d60d318b7312' (2024-02-08)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/9a333eaa80901efe01df07eade2c16d183761fa3' (2024-01-22)
  → 'github:NixOS/nixpkgs/bc6cb3d59b7aab88e967264254f8c1aa4c0284e9' (2024-02-08)
```
2024-02-09 10:39:27 +00:00
590a239f7d programs: gpodder: sandbox with bwrap
which we can do, now that xdg-open works correctly within sandboxes
2024-02-09 10:31:42 +00:00
bcbc57f5ef programs: get xdg-open to work from within sandboxes
note that implementation may have a quirk that applications launched via the portal cannot themselves "xdg-open" through the portal, because of the environment variable manipulation.

not sure how best to address that.
2024-02-09 10:27:30 +00:00
0d3adcdc5c modules: users: have user services inherit PATH from environment rather than forcibly overwriting it 2024-02-09 09:50:26 +00:00
d19907a38d sway: enable OpenURI interface in xdg-desktop-portal 2024-02-09 05:57:02 +00:00
9ac0e0e4fc modules/programs: put things in a pid namespace by default 2024-02-08 23:36:59 +00:00
c9af5bf9b4 programs: sandboxing: enable net isolation for most sandboxed programs 2024-02-08 21:51:32 +00:00
bc85169e3d programs: sandboxer: allow disable net access 2024-02-08 21:07:34 +00:00
7b9b3344a0 nixpkgs: 2024-02-07 -> 2024-02-08
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/966fd30804ad0e400fa3502e9f848bfad63b1852' (2024-02-07)
  → 'github:nixos/nixpkgs/74098fff8838394e2cdf78012bbc7f5bf835197e' (2024-02-08)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/be4596f17b30403478c629b27d87fd914a2b9f8a' (2024-02-07)
  → 'github:nixos/nixpkgs/075bf9cffe5b04d39874747239022de9aec5cdcd' (2024-02-08)
```
2024-02-08 11:09:25 +00:00
f6ca6210f9 feeds: link to podcastindex.org 2024-02-07 21:47:19 +00:00
19cfc86d1a nixpkgs: 2024-02-06 -> 2024-02-07
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/952bd699447d82d69f4b15d994d5dc232e7addfb' (2024-02-06)
  → 'github:nixos/nixpkgs/966fd30804ad0e400fa3502e9f848bfad63b1852' (2024-02-07)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8ad5408ea36be34ae262b04c8e913a95f8248fc7' (2024-02-06)
  → 'github:nixos/nixpkgs/be4596f17b30403478c629b27d87fd914a2b9f8a' (2024-02-07)
```
2024-02-07 09:45:02 +00:00
227d159c66 sway: map Super+Shift+PageUp/Down to next/prev track 2024-02-06 23:52:53 +00:00
a6becb8c42 sway: add Super+space to toggle media 2024-02-06 23:22:24 +00:00
2a5398beb3 sway: simplify brightness_up_cmd
sxmo just uses brightnessctl internally, plus a call to 'notify'

i don't really need the notification, and if i did i could implement wob support on both desktop and mobile
2024-02-06 23:10:01 +00:00
0f12ed68f7 sway: simplify config templating 2024-02-06 23:04:44 +00:00
0c050d1953 programs: fuzzel: fix overly-aggressive sandboxing 2024-02-06 20:10:29 +00:00
2fc1fe7510 modules/programs: make-sandboxed: fix that /share/* was being linked into top-level /; better way to enforce sandboxing of /share entries 2024-02-06 19:55:55 +00:00
8d705af7a0 nixpkgs: 2024-02-04 -> 2024-02-06
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/259981b0af5c285bb3cc7146de1da1b5af92236d' (2024-02-04)
  → 'github:nixos/nixpkgs/952bd699447d82d69f4b15d994d5dc232e7addfb' (2024-02-06)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/2be0b5db83fbea4a838f753994e8ebd35af91968' (2024-02-04)
  → 'github:nixos/nixpkgs/8ad5408ea36be34ae262b04c8e913a95f8248fc7' (2024-02-06)
```
2024-02-06 06:18:59 +00:00
e91ec2c35e todo.md: task to consolidate ~/dev and ~/ref 2024-02-06 06:08:06 +00:00
5fbf66fb15 programs: loupe: sandbox with bwrap 2024-02-06 06:05:32 +00:00
97d50629e9 programs: handbrake: sandbox with landlock 2024-02-06 05:48:54 +00:00
5f8699fcef rearrange /mnt structure for host-based subdirs
e.g. /mnt/servo/media, /mnt/desko/home, etc
2024-02-06 05:48:11 +00:00
7ce957c3af gtk: set GSK_RENDERER=cairo to fix a bug somewhere in moby's render stack 2024-02-06 05:02:02 +00:00
d7612d5034 modules/programs: make-sandboxed: avoid deep-copying all of /share when sandboxing
saves like 1 GiB of closure. but i haven't thoroughly tested this
2024-02-06 05:02:02 +00:00
5ff7bf0c69 programs: fuzzel: sandbox 2024-02-06 02:34:46 +00:00
2495200b67 tidy: programs: wget: remove warning about the sandbox being untested 2024-02-06 01:34:40 +00:00
4c499629f5 programs: vvvvvv: sandbox with bwrap 2024-02-06 01:34:04 +00:00
7b9f54dd54 programs: superTux: sandbox with bwrap 2024-02-06 01:16:36 +00:00
bda932c3df programs: supertuxkart: sandbox with bwrap 2024-02-06 01:10:39 +00:00
3f96f4af82 sway: refer to fewer programs in the config by absolute path
this aids in sandboxing and swapping stuff in/out at runtime
2024-02-05 23:40:18 +00:00
1c4e2f97fe swaylock: mark sandboxing as unsupported 2024-02-05 23:36:35 +00:00
594a729968 feeds: remove balaji 2024-02-05 22:48:09 +00:00
5c8bb55cec todo.md: better sandboxing around /mnt/servo-media 2024-02-05 22:33:42 +00:00
6eb2a3d67f programs: handbrake: sandbox with bwrap 2024-02-05 22:28:15 +00:00
ddc41bc9d8 programs: pavucontrol/pwvucontrol: sandbox with bwrap 2024-02-05 22:15:48 +00:00
7d833ebf76 programs: kdenlive: sandbox with bwrap 2024-02-05 22:07:37 +00:00
bfc0eadfaa programs: hitori: sandbox with bwrap 2024-02-05 21:52:57 +00:00
ff1cbcc16b programs: gnome-clocks,gnome-calendar: sandbox with bwrap 2024-02-05 21:46:27 +00:00
fd81e35c31 todo.md: package blurble game! 2024-02-05 21:46:09 +00:00
9a8d8a20bd programs: frozen-bubble: persist data and sandbox with bwrap 2024-02-05 21:32:58 +00:00
cd1d22e7b9 programs: gnome-calculator: sandbox with bwrap 2024-02-05 20:58:38 +00:00
2c0e93826d programs: gimp: sandbox with bwrap 2024-02-05 20:53:05 +00:00
cab346f3ad programs: delfin: sandbox with bwrap 2024-02-05 20:44:47 +00:00
568a72f6a4 gpodder-configured: remove unused derivation inputs 2024-02-05 20:22:27 +00:00
a2decaff9c programs: bemenu: sandbox with landlock 2024-02-05 18:41:52 +00:00
23411ed973 todo.md: make dconf stuff less monolithic 2024-02-05 18:33:03 +00:00
8ef9f7a485 epiphany: persist dconf settings; reduce sandboxer errors 2024-02-05 18:31:38 +00:00
12846732b9 programs: blanket: sandbox with bwrap 2024-02-05 18:26:21 +00:00
e84079e84c programs: firefox: allow sandbox access to ~/dev 2024-02-05 18:17:49 +00:00
45ffd9246d programs: brave: sandbox with bwrap 2024-02-05 18:17:28 +00:00
ed3935318d feeds: subscribe to non-paywalled Matt Levine 2024-02-05 16:41:38 +00:00
8052f62796 programs: sane-wipe browser: also clear epiphany artifacts 2024-02-05 16:31:19 +00:00
413903d03c make-sandboxed: also embed profiles for the withEmbeddedSandboxer passthru pkg 2024-02-05 08:26:40 +00:00
6d1eae2200 programs: gnome-2048: sandbox with bwrap 2024-02-05 08:26:06 +00:00
4d51c34ad2 programs: allow sane.strictSandboxing = "warn" 2024-02-05 05:28:02 +00:00
bc50a8c489 nixpkgs: 2024-02-03 -> 2024-02-04; sops-nix -> 2024-02-04
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/94db8d8c016a54feeaaf2643e2ce42bf4cc29286' (2024-02-03)
  → 'github:nixos/nixpkgs/259981b0af5c285bb3cc7146de1da1b5af92236d' (2024-02-04)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/79a13f1437e149dc7be2d1290c74d378dad60814' (2024-02-03)
  → 'github:nixos/nixpkgs/2be0b5db83fbea4a838f753994e8ebd35af91968' (2024-02-04)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/73bf36912e31a6b21af6e0f39218e067283c67ef' (2024-01-28)
  → 'github:Mic92/sops-nix/23f61b897c00b66855074db471ba016e0cda20dd' (2024-02-04)
```
2024-02-04 22:55:03 +00:00
ee8e33b795 koreader: remove dead patching code
it still builds (in 3:00 minutes), huh
2024-02-04 22:08:12 +00:00
8afb6406a1 koreader: remove dead code/build inputs 2024-02-04 22:02:03 +00:00
7ac1ee66ad koreader: use nixpkgs' luasocket and luasec 2024-02-04 21:30:30 +00:00
8a47eb92ed koreader: use nixpkgs' lua-rapidjson 2024-02-04 21:30:30 +00:00
b87934d5f8 koreader: use nixpkgs lpeg and remove vendor-external-projects.patch 2024-02-04 20:37:10 +00:00
293eab8225 koreader: use modern openssl 2024-02-04 20:05:02 +00:00
abdbb83e10 koreader: replace vendored dependencies with their nixpkgs equivalents much more effectively
the old method was still causing everything to be re-compiled within koreader, rather than linking against the nix store.

decreases build time to about 3m on a desktop
2024-02-04 19:39:32 +00:00
4a96fa233a koreader: 2023.10 -> 2024.01 2024-02-04 02:51:27 +00:00
4bd73ddca3 koreader-from-src: build even more from source 2024-02-03 23:58:41 +00:00
dc74bca06a programs: vim: add private/knowledge to sandbox 2024-02-03 23:53:53 +00:00
42523b75a8 programs: gdb: disable sandboxing 2024-02-03 23:53:34 +00:00
79736a4a0a koreader-from-src: tidy 2024-02-03 16:30:03 +00:00
111946eb1d programs: vim, imagemagick: fix sandboxing to consider uncreated files 2024-02-03 14:07:53 +00:00
09f3bfc944 flake: make "nix run .#deploy" deploy to all hosts 2024-02-03 02:55:13 +00:00
b8fc75ebd6 nixpkgs: 2024-02-02 -> 2024-02-03
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/1bfd22b6448ac4d407510bd37fe16d87a9dcb41b' (2024-02-02)
  → 'github:nixos/nixpkgs/94db8d8c016a54feeaaf2643e2ce42bf4cc29286' (2024-02-03)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/eef63ea04722d812a09a5974ed18c9761088a6e1' (2024-02-02)
  → 'github:nixos/nixpkgs/79a13f1437e149dc7be2d1290c74d378dad60814' (2024-02-03)
```
2024-02-03 02:15:09 +00:00
8de015f098 flake: preDeploy: fix host/addr mixup 2024-02-03 02:15:05 +00:00
6da85f6d8f flake: add a preDeploy target 2024-02-03 02:04:41 +00:00
2dc6da476b flake: deploy app: remove the last call to nixos-rebuild 2024-02-03 01:42:54 +00:00
453f40d0a8 flake: sync photos from moby with "nix run .#sync.moby" 2024-02-03 00:54:04 +00:00
14b20fd9c2 programs: komikku: fix sandboxing 2024-02-03 00:52:17 +00:00
2df1b20f02 programs: epiphany: simplify the sandboxing 2024-02-03 00:44:23 +00:00
56e7e9a7cc remove unused "default.nix.cmp" file
should have never been checked in
2024-02-03 00:18:33 +00:00
2f9fad503c programs: fix sandboxing errors for programs which create files (notably: ffmpeg) 2024-02-03 00:17:54 +00:00
3439ca34b8 sane-sandboxed: add more autodetect options, and a "withEmbeddedSandboxer" package output (for dev) 2024-02-03 00:17:24 +00:00
24e6e6cacc firefox-extensions.sidebery: downgrade 5.1.1 -> 5.0.0
release format is inconsistent; would need to build from-source to reliably use the latest version(s)
2024-02-02 23:26:14 +00:00
0ee9f2026c sane-sandboxed: hopefully fix a problem with path normalization for paths with spaces 2024-02-02 22:56:43 +00:00
5e3c2636db programs: make-sandboxed: handle packages which use relative links in bin (like spotify) 2024-02-02 22:38:36 +00:00
cd0a046776 dovecot: remove dead code 2024-02-02 20:47:55 +00:00
27edee0bbf dovecot2: fix sieves 2024-02-02 20:47:20 +00:00
56734fe5da mpv: add /dev/dri to the sandbox 2024-02-02 19:18:30 +00:00
832a572d56 firefox-extensions: bump to latest 2024-02-02 19:17:04 +00:00
3c96f6d418 programs: koreader: enable DRI in the sandbox, and use wrappedDerivation 2024-02-02 17:22:57 +00:00
86b23e8183 programs: fractal: enable DRI in sandbox 2024-02-02 17:19:35 +00:00
2bb9115f35 modules/programs: sandboxing: add "whitelistDri" option for gfx-intensive apps 2024-02-02 17:18:51 +00:00
065d045640 fix so sway inherits program env vars 2024-02-02 15:36:06 +00:00
d3eaa69261 lappy/desko: auto-start signal-desktop 2024-02-02 14:22:08 +00:00
6151eee8d5 programs (assorted): fix wantedBy = "default.target" to be more specific
now GUI apps aren't stuck in a restart loop until sway starts

in particular, signal-desktop can actually be autostarted
2024-02-02 14:21:57 +00:00
483a1d1780 sway: signal on launch to systemd that the graphical-session.target is ready
this allows auto-launching of other services which require a compositor (i.e. messaging apps)
2024-02-02 14:20:30 +00:00
567c7993b6 modules/programs: sandbox: allow mimeo config in any sandbox 2024-02-02 12:52:36 +00:00
f6eeab5650 nixpkgs: 2024-02-01 -> 2024-02-02
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/06002f375e1d20f1481abcb696a50f232202e7ac' (2024-02-01)
  → 'github:nixos/nixpkgs/1bfd22b6448ac4d407510bd37fe16d87a9dcb41b' (2024-02-02)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/fbba9b8f0b6364928f60ef1b97e686b569cdb64e' (2024-02-01)
  → 'github:nixos/nixpkgs/eef63ea04722d812a09a5974ed18c9761088a6e1' (2024-02-02)
```
2024-02-02 01:07:32 +00:00
2824671bde tune nix deploy parameters (specifically for moby)
this is experimental; hard to understand immediately how significant are the effects
2024-02-02 00:50:25 +00:00
efcaef2c35 lappy/desko/servo: downgrade kernel 6.7 -> 6.6 (latest supported by zfs) 2024-02-01 16:21:46 +00:00
25707eb79e servo: address deprecation warning: dovecot2.sieveScripts -> sieve.scripts 2024-02-01 15:47:56 +00:00
18679cd8c3 fix deprecation warnings: overrideScope' -> overrideScope 2024-02-01 15:44:46 +00:00
09923b60ea moby: disable desko as nixcache 2024-02-01 15:41:43 +00:00
3100189172 purge supercap
i no longer have access to dispatch build jobs to it :((((
2024-02-01 15:36:37 +00:00
715ac42f13 remove samba from closure
current samba hangs during configurePhase. this is not the first time samba has failed to build. nor the third. purge it.
2024-02-01 15:28:40 +00:00
a9810e7343 re-ship linux 6.7 to lappy/desko/servo
now that landlock-sandboxer builds against the correct linux headers,
this can actually work.
2024-02-01 13:54:44 +00:00
4f352c5725 landlock-sandboxer: build against headers which match the sandboxer source 2024-02-01 13:53:39 +00:00
17f35a3619 linux-megous: 6.6.0 -> 6.7.2 2024-02-01 12:51:53 +00:00
89d4f3eec3 nixpkgs: 2024-01-29 -> 2024-02-01
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/aa476d3e0de89aeb67950a1bc76b4fd576c24505' (2024-01-29)
  → 'github:nixos/nixpkgs/06002f375e1d20f1481abcb696a50f232202e7ac' (2024-02-01)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/a31b9bd76009c73a2f932fbdaa7145ac4a79544f' (2024-01-29)
  → 'github:nixos/nixpkgs/fbba9b8f0b6364928f60ef1b97e686b569cdb64e' (2024-02-01)
```
2024-02-01 11:32:36 +00:00
44419d71a5 lemmy-lemonade: init at 2023.10.29 2024-02-01 11:32:07 +00:00
02e597a862 fractal-nixified: 5 -> 6 2024-02-01 10:57:01 +00:00
00f995aec9 fixup landlock-sandboxer to work well for all systems
downgrade lappy/desko/servo back to default linux; zfs doesn't support latest

build landlock-sandboxer against the specific kernel being deployed; it's less noisy that way
2024-01-31 21:19:10 +00:00
368eb2c29b programs: git: whitelist more repo roots 2024-01-31 21:17:48 +00:00
5f793523d1 ship linux 6.7 to lappy/desko/servo 2024-01-31 20:33:15 +00:00
33bee7ac2e unl0kr: be a little more robust against bad password entry 2024-01-31 20:32:26 +00:00
84af8aca3c unl0kr: remove debugging code 2024-01-31 20:10:57 +00:00
a0f00313a7 moby: disable signal-desktop autostart 2024-01-31 20:09:03 +00:00
6603115192 moby: disable getty auto-login
i think this interacts badly with unl0kr style logins, though
honestly kinda hard to tell if that was a fluke or real.
2024-01-31 19:47:24 +00:00
ac968e1589 sxmo: allow the option to disable greeter entirely 2024-01-31 19:46:37 +00:00
2d4fc4f274 landlock-sandboxer: build against latest compatible linux 2024-01-31 17:45:46 +00:00
1d72e13a98 sxmo: launch via unl0kr by default 2024-01-31 17:40:36 +00:00
d9667653e7 docs: sway: point out that one can launch sway directly from a TTY 2024-01-31 16:29:27 +00:00
8c6bf07102 todo.md: sync 2024-01-31 16:28:56 +00:00
634520a1e9 unl0kr: fix cross compilation 2024-01-31 16:23:55 +00:00
13be5a1731 unl0kr: fix LOGIN_TIMEOUT to be infinite 2024-01-31 15:43:30 +00:00
30288cd67f user: add CAP_NET_ADMIN,CAP_NET_RAW even outside of systemd session
in fact, *only* outside of systemd session because they broke ambient caps in 255
2024-01-31 15:42:43 +00:00
87e2509af4 doc: cozy: mention that upstream has merged the patch i apply 2024-01-31 15:36:54 +00:00
8736ca478b programs: firefox: allow access to servo image-macros 2024-01-31 15:36:09 +00:00
cb3960fb21 programs: git: fix access to ~/private/knowledge 2024-01-31 15:35:21 +00:00
6e24a1ff28 programs: re-enable sops 2024-01-31 15:30:15 +00:00
91eae95b32 modules.gui.gnome: fix build 2024-01-31 15:29:49 +00:00
f5c88853ee sway: replace "greetd" with "unl0kr"-based login process 2024-01-31 15:20:27 +00:00
0009e5ca4c programs: sandboxing: use wrapperType="wrappedDerivation" where applicable 2024-01-29 15:21:16 +00:00
0403d5c03e nixpkgs: 2024-01-28 -> 2024-01-29
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/a86d1125195505d4ea8997b12507b9c623511256' (2024-01-28)
  → 'github:nixos/nixpkgs/aa476d3e0de89aeb67950a1bc76b4fd576c24505' (2024-01-29)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/f58fe0f36dbbef39b3f5ec8542a02dece7c9559b' (2024-01-28)
  → 'github:nixos/nixpkgs/a31b9bd76009c73a2f932fbdaa7145ac4a79544f' (2024-01-29)
```
2024-01-29 13:49:54 +00:00
db6ba61429 programs: sandbox more apps with wrapperType=wrappedDerivation 2024-01-29 13:45:57 +00:00
881d2f79ed modules/programs: add "unchecked" passthru to aid debugging 2024-01-29 13:36:01 +00:00
47abdfb831 modules/programs: patch dbus-1 files to use sandboxed binaries 2024-01-29 13:09:43 +00:00
3831c6f087 TODO: fold 2024-01-29 13:07:44 +00:00
d3f7a036ce ripgrep: move options out of assorted.nix into its own file 2024-01-29 12:57:56 +00:00
0454abacd9 komikku: sandbox 2024-01-29 12:56:08 +00:00
4f8d476ebf modules/programs: patch old /nix/store paths in .desktop files 2024-01-29 12:56:08 +00:00
1cb2c5225f programs: use wrapperType=wrappedDerivation where possible 2024-01-29 12:07:04 +00:00
7af970f38c modules/programs: extend wrapperType="wrappedDerivation" to handle common share/ items 2024-01-29 11:59:38 +00:00
6f86e61a00 firefox: fix build
zip was giving some complaints... i'm not sure why, i think it still works
2024-01-29 09:57:35 +00:00
3ea3776281 nixpkgs: 2024-01-27 -> 2024-01-28
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/ef4dd61b7d53af44b060473308c50fa3b34d5681' (2024-01-27)
  → 'github:nixos/nixpkgs/a86d1125195505d4ea8997b12507b9c623511256' (2024-01-28)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/c002c6aa977ad22c60398daaa9be52f2203d0006' (2024-01-27)
  → 'github:nixos/nixpkgs/f58fe0f36dbbef39b3f5ec8542a02dece7c9559b' (2024-01-28)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4606d9b1595e42ffd9b75b9e69667708c70b1d68' (2024-01-24)
  → 'github:Mic92/sops-nix/73bf36912e31a6b21af6e0f39218e067283c67ef' (2024-01-28)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/a1982c92d8980a0114372973cbdfe0a307f1bdea' (2024-01-12)
  → 'github:NixOS/nixpkgs/9a333eaa80901efe01df07eade2c16d183761fa3' (2024-01-22)
```
2024-01-29 09:57:35 +00:00
a7eb8dd6fa nixpkgs: 2024-01-22 -> 2024-01-27
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/dceddd03df4f840ea28c65887c199495793fb322' (2024-01-22)
  → 'github:nixos/nixpkgs/ef4dd61b7d53af44b060473308c50fa3b34d5681' (2024-01-27)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/8cccce637e19577815de54c5ecc3132dff965aee' (2024-01-22)
  → 'github:nixos/nixpkgs/c002c6aa977ad22c60398daaa9be52f2203d0006' (2024-01-27)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/ae171b54e76ced88d506245249609f8c87305752' (2024-01-21)
  → 'github:Mic92/sops-nix/4606d9b1595e42ffd9b75b9e69667708c70b1d68' (2024-01-24)
```

this breaks sway login for lappy. not obvious why.
2024-01-29 09:57:35 +00:00
c1a1f51ca2 git: fix git-upload-pack (used on the remote when doing git pull) 2024-01-29 09:57:27 +00:00
32824cfade modules/programs: sandbox in a manner that's more compatible with link-heavy apps like busybox, git, etc 2024-01-29 09:56:30 +00:00
51fc61b211 sane-sandboxed: cleanup 2024-01-29 09:14:43 +00:00
7b9795ea3d modules/programs: implement embedWrapper option 2024-01-29 09:13:49 +00:00
5f3e481fe4 sane-sandboxed: refactor and avoid passing duplicate/subpaths into the sandbox 2024-01-29 07:15:02 +00:00
86219d7006 sane-sandboxed: simplify: consolidate homePaths and rootPaths into just "paths" 2024-01-29 05:43:10 +00:00
381da74e6c users: enable pam_cap for "login" program 2024-01-28 17:55:19 +00:00
24c70c3683 feeds: switch acoup.blog to the database type feed
at some point my feed script became capable of understanding his RSS :)
2024-01-28 12:37:38 +00:00
bfec531fa2 sandbox a bunch more apps 2024-01-28 11:43:05 +00:00
de11edffa5 programs/assorted: remove more unused programs 2024-01-28 11:34:33 +00:00
294f167df0 sane-sandboxed: fix CLI escaping with capsh 2024-01-28 11:11:07 +00:00
e536e3c718 programs/assorted.nix: remove unused tree-sitter package 2024-01-28 11:03:09 +00:00
17d14dbac2 programs/assorted.nix: uninstall some programs i don't frequently use 2024-01-28 10:40:57 +00:00
94981ef335 vim: sandbox 2024-01-28 10:39:08 +00:00
3cd244be76 git: sandbox with bwrap 2024-01-28 10:36:19 +00:00
f100595257 modules/programs: properly forward autodetectCliPaths to the sandboxer 2024-01-28 10:31:07 +00:00
e84da827c2 sane-sandboxed: fix typo in add-pwd flag 2024-01-28 09:17:12 +00:00
42f9fa029d modules/programs: fix that whitelistPwd wasnt passed into the sandbox profile 2024-01-28 09:04:27 +00:00
40fee97b06 modules/programs: make-sandboxed: disallowReferences to the fake sane-sandboxed used during checkPhase 2024-01-28 08:58:13 +00:00
3cc8292d8b modules/programs: make-sandboxed: support packages with checkPhase by bypassing the sandbox 2024-01-28 07:45:08 +00:00
9261d30a34 modules/programs: reformatting 2024-01-28 05:58:08 +00:00
3eb3a8db5a modules/programs: add a whitelistPwd option to grant the program access to the directory it was called from 2024-01-28 05:57:30 +00:00
97129268f0 modules/programs: sandbox: add "capshonly" as a valid sandbox.method 2024-01-28 05:57:11 +00:00
fa39a965ca TODO: investigate sane.programs as a contributor to nixos-rebuild times 2024-01-28 05:55:32 +00:00
7da979503b bubblewrap: explicitly disable sandboxing 2024-01-27 17:20:40 +00:00
3b32c26026 zsh: explicitly disable sandboxing 2024-01-27 17:20:24 +00:00
cad25306e7 alacritty: explicitly disable sandbox 2024-01-27 17:20:11 +00:00
4d7414c941 programs: introduce and use "autodetectCliPaths" nix config 2024-01-27 17:19:48 +00:00
b29b8bdec7 wireshark: specify capabilities via sandbox.capabilities config 2024-01-27 17:12:40 +00:00
a7d081bfcb modules/programs: add a sane.strictSandboxing option 2024-01-27 17:11:07 +00:00
5ca208d07f modules/programs: sandbox: add enable flag and capabilities structured config 2024-01-27 17:08:27 +00:00
6c605944c5 pkgs: firefox-extensions: update to latest 2024-01-27 15:50:47 +00:00
02b6e17449 nicotine-plus: disable
now i have no firejail programs; no more setuid wrapper in /run/wrappers :)
2024-01-27 15:37:43 +00:00
770db96ec6 go2tv: sandbox with bwrap 2024-01-27 15:31:08 +00:00
ff356fdd49 playerctl: sandbox with bwrap 2024-01-27 15:18:56 +00:00
eec89e2cc1 librewolf: sandbox with bwrap 2024-01-27 15:16:53 +00:00
d69d8f64f3 tor-browser: sandbox with bwrap; remove useHardenedMalloc patch 2024-01-27 15:04:22 +00:00
4ee2562202 programs: tidy: prefer "sandbox.extraHomePaths" over "fs" for external deps 2024-01-27 14:54:17 +00:00
08b1ece56e programs: gnome-weather: sandbox with bwrap 2024-01-27 14:53:38 +00:00
26b978dcf2 modules/programs: sandbox: fix "inline" -> "inplace" typo 2024-01-27 14:42:25 +00:00
b22c2e094c koreader: sandbox with bwrap 2024-01-27 14:39:22 +00:00
b40775f97c koreader-from-src: document FTP configuration 2024-01-27 14:39:02 +00:00
a27a72646c koreader-from-src: fix non-cross build 2024-01-27 14:38:52 +00:00
100ddad40e wike: link to issue about state directory 2024-01-27 14:27:02 +00:00
d8b6d419b6 modules/programs: sandboxing: add wrapperType = "wrappedDerivation" to wrap without rebuilding the whole package 2024-01-27 14:26:41 +00:00
1bde38bf72 cozy: sandbox with bwrap 2024-01-27 13:11:22 +00:00
a06c81643c sane-sandboxed: don't error if ~ files aren't available to be bound 2024-01-27 12:48:58 +00:00
15fd7bf4a5 sane-sandboxed: implement a "capshonly" backend 2024-01-27 12:39:36 +00:00
0a25ef544f wike: sandbox with bwrap 2024-01-27 12:29:58 +00:00
a6b824d3c4 modules/programs/sandbox: add an "embedProfile" option to source sandbox settings from the package instead of the system 2024-01-27 12:23:25 +00:00
79ee47bada firefox: get away with linking slightly less into the sandbox 2024-01-27 11:41:18 +00:00
be06e61bfb programs: geary: fix sandboxing
this is an UGLY one. geary itself uses bwrap, and that fails if it's sandboxed AT ALL in landlock (i.e. even with just / landlocked as RW).

maybe this has to do with what landlock-sandboxer considers 'read/write' to be, and there's actually more file ops i need to enable on /
2024-01-27 11:28:08 +00:00
3b4884fcf1 sane-sandbox: fix secret binding 2024-01-27 11:26:10 +00:00
4319dc58eb programs: landlock: restrict the capabilities of sandboxed processes 2024-01-27 09:49:51 +00:00
3122434908 programs: add an option to configure extra home paths to make accessible in the sandbox 2024-01-27 09:11:32 +00:00
dae7785ee2 wireshark: remove dead code 2024-01-27 09:04:08 +00:00
d54f8b1e93 programs: fix so environment variables make it onto user sessions 2024-01-27 09:02:55 +00:00
27f3b2bd76 firefox: allow ~/tmp and ~/Pictures access 2024-01-27 06:00:46 +00:00
b417f60769 sane-sandboxed: try binding /proc/self in landlock. still doesnt work well 2024-01-27 05:59:40 +00:00
df2d5b6d01 sane-sandboxed: fixup /dev/std* for wireshark 2024-01-27 05:12:43 +00:00
3e6278fa21 wireshark: sandbox with landlock instead of firejail
and remove the SUID wrapper, yay!
2024-01-27 04:44:21 +00:00
a66b257644 sane-sandboxed: better support for landlock and SANE_SANDBOX_PREPEND/APPEND 2024-01-27 04:43:42 +00:00
ef66d2ec72 sane-sandboxed: add support for landlock backend 2024-01-27 03:39:26 +00:00
e21dbd507d landlock-sandboxer: init 2024-01-26 16:52:33 +00:00
64878bee67 sane-sandboxed: add SANE_SANDBOX_PREPEND, SANE_SANDBOX_APPEND env vars 2024-01-26 09:14:18 +00:00
557a080ffc TODO.md: try landlocked for sandboxing, instead of bubblewrap 2024-01-26 09:13:46 +00:00
8ecb17ed3e programs: enable libcap_ng/netcap 2024-01-26 09:13:20 +00:00
c4874c85b1 bubblewrap: debugging 2024-01-26 09:13:00 +00:00
563a75e9b2 users: launch entire systemd --user namespace with cap_net_admin, cap_net_raw
this should make sandboxing wireshark *much* easier, and same with things which require net namespaces, in the future
2024-01-25 15:05:35 +00:00
7f002b8718 programs: sane-sandboxed: implement --sane-sandbox-cap for capabilities setting 2024-01-24 06:34:11 +00:00
79e2bd2913 epiphany: sandbox with bwrap
this is the first app which *requires* DRI/DRM to function correctly. maybe this effects anything webkitgtk (like wike)?
2024-01-24 06:25:20 +00:00
95161b55cd spot: sandbox with bwrap 2024-01-24 05:47:04 +00:00
d91759068c element-desktop: sandbox with bwrap 2024-01-24 05:37:46 +00:00
c23c496066 programs: tuba: sandbox with bwrap
it complains "Fontconfig error: No writable cache directories"
seeeeeveral times. not sure if that's new or not. no obvious
consequences.
2024-01-24 05:34:10 +00:00
824630f7d1 programs: sandboxing: document /dev/dri a bit more 2024-01-24 05:28:27 +00:00
f8e8d23857 vlc: sandbox with bwrap instead of firejail 2024-01-24 05:19:20 +00:00
8484bb7978 docs: mime: document how to show the nix mime associations 2024-01-24 05:00:35 +00:00
57105c6861 sane-sandboxed: autodetect: handle file:/// URIs 2024-01-24 05:00:08 +00:00
3758044e7b sane-sandboxed: better handle "--" 2024-01-24 04:59:24 +00:00
bfaf098c31 sane-sandboxed: fix handling of -- (which previously smushed arguments) 2024-01-24 02:52:01 +00:00
0e99b296bc animatch: remove the (unused) .config directory 2024-01-24 02:18:58 +00:00
089f86d5e4 programs: make /usr/bin/env available in the sandbox
enables KOReader to run
2024-01-24 01:48:02 +00:00
d0e1241bd1 animatch: fix to run on wayland w/o Xwayland, and enable bwrap sandbox 2024-01-24 01:43:33 +00:00
c1a0a08b76 gtkcord4: sandbox with bwrap 2024-01-24 00:12:12 +00:00
e8748ce0a0 servo: lemmy: pict-rs: port the media-enable-full-video -> media-video-allow-audio CLI flag 2024-01-23 17:12:13 +00:00
7cf9b342cc gpodder: fixup GPODDER_DOWNLOAD_DIR to be more friendly to sandboxing 2024-01-23 16:44:47 +00:00
8739851f48 evince: port sandbox from firejail to bwrap 2024-01-23 16:44:13 +00:00
d945b43f6b signal-desktop: switch sandbox from firejail -> bwrap 2024-01-23 16:42:48 +00:00
fcc3ea1e39 todo: update containerization tasks 2024-01-23 16:41:06 +00:00
7722acecee sway: obtain deps via "config.sane.programs", so that i get the sandboxed version of e.g. splatmoji 2024-01-23 16:32:42 +00:00
bdd70f8fa2 sane-sandboxed: ignore the executable path when autodetecting media 2024-01-23 16:32:06 +00:00
571a0a9d06 gui: disable unused abaddon app 2024-01-23 16:30:06 +00:00
ccf4f66dd9 programs: dialect: sandbox with bubblewrap 2024-01-23 16:23:14 +00:00
b38e5403a5 splatmoji: sandbox 2024-01-23 16:01:27 +00:00
09af041745 g4music: ensure it can access the Music dir in its sandbox 2024-01-23 16:00:21 +00:00
cb5131746f programs: audacity: sandbox with bubblewrap 2024-01-23 15:59:50 +00:00
2fbd0f8ee1 nixpatches: apply bonsai refactor PR 2024-01-23 15:50:32 +00:00
bfd5630e21 programs: sandbox: omit media dirs by default, and implement --sane-sandbox-autodetect for programs which are liable to load data from paths 2024-01-23 15:48:12 +00:00
026f5dee4d programs: g4music: sandbox with bwrap 2024-01-23 15:06:45 +00:00
b59be8338a firefox: fix up sandboxing of ssh/sops 2024-01-23 14:57:57 +00:00
ab4bbc2224 programs: remove explicit firejail installation; let sane.programs decide when to install it sys-wide 2024-01-23 14:57:33 +00:00
156fcd1bf2 aerc: enable bwrap sandbox 2024-01-23 14:57:33 +00:00
576d2c32f0 programs: support secrets even when sandboxed 2024-01-23 14:57:33 +00:00
bb63a594ab conky: fixup needed paths for bwrap 2024-01-23 14:57:33 +00:00
25739ec2ba programs: sane-sandboxed: avoid reading firejail profiles when the backend isnt firejail
this should provide a marginal perf gain
2024-01-23 14:57:33 +00:00
f148334b58 programs: port extraFirejailConfig to extraConfig 2024-01-23 14:57:33 +00:00
da537ea8ea fractal: switch from firejail -> bwrap 2024-01-23 14:13:09 +00:00
18d224dc34 dino: switch from firejail to bwrap 2024-01-23 14:12:52 +00:00
3a6ee8708e programs: sane-sandboxed: dont error if network mountpoints are offline 2024-01-23 13:13:31 +00:00
983bf93d8f programs: sane-sandboxed: make the profile handle arguments with spaces 2024-01-23 12:47:25 +00:00
40cc8f5d1c programs: sane-sandboxed: make more debuggable 2024-01-23 12:27:23 +00:00
cce03a5dc8 programs: sandbox: use --dev-bind-try for root paths; fixes mpv on moby 2024-01-23 12:18:32 +00:00
38fd171713 spotify: sandbox with bwrap instead of firejail 2024-01-23 12:12:56 +00:00
84c78d9256 conky: sandbox with bwrap instead of firejail 2024-01-23 12:11:22 +00:00
973203d85e programs: mpv: sandbox with bwrap instead of firejail 2024-01-23 11:37:37 +00:00
f9174dd2aa programs: firefox: sandbox with bwrap instead of firejail 2024-01-23 11:37:19 +00:00
98dfc3aa5a programs: sandbox: allow all programs to access media
hopefully this is just a stopgap
2024-01-23 11:36:58 +00:00
27b56b1a12 programs: sane-sandbox: implement a cleaner debugshell and test API 2024-01-23 11:19:52 +00:00
6e9220d2bb programs: allow programs to specify "sandbox.method = "bwrap"" for bubblewrap sandboxing 2024-01-23 10:44:13 +00:00
0ddcfcaa23 sane-sandboxed: retrieve profiles from /share/sane-sandboxed/profiles so they can be customized without mass rebuilds 2024-01-23 08:01:23 +00:00
a4cb6645b4 programs: indirect firejail access through sane-sandboxed 2024-01-23 04:02:31 +00:00
2492ed2ca7 programs: introduce a sane-sandboxed helper
not yet used, but will be soon
2024-01-23 02:29:33 +00:00
f49d2a1e0e programs: split "makeSandboxed" into its own file 2024-01-23 01:23:14 +00:00
0dc3f4f7f2 modules/programs: move to subdir
this will help me factor out helpers
2024-01-23 01:02:04 +00:00
0bed4d0ada mpv: disable firejail sandboxing (it fails on moby) 2024-01-23 01:01:21 +00:00
f3e8af3fdb doc: libreoffice: mention "still" v.s. "fresh" variants 2024-01-23 01:00:34 +00:00
af542ec05f docs: gnome-keyring: point out that system gnome-keyring doesn't inherit my sandboxing 2024-01-23 01:00:06 +00:00
399a1d2052 steam: use wrapped package as system steam 2024-01-23 00:59:23 +00:00
bb6e5611d4 docs: conky: point out that un-sandboxed conky is used by sxmo-utils 2024-01-23 00:58:56 +00:00
d5901afb8e programs: firejail: specify profile via : (clarifies to firejail that its an identifier and not a path); invoke firejail via name instead of absolute path 2024-01-22 23:58:54 +00:00
c11f5a1401 wireshark: fix security.wrappers when wireshark is disabled 2024-01-22 23:58:04 +00:00
5b220f3fec wireshark: enable firejail isolation 2024-01-22 13:12:10 +00:00
8bf41ea858 programs: fix missing newline in firejail config concatenation 2024-01-22 13:11:47 +00:00
df861a3ef0 programs: firejail: inject custom firejail config through /etc/firejail
this improves rebuild times, and makes it easier for packages to inject their own free-form config
2024-01-22 11:12:18 +00:00
d6754b6cac evince: sandbox with firejail 2024-01-22 10:20:29 +00:00
b03d7f7fb0 geary: test the firejail profile; it's not ready 2024-01-22 10:04:18 +00:00
008b186479 audacity: test the firejail profile; it's not ready 2024-01-22 10:04:03 +00:00
914f9b3703 vlc: sandbox with firejail 2024-01-22 09:47:24 +00:00
ed7ec4a371 conky: sandbox with firejail 2024-01-22 09:31:00 +00:00
2d338201a5 signal-desktop: sandbox with firejail
TODO: fix URL opening / xdg-open
2024-01-22 09:30:34 +00:00
a8aad1f98f dino: sandbox with firejail
TODO: fix URL opening / xdg-open
2024-01-22 09:30:13 +00:00
2d06b93118 fractal: sandbox with firejail
TODO: seems this broke link opening? (xdg-open?)
2024-01-22 09:28:50 +00:00
60547204a8 sane.programs: firejail: support wrapping "runCommand" packages 2024-01-22 09:16:25 +00:00
3d763a0021 tor-browser-bundle-bin -> tor-browser
upstream nixpgs just has tor-browser-bundle-bin as an alias for tor-browser
2024-01-22 08:13:37 +00:00
ad474873e2 dovecot: fix unparseable config
upstream/nixpkgs is doing some shit, ugh
2024-01-22 08:09:37 +00:00
dd35136ac0 firejail: fix so /run/wrappers are available inside a jail 2024-01-22 07:18:50 +00:00
cfe6e9c20a nixpkgs: 2024-01-19 -> 2024-01-22
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/331c78971299375240001d946861951b6cc98176' (2024-01-19)
  → 'github:nixos/nixpkgs/dceddd03df4f840ea28c65887c199495793fb322' (2024-01-22)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/bbec4099302591a41304d360e3bab805e5ccc0be' (2024-01-19)
  → 'github:nixos/nixpkgs/8cccce637e19577815de54c5ecc3132dff965aee' (2024-01-22)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/87755331580fdf23df7e39b46d63ac88236bf42c' (2024-01-15)
  → 'github:Mic92/sops-nix/ae171b54e76ced88d506245249609f8c87305752' (2024-01-21)
```
2024-01-22 04:05:59 +00:00
0f3f0933b1 mpv: sandbox with firejail 2024-01-22 03:50:28 +00:00
f8440e3811 go2tv: allow more ports through the firewall 2024-01-22 03:50:04 +00:00
829460a076 todo: update firejail/sandboxing tasks 2024-01-22 02:04:32 +00:00
9ecd0adcbe firefox: sandbox with firejail
TODO: get it so open-in-mpv launches an mpv that has access to ~/.config/mpv

i guess this is the 'firejail url problem'
2024-01-21 23:59:15 +00:00
ad92a2e158 programs: abort when no firejail profile is found for a program.
in the future, i can whitelist specific binaries to omit their firejail
profiles.
2024-01-21 04:32:49 +00:00
5f5891d241 programs: apply firejail profile to programs which are net isolated 2024-01-21 04:28:48 +00:00
cf475c4696 nicotine-plus: remove distro-specific symlink 2024-01-21 03:56:33 +00:00
992194a1f0 programs: achieve network sandboxing without "sane-vpn do" 2024-01-21 03:51:12 +00:00
bad6a7bfee programs: implement "default vpn" with native nix code instead of sane-vpn 2024-01-21 01:04:31 +00:00
66d5e204be vpn: enforce "id" restrictions 2024-01-21 00:57:46 +00:00
ce35330923 vpn.nix: factor into a proper module
this will allow for better integration with 'sane.programs'
2024-01-21 00:49:34 +00:00
bdab1aa7e3 firefox-extensions: update to latest 2024-01-20 21:30:15 +00:00
080c8dbe3d sane-bt-search: try to install some logging for a sporadic error 2024-01-20 21:19:18 +00:00
a31fe44624 sane-bt-add: handle https:// URIs which forward to magnet: 2024-01-20 21:18:58 +00:00
59187a0ec0 programs: allow running binaries in a netns-style firejail 2024-01-20 11:11:12 +00:00
03fbf42680 servo: lemmy: pict-rs: fix broken CLI argument 2024-01-20 03:15:06 +00:00
f3b2a98874 firejail: fix cross compilation 2024-01-20 03:14:32 +00:00
2e9084c9ef nixpkgs: 2024-01-14 -> 2024-01-19; sops-nix -> 2024-01-15
```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/724e39ebb9b8eda97f17d423f66fbc5a991f4f8d' (2024-01-14)
  → 'github:nixos/nixpkgs/331c78971299375240001d946861951b6cc98176' (2024-01-19)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/6c08fe3ccf437d8b26bec010fd925ddd6bb0d0d5' (2024-01-14)
  → 'github:nixos/nixpkgs/bbec4099302591a41304d360e3bab805e5ccc0be' (2024-01-19)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/70dd0d521f7849338e487a219c1a07c429a66d77' (2024-01-14)
  → 'github:Mic92/sops-nix/87755331580fdf23df7e39b46d63ac88236bf42c' (2024-01-15)
```
2024-01-20 03:14:32 +00:00
0907240fda sane-vpn: implement the "do" command, to run a program in a netns 2024-01-19 22:55:26 +00:00
7d670facd4 feeds: sort 2024-01-19 21:38:45 +00:00
61e5704fd6 feeds: unsub LW
too verbose, and too many of y'all turned into authoritarians
2024-01-19 21:38:14 +00:00
fd0723169f nix-serve: fix coredump loop 2024-01-19 21:34:45 +00:00
a725d42bf5 ip_forward: consolidate the options to fix servo build 2024-01-19 21:34:18 +00:00
c03cea2d4e net/vpn.nix: cleanup dead code 2024-01-19 09:58:13 +00:00
f43d6bff92 route VPN traffic such that i can configure any app to selectively use the VPN
e.g. firejail --net=br-ovpnd-us-mi --noprofile --dns=46.227.67.134 getent ahostsv4 uninsane.org
2024-01-19 09:54:01 +00:00
43a8ca90a7 feeds: add Cat and Girl 2024-01-16 19:12:25 +00:00
dac6046828 firefox-extensions: update to latest 2024-01-16 19:10:32 +00:00
e2a6ae22dc sxmo-utils: 2024-12-28 -> 2024-01-01 2024-01-16 19:10:08 +00:00
f2ee43d1ef delfin: 0.2.1 -> 0.3.0 2024-01-16 19:09:50 +00:00
3d80b46570 lemoa: 0.5.0 -> 0.5.1 2024-01-16 19:09:38 +00:00
e7d383604a signal-desktop-from-src: 6.42.0 -> 6.44.0 2024-01-16 19:09:25 +00:00
7d504892be servo: dovecot: fix broken sieve 2024-01-16 06:28:25 +00:00
d7a2bf9d26 servo: remove networking.useDHCP=false override
seems likely that the change to systemd-networkd renamed the ethernet interface, and so eth0.useDHCP wasn't right. this change seems to restore networking
2024-01-16 06:09:19 +00:00
d6184a7b6d sane-vpn: update to be compatible with newer systemd-network vpn implementation 2024-01-16 03:36:37 +00:00
851c15aa6d vpn: port ovpnd connections to use systemd-network
this should allow better integration with e.g. systemd-run, in future
2024-01-16 03:20:40 +00:00
637 changed files with 43631 additions and 23965 deletions

View File

@ -3,6 +3,7 @@ keys:
- &user_lappy_colin age1j2pqnl8j0krdzk6npe93s4nnqrzwx978qrc0u570gzlamqpnje9sc8le2g
- &user_servo_colin age1z8fauff34cdecr6sjkre260luzxcca05kpcwvhx988d306tpcejsp63znu
- &user_moby_colin age1zsrsvd7j6l62fjxpfd2qnhqlk8wk4p8r0dtxpe4sdgnh2474095qdu7xj9
- &host_crappy age1hl50ufuxnqy0jnk8fqeu4tclh4vte2xn2d59pxff0gun20vsmv5sp78chj
- &host_desko age1vnw7lnfpdpjn62l3u5nyv5xt2c965k96p98kc43mcnyzpetrts9q54mc9v
- &host_lappy age1w7mectcjku6x3sd8plm8wkn2qfrhv9n6zhzlf329e2r2uycgke8qkf9dyn
- &host_servo age1tzlyex2z6t88tg9h82943e39shxhmqeyr7ywhlwpdjmyqsndv3qq27x0rf
@ -15,6 +16,7 @@ creation_rules:
- *user_lappy_colin
- *user_servo_colin
- *user_moby_colin
- *host_crappy
- *host_desko
- *host_lappy
- *host_servo

129
README.md
View File

@ -1,3 +1,9 @@
![hello](doc/hello.gif)
# .❄≡We|_c0m3 7o m`/ f14k≡❄.
(er, it's not a flake anymore. welcome to my nix files.)
## What's Here
this is the top-level repo from which i configure/deploy all my NixOS machines:
@ -6,18 +12,18 @@ this is the top-level repo from which i configure/deploy all my NixOS machines:
- server
- mobile phone (Pinephone)
everything outside of <./hosts/> and <./secrets/> is intended for export, to be importable for use by 3rd parties.
everything outside of [hosts/](./hosts/) and [secrets/](./secrets/) is intended for export, to be importable for use by 3rd parties.
the only hard dependency for my exported pkgs/modules should be [nixpkgs][nixpkgs].
building <./hosts/> will require [sops][sops].
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)
- ~~[`sxmo-utils`](./pkgs/additional/sxmo-utils/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/default.nix>
- <./modules/programs.nix>
- <./modules/users.nix>
- [modules/fs/](./modules/fs/default.nix)
- [modules/programs/](./modules/programs/default.nix)
- [modules/users/](./modules/users/default.nix)
[nixpkgs]: https://github.com/NixOS/nixpkgs
[sops]: https://github.com/Mic92/sops-nix
@ -25,47 +31,38 @@ you might specifically be interested in these files (elaborated further in #key-
## Using This Repo In Your Own Config
this should be a pretty "standard" flake. just reference it, and import either
- `nixosModules.sane` (for the modules)
- `overlays.pkgs` (for the packages)
or follow the instructions [here][NUR] to use it via the Nix User Repositories.
follow the instructions [here][NUR] to access my packages through the Nix User Repositories.
[NUR]: https://nur.nix-community.org/
## Layout
- `doc/`
- instructions for tasks i find myself doing semi-occasionally in this repo.
- instructions for tasks i find myself doing semi-occasionally in this repo.
- `hosts/`
- the bulk of config which isn't factored with external use in mind.
- that is, if you were to add this repo to a flake.nix for your own use,
you won't likely be depending on anything in this directory.
- configs which aren't factored with external use in mind.
- that is, if you were to add this repo to a flake.nix for your own use,
you won't likely be depending on anything in this directory.
- `integrations/`
- code intended for consumption by external tools (e.g. the Nix User Repos)
- code intended for consumption by external tools (e.g. the Nix User Repos).
- `modules/`
- config which is gated behind `enable` flags, in similar style to nixpkgs'
`nixos/` directory.
- if you depend on this repo, it's most likely for something in this directory.
- `nixpatches/`
- literally, diffs i apply atop upstream nixpkgs before performing further eval.
- config which is gated behind `enable` flags, in similar style to nixpkgs' `nixos/` directory.
- if you depend on this repo for anything besides packages, it's most likely for something in this directory.
- `overlays/`
- exposed via the `overlays` output in `flake.nix`.
- predominantly a list of `callPackage` directives.
- predominantly a list of `callPackage` directives.
- `pkgs/`
- derivations for things not yet packaged in nixpkgs.
- derivations for things from nixpkgs which i need to `override` for some reason.
- inline code for wholly custom packages (e.g. `pkgs/additional/sane-scripts/` for CLI tools
that are highly specific to my setup).
- derivations for things not yet packaged in nixpkgs.
- derivations for things from nixpkgs which i need to `override` for some reason.
- inline code for wholly custom packages (e.g. `pkgs/additional/sane-scripts/` for CLI tools
that are highly specific to my setup).
- `scripts/`
- scripts which aren't reachable on a deployed system, but may aid manual deployments
- scripts which aren't reachable on a deployed system, but may aid manual deployments.
- `secrets/`
- encrypted keys, API tokens, anything which one or more of my machines needs
read access to but shouldn't be world-readable.
- not much to see here
- encrypted keys, API tokens, anything which one or more of my machines needs
read access to but shouldn't be world-readable.
- not much to see here.
- `templates/`
- exposed via the `templates` output in `flake.nix`.
- used to instantiate short-lived environments.
- used to auto-fill the boiler-plate portions of new packages.
- used to instantiate short-lived environments.
- used to auto-fill the boiler-plate portions of new packages.
## Key Points of Interest
@ -73,35 +70,41 @@ or follow the instructions [here][NUR] to use it via the Nix User Repositories.
i.e. you might find value in using these in your own config:
- `modules/fs/`
- use this to statically define leafs and nodes anywhere in the filesystem,
not just inside `/nix/store`.
- e.g. specify that `/var/www` should be:
- owned by a specific user/group
- set to a specific mode
- symlinked to some other path
- populated with some statically-defined data
- populated according to some script
- created as a dependency of some service (e.g. `nginx`)
- values defined here are applied neither at evaluation time _nor_ at activation time.
- rather, they become systemd services.
- systemd manages dependencies
- e.g. link `/var/www -> /mnt/my-drive/www` only _after_ `/mnt/my-drive/www` appears)
- this is akin to using [Home Manager's][home-manager] file API -- the part which lets you
statically define `~/.config` files -- just with a different philosophy.
- use this to statically define leafs and nodes anywhere in the filesystem,
not just inside `/nix/store`.
- e.g. specify that `/var/www` should be:
- owned by a specific user/group
- set to a specific mode
- symlinked to some other path
- populated with some statically-defined data
- populated according to some script
- created as a dependency of some service (e.g. `nginx`)
- values defined here are applied neither at evaluation time _nor_ at activation time.
- rather, they become systemd services.
- systemd manages dependencies
- e.g. link `/var/www -> /mnt/my-drive/www` only _after_ `/mnt/my-drive/www` appears)
- this is akin to using [Home Manager's][home-manager] file API -- the part which lets you
statically define `~/.config` files -- just with a different philosophy.
- `modules/persist/`
- my alternative to the Impermanence module.
- this builds atop `modules/fs/` to achieve things stock impermanence can't:
- persist things to encrypted storage which is unlocked at login time (pam_mount).
- "persist" cache directories -- to free up RAM -- but auto-wipe them on mount
and encrypt them to ephemeral keys so they're unreadable post shutdown/unmount.
- `modules/programs.nix`
- like nixpkgs' `programs` options, but allows both system-wide or per-user deployment.
- allows `fs` and `persist` config values to be gated behind program deployment:
- e.g. `/home/<user>/.mozilla/firefox` is persisted only for users who
`sane.programs.firefox.enableFor.user."<user>" = true;`
- `modules/users.nix`
- convenience layer atop the above modules so that you can just write
`fs.".config/git"` instead of `fs."/home/colin/.config/git"`
- my alternative to the Impermanence module.
- this builds atop `modules/fs/` to achieve things stock impermanence can't:
- persist things to encrypted storage which is unlocked at login time (pam_mount).
- "persist" cache directories -- to free up RAM -- but auto-wipe them on mount
and encrypt them to ephemeral keys so they're unreadable post shutdown/unmount.
- `modules/programs/`
- like nixpkgs' `programs` options, but allows both system-wide or per-user deployment.
- allows `fs` and `persist` config values to be gated behind program deployment:
- e.g. `/home/<user>/.mozilla/firefox` is persisted only for users who
`sane.programs.firefox.enableFor.user."<user>" = true;`
- allows aggressive sandboxing any program:
- `sane.programs.firefox.sandbox.method = "bwrap"; # sandbox with bubblewrap`
- `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/`
- 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.

114
TODO.md
View File

@ -1,57 +1,104 @@
## BUGS
- nixpkgs date is incorrect (1970.01.01...)
- `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
- 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
- `nix` operations from lappy hang when `desko` is unreachable
- could at least direct the cache to `http://desko-hn:5001`
- syshud (volume overlay): when casting with `blast`, syshud 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'`
- `s6` is not re-entrant
- so if the desktop crashes, the login process from `unl0kr` fails to re-launch the GUI
- swaync brightness slider does not work
- it reads brightness from /sys/class/backlight/....
- but to *set* the brightness it assumes systemd logind is running
<repo:ErikReider/SwayNotificationCenter:src/controlCenter/widgets/backlight/backlightUtil.vala>
no reason i can't just write to that file, or exec brightnessctl (if i learn vala)
## 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
### sops/secrets
- attach secrets to the thing they're used by (sane.programs)
- rework secrets to leverage `sane.fs`
- remove sops activation script as it's covered by my systemd sane.fs impl
- user secrets could just use `gocryptfs`, like with ~/private?
- can gocryptfs support nested filesystems, each with different perms (for desko, moby, etc)?
### roles
- allow any host to take the role of `uninsane.org`
- will make it easier to test new services?
### upstreaming
- split out a sxmo module usable by NUR consumers
- bump nodejs version in lemmy-ui
- add updateScripts to all my packages in nixpkgs
- fix lightdm-mobile-greeter for newer libhandy
- port zecwallet-lite to a from-source build
- 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, ..?)
- best to do this after i know for sure i have good backups
- have `sane.programs` be wrapped such that they run in a cgroup?
- at least, only give them access to the portion of the fs they *need*.
- Android takes approach of giving each app its own user: could hack that in here.
- **systemd-run** takes a command and runs it in a temporary scope (cgroup)
- presumably uses the same options as systemd services
- see e.g. <https://github.com/NixOS/nixpkgs/issues/113903#issuecomment-857296349>
- flatpak does this, somehow
- apparmor? SElinux? (desktop) "portals"?
- see Spectrum OS; Alyssa Ross; etc
- bubblewrap-based sandboxing: <https://github.com/nixpak/nixpak>
- /mnt/desko/home, etc, shouldn't include secrets (~/private)
- 95% of its use is for remote media access and stuff which isn't in VCS (~/records)
- port all sane.programs to be sandboxed
- enforce that all `environment.packages` has a sandbox profile (or explicitly opts out)
- revisit "non-sandboxable" apps and check that i'm not actually just missing mountpoints
- LL_FS_RW=/ isn't enough -- need all mount points like `=/:/proc:/sys:...`.
- ensure non-bin package outputs are linked for sandboxed apps
- i.e. `outputs.man`, `outputs.debug`, `outputs.doc`, ...
- lock down dbus calls within the sandbox
- otherwise anyone can `systemd-run --user ...` to potentially escape a sandbox
- <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 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.
- make dconf stuff less monolithic
- i.e. per-app dconf profiles for those which need it. possible static config.
- flatpak/spectrum has some stuff to proxy dconf per-app
- canaries for important services
- e.g. daily email checks; daily backup checks
- integrate `nix check` into Gitea actions?
### faster/better deployments
- remove audacity's dependency on webkitgtk (via wxwidgets)
### user experience
- 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
- watch `forkstat`: it does way too much
- cleanup waybar/nwg-panel so that it's not invoking playerctl every 2 seconds
- nwg-panel: swaync icon is stuck as the refresh icon
- nwg-panel: doesn't appear on all desktops
- nwg-panel: doesn't know that virtual-desktop 10/TV exists
- install apps:
- display QR codes for WiFi endpoints: <https://linuxphoneapps.org/apps/noappid.wisperwind.wifi2qr/>
- shopping list (not in nixpkgs): <https://linuxphoneapps.org/apps/ro.hume.cosmin.shoppinglist/>
@ -59,8 +106,9 @@
- 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/>
- Folio is nice, uses standard markdown, though it only supports flat repos
- OSK overlay specifically for mobile gaming
- i.e. mock joysticks, for use with SuperTux and SuperTuxKart
- install mobile-friendly games:
@ -70,31 +118,34 @@
- Shootin Stars (Godot; not in nixpkgs) <https://gitlab.com/greenbeast/shootin-stars>
- 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>
- moby: tune keyboard layout
- SwayNC:
- don't show MPRIS if no players detected
- this is a problem of playerctld, i guess
- add option to change audio output
- fix colors (red alert) to match overall theme
- moby: tune GPS
- run only geoclue, and not gpsd, to save power?
- tune QGPS setting in eg25-control, for less jitter?
- direct mepo to prefer gpsd, with fallback to geoclue, for better accuracy?
- configure geoclue to do some smoothing?
- manually do smoothing, as some layer between mepo and geoclue/gpsd?
- manually do smoothing, as some layer between mepo and geoclue?
- 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)
- especially, make the menubar collapsible
- try Gradience tool specifically for theming adwaita? <https://linuxphoneapps.org/apps/com.github.gradienceteam.gradience/>
- phog: remove the gnome-shell runtime dependency to save hella closure size
#### non-moby
- RSS: integrate a paywall bypass
- e.g. self-hosted [ladder](https://github.com/everywall/ladder) (like 12ft.io)
- neovim: set up language server (lsp; rnix-lsp; nvim-lspconfig)
- neovim: integrate LLMs
- Helix: make copy-to-system clipboard be the default
- firefox/librewolf: persist history
- just not cookies or tabs
@ -111,13 +162,16 @@
- could change junk filter from "no DKIM success" to explicit "DKIM failed"
### 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!
- fix desko so it doesn't dispatch so many build jobs to servo by default
## NEW FEATURES:
- migrate MAME cabinet to nix
- boot it from PXE from servo?
- enable IPv6
- package lemonade lemmy app: <https://linuxphoneapps.org/apps/ml.mdwalters.lemonade/>

View File

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

25
doc/adding-a-host.md Normal file
View File

@ -0,0 +1,25 @@
to add a host:
- create the new nix targets
- hosts/by-name/HOST
- let the toplevel (flake.nix) know about HOST
- build and flash an image
- optionally expand the rootfs
- `cfdisk /dev/sda2` -> resize partition
- `mount /dev/sda2 boot`
- `btrfs filesystem resize max root`
- setup required persistent directories
- `mkdir -p root/persist/private`
- `gocryptfs -init root/persist/private`
- then boot the device, and for every dangling symlink in ~/.local/share, ~/.cache, do `mkdir -p` on it
- setup host ssh
- `mkdir -p root/persist/plaintext/etc/ssh/host_keys`
- boot the machine and let it create its own ssh keys
- add the pubkey to `hosts/common/hosts.nix`
- setup user ssh
- `ssh-keygen`. don't enter any password; it's stored in a password-encrypted fs.
- add the pubkey to `hosts/common/hosts.nix`
- allow the new host to view secrets
- instructions in hosts/common/secrets.nix
- run `ssh-to-age` on user/host pubkeys
- add age key to .sops.yaml
- update encrypted secrets: `sops updatekeys path/to/secret.yaml`

BIN
doc/hello.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

12
doc/recovery.md Normal file
View File

@ -0,0 +1,12 @@
## deploying to SD card
- build a toplevel config: `nix build '.#hostSystems.moby'`
- mount a system:
- `mkdir -p root/{nix,boot}`
- `mount /dev/sdX1 root/boot`
- `mount /dev/sdX2 root/nix`
- copy the config:
- `sudo nix copy --no-check-sigs --to root/ $(readlink result)`
- nix will copy stuff to `root/nix/store`
- install the boot files:
- `sudo /nix/store/sbwpwngjlgw4f736ay9hgi69pj3fdwk5-extlinux-conf-builder.sh -d ./root/boot -t 5 -c $(readlink ./result)`
- extlinux-conf-builder can be found in `/run/current-system/bin/switch-to-configuration`

View File

@ -1,121 +0,0 @@
{
"nodes": {
"mobile-nixos": {
"flake": false,
"locked": {
"lastModified": 1694749521,
"narHash": "sha256-MiVokKlpcJmfoGuWAMeW1En7gZ5hk0rCQArYm6P9XCc=",
"owner": "nixos",
"repo": "mobile-nixos",
"rev": "d25d3b87e7f300d8066e31d792337d9cd7ecd23b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "d25d3b87e7f300d8066e31d792337d9cd7ecd23b",
"repo": "mobile-nixos",
"type": "github"
}
},
"nixpkgs-next-unpatched": {
"locked": {
"lastModified": 1705233677,
"narHash": "sha256-eq3VE8QGJsunqqF/BlLslWE1gASp4Hlgp0c78coxat0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "724e39ebb9b8eda97f17d423f66fbc5a991f4f8d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "staging-next",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1705033721,
"narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unpatched": {
"locked": {
"lastModified": 1705254014,
"narHash": "sha256-4RrVNEqxeji4vqDgzSl7JoCD6a0ag5LF9zXFndtqrpE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6c08fe3ccf437d8b26bec010fd925ddd6bb0d0d5",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"mobile-nixos": "mobile-nixos",
"nixpkgs-next-unpatched": "nixpkgs-next-unpatched",
"nixpkgs-unpatched": "nixpkgs-unpatched",
"sops-nix": "sops-nix",
"uninsane-dot-org": "uninsane-dot-org"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs-unpatched"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1705201153,
"narHash": "sha256-y0/a4IMDZrc7lAkR7Gcm5R3W2iCBiARHnYZe6vkmiNE=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "70dd0d521f7849338e487a219c1a07c429a66d77",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"uninsane-dot-org": {
"inputs": {
"nixpkgs": [
"nixpkgs-unpatched"
]
},
"locked": {
"lastModified": 1704082841,
"narHash": "sha256-4g3lePnUALb8B1m3rEDD6rrZAq2pTN4qaSnStbd676U=",
"ref": "refs/heads/master",
"rev": "4a1fa488e64e6c87c6c951e3fafb2684692f64d3",
"revCount": 234,
"type": "git",
"url": "https://git.uninsane.org/colin/uninsane"
},
"original": {
"type": "git",
"url": "https://git.uninsane.org/colin/uninsane"
}
}
},
"root": "root",
"version": 7
}

549
flake.nix
View File

@ -1,549 +0,0 @@
# FLAKE FEEDBACK:
# - if flake inputs are meant to be human-readable, a human should be able to easily track them down given the URL.
# - this is not the case with registry URLs, like `nixpkgs/nixos-22.11`.
# - this is marginally the case with schemes like `github:nixos/nixpkgs`.
# - given the *existing* `git+https://` scheme, i propose expressing github URLs similarly:
# - `github+https://github.com/nixos/nixpkgs/tree/nixos-22.11`
# - this would allow for the same optimizations as today's `github:nixos/nixpkgs`, but without obscuring the source.
# a code reader could view the source being referenced simply by clicking the https:// portion of that URI.
# - need some way to apply local patches to inputs.
#
#
# DEVELOPMENT DOCS:
# - Flake docs: <https://nixos.wiki/wiki/Flakes>
# - Flake RFC: <https://github.com/tweag/rfcs/blob/flakes/rfcs/0049-flakes.md>
# - Discussion: <https://github.com/NixOS/rfcs/pull/49>
# - <https://serokell.io/blog/practical-nix-flakes>
#
#
# COMMON OPERATIONS:
# - update a specific flake input:
# - `nix flake lock --update-input nixpkgs`
{
# XXX: use the `github:` scheme instead of the more readable git+https: because it's *way* more efficient
# preferably, i would rewrite the human-readable https URLs to nix-specific github: URLs with a helper,
# but `inputs` is required to be a strict attrset: not an expression.
inputs = {
# branch workflow:
# - daily:
# - nixos-unstable cut from master after enough packages have been built in caches.
# - every 6 hours:
# - master auto-merged into staging and staging-next
# - staging-next auto-merged into staging.
# - manually, approximately once per month:
# - staging-next is cut from staging.
# - staging-next merged into master.
#
# which branch to source from?
# - nixos-unstable: for everyday development; it provides good caching
# - master: temporarily if i'm otherwise cherry-picking lots of already-applied patches
# - staging-next: if testing stuff that's been PR'd into staging, i.e. base library updates.
# - staging: maybe if no staging-next -> master PR has been cut yet?
#
# <https://github.com/nixos/nixpkgs/tree/nixos-unstable>
# nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=master";
# nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-staging";
# nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-staging-next";
nixpkgs-next-unpatched.url = "github:nixos/nixpkgs?ref=staging-next";
mobile-nixos = {
# <https://github.com/nixos/mobile-nixos>
# only used for building disk images, not relevant after deployment
# TODO: replace with something else. commit `0f3ac0bef1aea70254a3bae35e3cc2561623f4c1`
# replaces the imageBuilder with a "new implementation from celun" and wildly breaks my use.
# pinning to d25d3b... is equivalent to holding at 2023-09-15
url = "github:nixos/mobile-nixos?ref=d25d3b87e7f300d8066e31d792337d9cd7ecd23b";
flake = false;
};
sops-nix = {
# <https://github.com/Mic92/sops-nix>
# used to distribute secrets to my hosts
url = "github:Mic92/sops-nix";
# inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs-unpatched";
};
uninsane-dot-org = {
# provides the package to deploy <https://uninsane.org>, used only when building the servo host
url = "git+https://git.uninsane.org/colin/uninsane";
# inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs-unpatched";
};
};
outputs = {
self,
nixpkgs-unpatched,
nixpkgs-next-unpatched ? nixpkgs-unpatched,
mobile-nixos,
sops-nix,
uninsane-dot-org,
...
}@inputs:
let
inherit (builtins) attrNames elem listToAttrs map mapAttrs;
# redefine some nixpkgs `lib` functions to avoid the infinite recursion
# of if we tried to use patched `nixpkgs.lib` as part of the patching process.
mapAttrs' = f: set:
listToAttrs (map (attr: f attr set.${attr}) (attrNames set));
optionalAttrs = cond: attrs: if cond then attrs else {};
# mapAttrs but without the `name` argument
mapAttrValues = f: mapAttrs (_: f);
# rather than apply our nixpkgs patches as a flake input, do that here instead.
# this (temporarily?) resolves the bad UX wherein a subflake residing in the same git
# repo as the main flake causes the main flake to have an unstable hash.
patchNixpkgs = variant: nixpkgs: (import ./nixpatches/flake.nix).outputs {
inherit variant nixpkgs;
self = patchNixpkgs variant nixpkgs;
} // {
# provide values that nixpkgs ordinarily sources from the flake.lock file,
# inaccessible to it here because of the import-from-derivation.
# rev and shortRev seem to not always exist (e.g. if the working tree is dirty),
# so those are made conditional.
#
# these values impact the name of a produced nixos system. having date/rev in the
# `readlink /run/current-system` store path helps debuggability.
inherit (self) lastModifiedDate lastModified;
} // optionalAttrs (self ? rev) {
inherit (self) rev;
} // optionalAttrs (self ? shortRev) {
inherit (self) shortRev;
};
nixpkgs' = patchNixpkgs "master" nixpkgs-unpatched;
nixpkgsCompiledBy = system: nixpkgs'.legacyPackages."${system}";
evalHost = { name, local, target, light ? false, 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;
})
(import ./hosts/instantiate.nix { hostName = name; })
self.nixosModules.default
self.nixosModules.passthru
{
nixpkgs.overlays = [
self.overlays.passthru
self.overlays.sane-all
];
}
];
};
in {
nixosConfigurations = let
hosts = {
servo = { name = "servo"; local = "x86_64-linux"; target = "x86_64-linux"; };
desko = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; };
desko-light = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; light = true; };
lappy = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; };
lappy-light = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; light = true; };
moby = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; };
moby-light = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; light = true; };
rescue = { name = "rescue"; local = "x86_64-linux"; target = "x86_64-linux"; };
};
hostsNext = mapAttrs' (h: v: {
name = "${h}-next";
value = v // { nixpkgs = patchNixpkgs "staging-next" nixpkgs-next-unpatched; };
}) hosts;
in mapAttrValues evalHost (
hosts // hostsNext
);
# unofficial output
# this produces a EFI-bootable .img file (GPT with a /boot partition and a system (/ or /nix) partition).
# after building this:
# - flash it to a bootable medium (SD card, flash drive, HDD)
# - resize the root partition (use cfdisk)
# - mount the part
# - chown root:nixbld <part>/nix/store
# - chown root:root -R <part>/nix/store/*
# - chown root:root -R <part>/persist # if using impermanence
# - populate any important things (persist/, home/colin/.ssh, etc)
# - boot
# - if fs wasn't resized automatically, then `sudo btrfs filesystem resize max /`
# - checkout this flake into /etc/nixos AND UPDATE THE FS UUIDS.
# - `nixos-rebuild --flake './#<host>' switch`
imgs = mapAttrValues (host: host.config.system.build.img) self.nixosConfigurations;
# unofficial output
hostConfigs = mapAttrValues (host: host.config) self.nixosConfigurations;
hostSystems = mapAttrValues (host: host.config.system.build.toplevel) self.nixosConfigurations;
hostPkgs = mapAttrValues (host: host.config.system.build.pkgs) self.nixosConfigurations;
hostPrograms = mapAttrValues (host: mapAttrValues (p: p.package) host.config.sane.programs) self.nixosConfigurations;
patched.nixpkgs = nixpkgs';
overlays = {
# N.B.: `nix flake check` requires every overlay to take `final: prev:` at defn site,
# hence the weird redundancy.
default = final: prev: self.overlays.pkgs final prev;
sane-all = final: prev: import ./overlays/all.nix final prev;
disable-flakey-tests = final: prev: import ./overlays/disable-flakey-tests.nix final prev;
pkgs = final: prev: import ./overlays/pkgs.nix final prev;
pins = final: prev: import ./overlays/pins.nix final prev;
preferences = final: prev: import ./overlays/preferences.nix final prev;
optimizations = final: prev: import ./overlays/optimizations.nix final prev;
passthru = final: prev:
let
mobile = (import "${mobile-nixos}/overlay/overlay.nix");
uninsane = uninsane-dot-org.overlays.default;
in
(mobile final prev)
// (uninsane final prev)
;
};
nixosModules = rec {
default = sane;
sane = import ./modules;
passthru = { ... }: {
imports = [
sops-nix.nixosModules.sops
];
};
};
# this includes both our native packages and all the nixpkgs packages.
legacyPackages =
let
allPkgsFor = sys: (nixpkgsCompiledBy sys).appendOverlays [
self.overlays.passthru self.overlays.pkgs
];
in {
x86_64-linux = allPkgsFor "x86_64-linux";
aarch64-linux = allPkgsFor "aarch64-linux";
};
# extract only our own packages from the full set.
# because of `nix flake check`, we flatten the package set and only surface x86_64-linux packages.
packages = mapAttrs
(system: passthruPkgs: passthruPkgs.lib.filterAttrs
(name: pkg:
# keep only packages which will pass `nix flake check`, i.e. keep only:
# - derivations (not package sets)
# - packages that build for the given platform
(! elem name [ "feeds" "pythonPackagesExtensions" ])
&& (passthruPkgs.lib.meta.availableOn passthruPkgs.stdenv.hostPlatform pkg)
)
(
# expose sane packages and chosen inputs (uninsane.org)
(import ./pkgs { pkgs = passthruPkgs; }) // {
inherit (passthruPkgs) uninsane-dot-org;
}
)
)
# self.legacyPackages;
{
x86_64-linux = (nixpkgsCompiledBy "x86_64-linux").appendOverlays [
self.overlays.passthru
];
}
;
apps."x86_64-linux" =
let
pkgs = self.legacyPackages."x86_64-linux";
sanePkgs = import ./pkgs { inherit pkgs; };
deployScript = host: addr: action: pkgs.writeShellScript "deploy-${host}" ''
nix build '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} "$@"
sudo nix sign-paths -r -k /run/secrets/nix_serve_privkey $(readlink ./result-${host})
# XXX: this triggers another config eval & (potentially) build.
# if the config changed between these invocations, the above signatures might not apply to the deployed config.
# let the user handle that edge case by re-running this whole command.
# N.B.: `--fast` option here is critical to cross-compiled deployments: without it the build machine will try to invoke the host machine's `nix` binary.
# TODO: solve this by replacing the nixos-build invocation with:
# - nix-copy-closure --to $host $result
# - on target: nix-env set -p /nix/var/nix/profiles/system $result
# - on target: $result/bin/switch-to-configuration
nixos-rebuild --flake '.#${host}' ${action} --target-host colin@${addr} --use-remote-sudo "$@" --fast
'';
deployApp = host: addr: action: {
type = "app";
program = ''${deployScript host addr action}'';
};
# pkg updating.
# a cleaner alternative lives here: <https://discourse.nixos.org/t/how-can-i-run-the-updatescript-of-personal-packages/25274/2>
# mkUpdater :: [ String ] -> { type = "app"; program = path; }
mkUpdater = attrPath: {
type = "app";
program = let
pkg = pkgs.lib.getAttrFromPath attrPath sanePkgs;
strAttrPath = pkgs.lib.concatStringsSep "." attrPath;
commandArgv = pkg.updateScript.command or pkg.updateScript;
command = pkgs.lib.escapeShellArgs commandArgv;
in builtins.toString (pkgs.writeShellScript "update-${strAttrPath}" ''
export UPDATE_NIX_NAME=${pkg.name}
export UPDATE_NIX_PNAME=${pkg.pname}
export UPDATE_NIX_OLD_VERSION=${pkg.version}
export UPDATE_NIX_ATTR_PATH=${strAttrPath}
${command}
'');
};
mkUpdatersNoAliases = opts: basePath: pkgs.lib.concatMapAttrs
(name: pkg:
if pkg.recurseForDerivations or false then {
"${name}" = mkUpdaters opts (basePath ++ [ name ]);
} else if pkg.updateScript or null != null then {
"${name}" = mkUpdater (basePath ++ [ name ]);
} else {}
)
(pkgs.lib.getAttrFromPath basePath sanePkgs);
mkUpdaters = { ignore ? [], flakePrefix ? [] }@opts: basePath:
let
updaters = mkUpdatersNoAliases opts basePath;
invokeUpdater = name: pkg:
let
fullPath = basePath ++ [ name ];
doUpdateByDefault = !builtins.elem fullPath ignore;
# in case `name` has a `.` in it, we have to quote it
escapedPath = builtins.map (p: ''"${p}"'') fullPath;
updatePath = builtins.concatStringsSep "." (flakePrefix ++ escapedPath);
in pkgs.lib.optionalString doUpdateByDefault (
pkgs.lib.escapeShellArgs [
"nix" "run" ".#${updatePath}"
]
);
in {
type = "app";
# top-level app just invokes the updater of everything one layer below it
program = builtins.toString (pkgs.writeShellScript
(builtins.concatStringsSep "-" (flakePrefix ++ basePath))
(builtins.concatStringsSep
"\n"
(pkgs.lib.mapAttrsToList invokeUpdater updaters)
)
);
} // updaters;
in {
help = {
type = "app";
program = let
helpMsg = builtins.toFile "nixos-config-help-message" ''
commands:
- `nix run '.#help'`
- show this message
- `nix run '.#update.pkgs'`
- updates every package
- `nix run '.#update.feeds'`
- updates metadata for all feeds
- `nix run '.#init-feed' <url>`
- `nix run '.#deploy.{desko,lappy,moby,servo}[-light][.test]' [nixos-rebuild args ...]`
- `nix run '.#check'`
- make sure all systems build; NUR evaluates
specific build targets of interest:
- `nix build '.#imgs.rescue'`
'';
in builtins.toString (pkgs.writeShellScript "nixos-config-help" ''
cat ${helpMsg}
echo ""
echo "complete flake structure:"
nix flake show --option allow-import-from-derivation true
'');
};
# wrangle some names to get package updaters which refer back into the flake, but also conditionally ignore certain paths (e.g. sane.feeds).
# TODO: better design
update = rec {
_impl.pkgs.sane = mkUpdaters { flakePrefix = [ "update" "_impl" "pkgs" ]; ignore = [ [ "sane" "feeds" ] ]; } [ "sane" ];
pkgs = _impl.pkgs.sane;
_impl.feeds.sane.feeds = mkUpdaters { flakePrefix = [ "update" "_impl" "feeds" ]; } [ "sane" "feeds" ];
feeds = _impl.feeds.sane.feeds;
};
init-feed = {
type = "app";
program = "${pkgs.feeds.init-feed}";
};
deploy = {
lappy = deployApp "lappy" "lappy" "switch";
lappy-light = deployApp "lappy-light" "lappy" "switch";
moby = deployApp "moby" "moby" "switch";
moby-light = deployApp "moby-light" "moby" "switch";
moby-test = deployApp "moby" "moby" "test";
servo = deployApp "servo" "servo" "switch";
};
sync = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "sync-all" ''
RC_lappy=$(nix run '.#sync.lappy' -- "$@")
RC_moby=$(nix run '.#sync.moby' -- "$@")
RC_desko=$(nix run '.#sync.desko' -- "$@")
echo "lappy: $RC_lappy"
echo "moby: $RC_moby"
echo "desko: $RC_desko"
'');
};
sync.desko = {
# copy music from servo to desko
# can run this from any device that has ssh access to desko and servo
type = "app";
program = builtins.toString (pkgs.writeShellScript "sync-to-desko" ''
sudo mount /mnt/desko-home
${pkgs.sane-scripts.sync-music}/bin/sane-sync-music --compat /mnt/servo-media/Music /mnt/desko-home/Music "$@"
'');
};
sync.lappy = {
# copy music from servo to lappy
# can run this from any device that has ssh access to lappy and servo
type = "app";
program = builtins.toString (pkgs.writeShellScript "sync-to-lappy" ''
sudo mount /mnt/lappy-home
${pkgs.sane-scripts.sync-music}/bin/sane-sync-music --compress --compat /mnt/servo-media/Music /mnt/lappy-home/Music "$@"
'');
};
sync.moby = {
# copy music from servo to moby
# can run this from any device that has ssh access to moby and servo
type = "app";
program = builtins.toString (pkgs.writeShellScript "sync-to-moby" ''
sudo mount /mnt/moby-home
# N.B.: limited by network/disk -> reduce job count to improve pause/resume behavior
${pkgs.sane-scripts.sync-music}/bin/sane-sync-music --compress --compat --jobs 4 /mnt/servo-media/Music /mnt/moby-home/Music "$@"
'');
};
check = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "check-all" ''
nix run '.#check.nur'
RC0=$?
nix run '.#check.hostConfigs'
RC1=$?
nix run '.#check.rescue'
RC2=$?
echo "nur: $RC0"
echo "hostConfigs: $RC1"
echo "rescue: $RC2"
exit $(($RC0 | $RC1 | $RC2))
'');
};
check.nur = {
# `nix run '.#check-nur'`
# validates that my repo can be included in the Nix User Repository
type = "app";
program = builtins.toString (pkgs.writeShellScript "check-nur" ''
cd ${./.}/integrations/nur
NIX_PATH= NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-env -f . -qa \* --meta --xml \
--allowed-uris https://static.rust-lang.org \
--option restrict-eval true \
--option allow-import-from-derivation true \
--drv-path --show-trace \
-I nixpkgs=${nixpkgs-unpatched} \
-I ../../ \
| tee # tee to prevent interactive mode
'');
};
check.hostConfigs = {
type = "app";
program = let
checkHost = host: let
shellHost = pkgs.lib.replaceStrings [ "-" ] [ "_" ] host;
in ''
nix build -v '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} -j2 "$@"
RC_${shellHost}=$?
'';
in builtins.toString (pkgs.writeShellScript
"check-host-configs"
''
# build minimally-usable hosts first, then their full image.
# this gives me a minimal image i can deploy or copy over, early.
${checkHost "desko-light"}
${checkHost "moby-light"}
${checkHost "lappy-light"}
${checkHost "desko"}
${checkHost "lappy"}
${checkHost "servo"}
${checkHost "moby"}
${checkHost "rescue"}
# still want to build the -light variants first so as to avoid multiple simultaneous webkitgtk builds
${checkHost "desko-light-next"}
${checkHost "moby-light-next"}
${checkHost "desko-next"}
${checkHost "lappy-next"}
${checkHost "servo-next"}
${checkHost "moby-next"}
${checkHost "rescue-next"}
echo "desko: $RC_desko"
echo "lappy: $RC_lappy"
echo "servo: $RC_servo"
echo "moby: $RC_moby"
echo "rescue: $RC_rescue"
echo "desko-next: $RC_desko_next"
echo "lappy-next: $RC_lappy_next"
echo "servo-next: $RC_servo_next"
echo "moby-next: $RC_moby_next"
echo "rescue-next: $RC_rescue_next"
# i don't really care if the -next hosts fail. i build them mostly to keep the cache fresh/ready
exit $(($RC_desko | $RC_lappy | $RC_servo | $RC_moby | $RC_rescue))
''
);
};
check.rescue = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "check-rescue" ''
nix build -v '.#imgs.rescue' --out-link ./result-rescue-img -j2
'');
};
};
templates = {
env.python-data = {
# initialize with:
# - `nix flake init -t '/home/colin/dev/nixos/#env.python-data'`
# then enter with:
# - `nix develop`
path = ./templates/env/python-data;
description = "python environment for data processing";
};
pkgs.rust-inline = {
# initialize with:
# - `nix flake init -t '/home/colin/dev/nixos/#pkgs.rust-inline'`
path = ./templates/pkgs/rust-inline;
description = "rust package and development environment (inline rust sources)";
};
pkgs.rust = {
# initialize with:
# - `nix flake init -t '/home/colin/dev/nixos/#pkgs.rust'`
path = ./templates/pkgs/rust;
description = "rust package fit to ship in nixpkgs";
};
pkgs.make = {
# initialize with:
# - `nix flake init -t '/home/colin/dev/nixos/#pkgs.make'`
path = ./templates/pkgs/make;
description = "default Makefile-based derivation";
};
};
};
}

View File

@ -0,0 +1,45 @@
# Samsung chromebook XE303C12
# - <https://wiki.postmarketos.org/wiki/Samsung_Chromebook_(google-snow)>
{ ... }:
{
imports = [
./fs.nix
];
sane.hal.samsung.enable = true;
sane.roles.client = true;
# sane.roles.pc = true;
users.users.colin.initialPassword = "147147";
sane.programs.sway.enableFor.user.colin = true;
sane.programs.calls.enableFor.user.colin = false;
sane.programs.consoleMediaUtils.enableFor.user.colin = true;
sane.programs.epiphany.enableFor.user.colin = true;
sane.programs."gnome.geary".enableFor.user.colin = false;
# sane.programs.firefox.enableFor.user.colin = true;
sane.programs.portfolio-filemanager.enableFor.user.colin = true;
sane.programs.signal-desktop.enableFor.user.colin = false;
sane.programs.wike.enableFor.user.colin = true;
sane.programs.dino.config.autostart = false;
sane.programs.dissent.config.autostart = false;
sane.programs.fractal.config.autostart = false;
sane.programs.sway.config.mod = "Mod1"; #< alt key instead of Super
# sane.programs.guiApps.enableFor.user.colin = false;
# sane.programs.pcGuiApps.enableFor.user.colin = false; #< errors!
sane.programs.blueberry.enableFor.user.colin = false; # bluetooth manager: doesn't cross compile!
# sane.programs.brave.enableFor.user.colin = false; # 2024/06/03: fails eval if enabled on cross
# sane.programs.firefox.enableFor.user.colin = false; # 2024/06/03: this triggers an eval error in yarn stuff -- i'm doing IFD somewhere!!?
sane.programs.mepo.enableFor.user.colin = false; # 2024/06/04: doesn't cross compile (nodejs)
sane.programs.mercurial.enableFor.user.colin = false; # 2024/06/03: does not cross compile
sane.programs.nixpkgs-review.enableFor.user.colin = false; # 2024/06/03: OOMs when cross compiling
sane.programs.ntfy-sh.enableFor.user.colin = false; # 2024/06/04: doesn't cross compile (nodejs)
sane.programs.pwvucontrol.enableFor.user.colin = false; # 2024/06/03: doesn't cross compile (libspa-sys)
sane.programs."sane-scripts.bt-search".enableFor.user.colin = false; # 2024/06/03: does not cross compile
sane.programs.sequoia.enableFor.user.colin = false; # 2024/06/03: does not cross compile
sane.programs.zathura.enableFor.user.colin = false; # 2024/06/03: does not cross compile
}

View File

@ -0,0 +1,16 @@
{ ... }:
{
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/55555555-0303-0c12-86df-eda9e9311526";
fsType = "btrfs";
options = [
"compress=zstd"
"defaults"
];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/303C-5A37";
fsType = "vfat";
};
}

View File

@ -1,52 +1,50 @@
{ 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.gui.sway.enable = true;
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.signal-desktop.config.autostart = true;
sane.programs."gnome.geary".config.autostart = true;
sane.programs.signal-desktop.config.autostart = true;
sane.programs.nwg-panel.config = {
battery = false;
brightness = false;
};
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
# 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
@ -58,7 +56,4 @@
# TODO: ALLOW_USERS doesn't seem to work. still need `sudo snapper -c nix list`
ALLOW_USERS = [ "colin" ];
};
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
system.stateVersion = "21.05";
}

View File

@ -6,7 +6,6 @@
fileSystems."/tmp".options = [ "size=64G" ];
fileSystems."/nix" = {
# device = "/dev/disk/by-uuid/0ab0770b-7734-4167-88d9-6e4e20bb2a56";
device = "/dev/disk/by-uuid/845d85bf-761d-431b-a406-e6f20909154f";
fsType = "btrfs";
options = [
@ -16,7 +15,6 @@
};
fileSystems."/boot" = {
# device = "/dev/disk/by-uuid/41B6-BAEF";
device = "/dev/disk/by-uuid/5049-9AFD";
fsType = "vfat";
};

View File

@ -2,7 +2,6 @@
{
imports = [
./fs.nix
./polyfill.nix
];
sane.roles.client = true;
@ -10,13 +9,17 @@
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;
sane.gui.sway.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;
sops.secrets.colin-passwd.neededForUsers = true;
@ -30,7 +33,4 @@
SUBVOLUME = "/nix";
ALLOW_USERS = [ "colin" ];
};
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
system.stateVersion = "21.05";
}

View File

@ -14,24 +14,4 @@
device = "/dev/disk/by-uuid/BD79-D6BB";
fsType = "vfat";
};
# fileSystems."/nix" = {
# device = "/dev/disk/by-uuid/5a7fa69c-9394-8144-a74c-6726048b129f";
# fsType = "btrfs";
# };
# fileSystems."/boot" = {
# device = "/dev/disk/by-uuid/4302-1685";
# fsType = "vfat";
# };
# fileSystems."/" = {
# device = "none";
# fsType = "tmpfs";
# options = [
# "mode=755"
# "size=1G"
# "defaults"
# ];
# };
}

View File

@ -1,42 +0,0 @@
# doesn't actually *enable* anything,
# but sets up any modules such that if they *were* enabled, they'll act as expected.
{ pkgs, ... }:
{
sane.gui.sxmo = {
greeter = "greetd-sway-gtkgreet";
noidle = true; #< power button requires 1s hold, which makes it impractical to be dealing with.
settings = {
# XXX: make sure the user is part of the `input` group!
SXMO_LISGD_INPUT_DEVICE = "/dev/input/by-id/usb-Wacom_Co._Ltd._Pen_and_multitouch_sensor-event-if00";
# these identifiers are from `swaymsg -t get_inputs`
SXMO_VOLUME_BUTTON = "1:1:AT_Translated_Set_2_keyboard";
# SXMO_VOLUME_BUTTON = "none";
# N.B.: thinkpad's power button requires a full second press to do anything
SXMO_POWER_BUTTON = "0:1:Power_Button";
# SXMO_POWER_BUTTON = "none";
SXMO_DISABLE_LEDS = "1";
SXMO_UNLOCK_IDLE_TIME = "120"; # default
# sxmo tries to determine device type from /proc/device-tree/compatible,
# but that doesn't seem to exist on NixOS? (or maybe it just doesn't exist
# on non-aarch64 builds).
# the device type informs (at least):
# - SXMO_WIFI_MODULE
# - SXMO_RTW_SCAN_INTERVAL
# - SXMO_TOUCHSCREEN_ID
# - SXMO_MONITOR
# - SXMO_ALSA_CONTROL_NAME
# - SXMO_SWAY_SCALE
# see <repo:mil/sxmo-utils:scripts/deviceprofiles>
# SXMO_DEVICE_NAME = "pine64,pinephone-1.2";
# if sxmo doesn't know the device, it can't decide whether to use one_button or three_button mode
# and so it just wouldn't handle any button inputs (sxmo_hook_inputhandler.sh not on path)
SXMO_DEVICE_NAME = "three_button_touchscreen";
};
package = (pkgs.sxmo-utils.override { preferSystemd = true; }).overrideAttrs (base: {
postPatch = (base.postPatch or "") + ''
# after volume-button navigation mode, restore full keyboard functionality
cp ${./xkb_mobile_normal_buttons} ./configs/xkb/xkb_mobile_normal_buttons
'';
});
};
}

View File

@ -1,7 +0,0 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
};

View File

@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
# we need space in the GPT header to place tow-boot.
# only actually need 1 MB, but better to over-allocate than under-allocate
sane.image.extraGPTPadding = 16 * 1024 * 1024;
sane.image.firstPartGap = 0;
system.build.img = pkgs.runCommand "nixos_full-disk-image.img" {} ''
cp -v ${config.system.build.img-without-firmware}/nixos.img $out
chmod +w $out
dd if=${pkgs.tow-boot-pinephone}/Tow-Boot.noenv.bin of=$out bs=1024 seek=8 conv=notrunc
'';
}

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/>
@ -12,30 +9,28 @@
{ config, pkgs, lib, ... }:
{
imports = [
./bootloader.nix
./fs.nix
./gps.nix
./kernel.nix
./polyfill.nix
];
sane.hal.pine64.enable = true;
sane.roles.client = true;
sane.roles.handheld = true;
sane.zsh.showDeadlines = false; # unlikely to act on them when in shell
sane.services.wg-home.enable = true;
sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip;
sane.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
users.users.colin.initialPassword = "147147";
services.getty.autologinUser = "root"; # allows for emergency maintenance?
# services.getty.autologinUser = "root"; # allows for emergency maintenance?
sops.secrets.colin-passwd.neededForUsers = true;
sane.gui.sxmo.enable = true;
# sane.programs.consoleUtils.enableFor.user.colin = false;
# sane.programs.guiApps.enableFor.user.colin = false;
sane.programs.sway.enableFor.user.colin = true;
sane.programs.sway.config.mod = "Mod1"; #< alt key instead of Super
sane.programs.blueberry.enableFor.user.colin = false; # bluetooth manager: doesn't cross compile!
sane.programs.fcitx5.enableFor.user.colin = false; # does not cross compile
sane.programs.mercurial.enableFor.user.colin = false; # does not cross compile
sane.programs.nvme-cli.enableFor.system = false; # does not cross compile (libhugetlbfs)
@ -45,27 +40,12 @@
# sane.programs.ntfy-sh.config.autostart = true;
sane.programs.dino.config.autostart = true;
sane.programs.signal-desktop.config.autostart = true;
# sane.programs.signal-desktop.config.autostart = true; # TODO: enable once electron stops derping.
# sane.programs."gnome.geary".config.autostart = true;
# sane.programs.calls.config.autostart = true;
sane.programs.mpv.config.vo = "wlshm"; #< see hosts/common/programs/mpv.nix for details
sane.programs.firefox.mime.priority = 300; # prefer other browsers when possible
# HACK/TODO: make `programs.P.env.VAR` behave according to `mime.priority`
sane.programs.firefox.env = lib.mkForce {};
sane.programs.epiphany.env.BROWSER = "epiphany";
# 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.
@ -76,97 +56,11 @@
# `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.
# even 10 can be too much
boot.loader.generic-extlinux-compatible.configurationLimit = 8;
# mobile.bootloader.enable = false;
# mobile.boot.stage-1.enable = false;
# boot.initrd.systemd.enable = false;
# boot.initrd.services.swraid.enable = false; # attempt to fix dm_mod stuff
# hardware.firmware makes the referenced files visible to the kernel, for whenever a driver explicitly asks for them.
# these files are visible from userspace by following `/sys/module/firmware_class/parameters/path`
#
# mobile-nixos' /lib/firmware includes:
# rtl_bt (bluetooth)
# anx7688-fw.bin (USB-C chip: power negotiation, HDMI/dock)
# ov5640_af.bin (camera module)
# hardware.firmware = [ config.mobile.device.firmware ];
# hardware.firmware = [ pkgs.rtl8723cs-firmware ];
hardware.firmware = [
(pkgs.linux-firmware-megous.override {
# rtl_bt = false probably means no bluetooth connectivity.
# N.B.: DON'T RE-ENABLE without first confirming that wake-on-lan works during suspend (rtcwake).
# it seems the rtl_bt stuff ("bluetooth coexist") might make wake-on-LAN radically more flaky.
rtl_bt = false;
})
];
system.stateVersion = "21.11";
# defined: https://www.freedesktop.org/software/systemd/man/machine-info.html
# XXX colin: not sure which, if any, software makes use of this
environment.etc."machine-info".text = ''
CHASSIS="handset"
'';
# enable rotation sensor
hardware.sensor.iio.enable = true;
# inject specialized alsa configs via the environment.
# specifically, this gets the pinephone headphones & internal earpiece working.
# see pkgs/patched/alsa-ucm-conf for more info.
environment.variables.ALSA_CONFIG_UCM2 = "/run/current-system/sw/share/alsa/ucm2";
environment.pathsToLink = [ "/share/alsa/ucm2" ];
environment.systemPackages = [
(pkgs.alsa-ucm-conf-sane.override {
# internal speaker has a tendency to break :(
preferEarpiece = true;
})
];
systemd = let
ucm-env = config.environment.variables.ALSA_CONFIG_UCM2;
in {
# cribbed from <repo:nixos/mobile-nixos:modules/quirks/audio.nix>
# pipewire
user.services.pipewire.environment.ALSA_CONFIG_UCM2 = ucm-env;
user.services.pipewire-pulse.environment.ALSA_CONFIG_UCM2 = ucm-env;
user.services.wireplumber.environment.ALSA_CONFIG_UCM2 = ucm-env;
services.pipewire.environment.ALSA_CONFIG_UCM2 = ucm-env;
services.pipewire-pulse.environment.ALSA_CONFIG_UCM2 = ucm-env;
services.wireplumber.environment.ALSA_CONFIG_UCM2 = ucm-env;
# pulseaudio
# user.services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm-env;
# services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm-env;
# TODO: move elsewhere...
services.ModemManager.serviceConfig = {
# N.B.: the extra "" in ExecStart serves to force upstream ExecStart to be ignored
ExecStart = [ "" "${pkgs.modemmanager}/bin/ModemManager --debug" ];
# --debug sets DEBUG level logging: so reset
ExecStartPost = [ "${pkgs.modemmanager}/bin/mmcli --set-logging=INFO" ];
};
};
services.udev.extraRules = let
chmod = "${pkgs.coreutils}/bin/chmod";
chown = "${pkgs.coreutils}/bin/chown";
in ''
# make Pinephone flashlight writable by user.
# taken from postmarketOS: <repo:postmarketOS/pmaports:device/main/device-pine64-pinephone/60-flashlight.rules>
SUBSYSTEM=="leds", DEVPATH=="*/*:flash", RUN+="${chmod} g+w /sys%p/brightness /sys%p/flash_strobe", RUN+="${chown} :video /sys%p/brightness /sys%p/flash_strobe"
# make Pinephone front LEDs writable by user.
SUBSYSTEM=="leds", DEVPATH=="*/*:indicator", RUN+="${chmod} g+w /sys%p/brightness", RUN+="${chown} :video /sys%p/brightness"
'';
}

View File

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

View File

@ -1,90 +0,0 @@
{ pkgs, ... }:
let
dmesg = "${pkgs.util-linux}/bin/dmesg";
grep = "${pkgs.gnugrep}/bin/grep";
modprobe = "${pkgs.kmod}/bin/modprobe";
ensureHWReady = ''
# common boot failure:
# blank screen (no backlight even), with the following log:
# ```syslog
# sun8i-dw-hdmi 1ee0000.hdmi: Couldn't get the HDMI PHY
# ...
# sun4i-drm display-engine: Couldn't bind all pipelines components
# ...
# sun8i-dw-hdmi: probe of 1ee0000.hdmi failed with error -17
# ```
#
# in particular, that `probe ... failed` occurs *only* on failed boots
# (the other messages might sometimes occur even on successful runs?)
#
# reloading the sun8i hdmi driver usually gets the screen on, showing boot text.
# then restarting display-manager.service gets us to the login.
#
# NB: the above log is default level. though less specific, there's a `err` level message that also signals this:
# sun4i-drm display-engine: failed to bind 1ee0000.hdmi (ops sun8i_dw_hdmi_ops [sun8i_drm_hdmi]): -17
# NB: this is the most common, but not the only, failure mode for `display-manager`.
# another error seems characterized by these dmesg logs, in which reprobing sun8i_drm_hdmi does not fix:
# ```syslog
# sun6i-mipi-dsi 1ca0000.dsi: Couldn't get the MIPI D-PHY
# sun4i-drm display-engine: Couldn't bind all pipelines components
# sun6i-mipi-dsi 1ca0000.dsi: Couldn't register our component
# ```
if (${dmesg} --kernel --level err --color=never --notime | ${grep} -q 'sun4i-drm display-engine: failed to bind 1ee0000.hdmi')
then
echo "reprobing sun8i_drm_hdmi"
# if a command here fails it errors the whole service, so prefer to log instead
${modprobe} -r sun8i_drm_hdmi || echo "failed to unload sun8i_drm_hdmi"
${modprobe} sun8i_drm_hdmi || echo "failed to load sub8i_drm_hdmi"
fi
'';
in
{
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous;
# 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 = {
# defaults:
name = "aarch64-multiplatform";
baseConfig = "defconfig";
DTB = true;
autoModules = true;
preferBuiltin = true;
# extraConfig = ...
# ^-- raspberry pi stuff: we don't need it.
# target = "Image"; # <-- default
target = "Image.gz"; # <-- compress the kernel image
# target = "zImage"; # <-- confuses other parts of nixos :-(
};
# disable proximity sensor.
# the filtering/calibration is bad that it causes the screen to go fully dark at times.
boot.blacklistedKernelModules = [ "stk3310" ];
boot.kernelParams = [
# without this some GUI apps fail: `DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory`
# this is because they can't allocate enough video ram.
# see related nixpkgs issue: <https://github.com/NixOS/nixpkgs/issues/260222>
# TODO(2023/12/03): remove once mesa 23.3.1 lands: <https://github.com/NixOS/nixpkgs/pull/265740>
#
# the default CMA seems to be 32M.
# i was running fine with 256MB from 2022/07-ish through 2022/12-ish, but then the phone quit reliably coming back from sleep (phosh): maybe a memory leak?
# `cat /proc/meminfo` to see CmaTotal/CmaFree if interested in tuning this.
"cma=512M"
# 2023/10/20: potential fix for the lima (GPU) timeout bugs:
# - <https://gitlab.com/postmarketOS/pmaports/-/issues/805#note_890467824>
"lima.sched_timeout_ms=2000"
];
services.xserver.displayManager.job.preStart = ensureHWReady;
systemd.services.greetd.preStart = ensureHWReady;
}

View File

@ -1,96 +0,0 @@
# this file configures preferences per program, without actually enabling any programs.
# the goal is to separate the place where we decide *what* to use (i.e. `sane.programs.firefox.enable = true` -- at the toplevel)
# from where we specific how that thing should behave *if* it's in use.
#
# NixOS backgrounds:
# - <https://github.com/NixOS/nixos-artwork>
# - <https://github.com/NixOS/nixos-artwork/issues/50> (colorful; unmerged)
# - <https://github.com/NixOS/nixos-artwork/pull/60/files> (desktop-oriented; clean; unmerged)
# - <https://itsfoss.com/content/images/2023/04/nixos-tutorials.png>
{ lib, pkgs, sane-lib, ... }:
{
sane.programs.firefox.config = {
# compromise impermanence for the sake of usability
persistCache = "private";
persistData = "private";
# i don't do crypto stuff on moby
addons.ether-metamask.enable = false;
# sidebery UX doesn't make sense on small screen
addons.sidebery.enable = false;
};
sane.programs.swaynotificationcenter.config = {
backlight = "backlight"; # /sys/class/backlight/*backlight*/brightness
};
sane.gui.sxmo = {
nogesture = true;
settings = {
### hardware: touch screen
SXMO_LISGD_INPUT_DEVICE = "/dev/input/by-path/platform-1c2ac00.i2c-event";
# vol and power are detected correctly by upstream
### preferences
DEFAULT_COUNTRY = "US";
SXMO_AUTOROTATE = "1"; # enable auto-rotation at launch. has no meaning in stock/upstream sxmo-utils
# BEMENU lines (wayland DMENU):
# - camera is 9th entry
# - flashlight is 10th entry
# - config is 14th entry. inside that:
# - autorotate is 11th entry
# - system menu is 19th entry
# - close is 20th entry
# - power is 15th entry
# - close is 16th entry
SXMO_BEMENU_LANDSCAPE_LINES = "11"; # default 8
SXMO_BEMENU_PORTRAIT_LINES = "16"; # default 16
SXMO_LOCK_IDLE_TIME = "15"; # how long between screenoff -> lock -> back to screenoff (default: 8)
# gravity: how far to tilt the device before the screen rotates
# for a given setting, normal <-> invert requires more movement then left <-> right
# i.e. the settingd doesn't feel completely symmetric
# SXMO_ROTATION_GRAVITY default is 16374
# SXMO_ROTATION_GRAVITY = "12800"; # uncomfortably high
# SXMO_ROTATION_GRAVITY = "12500"; # kinda uncomfortable when walking
SXMO_ROTATION_GRAVITY = "12000";
SXMO_SCREENSHOT_DIR = "/home/colin/Pictures"; # default: "$HOME"
# sway/wayland scaling:
# - conflicting info out there on how scaling actually works
# at the least, for things where it matters (mpv), it seems like scale settings have 0 effect on perf
# ways to enforce scaling:
# - <https://wiki.archlinux.org/title/HiDPI>
# - `swaymsg -- output DSI-1 scale 2.0` (scales everything)
# - `dconf write /org/gnome/desktop/interface/text-scaling-factor 2.0` (scales ONLY TEXT)
# - `GDK_DPI_SCALE=2.0` (scales ONLY TEXT)
#
# application notes:
# - cozy: in landscape, playback position is not visible unless scale <= 1.7
# - if in a tab, then scale 1.6 is the max
# SXMO_SWAY_SCALE = "1.5"; # hard to press gPodder icons
SXMO_SWAY_SCALE = "1.6";
# SXMO_SWAY_SCALE = "1.8";
# SXMO_SWAY_SCALE = "2";
SXMO_WORKSPACE_WRAPPING = "5"; # how many workspaces. default: 4
# wvkbd layers:
# - full
# - landscape
# - special (e.g. coding symbols like ~)
# - emoji
# - nav
# - simple (like landscape, but no parens/tab/etc; even fewer chars)
# - simplegrid (simple, but grid layout)
# - dialer (digits)
# - cyrillic
# - arabic
# - persian
# - greek
# - georgian
WVKBD_LANDSCAPE_LAYERS = "landscape,special,emoji";
WVKBD_LAYERS = "full,special,emoji";
};
};
}

View File

@ -4,15 +4,11 @@
./fs.nix
];
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
sane.persist.enable = false;
sane.persist.enable = false; # what we mean here is that the image is immutable; `/` is still tmpfs.
sane.nixcache.enable = false; # don't want to be calling out to dead machines that we're *trying* to rescue
# auto-login at shell
services.getty.autologinUser = "colin";
# users.users.colin.initialPassword = "colin";
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
system.stateVersion = "21.05";
}

View File

@ -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
@ -37,7 +38,6 @@
# using root here makes sure we always have an escape hatch
services.getty.autologinUser = "root";
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
# both transmission and ipfs try to set different net defaults.
@ -45,13 +45,5 @@
boot.kernel.sysctl = {
"net.core.rmem_max" = 4194304; # 4MB
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11";
}

View File

@ -8,6 +8,7 @@
# - 1. identify disk IDs: `ls -l /dev/disk/by-id`
# - 2. pool these disks: `zpool create -f -m legacy pool raidz ata-ST4000VN008-2DR166_WDH0VB45 ata-ST4000VN008-2DR166_WDH17616 ata-ST4000VN008-2DR166_WDH0VC8Q ata-ST4000VN008-2DR166_WDH17680`
# - legacy documented: <https://superuser.com/questions/790036/what-is-a-zfs-legacy-mount-point>
# - 3. enable acl support: `zfs set acltype=posixacl pool`
#
# import pools: `zpool import pool`
# show zfs datasets: `zfs list` (will be empty if haven't imported)
@ -25,6 +26,7 @@
# scrub all zfs pools weekly:
services.zfs.autoScrub.enable = true;
boot.extraModprobeConfig = ''
### zfs_arc_max tunable:
# ZFS likes to use half the ram for its own cache and let the kernel push everything else to swap.
# so, reduce its cache size
# see: <https://askubuntu.com/a/1290387>
@ -33,7 +35,13 @@
# for all tunables, see: `man 4 zfs`
# to update these parameters without rebooting:
# - `echo '4294967296' | sane-sudo-redirect /sys/module/zfs/parameters/zfs_arc_max`
options zfs zfs_arc_max=4294967296
### zfs_bclone_enabled tunable
# this allows `cp --reflink=always FOO BAR` to work. i.e. shallow copies.
# it's unstable as of 2.2.3. led to *actual* corruption in 2.2.1, but hopefully better by now.
# - <https://github.com/openzfs/zfs/issues/405>
# note that `du -h` won't *always* show the reduced size for reflink'd files (?).
# `zpool get all | grep clone` seems to be the way to *actually* see how much data is being deduped
options zfs zfs_arc_max=4294967296 zfs_bclone_enabled=1
'';
# to be able to mount the pool like this, make sure to tell zfs to NOT manage it itself.
# otherwise local-fs.target will FAIL and you will be dropped into a rescue shell.
@ -43,6 +51,7 @@
fileSystems."/mnt/pool" = {
device = "pool";
fsType = "zfs";
options = [ "acl" ]; #< not sure if this `acl` flag is actually necessary. it mounts without it.
};
# services.zfs.zed = ... # TODO: zfs can send me emails when disks fail
sane.programs.sysadminUtils.suggestedPrograms = [ "zfs" ];
@ -50,6 +59,7 @@
sane.persist.stores."ext" = {
origin = "/mnt/pool/persist";
storeDescription = "external HDD storage";
defaultMethod = "bind"; #< TODO: change to "symlink"?
};
# increase /tmp space (defaults to 50% of RAM) for building large nix things.
@ -81,59 +91,45 @@
};
sane.fs."/mnt/usb-hdd".mount = {};
sane.persist.sys.byStore.plaintext = [
# TODO: this is overly broad; only need media and share directories to be persisted
{ user = "colin"; group = "users"; path = "/var/lib/uninsane"; }
];
# force some problematic directories to always get correct permissions:
sane.fs."/var/lib/uninsane/media".dir.acl = {
user = "colin"; group = "media"; mode = "0775";
};
sane.fs."/var/lib/uninsane/media/archive".dir = {};
sane.fs."/var/lib/uninsane/media/archive/README.md".file.text = ''
# FIRST TIME SETUP FOR MEDIA DIRECTORY:
# - set the group stick bit: `sudo find /var/media -type d -exec chmod g+s {} +`
# - this ensures new files/dirs inherit the group of their parent dir (instead of the user who creates them)
# - ensure everything under /var/media is mounted with `-o acl`, to support acls
# - ensure all files are rwx by group: `setfacl --recursive --modify d:g::rwx /var/media`
# - alternatively, `d:g:media:rwx` to grant `media` group even when file has a different owner, but that's a bit complex
sane.persist.sys.byStore.ext = [{
path = "/var/media";
user = "colin";
group = "media";
mode = "0775";
}];
sane.fs."/var/media/archive".dir = {};
# this is file.text instead of symlink.text so that it may be read over a remote mount (where consumers might not have any /nix/store/.../README.md path)
sane.fs."/var/media/archive/README.md".file.text = ''
this directory is for media i wish to remove from my library,
but keep for a short time in case i reverse my decision.
treat it like a system trash can.
'';
sane.fs."/var/lib/uninsane/media/Books".dir = {};
sane.fs."/var/lib/uninsane/media/Books/Audiobooks".dir = {};
sane.fs."/var/lib/uninsane/media/Books/Books".dir = {};
sane.fs."/var/lib/uninsane/media/Books/Visual".dir = {};
sane.fs."/var/lib/uninsane/media/collections".dir = {};
sane.fs."/var/lib/uninsane/media/datasets".dir = {};
sane.fs."/var/lib/uninsane/media/freeleech".dir = {};
sane.fs."/var/lib/uninsane/media/Music".dir = {};
sane.fs."/var/lib/uninsane/media/Pictures".dir = {};
sane.fs."/var/lib/uninsane/media/Videos".dir = {};
sane.fs."/var/lib/uninsane/media/Videos/Film".dir = {};
sane.fs."/var/lib/uninsane/media/Videos/Shows".dir = {};
sane.fs."/var/lib/uninsane/media/Videos/Talks".dir = {};
sane.fs."/var/media/Books".dir = {};
sane.fs."/var/media/Books/Audiobooks".dir = {};
sane.fs."/var/media/Books/Books".dir = {};
sane.fs."/var/media/Books/Visual".dir = {};
sane.fs."/var/media/collections".dir = {};
# sane.fs."/var/media/datasets".dir = {};
sane.fs."/var/media/freeleech".dir = {};
sane.fs."/var/media/Music".dir = {};
sane.fs."/var/media/Pictures".dir = {};
sane.fs."/var/media/Videos".dir = {};
sane.fs."/var/media/Videos/Film".dir = {};
sane.fs."/var/media/Videos/Shows".dir = {};
sane.fs."/var/media/Videos/Talks".dir = {};
# this is file.text instead of symlink.text so that it may be read over a remote mount (where consumers might not have any /nix/store/.../README.md path)
sane.fs."/var/lib/uninsane/datasets/README.md".file.text = ''
this directory may seem redundant with ../media/datasets. it isn't.
this directory exists on SSD, allowing for speedy access to specific datasets when necessary.
the contents should be a subset of what's in ../media/datasets.
'';
# make sure large media is stored to the HDD
sane.persist.sys.byStore.ext = [
{
user = "colin";
group = "users";
mode = "0777";
path = "/var/lib/uninsane/media/Videos";
}
{
user = "colin";
group = "users";
mode = "0777";
path = "/var/lib/uninsane/media/freeleech";
}
{
user = "colin";
group = "users";
mode = "0777";
path = "/var/lib/uninsane/media/datasets";
}
];
# btrfs doesn't easily support swapfiles
# swapDevices = [

View File

@ -3,9 +3,19 @@
let
portOpts = with lib; types.submodule {
options = {
visibleTo.ovpn = mkOption {
visibleTo.ovpns = mkOption {
type = types.bool;
default = false;
description = ''
whether to forward inbound traffic on the OVPN vpn port to the corresponding localhost port.
'';
};
visibleTo.doof = mkOption {
type = types.bool;
default = false;
description = ''
whether to forward inbound traffic on the doofnet vpn port to the corresponding localhost port.
'';
};
};
};
@ -13,7 +23,7 @@ in
{
options = with lib; {
sane.ports.ports = mkOption {
# add the `visibleTo.ovpn` option
# add the `visibleTo.{doof,ovpns}` options
type = types.attrsOf portOpts;
};
};
@ -24,18 +34,6 @@ in
sane.ports.openFirewall = true;
sane.ports.openUpnp = true;
# view refused packets with: `sudo journalctl -k`
# networking.firewall.logRefusedPackets = true;
# these useDHCP lines are legacy from the auto-generated config. might be safe to remove now?
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
# XXX colin: probably don't need this. wlan0 won't be populated unless i touch a value in networking.interfaces.wlan0
networking.wireless.enable = false;
# this is needed to forward packets from the VPN to the host
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
# unless we add interface-specific settings for each VPN, we have to define nameservers globally.
# networking.nameservers = [
# "1.1.1.1"
@ -50,37 +48,47 @@ 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"; #< TODO: enable IPv6
networking.wireguard.interfaces.wg-doof = {
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"
# "2602:fce8:106::51/128" #< TODO: enable IPv6
];
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
}
];
};
sane.netns.doof.hostVethIpv4 = "10.0.2.5";
sane.netns.doof.netnsVethIpv4 = "10.0.2.6";
sane.netns.doof.netnsPubIpv4 = "205.201.63.12";
sane.netns.doof.routeTable = 12;
# OVPN CONFIG (https://www.ovpn.com):
# DOCS: https://nixos.wiki/wiki/WireGuard
# if you `systemctl restart wireguard-wg-ovpns`, make sure to also restart any other services in `NetworkNamespacePath = .../ovpns`.
# TODO: why not create the namespace as a seperate operation (nix config for that?)
networking.wireguard.enable = true;
networking.wireguard.interfaces.wg-ovpns = let
ip = "${pkgs.iproute2}/bin/ip";
in-ns = "${ip} netns exec ovpns";
iptables = "${pkgs.iptables}/bin/iptables";
veth-host-ip = "10.0.1.5";
veth-local-ip = "10.0.1.6";
vpn-ip = "185.157.162.178";
# DNS = 46.227.67.134, 192.165.9.158, 2a07:a880:4601:10f0:cd45::1, 2001:67c:750:1:cafe:cd45::1
vpn-dns = "46.227.67.134";
bridgePort = port: proto: ''
${in-ns} ${iptables} -A PREROUTING -t nat -p ${proto} --dport ${port} -m iprange --dst-range ${vpn-ip} \
-j DNAT --to-destination ${veth-host-ip}
'';
bridgeStatements = lib.foldlAttrs
(acc: port: portCfg: acc ++ (builtins.map (bridgePort port) portCfg.protocol))
[]
config.sane.ports.ports;
in {
networking.wireguard.interfaces.wg-ovpns = {
privateKeyFile = config.sops.secrets.wg_ovpns_privkey.path;
# wg is active only in this namespace.
# run e.g. ip netns exec ovpns <some command like ping/curl/etc, it'll go through wg>
# sudo ip netns exec ovpns ping www.google.com
interfaceNamespace = "ovpns";
ips = [
"185.157.162.178/32"
];
ips = [ "185.157.162.178" ];
peers = [
{
publicKey = "SkkEZDCBde22KTs/Hc7FWvDBfdOCQA4YtBEuC3n5KGs=";
@ -98,99 +106,11 @@ in
# dynamicEndpointRefreshRestartSeconds = 5;
}
];
preSetup = ''
${ip} netns add ovpns || echo "ovpns already exists"
'';
postShutdown = ''
${in-ns} ip link del ovpns-veth-b || echo "couldn't delete ovpns-veth-b"
${ip} link del ovpns-veth-a || echo "couldn't delete ovpns-veth-a"
${ip} netns delete ovpns || echo "couldn't delete ovpns"
# restore rules/routes
${ip} rule del from ${veth-host-ip} lookup ovpns pref 50 || echo "couldn't delete init -> ovpns rule"
${ip} route del default via ${veth-local-ip} dev ovpns-veth-a proto kernel src ${veth-host-ip} metric 1002 table ovpns || echo "couldn't delete init -> ovpns route"
${ip} rule add from all lookup local pref 0
${ip} rule del from all lookup local pref 100
'';
postSetup = ''
# DOCS:
# - some of this approach is described here: <https://josephmuia.ca/2018-05-16-net-namespaces-veth-nat/>
# - iptables primer: <https://danielmiessler.com/study/iptables/>
# create veth pair
${ip} link add ovpns-veth-a type veth peer name ovpns-veth-b
${ip} addr add ${veth-host-ip}/24 dev ovpns-veth-a
${ip} link set ovpns-veth-a up
# mv veth-b into the ovpns namespace
${ip} link set ovpns-veth-b netns ovpns
${in-ns} ip addr add ${veth-local-ip}/24 dev ovpns-veth-b
${in-ns} ip link set ovpns-veth-b up
# make it so traffic originating from the host side of the veth
# is sent over the veth no matter its destination.
${ip} rule add from ${veth-host-ip} lookup ovpns pref 50
# for traffic originating at the host veth to the WAN, use the veth as our gateway
# not sure if the metric 1002 matters.
${ip} route add default via ${veth-local-ip} dev ovpns-veth-a proto kernel src ${veth-host-ip} metric 1002 table ovpns
# give the default route lower priority
${ip} rule add from all lookup local pref 100
${ip} rule del from all lookup local pref 0
# in order to access DNS in this netns, we need to route it to the VPN's nameservers
# - alternatively, we could fix DNS servers like 1.1.1.1.
${in-ns} ${iptables} -A OUTPUT -t nat -p udp --dport 53 -m iprange --dst-range 127.0.0.53 \
-j DNAT --to-destination ${vpn-dns}:53
'' + (lib.concatStringsSep "\n" bridgeStatements);
};
# create a new routing table that we can use to proxy traffic out of the root namespace
# through the ovpns namespace, and to the WAN via VPN.
networking.iproute2.rttablesExtraConfig = ''
5 ovpns
'';
networking.iproute2.enable = true;
# HURRICANE ELECTRIC CONFIG:
# networking.sits = {
# hurricane = {
# remote = "216.218.226.238";
# local = "192.168.0.5";
# # local = "10.0.0.5";
# # remote = "10.0.0.1";
# # local = "10.0.0.22";
# dev = "eth0";
# ttl = 255;
# };
# };
# networking.interfaces."hurricane".ipv6 = {
# addresses = [
# # mx.uninsane.org (publically routed /64)
# {
# address = "2001:470:b:465::1";
# prefixLength = 128;
# }
# # client addr
# # {
# # address = "2001:470:a:466::2";
# # prefixLength = 64;
# # }
# ];
# routes = [
# {
# address = "::";
# prefixLength = 0;
# # via = "2001:470:a:466::1";
# }
# ];
# };
# # after configuration, we want the hurricane device to look like this:
# # hurricane: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1480
# # inet6 2001:470:a:450::2 prefixlen 64 scopeid 0x0<global>
# # inet6 fe80::c0a8:16 prefixlen 64 scopeid 0x20<link>
# # sit txqueuelen 1000 (IPv6-in-IPv4)
# # test with:
# # curl --interface hurricane http://[2607:f8b0:400a:80b::2004]
# # ping 2607:f8b0:400a:80b::2004
sane.netns.ovpns.hostVethIpv4 = "10.0.1.5";
sane.netns.ovpns.netnsVethIpv4 = "10.0.1.6";
sane.netns.ovpns.netnsPubIpv4 = "185.157.162.178";
sane.netns.ovpns.routeTable = 11;
sane.netns.ovpns.dns = "46.227.67.134"; #< DNS requests inside the namespace are forwarded here
};
}

View File

@ -13,7 +13,7 @@ in
lib.mkIf false
{
sane.persist.sys.byStore.plaintext = [
{ inherit user group; mode = "0700"; path = svc-dir; }
{ inherit user group; mode = "0700"; path = svc-dir; method = "bind"; }
];
services.calibre-web.enable = true;
@ -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,65 @@
# that is NOT the case when the STUN server and client A are on the same LAN
# even if client A contacts the STUN server via its WAN address with port reflection enabled.
# hence, there's no obvious way to put the STUN server on the same LAN as either client and expect the rest to work.
{ lib, ... }:
# - 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
{ config, 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.ovpns = 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.ovpns = 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.ovpns = 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 +118,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"
# "external-ip=185.157.162.178/10.0.1.5"
"external-ip=185.157.162.178"
# "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=${config.sane.netns.ovpns.hostVethIpv4}" "external-ip=${config.sane.netns.ovpns.netnsPubIpv4}" #< 2024/04/25: works, if running in root namespace
"listening-ip=${config.sane.netns.ovpns.netnsPubIpv4}" "external-ip=${config.sane.netns.ovpns.netnsPubIpv4}"
# old attempts:
# "external-ip=${config.sane.netns.ovpns.netnsPubIpv4}/${config.sane.netns.ovpns.hostVethIpv4}"
# "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

@ -30,8 +30,7 @@ let
in
{
sane.persist.sys.byStore.ext = [
# /var/lib/monero/lmdb is what consumes most of the space
{ user = "bitcoind-mainnet"; group = "bitcoind-mainnet"; path = "/var/lib/bitcoind-mainnet"; }
{ user = "bitcoind-mainnet"; group = "bitcoind-mainnet"; path = "/var/lib/bitcoind-mainnet"; method = "bind"; }
];
# sane.ports.ports."8333" = {

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

@ -73,7 +73,7 @@
{ config, pkgs, ... }:
{
sane.persist.sys.byStore.ext = [
{ user = "clightning"; group = "clightning"; mode = "0710"; path = "/var/lib/clightning"; }
{ user = "clightning"; group = "clightning"; mode = "0710"; path = "/var/lib/clightning"; method = "bind"; }
];
# `lightning-cli` finds its RPC file via `~/.lightning/bitcoin/lightning-rpc`, to message the daemon

View File

@ -3,7 +3,7 @@
{
sane.persist.sys.byStore.ext = [
# /var/lib/monero/lmdb is what consumes most of the space
{ user = "monero"; group = "monero"; path = "/var/lib/monero"; }
{ user = "monero"; group = "monero"; path = "/var/lib/monero"; method = "bind"; }
];
services.monero.enable = true;

View File

@ -4,7 +4,7 @@
# tor hidden service hostnames aren't deterministic, so persist.
# might be able to get away with just persisting /var/lib/tor/onion, not sure.
sane.persist.sys.byStore.plaintext = [
{ user = "tor"; group = "tor"; mode = "0710"; path = "/var/lib/tor"; }
{ user = "tor"; group = "tor"; mode = "0710"; path = "/var/lib/tor"; method = "bind"; }
];
# tor: `tor.enable` doesn't start a relay, exit node, proxy, etc. it's minimal.

View File

@ -20,14 +20,13 @@
./navidrome.nix
./nginx.nix
./nixos-prebuild.nix
./nixserve.nix
./ntfy
./pict-rs.nix
./pleroma.nix
./postgres.nix
./prosody
./slskd.nix
./transmission.nix
./transmission
./trust-dns.nix
./wikipedia.nix
];

View File

@ -45,60 +45,60 @@ in
lib.mkIf false
{
sane.persist.sys.byStore.plaintext = [
{ user = "ejabberd"; group = "ejabberd"; path = "/var/lib/ejabberd"; }
{ user = "ejabberd"; group = "ejabberd"; path = "/var/lib/ejabberd"; method = "bind"; }
];
sane.ports.ports = lib.mkMerge ([
{
"3478" = {
protocol = [ "tcp" "udp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-stun-turn";
};
"5222" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-client-to-server";
};
"5223" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpps-client-to-server"; # XMPP over TLS
};
"5269" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
visibleTo.doof = true;
description = "colin-xmpp-server-to-server";
};
"5270" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
visibleTo.doof = true;
description = "colin-xmpps-server-to-server"; # XMPP over TLS
};
"5280" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-bosh";
};
"5281" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-bosh-https";
};
"5349" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-stun-turn-over-tls";
};
"5443" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-web-services"; # file uploads, websockets, admin
};
}
@ -109,8 +109,8 @@ lib.mkIf false
numPorts = turnPortHigh - turnPortLow + 1;
in {
protocol = [ "tcp" "udp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-turn-${builtins.toString count}-of-${builtins.toString numPorts}";
};
})

View File

@ -8,14 +8,14 @@
{
sane.ports.ports."143" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-imap-imap.uninsane.org";
};
sane.ports.ports."993" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-imaps-imap.uninsane.org";
};
@ -127,10 +127,11 @@
services.dovecot2.modules = [
pkgs.dovecot_pigeonhole # enables sieve execution (?)
];
services.dovecot2.sieveScripts = {
services.dovecot2.sieve = {
extensions = [ "fileinto" ];
# if any messages fail to pass (or lack) DKIM, move them to Junk
# XXX the key name ("after") is only used to order sieve execution/ordering
after = builtins.toFile "ensuredkim.sieve" ''
scripts.after = builtins.toFile "ensuredkim.sieve" ''
require "fileinto";
if not header :contains "Authentication-Results" "dkim=pass" {
@ -139,4 +140,6 @@
}
'';
};
systemd.services.dovecot2.serviceConfig.RestartSec = lib.mkForce "15s"; # nixos defaults this to 1s
}

View File

@ -1,6 +1,6 @@
# postfix config options: <https://www.postfix.org/postconf.5.html>
{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
submissionOptions = {
@ -20,9 +20,9 @@ in
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode? could be more granular
{ user = "opendkim"; group = "opendkim"; path = "/var/lib/opendkim"; }
{ user = "root"; group = "root"; path = "/var/lib/postfix"; }
{ user = "root"; group = "root"; path = "/var/spool/mail"; }
{ user = "opendkim"; group = "opendkim"; path = "/var/lib/opendkim"; method = "bind"; }
{ user = "root"; group = "root"; path = "/var/lib/postfix"; method = "bind"; }
{ user = "root"; group = "root"; path = "/var/spool/mail"; method = "bind"; }
# *probably* don't need these dirs:
# "/var/lib/dhparams" # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/security/dhparams.nix
# "/var/lib/dovecot"
@ -56,8 +56,7 @@ in
sane.dns.zones."uninsane.org".inet = {
MX."@" = "10 mx.uninsane.org.";
# XXX: RFC's specify that the MX record CANNOT BE A CNAME
A."mx" = "185.157.162.178";
A."mx" = "%AOVPNS%"; #< XXX: RFC's specify that the MX record CANNOT BE A CNAME. TODO: use "%AOVPNS%?
# Sender Policy Framework:
# +mx => mail passes if it originated from the MX

View File

@ -2,14 +2,18 @@
{
imports = [
./nfs.nix
./sftpgo.nix
./sftpgo
];
users.groups.export = {};
fileSystems."/var/export/media" = {
# everything in here could be considered publicly readable (based on the viewer's legal jurisdiction)
device = "/var/lib/uninsane/media";
device = "/var/media";
options = [ "rbind" ];
};
fileSystems."/var/export/pub" = {
device = "/var/www/sites/uninsane.org/share";
options = [ "rbind" ];
};
# fileSystems."/var/export/playground" = {
@ -30,14 +34,15 @@
# to query the quota/status:
# - `sudo btrfs qgroup show -re /var/export/playground`
sane.persist.sys.byStore.ext = [
{ user = "root"; group = "export"; mode = "0775"; path = "/var/export/playground"; }
{ user = "root"; group = "export"; mode = "0775"; path = "/var/export/playground"; method = "bind"; }
];
sane.fs."/var/export/README.md" = {
wantedBy = [ "nfs.service" "sftpgo.service" ];
file.text = ''
- media/ read-only: Videos, Music, Books, etc
- playground/ read-write: use it to share files with other users of this server
- playground/ read-write: use it to share files with other users of this server, inaccessible from the www
- pub/ read-only: content made to be shared with the www
'';
};

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;
@ -26,7 +27,7 @@
description = "NFS server portmapper";
};
sane.ports.ports."2049" = {
protocol = [ "tcp" ];
protocol = [ "tcp" "udp" ];
visibleTo.lan = true;
description = "NFS server";
};
@ -51,6 +52,23 @@
services.nfs.server.mountdPort = 4002;
services.nfs.server.statdPort = 4000;
services.nfs.extraConfig = ''
[nfsd]
# XXX: NFS over UDP REQUIRES SPECIAL CONFIG TO AVOID DATA LOSS.
# see `man 5 nfs`: "Using NFS over UDP on high-speed links".
# it's actually just a general property of UDP over IPv4 (IPv6 fixes it).
# both the client and the server should configure a shorter-than-default IPv4 fragment reassembly window to mitigate.
# OTOH, tunneling NFS over Wireguard also bypasses this weakness, because a mis-assembled packet would not have a valid signature.
udp=y
[exports]
# all export paths are relative to rootdir.
# for NFSv4, the export with fsid=0 behaves as `/` publicly,
# but NFSv3 implements no such feature.
# using `rootdir` instead of relying on `fsid=0` allows consistent export paths regardless of NFS proto version
rootdir=/var/export
'';
# format:
# fspoint visibility(options)
# options:
@ -85,13 +103,20 @@
in "${export} 10.78.79.0/22(${lib.concatStringsSep "," lanOpts}) 10.0.10.0/24(${lib.concatStringsSep "," vpnOpts})";
in lib.concatStringsSep "\n" [
(fmtExport {
export = "/var/export";
export = "/";
baseOpts = [ "crossmnt" "fsid=root" ];
extraLanOpts = [ "ro" ];
extraVpnOpts = [ "rw" "no_root_squash" ];
})
(fmtExport {
export = "/var/export/playground";
# provide /media as an explicit export. NFSv4 can transparently mount a subdir of an export, but NFSv3 can only mount paths which are exports.
export = "/media";
baseOpts = [ "crossmnt" ]; # TODO: is crossmnt needed here?
extraLanOpts = [ "ro" ];
extraVpnOpts = [ "rw" "no_root_squash" ];
})
(fmtExport {
export = "/playground";
baseOpts = [
"mountpoint"
"all_squash"

View File

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

View File

@ -0,0 +1,164 @@
# docs:
# - <https://github.com/drakkan/sftpgo>
# - config options: <https://github.com/drakkan/sftpgo/blob/main/docs/full-configuration.md>
# - config defaults: <https://github.com/drakkan/sftpgo/blob/main/sftpgo.json>
# - nixos options: <repo:nixos/nixpkgs:nixos/modules/services/web-apps/sftpgo.nix>
# - nixos example: <repo:nixos/nixpkgs:nixos/tests/sftpgo.nix>
#
# sftpgo is a FTP server that also supports WebDAV, SFTP, and web clients.
{ config, lib, pkgs, sane-lib, ... }:
let
external_auth_hook = pkgs.static-nix-shell.mkPython3Bin {
pname = "external_auth_hook";
srcRoot = ./.;
pyPkgs = [ "passlib" ];
};
# 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;
description = "colin-FTP server";
};
"990" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
description = "colin-FTPS server";
};
} // (sane-lib.mapToAttrs
(port: {
name = builtins.toString port;
value = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
description = "colin-FTP server data port range";
};
})
(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 = [
{
# binding this means any wireguard client can connect
address = "10.0.10.5";
port = 21;
debug = true;
}
{
# binding this means any LAN client can connect (also WAN traffic forwarded from the gateway)
address = "10.78.79.51";
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.
}
{
# binding this means any doof client can connect (TLS only)
address = config.sane.netns.doof.hostVethIpv4;
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 = 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.
Read-only access (LAN clients see everything; WAN clients can only see /pub):
Username: "anonymous"
Password: "anonymous"
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 = "${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
# - 2: quota is updated on every upload/delete, but only if user/folder has a quota restriction (default, i think)
# track_quota = 2;
};
};
};
users.users.sftpgo.extraGroups = [
"export"
"media"
"nginx" # to access certs
];
systemd.services.sftpgo = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
ReadWritePaths = [ "/var/export" ];
Restart = "always";
RestartSec = "20s";
UMask = lib.mkForce "0002";
};
};
}

View File

@ -0,0 +1,171 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.passlib ])"
# vim: set filetype=python :
#
# available environment variables:
# - SFTPGO_AUTHD_USERNAME
# - SFTPGO_AUTHD_USER
# - SFTPGO_AUTHD_IP
# - SFTPGO_AUTHD_PROTOCOL = { "DAV", "FTP", "HTTP", "SSH" }
# - SFTPGO_AUTHD_PASSWORD
# - SFTPGO_AUTHD_PUBLIC_KEY
# - SFTPGO_AUTHD_KEYBOARD_INTERACTIVE
# - SFTPGO_AUTHD_TLS_CERT
#
# user permissions:
# - see <repo:drakkan/sftpgo:internal/dataprovider/user.go>
# - "*" = grant all permissions
# - read-only perms:
# - "list" = list files and directories
# - "download"
# - rw perms:
# - "upload"
# - "overwrite" = allow uploads to replace existing files
# - "delete" = delete files and directories
# - "delete_files"
# - "delete_dirs"
# - "rename" = rename files and directories
# - "rename_files"
# - "rename_dirs"
# - "create_dirs"
# - "create_symlinks"
# - "chmod"
# - "chown"
# - "chtimes" = change atime/mtime (access and modification times)
#
# home_dir:
# - it seems (empirically) that a user can't cd above their home directory.
# though i don't have a reference for that in the docs.
import json
import os
import passlib.hosts
from hmac import compare_digest
authFail = dict(username="")
PERM_DENY = []
PERM_LIST = [ "list" ]
PERM_RO = [ "list", "download" ]
PERM_RW = [
# read-only:
"list",
"download",
# write:
"upload",
"overwrite",
"delete",
"rename",
"create_dirs",
"create_symlinks",
# intentionally omitted:
# "chmod",
# "chown",
# "chtimes",
]
TRUSTED_CREDS = [
# /etc/shadow style creds.
# mkpasswd -m sha-512
# $<method>$<salt>$<hash>
"$6$Zq3c2u4ghUH4S6EP$pOuRt13sEKfX31OqPbbd1LuhS21C9MICMc94iRdTAgdAcJ9h95gQH/6Jf6Ie4Obb0oxQtojRJ1Pd/9QHOlFMW." #< m. rocket boy
]
def mkAuthOk(username: str, permissions: dict[str, list[str]]) -> dict:
return dict(
status = 1,
username = username,
expiration_date = 0,
home_dir = "/var/export",
# uid/gid 0 means to inherit sftpgo uid.
# - i.e. users can't read files which Linux user `sftpgo` can't read
# - uploaded files belong to Linux user `sftpgo`
# other uid/gid values aren't possible for localfs backend, unless i let sftpgo use `sudo`.
uid = 0,
gid = 0,
# uid = 65534,
# gid = 65534,
max_sessions = 0,
# quota_*: 0 means to not use SFTP's quota system
quota_size = 0,
quota_files = 0,
permissions = permissions,
upload_bandwidth = 0,
download_bandwidth = 0,
filters = dict(
allowed_ip = [],
denied_ip = [],
),
public_keys = [],
# other fields:
# ? groups
# ? virtual_folders
)
def isLan(ip: str) -> bool:
return ip.startswith("10.78.76.") \
or ip.startswith("10.78.77.") \
or ip.startswith("10.78.78.") \
or ip.startswith("10.78.79.")
def isWireguard(ip: str) -> bool:
return ip.startswith("10.0.10.")
def isTrustedCred(password: str) -> bool:
for cred in TRUSTED_CREDS:
if passlib.hosts.linux_context.verify(password, cred):
return True
return False
def getAuthResponse(ip: str, username: str, password: str) -> dict:
"""
return a sftpgo auth response either denying the user or approving them
with a set of permissions.
"""
if isTrustedCred(password) and username != "colin":
# allow r/w access from those with a special token
return mkAuthOk(username, permissions = {
"/": PERM_RW,
"/playground": PERM_RW,
"/pub": PERM_RO,
})
if isWireguard(ip):
# allow any user from wireguard
return mkAuthOk(username, permissions = {
"/": PERM_RW,
"/playground": PERM_RW,
"/pub": PERM_RO,
})
if isLan(ip):
if username == "anonymous":
# allow anonymous users on the LAN
return mkAuthOk("anonymous", permissions = {
"/": PERM_RO,
"/playground": PERM_RW,
"/pub": PERM_RO,
})
if username == "anonymous":
# anonymous users from the www can have even more limited access.
# mostly because i need an easy way to test WAN connectivity :-)
return mkAuthOk("anonymous", permissions = {
# "/": PERM_DENY,
"/": PERM_LIST, #< REQUIRED, even for lftp to list a subdir
"/media": PERM_DENY,
"/playground": PERM_DENY,
"/pub": PERM_RO,
# "/README.md": PERM_RO, #< does not work
})
return authFail
def main():
ip = os.environ.get("SFTPGO_AUTHD_IP", "")
username = os.environ.get("SFTPGO_AUTHD_USERNAME", "")
password = os.environ.get("SFTPGO_AUTHD_PASSWORD", "")
resp = getAuthResponse(ip, username, password)
print(json.dumps(resp))
if __name__ == "__main__":
main()

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

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

View File

@ -16,7 +16,7 @@
mode = "0400";
};
sane.persist.sys.byStore.plaintext = [
{ user = "freshrss"; group = "freshrss"; path = "/var/lib/freshrss"; }
{ user = "freshrss"; group = "freshrss"; path = "/var/lib/freshrss"; method = "bind"; }
];
services.freshrss.enable = true;

View File

@ -4,7 +4,7 @@
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode? could be more granular
{ user = "git"; group = "gitea"; path = "/var/lib/gitea"; }
{ user = "git"; group = "gitea"; path = "/var/lib/gitea"; method = "bind"; }
];
services.gitea.enable = true;
services.gitea.user = "git"; # default is 'gitea'
@ -50,9 +50,15 @@
ENABLE_CAPTCHA = true;
NOREPLY_ADDRESS = "noreply.anonymous.git@uninsane.org";
};
session.COOKIE_SECURE = true;
session = {
COOKIE_SECURE = true;
# keep me logged in for 30 days
SESSION_LIFE_TIME = 60 * 60 * 24 * 30;
};
repository = {
DEFAULT_BRANCH = "master";
ENABLE_PUSH_CREATE_USER = true;
ENABLE_PUSH_CREATE_ORG = true;
};
other = {
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
@ -90,6 +96,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" = {
@ -100,6 +108,24 @@
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
};
# gitea serves all `raw` files as content-type: plain, but i'd like to serve them as their actual content type.
# or at least, enough to make specific pages viewable (serving unoriginal content as arbitrary content type is dangerous).
locations."~ ^/colin/phone-case-cq/raw/.*.html" = {
proxyPass = "http://127.0.0.1:3000";
extraConfig = ''
proxy_hide_header Content-Type;
default_type text/html;
add_header Content-Type text/html;
'';
};
locations."~ ^/colin/phone-case-cq/raw/.*.js" = {
proxyPass = "http://127.0.0.1:3000";
extraConfig = ''
proxy_hide_header Content-Type;
default_type text/html;
add_header Content-Type text/javascript;
'';
};
};
sane.dns.zones."uninsane.org".inet.CNAME."git" = "native";
@ -107,7 +133,7 @@
sane.ports.ports."22" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
visibleTo.doof = true;
description = "colin-git@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

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

View File

@ -1,9 +1,9 @@
{ ... }:
{ config, lib, pkgs, ... }:
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode? we only need this to save Indexer creds ==> migrate to config?
{ user = "root"; group = "root"; path = "/var/lib/jackett"; }
{ user = "root"; group = "root"; path = "/var/lib/jackett"; method = "bind"; }
];
services.jackett.enable = true;
@ -12,6 +12,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 ${config.sane.netns.ovpns.netnsPubIpv4}" ]; # 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";
};
@ -22,8 +24,7 @@
enableACME = true;
# inherit kTLS;
locations."/" = {
# proxyPass = "http://ovpns.uninsane.org:9117";
proxyPass = "http://10.0.1.6:9117";
proxyPass = "http://${config.sane.netns.ovpns.netnsVethIpv4}:9117";
recommendedProxySettings = true;
};
};

View File

@ -41,7 +41,7 @@
};
sane.persist.sys.byStore.plaintext = [
{ user = "jellyfin"; group = "jellyfin"; mode = "0700"; path = "/var/lib/jellyfin"; }
{ user = "jellyfin"; group = "jellyfin"; mode = "0700"; path = "/var/lib/jellyfin"; method = "bind"; }
];
sane.fs."/var/lib/jellyfin/config/logging.json" = {
# "Emby.Dlna" logging: <https://jellyfin.org/docs/general/networking/dlna>
@ -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

@ -7,7 +7,7 @@
{ ... }:
{
sane.persist.sys.byStore.ext = [
{ user = "colin"; group = "users"; path = "/var/lib/kiwix"; }
{ user = "colin"; group = "users"; path = "/var/lib/kiwix"; method = "bind"; }
];
sane.services.kiwix-serve = {

View File

@ -5,14 +5,14 @@ let
in
{
sane.persist.sys.byStore.plaintext = [
{ inherit user group; mode = "0700"; path = stateDir; }
{ inherit user group; mode = "0700"; path = stateDir; method = "bind"; }
];
services.komga.enable = true;
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

@ -10,16 +10,21 @@ let
uiPort = 1234; # default ui port is 1234
backendPort = 8536; # default backend port is 8536
#^ i guess the "backend" port is used for federation?
pict-rs = pkgs.pict-rs.overrideAttrs (upstream: {
# as of v 0.4.2, all non-GIF video is forcibly transcoded.
# that breaks lemmy, because of the request latency.
# and it eats up hella CPU.
# pict-rs is iffy around video altogether: mp4 seems the best supported.
postPatch = (upstream.postPatch or "") + ''
substituteInPlace src/validate.rs \
--replace 'if transcode_options.needs_reencode() {' 'if false {'
'';
});
pict-rs = pkgs.pict-rs;
# pict-rs = pkgs.pict-rs.overrideAttrs (upstream: {
# # as of v0.4.2, all non-GIF video is forcibly transcoded.
# # that breaks lemmy, because of the request latency.
# # and it eats up hella CPU.
# # pict-rs is iffy around video altogether: mp4 seems the best supported.
# # XXX: this patch no longer applies after 0.5.10 -> 0.5.11 update.
# # git log is hard to parse, but *suggests* that video is natively supported
# # better than in the 0.4.2 days, e.g. 5fd59fc5b42d31559120dc28bfef4e5002fb509e
# # "Change commandline flag to allow disabling video, since it is enabled by default"
# postPatch = (upstream.postPatch or "") + ''
# substituteInPlace src/validate.rs \
# --replace-fail 'if transcode_options.needs_reencode() {' 'if false {'
# '';
# });
in {
services.lemmy = {
enable = true;
@ -78,8 +83,8 @@ in {
# CLI args: <https://git.asonix.dog/asonix/pict-rs#user-content-running>
systemd.services.pict-rs.serviceConfig.ExecStart = lib.mkForce (lib.concatStringsSep " " [
"${lib.getBin pict-rs}/bin/pict-rs run"
"--media-max-frame-count" (builtins.toString (30*60*60))
"--media-video-max-frame-count" (builtins.toString (30*60*60))
"--media-process-timeout 120"
"--media-enable-full-video true" # allow audio
"--media-video-allow-audio" # allow audio
]);
}

View File

@ -21,7 +21,7 @@
];
sane.persist.sys.byStore.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/matrix-synapse"; }
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/matrix-synapse"; method = "bind"; }
];
services.matrix-synapse.enable = true;
services.matrix-synapse.settings = {

View File

@ -6,7 +6,7 @@
lib.mkIf false
{
sane.persist.sys.byStore.plaintext = [
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/mx-puppet-discord"; }
{ user = "matrix-synapse"; group = "matrix-synapse"; path = "/var/lib/mx-puppet-discord"; method = "bind"; }
];
services.matrix-synapse.settings.app_service_config_files = [

View File

@ -4,12 +4,11 @@
{ config, lib, ... }:
let
ircServer = { name, additionalAddresses ? [], sasl ? true, port ? 6697 }: let
ircServer = { name, additionalAddresses ? [], ssl ? true, sasl ? true, port ? if ssl then 6697 else 6667 }: let
lowerName = lib.toLower name;
in {
# XXX sasl: appservice doesn't support NickServ identification (only SASL, or PASS if sasl = false)
inherit name additionalAddresses sasl port;
ssl = true;
inherit additionalAddresses name port sasl ssl;
botConfig = {
# bot has no presence in IRC channel; only real Matrix users
enabled = false;
@ -103,7 +102,7 @@ in
sane.persist.sys.byStore.plaintext = [
# TODO: mode?
{ user = "matrix-appservice-irc"; group = "matrix-appservice-irc"; path = "/var/lib/matrix-appservice-irc"; }
{ user = "matrix-appservice-irc"; group = "matrix-appservice-irc"; path = "/var/lib/matrix-appservice-irc"; method = "bind"; }
];
# XXX: matrix-appservice-irc PreStart tries to chgrp the registration.yml to matrix-synapse,
@ -156,6 +155,10 @@ in
# - #sxmo-offtopic
};
"irc.rizon.net" = ircServer { name = "Rizon"; };
"wigle.net" = ircServer {
name = "WiGLE";
ssl = false;
};
};
};
};

View File

@ -5,8 +5,8 @@
lib.mkIf false # disabled 2024/01/11: i don't use it, and pkgs.mautrix-signal had some API changes
{
sane.persist.sys.byStore.plaintext = [
{ user = "mautrix-signal"; group = "mautrix-signal"; path = "/var/lib/mautrix-signal"; }
{ user = "signald"; group = "signald"; path = "/var/lib/signald"; }
{ user = "mautrix-signal"; group = "mautrix-signal"; path = "/var/lib/mautrix-signal"; method = "bind"; }
{ user = "signald"; group = "signald"; path = "/var/lib/signald"; method = "bind"; }
];
# allow synapse to read the registration file

View File

@ -1,15 +1,16 @@
{ lib, ... }:
lib.mkIf false #< i don't actively use navidrome
{
sane.persist.sys.byStore.plaintext = [
{ user = "navidrome"; group = "navidrome"; path = "/var/lib/navidrome"; }
{ user = "navidrome"; group = "navidrome"; path = "/var/lib/navidrome"; method = "bind"; }
];
services.navidrome.enable = true;
services.navidrome.settings = {
# docs: https://www.navidrome.org/docs/usage/configuration-options/
Address = "127.0.0.1";
Port = 4533;
MusicFolder = "/var/lib/uninsane/media/Music";
MusicFolder = "/var/media/Music";
CovertArtPriority = "*.jpg, *.JPG, *.png, *.PNG, embedded";
AutoImportPlaylists = false;
ScanSchedule = "@every 1h";

View File

@ -17,14 +17,14 @@ in
sane.ports.ports."80" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
visibleTo.ovpn = true; # so that letsencrypt can procure a cert for the mx record
visibleTo.ovpns = true; # so that letsencrypt can procure a cert for the mx record
visibleTo.doof = true;
description = "colin-http-uninsane.org";
};
sane.ports.ports."443" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
visibleTo.doof = true;
description = "colin-https-uninsane.org";
};
@ -55,8 +55,8 @@ in
# web blog/personal site
# alternative way to link stuff into the share:
# sane.fs."/var/lib/uninsane/share/Ubunchu".mount.bind = "/var/lib/uninsane/media/Books/Visual/HiroshiSeo/Ubunchu";
# sane.fs."/var/lib/uninsane/media/Books/Visual/HiroshiSeo/Ubunchu".dir = {};
# sane.fs."/var/www/sites/uninsane.org/share/Ubunchu".mount.bind = "/var/media/Books/Visual/HiroshiSeo/Ubunchu";
# sane.fs."/var/media/Books/Visual/HiroshiSeo/Ubunchu".dir = {};
services.nginx.virtualHosts."uninsane.org" = publog {
# a lot of places hardcode https://uninsane.org,
# and then when we mix http + non-https, we get CORS violations
@ -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 =
@ -169,8 +179,8 @@ in
security.acme.defaults.email = "admin.acme@uninsane.org";
sane.persist.sys.byStore.plaintext = [
{ user = "acme"; group = "acme"; path = "/var/lib/acme"; }
{ user = "colin"; group = "users"; path = "/var/www/sites"; }
{ user = "acme"; group = "acme"; path = "/var/lib/acme"; method = "bind"; }
{ user = "colin"; group = "users"; path = "/var/www/sites"; method = "bind"; }
];
# let's encrypt default chain looks like:

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

@ -34,7 +34,7 @@ in
# not 100% necessary to persist this, but ntfy does keep a 12hr (by default) cache
# for pushing notifications to users who become offline.
# ACLs also live here.
{ user = "ntfy-sh"; group ="ntfy-sh"; path = "/var/lib/ntfy-sh"; }
{ user = "ntfy-sh"; group ="ntfy-sh"; path = "/var/lib/ntfy-sh"; method = "bind"; }
];
services.ntfy-sh.enable = true;
@ -86,7 +86,7 @@ in
sane.ports.ports."${builtins.toString altPort}" = {
protocol = [ "tcp" ];
visibleTo.lan = true;
visibleTo.wan = true;
visibleTo.doof = true;
description = "colin-ntfy.uninsane.org";
};
}

View File

@ -49,7 +49,7 @@ in
type = types.package;
default = pkgs.static-nix-shell.mkPython3Bin {
pname = "ntfy-waiter";
src = ./.;
srcRoot = ./.;
pkgs = [ "ntfy-sh" ];
};
description = ''
@ -62,8 +62,8 @@ in
sane.ports.ports = lib.mkMerge (lib.forEach portRange (port: {
"${builtins.toString port}" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-notification-waiter-${builtins.toString (port - portLow + 1)}-of-${builtins.toString numPorts}";
};
}));

View File

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

View File

@ -15,7 +15,7 @@ let
in
{
sane.persist.sys.byStore.plaintext = [
{ user = "pleroma"; group = "pleroma"; path = "/var/lib/pleroma"; }
{ user = "pleroma"; group = "pleroma"; path = "/var/lib/pleroma"; method = "bind"; }
];
services.pleroma.enable = true;
services.pleroma.secretConfigFile = config.sops.secrets.pleroma_secrets.path;
@ -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

@ -8,7 +8,7 @@ in
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode?
{ user = "postgres"; group = "postgres"; path = "/var/lib/postgresql"; }
{ user = "postgres"; group = "postgres"; path = "/var/lib/postgresql"; method = "bind"; }
];
services.postgresql.enable = true;

View File

@ -57,46 +57,46 @@ let
in
{
sane.persist.sys.byStore.plaintext = [
{ user = "prosody"; group = "prosody"; path = "/var/lib/prosody"; }
{ user = "prosody"; group = "prosody"; path = "/var/lib/prosody"; method = "bind"; }
];
sane.ports.ports."5000" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-prosody-fileshare-proxy65";
};
sane.ports.ports."5222" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-client-to-server";
};
sane.ports.ports."5223" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpps-client-to-server"; # XMPP over TLS
};
sane.ports.ports."5269" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
visibleTo.doof = true;
description = "colin-xmpp-server-to-server";
};
sane.ports.ports."5270" = {
protocol = [ "tcp" ];
visibleTo.wan = true;
visibleTo.doof = true;
description = "colin-xmpps-server-to-server"; # XMPP over TLS
};
sane.ports.ports."5280" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-bosh";
};
sane.ports.ports."5281" = {
protocol = [ "tcp" ];
visibleTo.doof = true;
visibleTo.lan = true;
visibleTo.wan = true;
description = "colin-xmpp-prosody-https"; # necessary?
};

View File

@ -3,10 +3,15 @@
#
# config precedence (higher precedence overrules lower precedence):
# - Default Values < Environment Variables < YAML Configuraiton File < Command Line Arguments
{ config, lib, ... }:
#
# 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, pkgs, ... }:
{
sane.persist.sys.byStore.plaintext = [
{ user = "slskd"; group = "slskd"; path = "/var/lib/slskd"; }
{ user = "slskd"; group = "media"; path = "/var/lib/slskd"; method = "bind"; }
];
sops.secrets."slskd_env" = {
owner = config.users.users.slskd.name;
@ -15,10 +20,9 @@
users.users.slskd.extraGroups = [ "media" ];
sane.ports.ports."50000" = {
sane.ports.ports."50300" = {
protocol = [ "tcp" ];
# not visible to WAN: i run this in a separate netns
visibleTo.ovpn = true;
# visibleTo.ovpns = true; #< not needed: it runs in the ovpns namespace
description = "colin-soulseek";
};
@ -28,12 +32,14 @@
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://10.0.1.6:5001";
proxyPass = "http://${config.sane.netns.ovpns.netnsVethIpv4}:5030";
proxyWebsockets = true;
};
};
services.slskd.enable = true;
services.slskd.domain = null; # i'll manage nginx for it
services.slskd.group = "media";
# env file, for auth (SLSKD_SLSK_PASSWORD, SLSKD_SLSK_USERNAME)
services.slskd.environmentFile = config.sops.secrets.slskd_env.path;
services.slskd.settings = {
@ -44,13 +50,13 @@
# [Alias]/path/on/disk
# NOTE: Music library is quick to scan; videos take a solid 10min to scan.
# TODO: re-enable the other libraries
# "[Audioooks]/var/lib/uninsane/media/Books/Audiobooks"
# "[Books]/var/lib/uninsane/media/Books/Books"
# "[Manga]/var/lib/uninsane/media/Books/Visual"
# "[games]/var/lib/uninsane/media/games"
"[Music]/var/lib/uninsane/media/Music"
# "[Film]/var/lib/uninsane/media/Videos/Film"
# "[Shows]/var/lib/uninsane/media/Videos/Shows"
# "[Audioooks]/var/media/Books/Audiobooks"
# "[Books]/var/media/Books/Books"
# "[Manga]/var/media/Books/Visual"
# "[games]/var/media/games"
"[Music]/var/media/Music"
# "[Film]/var/media/Videos/Film"
# "[Shows]/var/media/Videos/Shows"
];
# directories.downloads = "..." # TODO
# directories.incomplete = "..." # TODO
@ -62,13 +68,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";
Group = "media";
};
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 ${config.sane.netns.ovpns.netnsPubIpv4}" ]; # 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

@ -1,100 +0,0 @@
{ config, pkgs, ... }:
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode? we need this specifically for the stats tracking in .config/
{ user = "transmission"; group = config.users.users.transmission.group; path = "/var/lib/transmission"; }
];
users.users.transmission.extraGroups = [ "media" ];
services.transmission.enable = true;
services.transmission.package = pkgs.transmission_4; #< 2023/09/06: nixpkgs `transmission` defaults to old 3.00
#v setting `group` this way doesn't tell transmission to `chown` the files it creates
# it's a nixpkgs setting which just runs the transmission daemon as this group
services.transmission.group = "media";
# transmission will by default not allow the world to read its files.
services.transmission.downloadDirPermissions = "775";
services.transmission.extraFlags = [
# "--log-level=debug"
];
services.transmission.settings = {
# message-level = 3; #< enable for debug logging. 0-3, default is 2.
# 0.0.0.0 => allow rpc from any host: we gate it via firewall and auth requirement
rpc-bind-address = "0.0.0.0";
#rpc-host-whitelist = "bt.uninsane.org";
#rpc-whitelist = "*.*.*.*";
rpc-authentication-required = true;
rpc-username = "colin";
# salted pw. to regenerate, set this plaintext, run nixos-rebuild, and then find the salted pw in:
# /var/lib/transmission/.config/transmission-daemon/settings.json
rpc-password = "{503fc8928344f495efb8e1f955111ca5c862ce0656SzQnQ5";
rpc-whitelist-enabled = false;
# hopefully, make the downloads world-readable
# umask = 0; #< default is 2: i.e. deny writes from world
# force peer connections to be encrypted
encryption = 2;
# units in kBps
speed-limit-down = 12000;
speed-limit-down-enabled = true;
speed-limit-up = 800;
speed-limit-up-enabled = true;
# see: https://git.zknt.org/mirror/transmission/commit/cfce6e2e3a9b9d31a9dafedd0bdc8bf2cdb6e876?lang=bg-BG
anti-brute-force-enabled = false;
download-dir = "/var/lib/uninsane/media";
incomplete-dir = "/var/lib/uninsane/media/incomplete";
# transmission regularly fails to move stuff from the incomplete dir to the main one, so disable:
# TODO: uncomment this line!
incomplete-dir-enabled = false;
};
systemd.services.transmission.after = [ "wireguard-wg-ovpns.service" ];
systemd.services.transmission.partOf = [ "wireguard-wg-ovpns.service" ];
systemd.services.transmission.serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
Restart = "on-failure";
RestartSec = "30s";
};
# service to automatically backup torrents i add to transmission
systemd.services.backup-torrents = {
description = "archive torrents to storage not owned by transmission";
script = ''
${pkgs.rsync}/bin/rsync -arv /var/lib/transmission/.config/transmission-daemon/torrents/ /var/backup/torrents/
'';
};
systemd.timers.backup-torrents = {
wantedBy = [ "multi-user.target" ];
timerConfig = {
OnStartupSec = "11min";
OnUnitActiveSec = "240min";
};
};
# transmission web client
services.nginx.virtualHosts."bt.uninsane.org" = {
# basicAuth is literally cleartext user/pw, so FORCE this to happen over SSL
forceSSL = true;
enableACME = true;
# inherit kTLS;
locations."/" = {
# proxyPass = "http://ovpns.uninsane.org:9091";
proxyPass = "http://10.0.1.6:9091";
};
};
sane.dns.zones."uninsane.org".inet.CNAME."bt" = "native";
sane.ports.ports."51413" = {
protocol = [ "tcp" "udp" ];
visibleTo.ovpn = true;
description = "colin-bittorrent";
};
}

View File

@ -0,0 +1,156 @@
{ config, lib, pkgs, ... }:
let
# 2023/09/06: nixpkgs `transmission` defaults to old 3.00
# 2024/02/15: some torrent trackers whitelist clients; everyone is still on 3.00 for some reason :|
# some do this via peer-id (e.g. baka); others via user-agent (e.g. MAM).
# peer-id format is essentially the same between 3.00 and 4.x (just swap the MAJOR/MINOR/PATCH numbers).
# user-agent format has changed. `Transmission/3.00` (old) v.s. `TRANSMISSION/MAJ.MIN.PATCH` (new).
realTransmission = pkgs.transmission_4;
realVersion = {
major = lib.versions.major realTransmission.version;
minor = lib.versions.minor realTransmission.version;
patch = lib.versions.patch realTransmission.version;
};
package = realTransmission.overrideAttrs (upstream: {
# `cmakeFlags = [ "-DTR_VERSION_MAJOR=3" ]`, etc, doesn't seem to take effect.
postPatch = (upstream.postPatch or "") + ''
substituteInPlace CMakeLists.txt \
--replace-fail 'TR_VERSION_MAJOR "${realVersion.major}"' 'TR_VERSION_MAJOR "3"' \
--replace-fail 'TR_VERSION_MINOR "${realVersion.minor}"' 'TR_VERSION_MINOR "0"' \
--replace-fail 'TR_VERSION_PATCH "${realVersion.patch}"' 'TR_VERSION_PATCH "0"' \
--replace-fail 'set(TR_USER_AGENT_PREFIX "''${TR_SEMVER}")' 'set(TR_USER_AGENT_PREFIX "3.00")'
'';
});
download-dir = "/var/media/torrents"; #< keep in sync with consts embedded in `torrent-done`
torrent-done = pkgs.static-nix-shell.mkBash {
pname = "torrent-done";
srcRoot = ./.;
pkgs = [
"acl"
"coreutils"
"findutils"
"rsync"
"util-linux"
];
};
in
{
sane.persist.sys.byStore.plaintext = [
# TODO: mode? we need this specifically for the stats tracking in .config/
{ user = "transmission"; group = config.users.users.transmission.group; path = "/var/lib/transmission"; method = "bind"; }
];
users.users.transmission.extraGroups = [ "media" ];
services.transmission.enable = true;
services.transmission.package = package;
#v setting `group` this way doesn't tell transmission to `chown` the files it creates
# it's a nixpkgs setting which just runs the transmission daemon as this group
services.transmission.group = "media";
# transmission will by default not allow the world to read its files.
services.transmission.downloadDirPermissions = "775";
services.transmission.extraFlags = [
# "--log-level=debug"
];
services.transmission.settings = {
# 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.
# ovpns.netnsVethIpv4 => allow rpc only from the root servo ns. it'll tunnel things to the net, if need be.
rpc-bind-address = config.sane.netns.ovpns.netnsVethIpv4;
#rpc-host-whitelist = "bt.uninsane.org";
#rpc-whitelist = "*.*.*.*";
rpc-authentication-required = true;
rpc-username = "colin";
# salted pw. to regenerate, set this plaintext, run nixos-rebuild, and then find the salted pw in:
# /var/lib/transmission/.config/transmission-daemon/settings.json
rpc-password = "{503fc8928344f495efb8e1f955111ca5c862ce0656SzQnQ5";
rpc-whitelist-enabled = false;
# force behind ovpns in case the NetworkNamespace fails somehow
bind-address-ipv4 = config.sane.netns.ovpns.netnsPubIpv4;
port-forwarding-enabled = false;
# hopefully, make the downloads world-readable
# umask = 0; #< default is 2: i.e. deny writes from world
# force peer connections to be encrypted
encryption = 2;
# units in kBps
speed-limit-down = 12000;
speed-limit-down-enabled = true;
speed-limit-up = 800;
speed-limit-up-enabled = true;
# see: https://git.zknt.org/mirror/transmission/commit/cfce6e2e3a9b9d31a9dafedd0bdc8bf2cdb6e876?lang=bg-BG
anti-brute-force-enabled = false;
inherit download-dir;
incomplete-dir = "${download-dir}/incomplete";
# transmission regularly fails to move stuff from the incomplete dir to the main one, so disable:
incomplete-dir-enabled = false;
# env vars available in script:
# - TR_APP_VERSION - Transmission's short version string, e.g. `4.0.0`
# - TR_TIME_LOCALTIME
# - TR_TORRENT_BYTES_DOWNLOADED - Number of bytes that were downloaded for this torrent
# - TR_TORRENT_DIR - Location of the downloaded data
# - TR_TORRENT_HASH - The torrent's info hash
# - TR_TORRENT_ID
# - TR_TORRENT_LABELS - A comma-delimited list of the torrent's labels
# - TR_TORRENT_NAME - Name of torrent (not filename)
# - TR_TORRENT_TRACKERS - A comma-delimited list of the torrent's trackers' announce URLs
script-torrent-done-enabled = true;
script-torrent-done-filename = "${torrent-done}/bin/torrent-done";
};
systemd.services.transmission.after = [ "wireguard-wg-ovpns.service" ];
systemd.services.transmission.partOf = [ "wireguard-wg-ovpns.service" ];
systemd.services.transmission.serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
ExecStartPre = [ "${lib.getExe pkgs.sane-scripts.ip-check} --no-upnp --expect ${config.sane.netns.ovpns.netnsPubIpv4}" ]; # 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
};
# service to automatically backup torrents i add to transmission
systemd.services.backup-torrents = {
description = "archive torrents to storage not owned by transmission";
script = ''
${pkgs.rsync}/bin/rsync -arv /var/lib/transmission/.config/transmission-daemon/torrents/ /var/backup/torrents/
'';
};
systemd.timers.backup-torrents = {
wantedBy = [ "multi-user.target" ];
timerConfig = {
OnStartupSec = "11min";
OnUnitActiveSec = "240min";
};
};
# transmission web client
services.nginx.virtualHosts."bt.uninsane.org" = {
# basicAuth is literally cleartext user/pw, so FORCE this to happen over SSL
forceSSL = true;
enableACME = true;
# inherit kTLS;
locations."/" = {
# proxyPass = "http://ovpns.uninsane.org:9091";
proxyPass = "http://${config.sane.netns.ovpns.netnsVethIpv4}:9091";
};
};
sane.dns.zones."uninsane.org".inet.CNAME."bt" = "native";
sane.ports.ports."51413" = {
protocol = [ "tcp" "udp" ];
# visibleTo.ovpns = true; #< not needed: it runs in the ovpns namespace
description = "colin-bittorrent";
};
}

View File

@ -0,0 +1,74 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p acl -p bash -p coreutils -p findutils -p rsync -p util-linux
# transmission invokes this with no args, and the following env vars:
# - TR_TORRENT_DIR: full path to the folder i told transmission to download it to.
# e.g. /var/media/torrents/Videos/Film/Jason.Bourne-2016
# optionally:
# - TR_DRY_RUN=1
# - TR_DEBUG=1
# - TR_NO_HARDLINK=1
DOWNLOAD_DIR=/var/media/torrents
destructive() {
if [ -n "${TR_DRY_RUN-}" ]; then
echo "[dry-run] $*"
else
debug "$@"
"$@"
fi
}
debug() {
if [ -n "${TR_DEBUG-}" ]; then
echo "$@"
fi
}
if [[ "$TR_TORRENT_DIR" =~ ^.*freeleech.*$ ]]; then
# freeleech torrents have no place in my permanent library
echo "freeleech: nothing to do"
exit 0
fi
if ! [[ "$TR_TORRENT_DIR" =~ ^$DOWNLOAD_DIR/.*$ ]]; then
echo "unexpected torrent dir, aborting: $TR_TORRENT_DIR"
exit 0
fi
REL_DIR="${TR_TORRENT_DIR#$DOWNLOAD_DIR/}"
MEDIA_DIR="/var/media/$REL_DIR"
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"/*)
debug "top-level items in torrent dir:" "${subdirs[@]}"
if [ ${#subdirs[@]} -eq 1 ]; then
dirname="${subdirs[0]}"
debug "exactly one top-level item, checking if directory: $dirname"
if [ -d "$dirname" ]; then
destructive mv "$dirname"/* "$MEDIA_DIR/" && destructive rmdir "$dirname"
fi
fi
# remove noisy files:
destructive find "$MEDIA_DIR/" -type f \(\
-iname '.*downloaded.?from.*' \
-o -iname 'source.txt' \
-o -iname 'upcoming.?releases.*' \
-o -iname 'www.YTS.*.jpg' \
-o -iname 'WWW.YIFY*.COM.jpg' \
-o -iname 'YIFY*.com.txt' \
-o -iname 'YTS*.com.txt' \
\) -exec rm {} \;
if ! [ -n "${TR_NO_HARDLINK}" ]; then
# dedupe the whole media library.
# yeah, a bit excessive: move this to a cron job if that's problematic
# or make it run with only 1/N probability, etc.
destructive hardlink /var/media --reflink=always --ignore-time --verbose
fi

View File

@ -2,24 +2,16 @@
{ 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;
visibleTo.wan = true;
visibleTo.ovpn = true;
# visibleTo.wan = true;
visibleTo.ovpns = true;
visibleTo.doof = true;
description = "colin-dns-hosting";
};
@ -47,6 +39,7 @@ in lib.mkMerge [
CNAME."native" = "%CNAMENATIVE%";
A."@" = "%ANATIVE%";
A."servo.wan" = "%AWAN%";
A."servo.doof" = "%ADOOF%";
A."servo.lan" = config.sane.hosts.by-name."servo".lan-ip;
A."servo.hn" = config.sane.hosts.by-name."servo".wg-home.ip;
@ -54,9 +47,9 @@ in lib.mkMerge [
# it's best that we keep this identical, or a superset of, what org. lists as our NS.
# so, org. can specify ns2/ns3 as being to the VPN, with no mention of ns1. we provide ns1 here.
A."ns1" = "%ANATIVE%";
A."ns2" = "185.157.162.178";
A."ns3" = "185.157.162.178";
A."ovpns" = "185.157.162.178";
A."ns2" = "%ADOOF%";
A."ns3" = "%AOVPNS%";
A."ovpns" = "%AOVPNS%";
NS."@" = [
"ns1.uninsane.org."
"ns2.uninsane.org."
@ -66,145 +59,109 @@ 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;
};
networking.nat.enable = true; #< TODO: try removing this?
# networking.nat.extraCommands = ''
# # redirect incoming DNS requests from LAN addresses
# # to the LAN-specialized DNS service
# # N.B.: use the `nixos-*` chains instead of e.g. PREROUTING
# # because they get cleanly reset across activations or `systemctl restart firewall`
# # instead of accumulating cruft
# iptables -t nat -A nixos-nat-pre -p udp --dport 53 \
# -m iprange --src-range 10.78.76.0-10.78.79.255 \
# -j DNAT --to-destination :1053
# iptables -t nat -A nixos-nat-pre -p tcp --dport 53 \
# -m iprange --src-range 10.78.76.0-10.78.79.255 \
# -j DNAT --to-destination :1053
# '';
# sane.ports.ports."1053" = {
# # because the NAT above redirects in nixos-nat-pre, LAN requests behave as though they arrived on the external interface at the redirected port.
# # TODO: try nixos-nat-post instead?
# # TODO: or, don't NAT from port 53 -> port 1053, but rather nat from LAN addr to a loopback addr.
# # - this is complicated in that loopback is a different interface than eth0, so rewriting the destination address would cause the packets to just be dropped by the interface
# protocol = [ "udp" "tcp" ];
# visibleTo.lan = true;
# description = "colin-redirected-dns-for-lan-namespace";
# };
# sane.services.dyn-dns.restartOnChange = [ "trust-dns.service" ];
networking.nat.enable = true;
networking.nat.extraCommands = ''
# redirect incoming DNS requests from LAN addresses
# to the LAN-specialized DNS service
# N.B.: use the `nixos-*` chains instead of e.g. PREROUTING
# because they get cleanly reset across activations or `systemctl restart firewall`
# instead of accumulating cruft
iptables -t nat -A nixos-nat-pre -p udp --dport 53 \
-m iprange --src-range 10.78.76.0-10.78.79.255 \
-j DNAT --to-destination :1053
iptables -t nat -A nixos-nat-pre -p tcp --dport 53 \
-m iprange --src-range 10.78.76.0-10.78.79.255 \
-j DNAT --to-destination :1053
'';
sane.ports.ports."1053" = {
# because the NAT above redirects in nixos-nat-pre, LAN requests behave as though they arrived on the external interface at the redirected port.
# TODO: try nixos-nat-post instead?
# TODO: or, don't NAT from port 53 -> port 1053, but rather nat from LAN addr to a loopback addr.
# - this is complicated in that loopback is a different interface than eth0, so rewriting the destination address would cause the packets to just be dropped by the interface
protocol = [ "udp" "tcp" ];
visibleTo.lan = true;
description = "colin-redirected-dns-for-lan-namespace";
};
}
{
systemd.services =
let
sed = "${pkgs.gnused}/bin/sed";
stateDir = "/var/lib/trust-dns";
zoneTemplate = pkgs.writeText "uninsane.org.zone.in" config.sane.dns.zones."uninsane.org".rendered;
zoneDirFor = flavor: "${stateDir}/${flavor}";
zoneFor = flavor: "${zoneDirFor flavor}/uninsane.org.zone";
mkTrustDnsService = opts: flavor: let
flags = let baseCfg = config.services.trust-dns; in
(lib.optional baseCfg.debug "--debug") ++ (lib.optional baseCfg.quiet "--quiet");
flagsStr = builtins.concatStringsSep " " flags;
anative = nativeAddrs."servo.${flavor}";
toml = pkgs.formats.toml { };
configTemplate = opts.config or (toml.generate "trust-dns-${flavor}.toml" (
(
lib.filterAttrsRecursive (_: v: v != null) config.services.trust-dns.settings
) // {
listen_addrs_ipv4 = opts.listen or [ anative ];
}
));
configFile = "${stateDir}/${flavor}-config.toml";
port = opts.port or 53;
in {
description = "trust-dns Domain Name Server (serving ${flavor})";
unitConfig.Documentation = "https://trust-dns.org/";
preStart = ''
wan=$(cat '${config.sane.services.dyn-dns.ipPath}')
${sed} s/%AWAN%/$wan/ ${configTemplate} > ${configFile}
'' + lib.optionalString (!opts ? config) ''
mkdir -p ${zoneDirFor flavor}
${sed} \
-e s/%CNAMENATIVE%/servo.${flavor}/ \
-e s/%ANATIVE%/${anative}/ \
-e s/%AWAN%/$wan/ \
-e s/%AOVPNS%/185.157.162.178/ \
${zoneTemplate} > ${zoneFor flavor}
'';
serviceConfig = config.systemd.services.trust-dns.serviceConfig // {
ExecStart = ''
${pkgs.trust-dns}/bin/${pkgs.trust-dns.meta.mainProgram} \
--port ${builtins.toString port} \
--zonedir ${zoneDirFor flavor}/ \
--config ${configFile} ${flagsStr}
'';
};
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
};
in {
trust-dns-wan = mkTrustDnsService { listen = [ nativeAddrs."servo.lan" bindOvpn ]; } "wan";
trust-dns-lan = mkTrustDnsService { port = 1053; } "lan";
trust-dns-hn = mkTrustDnsService { port = 1053; } "hn";
trust-dns-hn-resolver = mkTrustDnsService {
config = pkgs.writeText "hn-resolver-config.toml" ''
# i host a resolver in the wireguard VPN so that clients can resolve DNS through the VPN.
# (that's what this file achieves).
#
# one would expect this resolver could host the authoritative zone for `uninsane.org`, and then forward everything else to the system resolver...
# and while that works for `dig`, it breaks for `nslookup` (and so `ssh`, etc).
#
# DNS responses include a flag for if the responding server is the authority of the zone queried.
# it seems that default Linux stub resolvers either:
# - expect DNSSEC when the response includes that bit, or
# - expect A records to be in the `answer` section instead of `additional` section.
# or perhaps something more nuanced. but for `nslookup` to be reliable, it has to talk to an
# instance of trust-dns which is strictly a resolver, with no authority.
# hence, this config: a resolver which forwards to the actual authority.
listen_addrs_ipv4 = ["${nativeAddrs."servo.hn"}"]
listen_addrs_ipv6 = []
[[zones]]
zone = "uninsane.org"
zone_type = "Forward"
stores = { type = "forward", name_servers = [{ socket_addr = "${nativeAddrs."servo.hn"}:1053", protocol = "udp", trust_nx_responses = true }] }
[[zones]]
# forward the root zone to the local DNS resolver
zone = "."
zone_type = "Forward"
stores = { type = "forward", name_servers = [{ socket_addr = "127.0.0.53:53", protocol = "udp", trust_nx_responses = true }] }
'';
} "hn-resolver";
sane.services.trust-dns.enable = true;
sane.services.trust-dns.instances = let
mkSubstitutions = flavor: {
"%ADOOF%" = config.sane.netns.doof.netnsPubIpv4;
"%ANATIVE%" = nativeAddrs."servo.${flavor}";
"%AOVPNS%" = config.sane.netns.ovpns.netnsPubIpv4;
"%AWAN%" = "$(cat '${dyn-dns.ipPath}')";
"%CNAMENATIVE%" = "servo.${flavor}";
};
in
{
doof = {
substitutions = mkSubstitutions "doof";
listenAddrsIpv4 = [
config.sane.netns.doof.hostVethIpv4
config.sane.netns.ovpns.hostVethIpv4
];
};
hn = {
substitutions = mkSubstitutions "hn";
listenAddrsIpv4 = [ nativeAddrs."servo.hn" ];
};
lan = {
substitutions = mkSubstitutions "lan";
listenAddrsIpv4 = [ nativeAddrs."servo.lan" ];
# port = 1053;
};
# wan = {
# substitutions = mkSubstitutions "wan";
# listenAddrsIpv4 = [
# nativeAddrs."servo.lan"
# ];
# };
# 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"
"trust-dns-lan.service"
"trust-dns-doof.service"
"trust-dns-hn.service"
"trust-dns-lan.service"
# "trust-dns-wan.service"
# "trust-dns-hn-resolver.service" # doesn't need restart because it doesn't know about WAN IP
];
}
]

50
hosts/common/boot.nix Normal file
View File

@ -0,0 +1,50 @@
{ lib, pkgs, ... }:
{
boot.initrd.supportedFilesystems = [ "ext4" "btrfs" "ext2" "ext3" "vfat" ];
# useful emergency utils
boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.btrfs-progs}/bin/btrfstune
copy_bin_and_libs ${pkgs.util-linux}/bin/{cfdisk,lsblk,lscpu}
copy_bin_and_libs ${pkgs.gptfdisk}/bin/{cgdisk,gdisk}
copy_bin_and_libs ${pkgs.smartmontools}/bin/smartctl
copy_bin_and_libs ${pkgs.e2fsprogs}/bin/resize2fs
'' + lib.optionalString pkgs.stdenv.hostPlatform.isx86_64 ''
copy_bin_and_libs ${pkgs.nvme-cli}/bin/nvme # doesn't cross compile
'';
boot.kernelParams = [
"boot.shell_on_fail"
#v experimental full pre-emption for hopefully better call/audio latency on moby.
# also toggleable at runtime via /sys/kernel/debug/sched/preempt
# defaults to preempt=voluntary
# "preempt=full"
];
# other kernelParams:
# "boot.trace"
# "systemd.log_level=debug"
# "systemd.log_target=console"
# moby has to run recent kernels (defined elsewhere).
# meanwhile, kernel variation plays some minor role in things like sandboxing (landlock) and capabilities.
# simpler to keep near the latest kernel on all devices,
# and also makes certain that any weird system-level bugs i see aren't likely to be stale kernel bugs.
# servo needs zfs though, which doesn't support every kernel.
boot.kernelPackages = lib.mkDefault pkgs.zfs.latestCompatibleLinuxPackages;
# hack in the `boot.shell_on_fail` arg since that doesn't always seem to work.
boot.initrd.preFailCommands = "allowShell=1";
# default: 4 (warn). 7 is debug
boot.consoleLogLevel = 7;
boot.loader.grub.enable = lib.mkDefault false;
boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true;
hardware.enableAllFirmware = true; # firmware with licenses that don't allow for redistribution. fuck lawyers, fuck IP, give me the goddamn firmware.
# hardware.enableRedistributableFirmware = true; # proprietary but free-to-distribute firmware (extraneous to `enableAllFirmware` option)
# default is 252274, which is too low particularly for servo.
# manifests as spurious "No space left on device" when trying to install watches,
# e.g. in dyn-dns by `systemctl start dyn-dns-watcher.path`.
# see: <https://askubuntu.com/questions/828779/failed-to-add-run-systemd-ask-password-to-directory-watch-no-space-left-on-dev>
boot.kernel.sysctl."fs.inotify.max_user_watches" = 1048576;
}

View File

@ -1,22 +1,30 @@
{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
./boot.nix
./feeds.nix
./fs.nix
./hardware
./home
./hosts.nix
./ids.nix
./machine-id.nix
./net
./nix-path
./nix.nix
./persist.nix
./polyunfill.nix
./programs
./quirks.nix
./secrets.nix
./ssh.nix
./systemd.nix
./users
];
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
# this affects where nixos modules look for stateful data which might have been migrated across releases.
system.stateVersion = "21.11";
sane.nixcache.enable-trusted-keys = true;
sane.nixcache.enable = lib.mkDefault true;
sane.persist.enable = lib.mkDefault true;
@ -24,69 +32,9 @@
sane.programs.sysadminUtils.enableFor.system = lib.mkDefault true;
sane.programs.consoleUtils.enableFor.user.colin = lib.mkDefault true;
nixpkgs.config.allowUnfree = true; # NIXPKGS_ALLOW_UNFREE=1
nixpkgs.config.allowBroken = true; # NIXPKGS_ALLOW_BROKEN=1
# time.timeZone = "America/Los_Angeles";
time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone
nix.extraOptions = ''
# see: `man nix.conf`
# useful when a remote builder has a faster internet connection than me
builders-use-substitutes = true # default: false
# maximum seconds to wait when connecting to binary substituter
connect-timeout = 3 # default: 0
# download-attempts = 5 # default: 5
# allow `nix flake ...` command
experimental-features = nix-command flakes
# whether to build from source when binary substitution fails
fallback = true # default: false
# whether to keep building dependencies if any other one fails
keep-going = true # default: false
# whether to keep build-only dependencies of GC roots (e.g. C compiler) when doing GC
keep-outputs = true # default: false
# how many lines to show from failed build
log-lines = 30 # default: 10
# narinfo-cache-negative-ttl = 3600 # default: 3600
# whether to use ~/.local/state/nix/profile instead of ~/.nix-profile, etc
use-xdg-base-directories = true # default: false
# whether to warn if repository has uncommited changes
warn-dirty = false # default: true
'';
# hardlinks identical files in the nix store to save 25-35% disk space.
# unclear _when_ this occurs. it's not a service.
# does the daemon continually scan the nix store?
# does the builder use some content-addressed db to efficiently dedupe?
nix.settings.auto-optimise-store = true;
# TODO: see if i can remove this?
nix.settings.trusted-users = [ "root" ];
services.journald.extraConfig = ''
# docs: `man journald.conf`
# merged journald config is deployed to /etc/systemd/journald.conf
[Journal]
# disable journal compression because the underlying fs is compressed
Compress=no
'';
systemd.services.nix-daemon.serviceConfig = {
# the nix-daemon manages nix builders
# kill nix-daemon subprocesses when systemd-oomd detects an out-of-memory condition
# see:
# - nixos PR that enabled systemd-oomd: <https://github.com/NixOS/nixpkgs/pull/169613>
# - systemd's docs on these properties: <https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#ManagedOOMSwap=auto%7Ckill>
#
# systemd's docs warn that without swap, systemd-oomd might not be able to react quick enough to save the system.
# see `man oomd.conf` for further tunables that may help.
#
# alternatively, apply this more broadly with `systemd.oomd.enableSystemSlice = true` or `enableRootSlice`
# TODO: also apply this to the guest user's slice (user-1100.slice)
# TODO: also apply this to distccd
ManagedOOMMemoryPressure = "kill";
ManagedOOMSwap = "kill";
};
system.activationScripts.nixClosureDiff = {
supportsDryActivation = true;
text = ''
@ -98,37 +46,6 @@
fi
'';
};
system.activationScripts.notifyActive = {
text = ''
# send a notification to any sway users logged in, that the system has been activated/upgraded.
# this probably doesn't work if more than one sway session exists on the system.
_notifyActiveSwaySock="$(echo /run/user/*/sway-ipc.*.sock)"
if [ -e "$_notifyActiveSwaySock" ]; then
SWAYSOCK="$_notifyActiveSwaySock" ${pkgs.sway}/bin/swaymsg -- exec \
"${pkgs.libnotify}/bin/notify-send 'nixos activated' 'version: $(cat $systemConfig/nixos-version)'"
fi
'';
};
# disable non-required packages like nano, perl, rsync, strace
environment.defaultPackages = [];
# dconf docs: <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/profiles>
# this lets programs temporarily write user-level dconf settings (aka gsettings).
# they're written to ~/.config/dconf/user, unless `DCONF_PROFILE` is set to something other than the default of /etc/dconf/profile/user
# find keys/values with `dconf dump /`
programs.dconf.enable = true;
programs.dconf.packages = [
(pkgs.writeTextFile {
name = "dconf-user-profile";
destination = "/etc/dconf/profile/user";
text = ''
user-db:user
system-db:site
'';
})
];
# sane.programs.glib.enableFor.user.colin = true; # for `gsettings`
# link debug symbols into /run/current-system/sw/lib/debug
# hopefully picked up by gdb automatically?

View File

@ -1,4 +1,5 @@
# where to find good stuff?
# - universal search/directory: <https://podcastindex.org>
# - podcasts w/ a community: <https://lemmyverse.net/communities?query=podcast>
# - podcast rec thread: <https://lemmy.ml/post/1565858>
#
@ -72,24 +73,26 @@ let
(fromDb "feeds.feedburner.com/80000HoursPodcast" // rat)
(fromDb "feeds.feedburner.com/dancarlin/history" // rat)
(fromDb "feeds.feedburner.com/radiolab" // pol) # Radiolab -- also available here, but ONLY OVER HTTP: <http://feeds.wnyc.org/radiolab>
(fromDb "feeds.libsyn.com/421877" // rat) # Less Wrong Curated
(fromDb "feeds.megaphone.fm/behindthebastards" // pol) # also Maggie Killjoy
# (fromDb "feeds.megaphone.fm/hubermanlab" // uncat) # Daniel Huberman on sleep
(fromDb "feeds.megaphone.fm/recodedecode" // tech) # The Verge - Decoder
(fromDb "feeds.simplecast.com/54nAGcIl" // pol) # The Daily
(fromDb "feeds.simplecast.com/82FI35Px" // pol) # Ezra Klein Show
(fromDb "feeds.simplecast.com/wgl4xEgL" // rat) # Econ Talk
(fromDb "feeds.simplecast.com/xKJ93w_w" // uncat) # Atlas Obscura
# (fromDb "feeds.simplecast.com/l2i9YnTd" // tech // pol) # Hard Fork (NYtimes tech)
(fromDb "feeds.transistor.fm/acquired" // tech)
(fromDb "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)
# (fromDb "podcast.thelinuxexp.com" // tech) # low-brow linux/foss PR announcements
(fromDb "politicalorphanage.libsyn.com" // pol)
(fromDb "reverseengineering.libsyn.com/rss" // tech) # UnNamed Reverse Engineering Podcast
(fromDb "rss.acast.com/deconstructed") # The Intercept - Deconstructed
@ -102,14 +105,21 @@ 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 "trashfuturepodcast.podbean.com" // pol) # rec by Cory Doctorow, but way rambly
(fromDb "wakingup.libsyn.com" // pol) # Sam Harris
(fromDb "werenotwrong.fireside.fm" // pol)
(mkPod "https://sfconservancy.org/casts/the-corresponding-source/feeds/ogg/" // tech)
# (fromDb "feeds.libsyn.com/421877" // rat) # Less Wrong Curated
# (fromDb "feeds.megaphone.fm/hubermanlab" // uncat) # Daniel Huberman on sleep
# (fromDb "feeds.simplecast.com/l2i9YnTd" // tech // pol) # Hard Fork (NYtimes tech)
# (fromDb "podcast.thelinuxexp.com" // tech) # low-brow linux/foss PR announcements
# (fromDb "rss.art19.com/your-welcome" // pol) # Michael Malice - Your Welcome -- also available here: <https://origin.podcastone.com/podcast?categoryID2=2232>
# (fromDb "rss.prod.firstlook.media/deconstructed/podcast.rss" // pol) #< possible URL rot
# (fromDb "rss.prod.firstlook.media/intercepted/podcast.rss" // pol) #< possible URL rot
# (fromDb "trashfuturepodcast.podbean.com" // pol) # rec by Cory Doctorow, but way rambly
# (mkPod "https://anchor.fm/s/21bc734/podcast/rss" // pol // infrequent) # Emerge: making sense of what's next -- <https://www.whatisemerging.com/emergepodcast>
# (mkPod "https://audioboom.com/channels/5097784.rss" // tech) # Lateral with Tom Scott
# (mkPod "https://feeds.megaphone.fm/RUNMED9919162779" // pol // infrequent) # The Witch Trials of J.K. Rowling: <https://www.thefp.com/witchtrials>
@ -117,12 +127,15 @@ let
];
texts = [
(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 "buttondown.email" // tech)
(fromDb "ben-evans.com/benedictevans" // pol)
(fromDb "bitbashing.io" // tech)
(fromDb "bitsaboutmoney.com" // uncat)
@ -133,19 +146,19 @@ 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)
(fromDb "hardcoresoftware.learningbyshipping.com" // tech) # Steven Sinofsky
(fromDb "harihareswara.net" // tech // pol) # rec by Cory Doctorow
(fromDb "ianthehenry.com" // tech)
(fromDb "idiomdrottning.org" // uncat)
(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)
@ -153,52 +166,64 @@ let
(fromDb "mg.lol" // tech)
(fromDb "mindingourway.com" // rat)
(fromDb "morningbrew.com/feed" // pol)
(fromDb "nixpkgs.news" // tech)
(fromDb "overcomingbias.com" // rat) # Robin Hanson
(fromDb "palladiummag.com" // uncat)
(fromDb "philosopher.coach" // rat) # Peter Saint-Andre -- side project of stpeter.im
(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
(fromDb "slatecave.net" // tech)
(fromDb "slimemoldtimemold.com" // rat)
(fromDb "spectrum.ieee.org" // tech)
(fromDb "stpeter.im/atom.xml" // pol)
# (fromDb "theregister.com" // tech)
(fromDb "thediff.co" // pol) # Byrne Hobart
(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)
(fromDb "weekinethereumnews.com" // tech)
(fromDb "willow.phantoma.online") # wizard@xyzzy.link
(fromDb "xn--gckvb8fzb.com" // tech)
(fromDb "xorvoid.com" // tech)
(mkSubstack "astralcodexten" // rat // daily) # Scott Alexander
(mkSubstack "byrnehobart" // pol // infrequent)
# (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://acoup.blog/feed" // rat // weekly)
(mkText "https://anish.lakhwara.com/home.html" // tech // weekly)
(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://til.simonwillison.net/tils/feed.atom" // tech // weekly)
(mkText "https://www.bloomberg.com/opinion/authors/ARbTQlRLRjE/matthew-s-levine.rss" // pol // weekly) # Matt Levine
(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)
];
videos = [
@ -208,17 +233,22 @@ let
(fromDb "youtube.com/@Exurb1a")
(fromDb "youtube.com/@hbomberguy")
(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/@Vsauce") # they're all like 1-minute long videos now? what happened @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

@ -1,40 +1,73 @@
# docs
# - x-systemd options: <https://www.freedesktop.org/software/systemd/man/systemd.mount.html>
# - fuse options: `man mount.fuse`
{ lib, pkgs, sane-lib, ... }:
{ config, lib, pkgs, sane-lib, utils, ... }:
let
fsOpts = rec {
common = [
"_netdev"
"noatime"
"user" # allow any user with access to the device to mount the fs
# user: allow any user with access to the device to mount the fs.
# note that this requires a suid `mount` binary; see: <https://zameermanji.com/blog/2022/8/5/using-fuse-without-root-on-linux/>
"user"
"x-systemd.requires=network-online.target"
"x-systemd.after=network-online.target"
"x-systemd.mount-timeout=10s" # how long to wait for mount **and** how long to wait for unmount
];
auto = [ "x-systemd.automount" ];
noauto = [ "noauto" ]; # don't mount as part of remote-fs.target
# x-systemd.automount: mount the fs automatically *on first access*.
# creates a `path-to-mount.automount` systemd unit.
automount = [ "x-systemd.automount" ];
# noauto: don't mount as part of remote-fs.target.
# N.B.: `remote-fs.target` is a dependency of multi-user.target, itself of graphical.target.
# hence, omitting `noauto` can slow down boots.
noauto = [ "noauto" ];
# lazyMount: defer mounting until first access from userspace.
# see: `man systemd.automount`, `man automount`, `man autofs`
lazyMount = noauto ++ automount;
wg = [
"x-systemd.requires=wireguard-wg-home.service"
"x-systemd.after=wireguard-wg-home.service"
];
ssh = common ++ [
"identityfile=/home/colin/.ssh/id_ed25519"
"allow_other"
fuse = [
"allow_other" # allow users other than the one who mounts it to access it. needed, if systemd is the one mounting this fs (as root)
# allow_root: allow root to access files on this fs (if mounted by non-root, else it can always access them).
# N.B.: if both allow_root and allow_other are specified, then only allow_root takes effect.
# "allow_root"
# default_permissions: enforce local permissions check. CRUCIAL if using `allow_other`.
# w/o this, permissions mode of sshfs is like:
# - sshfs runs all remote commands as the remote user.
# - if a local user has local permissions to the sshfs mount, then their file ops are sent blindly across the tunnel.
# - `allow_other` allows *any* local user to access the mount, and hence any local user can now freely become the remote mapped user.
# with default_permissions, sshfs doesn't tunnel file ops from users until checking that said user could perform said op on an equivalent local fs.
"default_permissions"
];
sshColin = ssh ++ [
"transform_symlinks"
"idmap=user"
fuseColin = fuse ++ [
"uid=1000"
"gid=100"
];
sshRoot = ssh ++ [
# we don't transform_symlinks because that breaks the validity of remote /nix stores
"sftp_server=/run/wrappers/bin/sudo\\040/run/current-system/sw/libexec/sftp-server"
ssh = common ++ fuse ++ [
"identityfile=/home/colin/.ssh/id_ed25519"
# i *think* idmap=user means that `colin` on `localhost` and `colin` on the remote are actually treated as the same user, even if their uid/gid differs?
# i.e., local colin's id is translated to/from remote colin's id on every operation?
"idmap=user"
];
sshColin = ssh ++ fuseColin ++ [
# follow_symlinks: remote files which are symlinks are presented to the local system as ordinary files (as the target of the symlink).
# if the symlink target does not exist, the presentation is unspecified.
# symlinks which point outside the mount ARE followed. so this is more capable than `transform_symlinks`
"follow_symlinks"
# symlinks on the remote fs which are absolute paths are presented to the local system as relative symlinks pointing to the expected data on the remote fs.
# only symlinks which would point inside the mountpoint are translated.
"transform_symlinks"
];
# sshRoot = ssh ++ [
# # we don't transform_symlinks because that breaks the validity of remote /nix stores
# "sftp_server=/run/wrappers/bin/sudo\\040/run/current-system/sw/libexec/sftp-server"
# ];
# in the event of hunt NFS mounts, consider:
# - <https://unix.stackexchange.com/questions/31979/stop-broken-nfs-mounts-from-locking-a-directory>
@ -42,28 +75,103 @@ let
# actimeo=n = how long (in seconds) to cache file/dir attributes (default: 3-60s)
# bg = retry failed mounts in the background
# retry=n = for how many minutes `mount` will retry NFS mount operation
# intr = allow Ctrl+C to abort I/O (it will error with `EINTR`)
# soft = on "major timeout", report I/O error to userspace
# softreval = on "major timeout", service the request using known-stale cache results instead of erroring -- if such cache data exists
# retrans=n = how many times to retry a NFS request before giving userspace a "server not responding" error (default: 3)
# timeo=n = number of *deciseconds* to wait for a response before retrying it (default: 600)
# note: client uses a linear backup, so the second request will have double this timeout, then triple, etc.
# proto=udp = encapsulate protocol ops inside UDP packets instead of a TCP session.
# requires `nfsvers=3` and a kernel compiled with `NFS_DISABLE_UDP_SUPPORT=n`.
# UDP might be preferable to TCP because the latter is liable to hang for ~100s (kernel TCP timeout) after a link drop.
# however, even UDP has issues with `umount` hanging.
#
# N.B.: don't change these without first testing the behavior of sandboxed apps on a flaky network.
nfs = common ++ [
# "actimeo=10"
"bg"
"retrans=4"
# "actimeo=5"
# "bg"
"retrans=1"
"retry=0"
# "intr"
"soft"
"timeo=15"
"softreval"
"timeo=30"
"nofail" # don't fail remote-fs.target when this mount fails (not an option for sshfs else would be common)
# "proto=udp" # default kernel config doesn't support NFS over UDP: <https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1964093> (see comment 11).
# "nfsvers=3" # NFSv4+ doesn't support UDP at *all*. it's ok to omit nfsvers -- server + client will negotiate v3 based on udp requirement. but omitting causes confusing mount errors when the server is *offline*, because the client defaults to v4 and thinks the udp option is a config error.
# "x-systemd.idle-timeout=10" # auto-unmount after this much inactivity
];
# manually perform a ftp mount via e.g.
# curlftpfs -o ftpfs_debug=2,user=anonymous:anonymous,connect_timeout=10 -f -s ftp://servo-hn /mnt/my-ftp
ftp = common ++ fuseColin ++ [
# "ftpfs_debug=2"
"user=colin:ipauth"
# connect_timeout=10: casting shows to T.V. fails partway through about half the time
"connect_timeout=20"
];
};
remoteHome = host: {
fileSystems."/mnt/${host}-home" = {
sane.programs.sshfs-fuse.enableFor.system = true;
fileSystems."/mnt/${host}/home" = {
device = "colin@${host}:/home/colin";
fsType = "fuse.sshfs";
options = fsOpts.sshColin ++ fsOpts.noauto;
options = fsOpts.sshColin ++ fsOpts.lazyMount;
noCheck = true;
};
sane.fs."/mnt/${host}-home" = sane-lib.fs.wantedDir;
sane.fs."/mnt/${host}/home" = sane-lib.fs.wanted {
dir.acl.user = "colin";
dir.acl.group = "users";
dir.acl.mode = "0700";
};
};
remoteServo = subdir: {
sane.programs.curlftpfs.enableFor.system = true;
sane.fs."/mnt/servo/${subdir}" = sane-lib.fs.wanted {
dir.acl.user = "colin";
dir.acl.group = "users";
dir.acl.mode = "0750";
};
fileSystems."/mnt/servo/${subdir}" = {
device = "ftp://servo-hn:/${subdir}";
noCheck = true;
fsType = "fuse.curlftpfs";
options = fsOpts.ftp ++ fsOpts.noauto ++ fsOpts.wg;
# fsType = "nfs";
# options = fsOpts.nfs ++ fsOpts.lazyMount ++ fsOpts.wg;
};
systemd.services."automount-servo-${utils.escapeSystemdPath subdir}" = let
fs = config.fileSystems."/mnt/servo/${subdir}";
in {
# this is a *flaky* network mount, especially on moby.
# if done as a normal autofs mount, access will eternally block when network is dropped.
# notably, this would block *any* sandboxed app which allows media access, whether they actually try to use that media or not.
# a practical solution is this: mount as a service -- instead of autofs -- and unmount on timeout error, in a restart loop.
# until the ftp handshake succeeds, nothing is actually mounted to the vfs, so this doesn't slow down any I/O when network is down.
description = "automount /mnt/servo/${subdir} in a fault-tolerant and non-blocking manner";
after = [ "network-online.target" ];
requires = [ "network-online.target" ];
wantedBy = [ "default.target" ];
serviceConfig.Type = "simple";
serviceConfig.ExecStart = lib.escapeShellArgs [
"/usr/bin/env"
"PATH=/run/current-system/sw/bin"
"mount.${fs.fsType}"
"-f" # foreground (i.e. don't daemonize)
"-s" # single-threaded (TODO: it's probably ok to disable this?)
"-o"
(lib.concatStringsSep "," (lib.filter (o: !lib.hasPrefix "x-systemd." o) fs.options))
fs.device
"/mnt/servo/${subdir}"
];
# not sure if this configures a linear, or exponential backoff.
# but the first restart will be after `RestartSec`, and the n'th restart (n = RestartSteps) will be RestartMaxDelaySec after the n-1'th exit.
serviceConfig.Restart = "always";
serviceConfig.RestartSec = "10s";
serviceConfig.RestartMaxDelaySec = "120s";
serviceConfig.RestartSteps = "5";
};
};
in
lib.mkMerge [
@ -99,45 +207,31 @@ lib.mkMerge [
# but it decreases working memory under the heaviest of loads by however much space the compressed memory occupies (e.g. 50% if 2:1; 25% if 4:1)
zramSwap.memoryPercent = 100;
# fileSystems."/mnt/servo-nfs" = {
# device = "servo-hn:/";
# noCheck = true;
# fsType = "nfs";
# options = fsOpts.nfs ++ fsOpts.auto ++ fsOpts.wg;
# };
fileSystems."/mnt/servo-nfs/media" = {
device = "servo-hn:/media";
noCheck = true;
fsType = "nfs";
options = fsOpts.nfs ++ fsOpts.auto ++ fsOpts.wg;
};
fileSystems."/mnt/servo-nfs/playground" = {
device = "servo-hn:/playground";
noCheck = true;
fsType = "nfs";
options = fsOpts.nfs ++ fsOpts.auto ++ fsOpts.wg;
};
# fileSystems."/mnt/servo-media-nfs" = {
# device = "servo-hn:/media";
# noCheck = true;
# fsType = "nfs";
# options = fsOpts.common ++ fsOpts.auto;
# };
sane.fs."/mnt/servo-media" = sane-lib.fs.wantedSymlinkTo "/mnt/servo-nfs/media";
# environment.pathsToLink = [
# # needed to achieve superuser access for user-mounted filesystems (see sshRoot above)
# # we can only link whole directories here, even though we're only interested in pkgs.openssh
# "/libexec"
# ];
environment.pathsToLink = [
# needed to achieve superuser access for user-mounted filesystems (see optionsRoot above)
# we can only link whole directories here, even though we're only interested in pkgs.openssh
"/libexec"
];
environment.systemPackages = [
pkgs.sshfs-fuse
];
programs.fuse.userAllowOther = true; #< necessary for `allow_other` or `allow_root` options.
}
(remoteHome "crappy")
(remoteHome "desko")
(remoteHome "lappy")
(remoteHome "moby")
# this granularity of servo media mounts is necessary to support sandboxing:
# for flaky mounts, we can only bind the mountpoint itself into the sandbox,
# so it's either this or unconditionally bind all of media/.
(remoteServo "media/archive")
(remoteServo "media/Books")
(remoteServo "media/collections")
# (remoteServo "media/datasets")
(remoteServo "media/games")
(remoteServo "media/Music")
(remoteServo "media/Pictures/macros")
(remoteServo "media/torrents")
(remoteServo "media/Videos")
(remoteServo "playground")
]

View File

@ -1,89 +0,0 @@
{ config, lib, pkgs, ... }:
{
imports = [
./x86_64.nix
];
boot.initrd.supportedFilesystems = [ "ext4" "btrfs" "ext2" "ext3" "vfat" ];
# useful emergency utils
boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.btrfs-progs}/bin/btrfstune
copy_bin_and_libs ${pkgs.util-linux}/bin/{cfdisk,lsblk,lscpu}
copy_bin_and_libs ${pkgs.gptfdisk}/bin/{cgdisk,gdisk}
copy_bin_and_libs ${pkgs.smartmontools}/bin/smartctl
copy_bin_and_libs ${pkgs.e2fsprogs}/bin/resize2fs
'' + lib.optionalString pkgs.stdenv.hostPlatform.isx86_64 ''
copy_bin_and_libs ${pkgs.nvme-cli}/bin/nvme # doesn't cross compile
'';
boot.kernelParams = [
"boot.shell_on_fail"
#v experimental full pre-emption for hopefully better call/audio latency on moby.
# also toggleable at runtime via /sys/kernel/debug/sched/preempt
# defaults to preempt=voluntary
# "preempt=full"
];
# other kernelParams:
# "boot.trace"
# "systemd.log_level=debug"
# "systemd.log_target=console"
# hack in the `boot.shell_on_fail` arg since that doesn't always seem to work.
boot.initrd.preFailCommands = "allowShell=1";
# default: 4 (warn). 7 is debug
boot.consoleLogLevel = 7;
boot.loader.grub.enable = lib.mkDefault false;
boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true;
# non-free firmware
hardware.enableRedistributableFirmware = true;
# default is 252274, which is too low particularly for servo.
# manifests as spurious "No space left on device" when trying to install watches,
# e.g. in dyn-dns by `systemctl start dyn-dns-watcher.path`.
# see: <https://askubuntu.com/questions/828779/failed-to-add-run-systemd-ask-password-to-directory-watch-no-space-left-on-dev>
boot.kernel.sysctl."fs.inotify.max_user_watches" = 1048576;
# powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS
powerManagement.powertop.enable = false;
# linux CPU governor: <https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt>
# - options:
# - "powersave" => force CPU to always run at lowest supported frequency
# - "performance" => force CPU to always run at highest frequency
# - "ondemand" => adjust frequency based on load
# - "conservative" (ondemand but slower to adjust)
# - "schedutil"
# - "userspace"
# - not all options are available for all platforms
# - intel (intel_pstate) appears to manage scaling w/o intervention/control from the OS.
# - AMD (acpi-cpufreq) appears to manage scaling via the OS *or* HW. but the ondemand defaults never put it to max hardware frequency.
# - qualcomm (cpufreq-dt) appears to manage scaling *only* via the OS. ondemand governor exercises the full range.
# - query details with `sudo cpupower frequency-info`
powerManagement.cpuFreqGovernor = "ondemand";
services.logind.extraConfig = ''
# 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
'';
# some packages build only if binfmt *isn't* present
nix.settings.system-features = lib.mkIf (config.boot.binfmt.emulatedSystems == []) [
"no-binfmt"
];
# services.snapper.configs = {
# root = {
# subvolume = "/";
# extraConfig = {
# ALLOW_USERS = "colin";
# };
# };
# };
# services.snapper.snapshotInterval = "daily";
}

View File

@ -1,15 +0,0 @@
{ lib, pkgs, ... }:
{
config = lib.mkIf (pkgs.system == "x86_64-linux") {
boot.initrd.availableKernelModules = [
"xhci_pci" "ahci" "sd_mod" "sdhci_pci" # nixos-generate-config defaults
"usb_storage" # rpi needed this to boot from usb storage, i think.
"nvme" # to boot from nvme devices
# efi_pstore evivars
];
hardware.cpu.amd.updateMicrocode = true; # desktop
hardware.cpu.intel.updateMicrocode = true; # laptop
};
}

View File

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

45
hosts/common/home/fs.nix Normal file
View File

@ -0,0 +1,45 @@
{ config, lib, ... }:
{
sane.user.persist.byStore.plaintext = [
"archive"
"dev"
# TODO: records should be private
"records"
"ref"
"tmp"
"use"
"Books/local"
"Music"
"Pictures/albums"
"Pictures/cat"
"Pictures/from"
"Pictures/Screenshots" #< XXX: something is case-sensitive about this?
"Pictures/Photos"
"Videos/local"
# these are persisted simply to save on RAM.
# ~/.cache/nix can become several GB.
# mesa_shader_cache is < 10 MB.
# TODO: integrate with sane.programs.sandbox?
".cache/mesa_shader_cache"
".cache/nix"
];
sane.user.persist.byStore.private = [
"knowledge"
];
# convenience
sane.user.fs = let
persistEnabled = config.sane.persist.enable;
in {
".persist/private" = lib.mkIf persistEnabled { symlink.target = config.sane.persist.stores.private.origin; };
".persist/plaintext" = lib.mkIf persistEnabled { symlink.target = config.sane.persist.stores.plaintext.origin; };
".persist/ephemeral" = lib.mkIf persistEnabled { symlink.target = config.sane.persist.stores.cryptClearOnBoot.origin; };
"nixos".symlink.target = "dev/nixos";
"Books/servo".symlink.target = "/mnt/servo/media/Books";
"Videos/servo".symlink.target = "/mnt/servo/media/Videos";
"Pictures/servo-macros".symlink.target = "/mnt/servo/media/Pictures/macros";
};
}

View File

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

View File

@ -1,21 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash
# initializes the default libsecret keyring (used by gnome-keyring) if not already initialized.
# this initializes it to be plaintext/unencrypted.
ringdir=/home/colin/private/.local/share/keyrings
if test -f "$ringdir/default"
then
echo 'keyring already initialized: not doing anything'
else
keyring="$ringdir/Default_keyring.keyring"
echo 'initializing default user keyring:' "$keyring.new"
echo '[keyring]' > "$keyring.new"
echo 'display-name=Default keyring' >> "$keyring.new"
echo 'lock-on-idle=false' >> "$keyring.new"
echo 'lock-after=false' >> "$keyring.new"
chown colin:users "$keyring.new"
# closest to an atomic update we can achieve
mv "$keyring.new" "$keyring" && echo -n "Default_keyring" > "$ringdir/default"
fi

View File

@ -1,4 +1,5 @@
{ config, lib, ...}:
# TODO: move into modules/users.nix
{ config, lib, pkgs, ...}:
let
# [ ProgramConfig ]
@ -6,6 +7,9 @@ let
(p: p.enabled)
(builtins.attrValues config.sane.programs);
# [ ProgramConfig ]
enabledProgramsWithPackage = builtins.filter (p: p.package != null) enabledPrograms;
# [ { "<mime-type>" = { prority, desktop } ]
enabledWeightedMimes = builtins.map weightedMimes enabledPrograms;
@ -21,23 +25,70 @@ let
# [ { priority, desktop } ... ] -> Self
sortOneMimeType = associations: builtins.sort
(l: r: assert l.priority != r.priority; l.priority < r.priority)
(l: r: lib.throwIf
(l.priority == r.priority)
"${l.desktop} and ${r.desktop} share a preferred mime type with identical priority ${builtins.toString l.priority} (and so the desired association is ambiguous)"
(l.priority < r.priority)
)
associations;
sortMimes = mimes: builtins.mapAttrs (_k: sortOneMimeType) mimes;
# { "<mime-type>"} = [ { priority, desktop } ... ]; } -> { "<mime-type>" = [ "<desktop>" ... ]; }
removePriorities = mimes: builtins.mapAttrs
(_k: associations: builtins.map (a: a.desktop) associations)
mimes;
# { "<mime-type>" = [ "<desktop>" ... ]; } -> { "<mime-type>" = "<desktop1>;<desktop2>;..."; }
formatDesktopLists = mimes: builtins.mapAttrs
(_k: desktops: lib.concatStringsSep ";" desktops)
mimes;
mimeappsListPkg = pkgs.writeTextDir "share/applications/mimeapps.list" (
lib.generators.toINI { } {
"Default Applications" = formatDesktopLists (removePriorities (sortMimes (mergeMimes enabledWeightedMimes)));
}
);
localShareApplicationsPkg = (pkgs.symlinkJoin {
name = "user-local-share-applications";
paths = builtins.map
(p: builtins.toString p.package)
(enabledProgramsWithPackage ++ [ { package=mimeappsListPkg; } ]);
}).overrideAttrs (orig: {
# like normal symlinkJoin, but don't error if the path doesn't exist
buildCommand = ''
mkdir -p $out/share/applications
for i in $(cat $pathsPath); do
if [ -e "$i/share/applications" ]; then
${pkgs.buildPackages.xorg.lndir}/bin/lndir -silent $i/share/applications $out/share/applications
fi
done
runHook postBuild
'';
postBuild = ''
# rebuild `mimeinfo.cache`, used by file openers to show the list of *all* apps, not just the user's defaults.
${pkgs.buildPackages.desktop-file-utils}/bin/update-desktop-database $out/share/applications
'';
});
in
{
# the xdg mime type for a file can be found with:
# - `xdg-mime query filetype path/to/thing.ext`
# the default handler for a mime type can be found with:
# - `xdg-mime query default <mimetype>` (e.g. x-scheme-handler/http)
# the nix-configured handler can be found `nix-repl > :lf . > hostConfigs.desko.xdg.mime.defaultApplications`
#
# glib/gio is queried via glib.bin output:
# - `gio mime x-scheme-handler/https`
# - `gio open <path_or_url>`
# - `gio launch </path/to/app.desktop>`
#
# we can have single associations or a list of associations.
# there's also options to *remove* [non-default] associations from specific apps
xdg.mime.enable = true;
xdg.mime.defaultApplications = removePriorities (sortMimes (mergeMimes enabledWeightedMimes));
# N.B.: don't use nixos' `xdg.mime` option becaue that caues `/share/applications` to be linked into the whole system,
# which limits what i can do around sandboxing. getting the default associations to live in ~/ makes it easier to expose
# the associations to apps selectively.
# xdg.mime.enable = true;
# xdg.mime.defaultApplications = removePriorities (sortMimes (mergeMimes enabledWeightedMimes));
sane.user.fs.".local/share/applications".symlink.target = "${localShareApplicationsPkg}/share/applications";
}

View File

@ -3,13 +3,18 @@
{
# 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"
XDG_TEMPLATES_DIR="$HOME/.xdg/Templates"
XDG_VIDEOS_DIR="$HOME/Videos"
'';
@ -17,4 +22,6 @@
# prevent `xdg-user-dirs-update` from overriding/updating our config
# see <https://manpages.ubuntu.com/manpages/bionic/man5/user-dirs.conf.5.html>
sane.user.fs.".config/user-dirs.conf".symlink.text = "enabled=False";
sane.user.fs.".config/environment.d/30-user-dirs.conf".symlink.target = "../user-dirs.dirs";
}

View File

@ -2,6 +2,14 @@
{
# TODO: this should be populated per-host
sane.hosts.by-name."crappy" = {
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMIvSQAGKqmymXIL4La9B00LPxBIqWAr5AsJxk3UQeY5";
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMN0cpRAloCBOE5/2wuzgik35iNDv5KLceWMCVaa7DIQ";
# wg-home.pubkey = "TODO";
# wg-home.ip = "10.0.10.55";
lan-ip = "10.78.79.55";
};
sane.hosts.by-name."desko" = {
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPU5GlsSfbaarMvDA20bxpSZGWviEzXGD8gtrIowc1pX";
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFw9NoRaYrM6LbDd3aFBc4yyBlxGQn8HjeHd/dZ3CfHk";
@ -36,10 +44,4 @@
wg-home.endpoint = "uninsane.org:51820";
lan-ip = "10.78.79.51";
};
sane.hosts.by-name."supercap" = {
ssh.authorized = false;
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHf/mqqkX45EWAcquV04MC3SUljTApdclH1gjI19F+PA";
lan-ip = "10.78.79.232";
};
}

View File

@ -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;
@ -57,6 +60,8 @@
sane.ids.bitcoind-mainnet.gid = 2418;
sane.ids.clightning.uid = 2419;
sane.ids.clightning.gid = 2419;
sane.ids.nix-serve.uid = 2420;
sane.ids.nix-serve.gid = 2420;
sane.ids.colin.uid = 1000;
sane.ids.guest.uid = 1100;
@ -76,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

@ -4,46 +4,26 @@
imports = [
./dns.nix
./hostnames.nix
./modemmanager.nix
./networkmanager.nix
./upnp.nix
./vpn.nix
];
# the default backend is "wpa_supplicant".
# wpa_supplicant reliably picks weak APs to connect to.
# see: <https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/474>
# iwd is an alternative that shouldn't have this problem
# docs:
# - <https://nixos.wiki/wiki/Iwd>
# - <https://iwd.wiki.kernel.org/networkmanager>
# - `man iwd.config` for global config
# - `man iwd.network` for per-SSID config
# use `iwctl` to control
# networking.networkmanager.wifi.backend = "iwd";
# networking.wireless.iwd.enable = true;
# networking.wireless.iwd.settings = {
# # auto-connect to a stronger network if signal drops below this value
# # bedroom -> bedroom connection is -35 to -40 dBm
# # bedroom -> living room connection is -60 dBm
# General.RoamThreshold = "-52"; # default -70
# General.RoamThreshold5G = "-52"; # default -76
# };
# plugins mostly add support for establishing different VPN connections.
# the default plugin set includes mostly proprietary VPNs:
# - fortisslvpn (Fortinet)
# - iodine (DNS tunnels)
# - l2tp
# - openconnect (Cisco Anyconnect / Juniper / ocserv)
# - openvpn
# - vpnc (Cisco VPN)
# - sstp
#
# i don't use these, and notably they drag in huge dependency sets and don't cross compile well.
# e.g. openconnect drags in webkitgtk (for SSO)!
networking.networkmanager.plugins = lib.mkForce [];
systemd.network.enable = true;
networking.useNetworkd = true;
# keyfile.path = where networkmanager should look for connection credentials
networking.networkmanager.extraConfig = ''
[keyfile]
path=/var/lib/NetworkManager/system-connections
'';
# view refused/dropped packets with: `sudo journalctl -k`
# networking.firewall.logRefusedPackets = true;
# networking.firewall.logRefusedUnicastsOnly = false;
networking.firewall.logReversePathDrops = true;
# linux will drop inbound packets if it thinks a reply to that packet wouldn't exit via the same interface (rpfilter).
# that heuristic fails for complicated VPN-style routing, especially with SNAT.
# networking.firewall.checkReversePath = false; # or "loose" to keep it partially.
# networking.firewall.enable = false; #< set false to debug
# this is needed to forward packets from the VPN to the host.
# this is required separately by servo and by any `sane-vpn` users,
# however Nix requires this be set centrally, in only one location (i.e. here)
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
}

View File

@ -1,15 +1,39 @@
{ ... }:
# 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)
#
# components:
# - /etc/nsswitch.conf:
# - glibc uses this to provide `getaddrinfo`, i.e. host -> ip address lookup
# call directly with `getent ahostsv4 www.google.com`
# - `nss` (a component of glibc) is modular: names mentioned in that file are `dlopen`'d (i think that's the mechanism)
# in NixOS, that means _they have to be on LDPATH_.
# - `nscd` is used by NixOS simply to proxy nss requests.
# here, /etc/nsswitch.conf consumers contact nscd via /var/run/nscd/socket.
# in this way, only `nscd` needs to have the nss modules on LDPATH.
# - /etc/resolv.conf
# - contains the DNS servers for a system.
# - historically, NetworkManager would update this file as you switch networks.
# - modern implementations hardcodes `127.0.0.53` and then systemd-resolved proxies everything (and caches).
#
# namespacing:
# - 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 the ovnps namespace to use the provider's DNS resolvers.
# 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?)
# there also seems to be some cache somewhere that's shared between the two namespaces.
# i think this is a libc thing. might need to leverage proper cgroups to _really_ kill it.
# - getent ahostsv4 www.google.com
# - try fix: <https://serverfault.com/questions/765989/connect-to-3rd-party-vpn-server-but-dont-use-it-as-the-default-route/766290#766290>
services.resolved.enable = true;
# 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
# - curl https://matrix.org => works
@ -24,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.
@ -32,6 +57,17 @@
# nsncd is the Name Service NON-Caching Daemon. it's a drop-in that doesn't cache;
# this is OK on the host -- because systemd-resolved caches. it's probably sub-optimal
# in the netns and we query upstream DNS more often than needed. hm.
# TODO: run a separate recursive resolver in each namespace.
services.nscd.enableNsncd = true;
# services.nscd.enableNsncd = true;
# disabling nscd LOSES US SOME FUNCTIONALITY. in particular, only the glibc-builtin modules are accessible via /etc/resolv.conf.
# - dns: glibc-bultin
# - files: glibc-builtin
# - myhostname: systemd
# - mymachines: systemd
# - resolve: systemd
# in practice, i see no difference with nscd disabled.
# disabling nscd VASTLY simplifies netns and process isolation. see explainer at top of file.
services.nscd.enable = false;
system.nssModules = lib.mkForce [];
}
]

View File

@ -0,0 +1,78 @@
{ config, lib, pkgs, ... }:
{
networking.modemmanager.package = pkgs.modemmanager-split.daemon.overrideAttrs (upstream: {
# patch to allow the dbus endpoints to be owned by networkmanager user
postInstall = (upstream.postInstall or "") + ''
substitute $out/share/dbus-1/system.d/org.freedesktop.ModemManager1.conf \
$out/share/dbus-1/system.d/networkmanager-org.freedesktop.ModemManager1.conf \
--replace-fail 'user="root"' 'group="networkmanager"'
'';
});
systemd.services.ModemManager = {
# aliases = [ "dbus-org.freedesktop.ModemManager1.service" ];
# after = [ "polkit.service" ];
# requires = [ "polkit.service" ];
wantedBy = [ "network.target" ]; #< default is `multi-user.target`, somehow it doesn't auto-start with that...
# 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 = [
"" # first blank line is to clear the upstream `ExecStart` field.
"${lib.getExe' config.networking.modemmanager.package "ModemManager"} --debug"
];
# --debug sets DEBUG level logging: so reset
serviceConfig.ExecStartPost = "${lib.getExe config.sane.programs.mmcli.package} --set-logging=INFO";
# v this is what upstream ships
# serviceConfig.Restart = "on-abort";
# serviceConfig.StandardError = "null";
# serviceConfig.CapabilityBoundingSet = "CAP_SYS_ADMIN CAP_NET_ADMIN";
# serviceConfig.ProtectSystem = true; # makes empty: /boot, /usr
# serviceConfig.ProtectHome = true; # makes empty: /home, /root, /run/user
# serviceConfig.PrivateTmp = true;
# serviceConfig.RestrictAddressFamilies = "AF_NETLINK AF_UNIX AF_QIPCRTR";
# serviceConfig.NoNewPrivileges = true;
serviceConfig.CapabilityBoundingSet = [ "CAP_NET_ADMIN" ]; #< TODO: make sure this is *really* taking effect, and isn't supplemental to upstream's `CAP_SYS_ADMIN` setting
serviceConfig.LockPersonality = true;
# serviceConfig.PrivateUsers = true; #< untried, not likely to work since it needs capabilities
serviceConfig.PrivateTmp = true;
serviceConfig.ProtectClock = true; # syscall filter to prevent changing the RTC
serviceConfig.ProtectControlGroups = true;
serviceConfig.ProtectHome = true; # makes empty: /home, /root, /run/user
serviceConfig.ProtectHostname = true; # prevents changing hostname
serviceConfig.ProtectKernelLogs = true; # disable /proc/kmsg, /dev/kmsg
serviceConfig.ProtectKernelModules = true; # syscall filter to prevent module calls
serviceConfig.ProtectKernelTunables = true;
serviceConfig.ProtectSystem = "strict"; # makes read-only all but /dev, /proc, /sys
serviceConfig.RestrictAddressFamilies = [
"AF_NETLINK"
"AF_QIPCRTR"
"AF_UNIX"
];
serviceConfig.RestrictSUIDSGID = true;
serviceConfig.SystemCallArchitectures = "native"; # prevents e.g. aarch64 syscalls in the event that the kernel is multi-architecture.
# from earlier `landlock` sandboxing, i know it needs these directories:
# - # "/"
# - "/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"
};
# so that ModemManager can discover when the modem appears
# services.udev.packages = lib.mkIf cfg.enabled [ cfg.package ];
}

View File

@ -0,0 +1,268 @@
{ config, pkgs, ... }:
let
# networkmanager = pkgs.networkmanager;
networkmanager = pkgs.networkmanager.overrideAttrs (upstream: {
src = pkgs.fetchFromGitea {
domain = "git.uninsane.org";
owner = "colin";
repo = "NetworkManager";
# patched to fix polkit permissions (with `nmcli`) when NetworkManager runs as user networkmanager
rev = "dev-sane-1.48.0";
hash = "sha256-vGmOKtwVItxjYioZJlb1og3K6u9s4rcmDnjAPLBC3ao=";
};
# patches = [];
});
# split the package into `daemon` and `nmcli` outputs, because the networkmanager *service*
# doesn't need `nmcli`/`nmtui` tooling
networkmanager-split = pkgs.networkmanager-split.override { inherit networkmanager; };
in {
networking.networkmanager.enable = true;
# plugins mostly add support for establishing different VPN connections.
# the default plugin set includes mostly proprietary VPNs:
# - fortisslvpn (Fortinet)
# - iodine (DNS tunnels)
# - l2tp
# - openconnect (Cisco Anyconnect / Juniper / ocserv)
# - openvpn
# - vpnc (Cisco VPN)
# - sstp
#
# i don't use these, and notably they drag in huge dependency sets and don't cross compile well.
# e.g. openconnect drags in webkitgtk (for SSO)!
# networking.networkmanager.plugins = lib.mkForce [];
networking.networkmanager.enableDefaultPlugins = false;
networking.networkmanager.package = networkmanager-split.daemon.overrideAttrs (upstream: {
# postPatch = (upstream.postPatch or "") + ''
# substituteInPlace src/{core/org.freedesktop.NetworkManager,nm-dispatcher/nm-dispatcher}.conf --replace-fail \
# 'user="root"' 'user="networkmanager"'
# '';
postInstall = (upstream.postInstall or "") + ''
# allow the bus to owned by either root or networkmanager users
# use the group here, that way ordinary users can be elevated to control networkmanager
# (via e.g. `nmcli`)
for f in org.freedesktop.NetworkManager.conf nm-dispatcher.conf ; do
substitute $out/share/dbus-1/system.d/$f \
$out/share/dbus-1/system.d/networkmanager-$f \
--replace-fail 'user="root"' 'group="networkmanager"'
done
# remove unused services to prevent any unexpected interactions
rm $out/etc/systemd/system/{nm-cloud-setup.service,nm-cloud-setup.timer,nm-priv-helper.service}
'';
});
# fixup the services to run as `networkmanager` and with less permissions
systemd.services.NetworkManager = {
serviceConfig.RuntimeDirectory = "NetworkManager"; #< tells systemd to create /run/NetworkManager
# serviceConfig.StateDirectory = "NetworkManager"; #< tells systemd to create /var/lib/NetworkManager
serviceConfig.User = "networkmanager";
serviceConfig.Group = "networkmanager";
serviceConfig.AmbientCapabilities = [
# "CAP_DAC_OVERRIDE"
"CAP_NET_ADMIN"
"CAP_NET_RAW" #< required, else `libndp: ndp_sock_open: Failed to create ICMP6 socket.`
"CAP_NET_BIND_SERVICE" #< this *does* seem to be necessary, though i don't understand why. DHCP?
# "CAP_SYS_MODULE"
# "CAP_AUDIT_WRITE" #< allow writing to the audit log (optional)
# "CAP_KILL"
];
serviceConfig.LockPersonality = true;
serviceConfig.NoNewPrivileges = true;
serviceConfig.PrivateDevices = true; # remount /dev with just the basics, syscall filter to block @raw-io
serviceConfig.PrivateIPC = true;
serviceConfig.PrivateTmp = true;
# serviceConfig.PrivateUsers = true; #< BREAKS NetworkManager (presumably, it causes a new user namespace, breaking CAP_NET_ADMIN & others). "platform-linux: do-change-link[3]: failure 1 (Operation not permitted)"
serviceConfig.ProtectClock = true; # syscall filter to prevent changing the RTC
serviceConfig.ProtectControlGroups = true;
serviceConfig.ProtectHome = true; # makes empty: /home, /root, /run/user
serviceConfig.ProtectHostname = true; # probably not upstreamable: prevents changing hostname
serviceConfig.ProtectKernelLogs = true; # disable /proc/kmsg, /dev/kmsg
serviceConfig.ProtectKernelModules = true; # syscall filter to prevent module calls (probably not upstreamable: NM will want to load modules like `ppp`)
serviceConfig.ProtectKernelTunables = true; # but NM might need to write /proc/sys/net/...
serviceConfig.ProtectSystem = "strict"; # makes read-only: all but /dev, /proc, /sys.
serviceConfig.RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_NETLINK" # breaks near DHCP without this
"AF_PACKET" # for DHCP
"AF_UNIX"
# AF_ALG ?
# AF_BLUETOOTH ?
# AF_BRIDGE ?
];
serviceConfig.RestrictSUIDSGID = true;
serviceConfig.SystemCallArchitectures = "native"; # prevents e.g. aarch64 syscalls in the event that the kernel is multi-architecture.
# from earlier `landlock` sandboxing, i know it needs these directories:
# - "/proc/net"
# - "/proc/sys/net"
# - "/run/NetworkManager"
# - "/run/systemd" # for trust-dns-nmhook
# - "/run/udev"
# - # "/run/wg-home.priv"
# - "/sys/class"
# - "/sys/devices"
# - "/var/lib/NetworkManager"
# - "/var/lib/trust-dns" #< for trust-dns-nmhook
# - "/run/systemd"
};
systemd.services.NetworkManager-wait-online = {
serviceConfig.User = "networkmanager";
serviceConfig.Group = "networkmanager";
};
# fix NetworkManager-dispatcher to actually run as a daemon,
# and sandbox it a bit
systemd.services.NetworkManager-dispatcher = {
after = [ "trust-dns-localhost.service" ]; #< so that /var/lib/trust-dns will exist
# serviceConfig.ExecStart = [
# "" # first blank line is to clear the upstream `ExecStart` field.
# "${cfg.package}/libexec/nm-dispatcher --persist" # --persist is needed for it to actually run as a daemon
# ];
# serviceConfig.Restart = "always";
# serviceConfig.RestartSec = "1s";
# serviceConfig.DynamicUser = true; #< not possible, else we lose group perms (so can't write to `trust-dns`'s files in the nm hook)
serviceConfig.User = "networkmanager"; # TODO: should arguably use `DynamicUser`
serviceConfig.Group = "networkmanager";
serviceConfig.LockPersonality = true;
serviceConfig.NoNewPrivileges = true;
serviceConfig.PrivateDevices = true; # remount /dev with just the basics, syscall filter to block @raw-io
serviceConfig.PrivateIPC = true;
serviceConfig.PrivateTmp = true;
serviceConfig.PrivateUsers = true;
serviceConfig.ProtectClock = true; # syscall filter to prevent changing the RTC
serviceConfig.ProtectControlGroups = true;
serviceConfig.ProtectHome = true; # makes empty: /home, /root, /run/user
serviceConfig.ProtectHostname = true; # probably not upstreamable: prevents changing hostname
serviceConfig.ProtectKernelLogs = true; # disable /proc/kmsg, /dev/kmsg
serviceConfig.ProtectKernelModules = true; # syscall filter to prevent module calls
serviceConfig.ProtectKernelTunables = true;
serviceConfig.ProtectSystem = "full"; # makes read-only: /boot, /etc/, /usr. `strict` isn't possible due to trust-dns hook
serviceConfig.RestrictAddressFamilies = [
"AF_UNIX" # required, probably for dbus or systemd connectivity
];
serviceConfig.RestrictSUIDSGID = true;
serviceConfig.SystemCallArchitectures = "native"; # prevents e.g. aarch64 syscalls in the event that the kernel is multi-architecture.
};
# harden wpa_supplicant (used by NetworkManager)
systemd.services.wpa_supplicant = {
serviceConfig.User = "networkmanager";
serviceConfig.Group = "networkmanager";
serviceConfig.AmbientCapabilities = [
"CAP_NET_ADMIN"
"CAP_NET_RAW"
];
serviceConfig.LockPersonality = true;
serviceConfig.NoNewPrivileges = true;
# serviceConfig.PrivateDevices = true; # untried, not likely to work. remount /dev with just the basics, syscall filter to block @raw-io
serviceConfig.PrivateIPC = true;
serviceConfig.PrivateTmp = true;
# serviceConfig.PrivateUsers = true; #< untried, not likely to work
serviceConfig.ProtectClock = true; # syscall filter to prevent changing the RTC
serviceConfig.ProtectControlGroups = true;
serviceConfig.ProtectHome = true; # makes empty: /home, /root, /run/user
serviceConfig.ProtectHostname = true; # prevents changing hostname
serviceConfig.ProtectKernelLogs = true; # disable /proc/kmsg, /dev/kmsg
serviceConfig.ProtectKernelModules = true; # syscall filter to prevent module calls
serviceConfig.ProtectKernelTunables = true; #< N.B.: i think this makes certain /proc writes fail
serviceConfig.ProtectSystem = "strict"; # makes read-only: all but /dev, /proc, /sys.
serviceConfig.RestrictAddressFamilies = [
"AF_INET" #< required
"AF_INET6"
"AF_NETLINK" #< required
"AF_PACKET" #< required
"AF_UNIX" #< required (wpa_supplicant wants to use dbus)
];
serviceConfig.RestrictSUIDSGID = true;
serviceConfig.SystemCallArchitectures = "native"; # prevents e.g. aarch64 syscalls in the event that the kernel is multi-architecture.
# from earlier `landlock` sandboxing, i know it needs only these paths:
# - "/dev/net"
# - "/dev/rfkill"
# - "/proc/sys/net"
# - "/sys/class/net"
# - "/sys/devices"
# - "/run/systemd"
};
networking.networkmanager.settings = {
# keyfile.path = where networkmanager should look for connection credentials
keyfile.path = "/var/lib/NetworkManager/system-connections";
# wifi.backend = "wpa_supplicant"; #< default
# wifi.scan-rand-mac-address = true; #< default
# logging.audit = false; #< default
logging.level = "INFO";
# main.dhcp = "internal"; #< default
main.dns = if config.services.resolved.enable then
"systemd-resolved"
else if config.sane.services.trust-dns.enable && config.sane.services.trust-dns.asSystemResolver then
"none"
else
"internal"
;
main.systemd-resolved = false;
};
environment.etc."NetworkManager/system-connections".source = "/var/lib/NetworkManager/system-connections";
# the default backend is "wpa_supplicant".
# wpa_supplicant reliably picks weak APs to connect to.
# see: <https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/474>
# iwd is an alternative that shouldn't have this problem
# docs:
# - <https://nixos.wiki/wiki/Iwd>
# - <https://iwd.wiki.kernel.org/networkmanager>
# - `man iwd.config` for global config
# - `man iwd.network` for per-SSID config
# use `iwctl` to control
# networking.networkmanager.wifi.backend = "iwd";
# networking.wireless.iwd.enable = true;
# networking.wireless.iwd.settings = {
# # auto-connect to a stronger network if signal drops below this value
# # bedroom -> bedroom connection is -35 to -40 dBm
# # bedroom -> living room connection is -60 dBm
# General.RoamThreshold = "-52"; # default -70
# General.RoamThreshold5G = "-52"; # default -76
# };
# allow networkmanager to control systemd-resolved,
# which it needs to do to apply new DNS settings when using systemd-resolved.
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (subject.isInGroup("networkmanager") && action.id.indexOf("org.freedesktop.resolve1.") == 0) {
return polkit.Result.YES;
}
});
'';
users.users.networkmanager = {
isSystemUser = true;
group = "networkmanager";
extraGroups = [ "trust-dns" ];
};
# there is, unfortunately, no proper interface by which to plumb wpa_supplicant into the NixOS service, except by overlay.
nixpkgs.overlays = [(self: super: {
wpa_supplicant = super.wpa_supplicant.overrideAttrs (upstream: {
# postPatch = (upstream.postPatch or "") + ''
# substituteInPlace wpa_supplicant/dbus/dbus-wpa_supplicant.conf --replace-fail \
# 'user="root"' 'user="networkmanager"'
# '';
postInstall = (upstream.postInstall or "") + ''
substitute $out/share/dbus-1/system.d/dbus-wpa_supplicant.conf \
$out/share/dbus-1/system.d/networkmanager-wpa_supplicant.conf \
--replace-fail 'user="root"' 'group="networkmanager"'
'';
postFixup = (upstream.postFixup or "") + ''
# remove unused services to avoid unexpected interactions
rm $out/etc/systemd/system/{wpa_supplicant-nl80211@,wpa_supplicant-wired@,wpa_supplicant@}.service
'';
});
})];
}

View File

@ -1,89 +1,68 @@
{ config, lib, pkgs, ... }:
# to add a new OVPN VPN:
# - generate a privkey `wg genkey`
# - add this key to `sops secrets/universal.yaml`
# - upload pubkey to OVPN.com
# - upload pubkey to OVPN.com (`cat wg.priv | wg pubkey`)
# - generate config @ OVPN.com
# - copy the Address, PublicKey, Endpoint from OVPN's config
# N.B.: maximum interface name in Linux is 15 characters.
{ config, lib, pkgs, ... }:
let
def-wg-vpn = name: { endpoint, publicKey, address, dns, privateKeyFile }: {
# networking.wg-quick.interfaces."${name}" = {
# inherit address privateKeyFile dns;
# peers = [
# {
# allowedIPs = [
# "0.0.0.0/0"
# "::/0"
# ];
# inherit endpoint publicKey;
# }
# ];
# # to start: `systemctl start wg-quick-${name}`
# autostart = false;
# };
systemd.network.netdevs."${name}" = {
# see: `man 5 systemd.netdev`
wireguardConfig = {
PrivateKeyFile = privateKeyFile;
};
wireguardPeers = [{
AllowedIPs = [
"0.0.0.0/0"
"::/0"
];
Endpoint = endpoint;
PublicKey = publicKey;
}];
# 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"
];
};
systemd.network.networks."${name}" = {
# see: `man 5 systemd.network`
matchConfig.Name = name;
networkConfig.Address = address;
networkConfig.DNS = dns;
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";
};
};
def-ovpn = name: { endpoint, publicKey, address }: def-wg-vpn "ovpnd-${name}" {
inherit endpoint publicKey address;
privateKeyFile = config.sops.secrets."wg/ovpnd_${name}_privkey".path;
dns = [
"46.227.67.134"
"192.165.9.158"
];
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.
'';
};
};
in lib.mkMerge [
(def-ovpn "us" {
endpoint = "vpn31.prd.losangeles.ovpn.com:9929";
publicKey = "VW6bEWMOlOneta1bf6YFE25N/oMGh1E1UFBCfyggd0k=";
address = [
"172.27.237.218/32"
"fd00:0000:1337:cafe:1111:1111:ab00:4c8f/128"
];
})
# NB: us-* share the same wg key and link-local addrs, but distinct public addresses
(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=";
address = [
"172.21.182.178/32"
"fd00:0000:1337:cafe:1111:1111:cfcb:27e3/128"
];
})
(def-ovpn "ukr" {
endpoint = "vpn96.prd.kyiv.ovpn.com:9929";
publicKey = "CjZcXDxaaKpW8b5As1EcNbI6+42A6BjWahwXDCwfVFg=";
address = [
"172.18.180.159/32"
"fd00:0000:1337:cafe:1111:1111:ec5c:add3/128"
];
})
]
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

@ -1,16 +0,0 @@
{ pkgs, sane-lib, ... }:
{
# allow `nix-shell` (and probably nix-index?) to locate our patched and custom packages
nix.nixPath = [
"nixpkgs=${pkgs.path}"
# note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root
# "nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay"
# as long as my system itself doesn't rely on NIXPKGS at runtime, we can point the overlays to git
# to avoid switching so much during development
"nixpkgs-overlays=/home/colin/dev/nixos/hosts/common/nix-path/overlay"
];
# ensure new deployments have a source of this repo with which they can bootstrap.
environment.etc."nixos".source = ../../..;
}

View File

@ -1,4 +0,0 @@
# XXX: NIX_PATH=...:nixpkgs-overlays=... will import every overlay in the directory
# so we prefer to give it a directory with just this *one* overlay, otherwise it imports conflicting overlays
# and gets stuck in a loop until it OOMs
import ../../../../overlays/all.nix

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

@ -0,0 +1,95 @@
{ config, lib, pkgs, ... }:
{
nix.settings = {
# see: `man nix.conf`
# useful when a remote builder has a faster internet connection than me.
# note that this also applies to `nix copy --to`, though.
# i think any time a remote machine wants a path, this means we ask them to try getting it themselves before we supply it.
builders-use-substitutes = true; # default: false
# maximum seconds to wait when connecting to binary substituter
connect-timeout = 3; # default: 0
# download-attempts = 5; # default: 5
# allow `nix flake ...` command
experimental-features = [ "nix-command" "flakes "];
# whether to build from source when binary substitution fails
fallback = true; # default: false
# whether to keep building dependencies if any other one fails
keep-going = true; # default: false
# whether to keep build-only dependencies of GC roots (e.g. C compiler) when doing GC
keep-outputs = true; # default: false
# how many lines to show from failed build
log-lines = 30; # default: 10
# how many substitution downloads to perform in parallel.
# i wonder if parallelism is causing moby's substitutions to fail?
max-substitution-jobs = 6; # default: 16
# narinfo-cache-negative-ttl = 3600 # default: 3600
# whether to use ~/.local/state/nix/profile instead of ~/.nix-profile, etc
use-xdg-base-directories = true; # default: false
# whether to warn if repository has uncommited changes
warn-dirty = false; # default: true
# hardlinks identical files in the nix store to save 25-35% disk space.
# unclear _when_ this occurs. it's not a service.
# does the daemon continually scan the nix store?
# does the builder use some content-addressed db to efficiently dedupe?
auto-optimise-store = true;
# allow #!nix-shell scripts to locate my patched nixpkgs & custom packages.
# this line might become unnecessary: see <https://github.com/NixOS/nixpkgs/pull/273170>
nix-path = config.nix.nixPath;
};
# 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.maxBuildCost >= 2) [
"nixpkgs=${pkgs.path}"
]) ++ [
# note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root
# "nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay"
# as long as my system itself doesn't rely on NIXPKGS at runtime, we can point the overlays to git
# to avoid `switch`ing so much during development.
# TODO: it would be nice to remove this someday!
# it's an impurity that touches way more than i need and tends to cause hard-to-debug eval issues
# when it goes wrong. should i port my `nix-shell` scripts to something more tailored to my uses
# and then delete `nixpkgs-overlays`?
"nixpkgs-overlays=/home/colin/dev/nixos/integrations/nixpkgs/nixpkgs-overlays.nix"
];
# 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.maxBuildCost >= 3) {
source = pkgs.sane-nix-files;
};
environment.etc."nix/registry.json" = lib.mkIf (config.sane.maxBuildCost < 3) {
enable = false;
};
systemd.services.nix-daemon.serviceConfig = {
# the nix-daemon manages nix builders
# kill nix-daemon subprocesses when systemd-oomd detects an out-of-memory condition
# see:
# - nixos PR that enabled systemd-oomd: <https://github.com/NixOS/nixpkgs/pull/169613>
# - systemd's docs on these properties: <https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#ManagedOOMSwap=auto%7Ckill>
#
# systemd's docs warn that without swap, systemd-oomd might not be able to react quick enough to save the system.
# see `man oomd.conf` for further tunables that may help.
#
# alternatively, apply this more broadly with `systemd.oomd.enableSystemSlice = true` or `enableRootSlice`
# TODO: also apply this to the guest user's slice (user-1100.slice)
# TODO: also apply this to distccd
ManagedOOMMemoryPressure = "kill";
ManagedOOMSwap = "kill";
};
}

View File

@ -1,13 +1,14 @@
{ ... }:
{
sane.persist.stores.private.origin = "/home/colin/private";
# store /home/colin/a/b in /home/private/a/b instead of /home/private/home/colin/a/b
# store /home/colin/a/b in /mnt/persist/private/a/b instead of /mnt/persist/private/home/colin/a/b
sane.persist.stores.private.prefix = "/home/colin";
sane.persist.sys.byStore.initrd = [
"/var/log"
];
sane.persist.sys.byStore.plaintext = [
# TODO: these should be private.. somehow
"/var/log"
"/var/backup" # for e.g. postgres dumps
];
sane.persist.sys.byStore.cryptClearOnBoot = [

216
hosts/common/polyunfill.nix Normal file
View File

@ -0,0 +1,216 @@
# strictly *decrease* the scope of the default nixos installation/config
{ 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
{
# 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;
};
options.environment.systemPackages = lib.mkOption {
# see: <repo:nixos/nixpkgs:nixos/modules/config/system-path.nix>
# it's 31 "requiredPackages", with no explanation of why they're "required"...
# most of these can be safely removed without breaking the *boot*,
# but some core system services DO implicitly depend on them.
# TODO: see which more of these i can remove (or shadow/sandbox)
apply = let
requiredPackages = builtins.map (pkg: lib.setPrio ((pkg.meta.priority or 5) + 3) pkg) [
# pkgs.acl
# pkgs.attr
# pkgs.bashInteractive
# pkgs.bzip2
# pkgs.coreutils-full
# pkgs.cpio
# pkgs.curl
# pkgs.diffutils
# pkgs.findutils
# pkgs.gawk
# pkgs.stdenv.cc.libc
# pkgs.getent
# pkgs.getconf
# pkgs.gnugrep
# pkgs.gnupatch
# pkgs.gnused
# pkgs.gnutar
# pkgs.gzip
# pkgs.xz
pkgs.less
# pkgs.libcap #< implicitly required by NetworkManager/wpa_supplicant!
# pkgs.ncurses
pkgs.netcat
# config.programs.ssh.package
# pkgs.mkpasswd
pkgs.procps
# pkgs.su
# pkgs.time
# pkgs.util-linux
# pkgs.which
# pkgs.zstd
];
in lib.filter (p: ! builtins.elem p requiredPackages);
};
options.system.fsPackages = lib.mkOption {
# <repo:nixos/nixpkgs:nixos/modules/tasks/filesystems/vfat.nix> adds `mtools` and `dosfstools`
# dosfstools actually makes its way into the initrd (`fsck.vfat`).
# mtools is like "MS-DOS for Linux", ancient functionality i'll never use.
apply = lib.filter (p: p != pkgs.mtools);
};
config = {
# disable non-required packages like nano, perl, rsync, strace
environment.defaultPackages = [];
# 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"
];
# 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 [];
# 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
# 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;
# 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;
# 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;
# `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 "";
# 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/tasks/bcache.nix>
# these allow you to use the Linux block cache (cool! doesn't need to be a default though)
boot.bcache.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;
# see: <repo:nixos/nixpkgs:nixos/modules/virtualisation/nixos-containers.nix>
boot.enableContainers = lib.mkDefault false;
};
}

View File

@ -15,7 +15,7 @@ in
};
};
package = pkgs.abaddon.overrideAttrs (upstream: {
packageUnwrapped = pkgs.abaddon.overrideAttrs (upstream: {
patches = (upstream.patches or []) ++ [
(pkgs.fetchpatch {
url = "https://git.uninsane.org/colin/abaddon/commit/eb551f188d34679f75adcbc83cb8d5beb4d19fd6.patch";
@ -87,13 +87,8 @@ in
services.abaddon = {
description = "unofficial Discord chat client";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/abaddon";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
partOf = lib.mkIf cfg.config.autostart [ "graphical-session" ];
command = "abaddon";
};
};
}

View File

@ -3,6 +3,9 @@
{
sane.programs.aerc = {
sandbox.method = "bwrap";
sandbox.wrapperType = "inplace"; #< /share/aerc/aerc.conf refers to other /share files by absolute path
sandbox.net = "clearnet";
secrets.".config/aerc/accounts.conf" = ../../../secrets/common/aerc_accounts.conf.bin;
mime.associations."x-scheme-handler/mailto" = "aerc.desktop";
};

View File

@ -3,13 +3,28 @@
# - `man 5 alacritty`
# - defaults: <https://github.com/alacritty/alacritty/releases> -> alacritty.yml
# - irc: #alacritty on libera.chat
{ lib, ... }:
{ config, lib, ... }:
let
cfg = config.sane.programs.alacritty;
in
{
sane.programs.alacritty = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.fontSize = mkOption {
type = types.int;
default = 14;
};
};
};
sandbox.enable = false;
env.TERMINAL = lib.mkDefault "alacritty";
fs.".config/alacritty/alacritty.toml".symlink.text = ''
[font]
size = 14
size = ${builtins.toString cfg.config.fontSize}
[[keyboard.bindings]]
mods = "Control"
@ -35,6 +50,21 @@
mods = "Control|Shift"
key = "PageDown"
action = "ScrollPageDown"
# disable OS shortcuts which leak through...
# see sway config or sane-input-handler for more info on why these leak through
[[keyboard.bindings]]
key = "AudioVolumeUp"
action = "None"
[[keyboard.bindings]]
key = "AudioVolumeDown"
action = "None"
[[keyboard.bindings]]
key = "Power"
action = "None"
[[keyboard.bindings]]
key = "PowerOff"
action = "None"
'';
};
}

View File

@ -0,0 +1,59 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.alsa-ucm-conf;
in
{
sane.programs.alsa-ucm-conf = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.preferEarpiece = mkOption {
type = types.bool;
default = true;
};
};
};
# upstream alsa ships with PinePhone audio configs, but they don't actually produce sound.
# - still true as of 2024-05-26
# - see: <https://github.com/alsa-project/alsa-ucm-conf/pull/134>
#
# 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.
#
# 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;
};
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.
# this is particularly needed by wireplumber;
# also *maybe* pipewire and pipewire-pulse.
# taken from <repo:nixos/mobile-nixos:modules/quirks/audio.nix>
env.ALSA_CONFIG_UCM2 = "/run/current-system/sw/share/alsa/ucm2";
enableFor.system = lib.mkIf (builtins.any (en: en) (builtins.attrValues cfg.enableFor.user)) true;
};
environment.pathsToLink = lib.mkIf cfg.enabled [
"/share/alsa/ucm2"
];
}

View File

@ -1,10 +1,43 @@
{ ... }:
# debug with:
# - `animatch --debug`
# - `gdb animatch`
# try:
# - `animatch --fullscreen`
# - `animatch --windowed`
# the other config options (e.g. verbose logging -- which doesn't seem to do anything) have to be configured via .ini file
# ```ini
# # ~/.config/Holy Pangolin/Animatch/SuperDerpy.ini
# [SuperDerpy]
# debug=1
# disableTouch=1
# [game]
# verbose=1
# ```
{ pkgs, ... }:
{
sane.programs.animatch = {
packageUnwrapped = with pkgs; animatch.override {
# allegro has no native wayland support, and so by default crashes when run without Xwayland.
# enable the allegro SDL backend, and achieve Wayland support via SDL's Wayland support.
# TODO: see about upstreaming this to nixpkgs?
allegro5 = allegro5.overrideAttrs (upstream: {
buildInputs = upstream.buildInputs ++ [
SDL2
];
cmakeFlags = upstream.cmakeFlags ++ [
"-DALLEGRO_SDL=on"
];
});
};
buildCost = 1;
sandbox.method = "bwrap";
sandbox.whitelistWayland = true;
persist.byStore.plaintext = [
# game progress
".config/Holy Pangolin/Animatch"
".local/share/Holy Pangolin/Animatch" # i think this one might be wrong
# ".config/Holy Pangolin/Animatch" #< used for SuperDerpy config (e.g. debug, disableTouch, fullscreen, enable sound, etc). SuperDerpy.ini
".local/share/Holy Pangolin/Animatch" #< used for game state (level clears). SuperDerpy.ini
];
};
}

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