Compare commits

..

42 Commits

Author SHA1 Message Date
10d69fb0a4 mautrix-signal: configure correct permissions so that i can use the bridge 2023-01-17 07:57:24 +00:00
98ae1a8513 matrix: persist the mautrix-signal directory 2023-01-16 11:58:21 +00:00
72a2ab78f3 matrix: allow mautrix-signal to communicate with signald 2023-01-16 11:54:32 +00:00
487af9b492 fs: fix /var/lib/private to have expected mode (0700) 2023-01-16 11:43:43 +00:00
472d25c056 mautrix-signal: define the shared secrets statically 2023-01-16 11:43:17 +00:00
9eafacad12 mautrix-signal: get a *little* closer to working
it looks like mautrix-signal reads the appserver token (AS_TOKEN) from
its config file -- which we place in the nix store. as such, we have no
easy way of getting the token from registration.yaml over to
mautrix-signal. this is presumably what the environmentFile stuff is
meant for, but it doesn't *really* help much.

i think it makes sense to pursue coffeetables' nix-matrix-appservices
module, which has good-looking AS_TOKEN support:
<https://gitlab.com/coffeetables/nix-matrix-appservices>
2023-01-16 10:22:44 +00:00
0eb46a3179 add mautrix-signal (experimental) 2023-01-16 09:03:56 +00:00
ddb184b5ff (nixos) mx-puppet-discord: move to matrix category 2023-01-16 07:31:12 +00:00
194a6b6cf4 nixpatches: remove unused fakeHash input (just omit the hash when you need to) 2023-01-16 06:47:44 +00:00
016384aa2b nixpatches: move the list to the nixpatches flake instead of injecting it 2023-01-16 06:46:59 +00:00
b4e19c037e ejabberd: TODO: fix acme/nginx group membership 2023-01-16 05:59:52 +00:00
bd504f6c83 pin nheko package 2023-01-15 07:52:21 +00:00
bdd309eb15 flake: convert path:nixpatches -> ./nixpatches to fix poor flake input invalidation 2023-01-15 07:36:04 +00:00
eedc1170ec fix: remove kiwix-tools patch & improve nixpatches sub-flake UX 2023-01-15 04:27:42 +00:00
5a586c6e3c flake: migrate back to the more-efficient github: input scheme 2023-01-15 04:10:10 +00:00
371bcad650 flake.nix: use conventional URIs, no custom shit 2023-01-14 23:28:12 +00:00
926decbea5 persist ~/.cache/nix 2023-01-14 23:21:15 +00:00
c0f76ea8d8 flake: add flake feedback info for nix devs/readers 2023-01-14 23:20:38 +00:00
40fc37930f flake update: nixpkgs 2023-01-11 -> 2023-01-12
```
• Updated input 'nixpkgs-stable':
    'github:NixOS/nixpkgs/6a3f9996408c970b99b8b992b11bb249d1455b62' (2023-01-12)
  → 'github:NixOS/nixpkgs/e285dd0ca97c264003867c7329f0d1f4f028739c' (2023-01-13)
• Updated input 'nixpkgs-unpatched':
    'github:NixOS/nixpkgs/6c8644fc37b6e141cbfa6c7dc8d98846c4ff0c2e' (2023-01-11)
  → 'github:NixOS/nixpkgs/0f213d0fee84280d8c3a97f7469b988d6fe5fcdf' (2023-01-12)
```
2023-01-14 18:37:57 +00:00
30e7eb9ab6 sane-bt-search: convert to nix-shell and increase verbosity 2023-01-14 10:23:50 +00:00
2e03f47edc gPodder: persist the whole gPodder directory 2023-01-14 05:36:31 +00:00
4d552e3f0f gpodder-configured: remove the readFile business and use linkFarm instead 2023-01-14 05:29:38 +00:00
176a98879d gpodder: auto-unsubscribe from extra feeds at start 2023-01-14 05:25:16 +00:00
fc70889c34 Revert "import nix-script": it doesn't provide benefit over nix-shell
This reverts commit fe15cdd705.

although it *does* support generating derivation text,
import-from-derivation on the results is too clunky to actually be
usable in practice. it frequently mysteriously hangs instead.
2023-01-14 04:01:04 +00:00
49b4c57826 snippets: add nixos snippets 2023-01-14 03:38:51 +00:00
5111d095ac gpodder-configured: improve docs 2023-01-13 15:09:43 +00:00
fe15cdd705 import nix-script
this is a tool i can use like `nix-shell`, but it should be more
amenable to packaging. `nix-script --export --build-root .
./my-script.sh` gives a derivation which i should be able to
`callPackage` on.
2023-01-13 15:08:30 +00:00
638420ea0d whalebird: fix tray_icon oversight during last update 2023-01-13 10:09:07 +00:00
d55dd5ace6 whalebird: fix aarch64 build (hopefully) 2023-01-13 09:53:14 +00:00
45695aed6b whalebird: 4.6.5 -> 4.7.4 2023-01-13 09:41:05 +00:00
d6e79c4d07 feeds: remove the unused update.nix file 2023-01-13 09:41:05 +00:00
380ceaf625 mfeeds: rename update.sh -> update.py 2023-01-13 09:41:05 +00:00
942c581107 feeds: port the update.sh script to use our own feedsearch package instead of the deployed version 2023-01-13 09:41:05 +00:00
b6d94c2e08 feedsearch_crawler: add to all python3XXPackages 2023-01-13 09:41:05 +00:00
fd7acc8fc8 let host nix (i.e. nix-shell, nix-locate) know about our patched nixpkgs and overlays 2023-01-13 09:41:05 +00:00
db670fc172 package feedsearch-crawler 2023-01-13 09:41:05 +00:00
6438971c8c ssh keys: add github.com's pubkey 2023-01-13 09:41:05 +00:00
e439d398b6 flake: patch using the target system instead of the host 2023-01-13 09:05:00 +00:00
0f25cba331 moby kernel: disable config option that would break build 2023-01-13 04:40:34 +00:00
39959e912d cross: fix cross compilation by setting both local AND crossSystem 2023-01-13 04:40:34 +00:00
62e649743d moby: update megous kernel 6.1-20221128-1027 -> 6.1-20221211-1046 2023-01-13 04:40:34 +00:00
b1741a18e1 feeds: include "title" in the output OPML -- when it exists 2023-01-13 04:13:44 +00:00
34 changed files with 662 additions and 147 deletions

44
flake.lock generated
View File

@@ -60,37 +60,38 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-RM4ZprjMlUTMD0huOPQceF0ujXG2xk7LE1fGXfcg71g=", "narHash": "sha256-ERkw+xJQ2mZMztI8hzWjilnvHQtKHslNyuG9TXM/lCI=",
"path": "nixpatches", "path": "/nix/store/zy5rd2m4ww1wwllfq8sgwvdslganf1ks-source/nixpatches",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "nixpatches", "path": "/nix/store/zy5rd2m4ww1wwllfq8sgwvdslganf1ks-source/nixpatches",
"type": "path" "type": "path"
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1673527292, "lastModified": 1673704454,
"narHash": "sha256-903EpRSDCfUvic7Hsiqwy+h7zlMTLAUbCXkEGGriCfM=", "narHash": "sha256-5Wdj1MgdOgn3+dMFIBtg+IAYZApjF8JzwLWDPieg0C4=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6a3f9996408c970b99b8b992b11bb249d1455b62", "rev": "a83ed85c14fcf242653df6f4b0974b7e1c73c6c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "nixos",
"ref": "nixos-22.11", "ref": "nixos-22.11",
"type": "indirect" "repo": "nixpkgs",
"type": "github"
} }
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1673100377, "lastModified": 1673740915,
"narHash": "sha256-mT76pTd0YFxT6CwtPhDgHJhuIgLY+ZLSMiQpBufwMG4=", "narHash": "sha256-MMH8zONfqahgHly3K8/A++X34800rajA/XgZ2DzNL/M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9f11a2df77cb945c115ae2a65f53f38121597d73", "rev": "7c65528c3f8462b902e09d1ccca23bb9034665c2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -102,17 +103,18 @@
}, },
"nixpkgs-unpatched": { "nixpkgs-unpatched": {
"locked": { "locked": {
"lastModified": 1673450908, "lastModified": 1673631141,
"narHash": "sha256-b8em+kwrNtnB7gR8SyVf6WuTyQ+6tHS6dzt9D9wgKF0=", "narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6c8644fc37b6e141cbfa6c7dc8d98846c4ff0c2e", "rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"type": "indirect" "repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
@@ -134,11 +136,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1673481602, "lastModified": 1673752321,
"narHash": "sha256-P80X38fOM2MtoYdgkyuksGOQPDhIhNJW2W2jMeMIZzE=", "narHash": "sha256-EFfXY1ZHJq4FNaNQA9x0djtu/jiOhBbT0Xi+BT06cJw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "32187b33ac6ec9b628dcd08dd941a715e6241dda", "rev": "e18eefd2b133a58309475298052c341c08470717",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -1,24 +1,44 @@
# docs: # FLAKE FEEDBACK:
# - <https://nixos.wiki/wiki/Flakes> # - 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`
# - 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> # - <https://serokell.io/blog/practical-nix-flakes>
{ {
# 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 = { inputs = {
nixpkgs-stable.url = "nixpkgs/nixos-22.11"; # <https://github.com/nixos/nixpkgs/tree/nixos-22.11>
nixpkgs-unpatched.url = "nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:nixos/nixpkgs?ref=nixos-22.11";
# <https://github.com/nixos/nixpkgs/tree/nixos-unstable>
nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs = { nixpkgs = {
url = "path:nixpatches"; url = "./nixpatches";
inputs.nixpkgs.follows = "nixpkgs-unpatched"; inputs.nixpkgs.follows = "nixpkgs-unpatched";
}; };
mobile-nixos = { mobile-nixos = {
# <https://github.com/nixos/mobile-nixos>
url = "github:nixos/mobile-nixos"; url = "github:nixos/mobile-nixos";
flake = false; flake = false;
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-22.05"; # <https://github.com/nix-community/home-manager/tree/release-22.05>
url = "github:nix-community/home-manager?ref=release-22.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
sops-nix = { sops-nix = {
# <https://github.com/Mic92/sops-nix>
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -43,10 +63,12 @@
evalHost = { name, local, target }: evalHost = { name, local, target }:
let let
# XXX: we'd prefer to use `nixosSystem = (nixpkgsCompiledBy local).nixos` # XXX: we'd prefer to use `nixosSystem = (nixpkgsCompiledBy target).nixos`
# but it doesn't propagate config to the underlying pkgs, meaning it doesn't let you use # but it doesn't propagate config to the underlying pkgs, meaning it doesn't let you use
# non-free packages even after setting nixpkgs.allowUnfree. # non-free packages even after setting nixpkgs.allowUnfree.
nixosSystem = import ((nixpkgsCompiledBy local).path + "/nixos/lib/eval-config.nix"); # XXX: patch using the target -- not local -- otherwise the target will
# need to emulate the host in order to rebuild!
nixosSystem = import ((nixpkgsCompiledBy target).path + "/nixos/lib/eval-config.nix");
in in
(nixosSystem { (nixosSystem {
# we use pkgs built for and *by* the target, i.e. emulation, by default. # we use pkgs built for and *by* the target, i.e. emulation, by default.
@@ -60,6 +82,7 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
self.overlays.default self.overlays.default
self.overlays.passthru self.overlays.passthru
self.overlays.pins
]; ];
} }
]; ];
@@ -96,11 +119,12 @@
overlays = rec { overlays = rec {
default = pkgs; default = pkgs;
pkgs = import ./pkgs/overlay.nix; pkgs = import ./overlays/pkgs.nix;
pins = import ./overlays/pins.nix; # TODO: move to `nixpatches/` input
passthru = passthru =
let let
stable = next: prev: { stable = next: prev: {
stable = nixpkgs-stable.legacyPackages."${prev.stdenv.hostPlatform}"; stable = nixpkgs-stable.legacyPackages."${prev.stdenv.hostPlatform.system}";
}; };
mobile = (import "${mobile-nixos}/overlay/overlay.nix"); mobile = (import "${mobile-nixos}/overlay/overlay.nix");
uninsane = uninsane-dot-org.overlay; uninsane = uninsane-dot-org.overlay;

View File

@@ -1,5 +1,12 @@
{ ... }: { config, ... }:
let
mkCrossFrom = localSystem: pkgs: import pkgs.path {
inherit localSystem;
crossSystem = pkgs.stdenv.hostPlatform.system;
inherit (config.nixpkgs) config overlays;
};
in
{ {
# the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere;
# here we just define them all. # here we just define them all.
@@ -8,8 +15,8 @@
# non-emulated packages build *from* local *for* target. # non-emulated packages build *from* local *for* target.
# for large packages like the linux kernel which are expensive to build under emulation, # for large packages like the linux kernel which are expensive to build under emulation,
# the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation.
crossFrom."x86_64-linux" = (prev.forceSystem "x86_64-linux" null).appendOverlays next.overlays; crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" next;
crossFrom."aarch64-linux" = (prev.forceSystem "aarch64-linux" null).appendOverlays next.overlays; crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" next;
}) })
]; ];
} }

View File

@@ -30,6 +30,9 @@
"/var/lib/machines" # maybe not needed, but would be painful to add a VM and forget. "/var/lib/machines" # maybe not needed, but would be painful to add a VM and forget.
]; ];
# some services which use private directories error if the parent (/var/lib/private) isn't 700.
sane.fs."/var/lib/private".dir.acl.mode = "0700";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# time.timeZone = "America/Los_Angeles"; # time.timeZone = "America/Los_Angeles";
@@ -39,6 +42,11 @@
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
# allow `nix-shell` (and probably nix-index?) to locate our patched and custom packages
nix.nixPath = [
"nixpkgs=${pkgs.path}"
"nixpkgs-overlays=${../..}/overlays"
];
# TODO: move this into home-manager? # TODO: move this into home-manager?
fonts = { fonts = {

View File

@@ -41,6 +41,8 @@ let
); );
} // lib.optionalAttrs (raw.is_podcast or false) { } // lib.optionalAttrs (raw.is_podcast or false) {
format = "podcast"; format = "podcast";
} // lib.optionalAttrs (raw.title or "" != "") {
title = lib.mkDefault raw.title;
}; };
podcasts = [ podcasts = [

View File

@@ -21,6 +21,10 @@
sane.ids.freshrss.uid = 2401; sane.ids.freshrss.uid = 2401;
sane.ids.freshrss.gid = 2401; sane.ids.freshrss.gid = 2401;
sane.ids.mediawiki.uid = 2402; sane.ids.mediawiki.uid = 2402;
sane.ids.signald.uid = 2403;
sane.ids.signald.gid = 2403;
sane.ids.mautrix-signal.uid = 2404;
sane.ids.mautrix-signal.gid = 2404;
sane.ids.colin.uid = 1000; sane.ids.colin.uid = 1000;
sane.ids.guest.uid = 1100; sane.ids.guest.uid = 1100;

View File

@@ -86,6 +86,7 @@ in
"Pictures" "Pictures"
"Videos" "Videos"
".cache/nix"
".cargo" ".cargo"
".rustup" ".rustup"
]; ];

View File

@@ -125,6 +125,9 @@ in
# aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option '-mfpu=neon' # aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option '-mfpu=neon'
# make[3]: *** [../scripts/Makefile.build:289: drivers/video/fbdev/sun5i-eink-neon.o] Error 1 # make[3]: *** [../scripts/Makefile.build:289: drivers/video/fbdev/sun5i-eink-neon.o] Error 1
FB_SUN5I_EINK = no; FB_SUN5I_EINK = no;
# used by the pinephone pro, but fails to compile with:
# ../drivers/media/i2c/ov8858.c:1834:27: error: implicit declaration of function 'compat_ptr'
VIDEO_OV8858 = no;
}) })
)) ))
]; ];

View File

@@ -46,6 +46,8 @@
}]; }];
# provide access to certs # provide access to certs
# TODO: this should just be `acme`. then we also add nginx to the `acme` group.
# why is /var/lib/acme/* owned by `nginx` group??
users.users.ejabberd.extraGroups = [ "nginx" ]; users.users.ejabberd.extraGroups = [ "nginx" ];
security.acme.certs."uninsane.org".extraDomainNames = [ security.acme.certs."uninsane.org".extraDomainNames = [

View File

@@ -6,6 +6,7 @@
imports = [ imports = [
./discord-puppet.nix ./discord-puppet.nix
# ./irc.nix # ./irc.nix
./signal.nix
]; ];
sane.persist.sys.plaintext = [ sane.persist.sys.plaintext = [

View File

@@ -0,0 +1,35 @@
# config options:
# - <https://github.com/mautrix/signal/blob/master/mautrix_signal/example-config.yaml>
{ config, pkgs, ... }:
{
services.signald.enable = true;
services.mautrix-signal.enable = true;
services.mautrix-signal.environmentFile =
config.sops.secrets.mautrix_signal_env.path;
services.mautrix-signal.settings.signal.socket_path = "/run/signald/signald.sock";
services.mautrix-signal.settings.homeserver.domain = "uninsane.org";
services.mautrix-signal.settings.bridge.permissions."@colin:uninsane.org" = "admin";
services.matrix-synapse.settings.app_service_config_files = [
# auto-created by mautrix-signal service
"/var/lib/mautrix-signal/signal-registration.yaml"
];
systemd.services.mautrix-signal.serviceConfig = {
# allow communication to signald
SupplementaryGroups = [ "signald" ];
ReadWritePaths = [ "/run/signald" ];
};
sane.persist.sys.plaintext = [
{ user = "mautrix-signal"; group = "mautrix-signal"; directory = "/var/lib/mautrix-signal"; }
];
sops.secrets.mautrix_signal_env = {
sopsFile = ../../../../secrets/servo/mautrix_signal_env.bin;
format = "binary";
mode = "0440";
owner = config.users.users.mautrix-signal.name;
group = config.users.users.matrix-synapse.name;
};
}

View File

@@ -21,4 +21,10 @@
servo.root = root; servo.root = root;
}; };
}; };
com.github = rec {
# documented here: <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints>
# Github actually uses multiple keys -- one per format
root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
};
} }

View File

@@ -16,6 +16,10 @@ let
type = types.enum [ "text" "image" "podcast" ]; type = types.enum [ "text" "image" "podcast" ];
default = "text"; default = "text";
}; };
title = mkOption {
type = types.nullOr types.str;
default = null;
};
url = mkOption { url = mkOption {
type = types.str; type = types.str;
description = '' description = ''

View File

@@ -1,6 +1,7 @@
https://search.nixos.org/options?channel=unstable&query= https://search.nixos.org/options?channel=unstable&query=
https://search.nixos.org/packages?channel=unstable&query= https://search.nixos.org/packages?channel=unstable&query=
https://nixos.wiki/index.php?go=Go&search= https://nixos.wiki/index.php?go=Go&search=
https://nixos.org/manual/nix/stable/language/builtins.html
https://github.com/nixos/nixpkgs/pulls?q= https://github.com/nixos/nixpkgs/pulls?q=
https://nur.nix-community.org/ https://nur.nix-community.org/
https://nix-community.github.io/home-manager/options.html https://nix-community.github.io/home-manager/options.html

View File

@@ -12,8 +12,24 @@ rec {
# transform a list of feeds into an attrs mapping cat => [ feed0 feed1 ... ] # transform a list of feeds into an attrs mapping cat => [ feed0 feed1 ... ]
partitionByCat = feeds: builtins.groupBy (f: f.cat) feeds; partitionByCat = feeds: builtins.groupBy (f: f.cat) feeds;
xmlTag = tag: close: attrs:
let
fmt-attrs = builtins.concatStringsSep
" "
(lib.mapAttrsToList (name: value: ''${lib.escapeXML name}="${lib.escapeXML value}"'') attrs);
fmt-close = if close then "/" else "";
in
''<${tag} ${fmt-attrs} ${fmt-close}>'';
# represents a single RSS feed. # represents a single RSS feed.
opmlTerminal = feed: ''<outline xmlUrl="${feed.url}" type="rss"/>''; opmlTerminal = feed: xmlTag "outline" true (
{
xmlUrl = feed.url;
type = "rss";
} // lib.optionalAttrs (feed.title != null) {
title = feed.title;
}
);
# a list of RSS feeds. # a list of RSS feeds.
opmlTerminals = feeds: lib.concatStringsSep "\n" (builtins.map opmlTerminal feeds); opmlTerminals = feeds: lib.concatStringsSep "\n" (builtins.map opmlTerminal feeds);
# one node which packages some flat grouping of terminals. # one node which packages some flat grouping of terminals.

View File

@@ -102,7 +102,9 @@ let
gnome.gnome-terminal # works on phosh gnome.gnome-terminal # works on phosh
gnome.gnome-weather gnome.gnome-weather
{ pkg = gpodder-configured; dir = [ "gPodder/Downloads" ]; } # XXX: we preserve the whole thing because if we only preserve gPodder/Downloads
# then startup is SLOW during feed import, and we might end up with zombie eps in the dl dir.
{ pkg = gpodder-configured; dir = [ "gPodder" ]; }
gthumb gthumb
handbrake handbrake
@@ -151,7 +153,9 @@ let
# vlc remembers play position in ~/.config/vlc/vlc-qt-interface.conf # vlc remembers play position in ~/.config/vlc/vlc-qt-interface.conf
{ pkg = vlc; dir = [ ".config/vlc" ]; } { pkg = vlc; dir = [ ".config/vlc" ]; }
whalebird # pleroma client. input is broken on phosh # pleroma client (Electron). input is broken on phosh.
{ pkg = whalebird; private = [ ".config/Whalebird" ]; }
xdg-utils # for xdg-open xdg-utils # for xdg-open
xterm # broken on phosh xterm # broken on phosh
] ]

View File

@@ -4,6 +4,7 @@
./duplicity.nix ./duplicity.nix
./dyn-dns.nix ./dyn-dns.nix
./kiwix-serve.nix ./kiwix-serve.nix
./mautrix-signal.nix
./nixserve.nix ./nixserve.nix
./trust-dns.nix ./trust-dns.nix
]; ];

View File

@@ -0,0 +1,174 @@
{ config, lib, pkgs, ... }:
with lib;
let
dataDir = "/var/lib/mautrix-signal";
registrationFile = "${dataDir}/signal-registration.yaml";
cfg = config.services.mautrix-signal;
settingsFormat = pkgs.formats.json {};
settingsFile =
settingsFormat.generate "mautrix-signal-config.json" cfg.settings;
in
{
options = {
services.mautrix-signal = {
enable = mkEnableOption (lib.mdDoc "Mautrix-Signal, a Matrix-Signal puppeting bridge");
settings = mkOption rec {
apply = recursiveUpdate default;
inherit (settingsFormat) type;
default = {
# defaults based on this upstream example config:
# - <https://github.com/mautrix/signal/blob/master/mautrix_signal/example-config.yaml>
homeserver = {
address = "http://localhost:8008";
software = "standard";
# domain = "SETME";
};
appservice = rec {
address = "http://${hostname}:${toString port}";
hostname = "localhost";
port = 29328;
database = "sqlite:///${dataDir}/mautrix-signal.db";
database_opts = {};
bot_username = "signalbot";
};
bridge = {
username_template = "signal_{userid}";
permissions."*" = "relay";
double_puppet_server_map = {};
login_shared_secret_map = {};
};
logging = {
version = 1;
formatters.precise.format = "[%(levelname)s@%(name)s] %(message)s";
handlers.console = {
class = "logging.StreamHandler";
formatter = "precise";
};
# log to console/systemd instead of file
root = {
level = "INFO";
handlers = ["console"];
};
};
};
example = literalExpression ''
{
homeserver = {
address = "http://localhost:8008";
domain = "mydomain.example";
};
bridge.permissions = {
"@admin:mydomain.example" = "admin";
"mydomain.example" = "user";
};
}
'';
description = lib.mdDoc ''
{file}`config.yaml` configuration as a Nix attribute set.
Configuration options should match those described in
[example-config.yaml](https://github.com/mautrix/signale/blob/master/mautrix_signal/example-config.yaml).
'';
};
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
description = lib.mdDoc ''
File containing environment variables to be passed to the mautrix-signal service,
in which secret tokens can be specified securely by defining values for e.g.
`MAUTRIX_SIGNAL_APPSERVICE_AS_TOKEN`,
`MAUTRIX_SIGNAL_APPSERVICE_HS_TOKEN`
These environment variables can also be used to set other options by
replacing hierarchy levels by `.`, converting the name to uppercase
and prepending `MAUTRIX_SIGNAL_`.
For example, the first value above maps to
{option}`settings.appservice.as_token`.
The environment variable values can be prefixed with `json::` to have
them be parsed as JSON. For example, `login_shared_secret_map` can be
set as follows:
`MAUTRIX_SIGNAL_BRIDGE_LOGIN_SHARED_SECRET_MAP=json::{"example.com":"secret"}`.
'';
};
serviceDependencies = mkOption {
type = with types; listOf str;
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
'';
description = lib.mdDoc ''
List of Systemd services to require and wait for when starting the application service.
'';
};
};
};
config = mkIf cfg.enable {
users.groups.mautrix-signal = {};
users.users.mautrix-signal = {
group = "mautrix-signal";
isSystemUser = true;
};
systemd.services.mautrix-signal = {
description = "Mautrix-Signal, a Matrix-Signal puppeting bridge.";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ] ++ cfg.serviceDependencies;
after = [ "network-online.target" ] ++ cfg.serviceDependencies;
path = [ pkgs.ffmpeg ]; # voice messages need `ffmpeg`
# environment.HOME = dataDir;
preStart = ''
# generate the appservice's registration file if absent
if [ ! -f '${registrationFile}' ]; then
${pkgs.mautrix-signal}/bin/mautrix-signal \
--generate-registration \
--no-update \
--base-config='${pkgs.mautrix-signal}/${pkgs.mautrix-signal.pythonModule.sitePackages}/mautrix_signal/example-config.yaml' \
--config='${settingsFile}' \
--registration='${registrationFile}'
fi
'';
serviceConfig = {
Type = "simple";
Restart = "always";
User = "mautrix-signal";
ProtectSystem = "strict";
ProtectHome = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectControlGroups = true;
PrivateTmp = true;
WorkingDirectory = pkgs.mautrix-signal;
StateDirectory = baseNameOf dataDir;
UMask = "0027";
EnvironmentFile = cfg.environmentFile;
ExecStart = ''
${pkgs.mautrix-signal}/bin/mautrix-signal \
--config='${settingsFile}' \
--no-update
'';
};
};
};
}

View File

@@ -1,15 +1,14 @@
{ {
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11"; nixpkgs = {};
}; };
outputs = { self, nixpkgs }: outputs = { self, nixpkgs }@inputs:
let let
patchedPkgsFor = system: nixpkgs.legacyPackages.${system}.applyPatches { patchedPkgsFor = system: nixpkgs.legacyPackages.${system}.applyPatches {
name = "nixpkgs-patched-uninsane"; name = "nixpkgs-patched-uninsane";
src = nixpkgs; src = nixpkgs;
patches = import ./list.nix { patches = import ./list.nix {
inherit (nixpkgs.legacyPackages.${system}) fetchpatch; inherit (nixpkgs.legacyPackages.${system}) fetchpatch fetchurl;
inherit (nixpkgs.lib) fakeHash;
}; };
}; };
patchedFlakeFor = system: import "${patchedPkgsFor system}/flake.nix"; patchedFlakeFor = system: import "${patchedPkgsFor system}/flake.nix";

View File

@@ -1,4 +1,4 @@
{ fakeHash, fetchpatch }: [ { fetchpatch, fetchurl }: [
# librewolf: build with `MOZ_REQUIRE_SIGNING=false` # librewolf: build with `MOZ_REQUIRE_SIGNING=false`
(fetchpatch { (fetchpatch {
url = "https://github.com/NixOS/nixpkgs/pull/199134.diff"; url = "https://github.com/NixOS/nixpkgs/pull/199134.diff";
@@ -13,10 +13,17 @@
sha256 = "sha256-t4sG+xLDaxbJ/mV5G18N4ag8EC3IXPgtN5FJGANh1Dc="; sha256 = "sha256-t4sG+xLDaxbJ/mV5G18N4ag8EC3IXPgtN5FJGANh1Dc=";
}) })
# kiwix-tools: init at 3.4.0 # whalebird: 4.6.5 -> 4.7.4
(fetchpatch { (fetchpatch {
url = "https://github.com/NixOS/nixpkgs/pull/206254.diff"; # url = "https://git.uninsane.org/colin/nixpkgs/compare/master...pr.whalebird-4.7.4.diff";
sha256 = "sha256-Cendm7a23qj/YRBj5qVM8jhl9oTpztaDEkXcSG4dJys="; url = "https://git.uninsane.org/colin/nixpkgs/commit/f5c7c70dde720e990fa7e0748d1dc4764d6e4406.diff";
sha256 = "sha256-L9Ie80loaP6yl5ZFnJ1b5WMDpvO1QFE8tbrW5HBauko=";
})
# nixos/mx-puppet-discord: move to matrix category
(fetchurl {
url = "https://git.uninsane.org/colin/nixpkgs/commit/87c877fff84717478a96d1b0c65bd2febd350dea.diff";
sha256 = "sha256-E5TonCj3f8j7kxApBq/suNT5mB7z8uD00NzI34Qh2SE=";
}) })
./2022-12-19-i2p-aarch64.patch ./2022-12-19-i2p-aarch64.patch

24
overlays/pins.nix Normal file
View File

@@ -0,0 +1,24 @@
(next: prev: {
inherit (next.stable)
# TODO(unpin): broken on 2023/01/14 via mtxclient dep, aarch64-only:
# error: builder for '/nix/store/gwidl0c9ksxjgx0dgwnjssix4ikq73v5-mtxclient-0.9.0.drv' failed with exit code 2;
# last 10 log lines:
# > make[2]: *** [CMakeFiles/matrix_client.dir/build.make:370: CMakeFiles/matrix_client.dir/lib/structs/events/encrypted.cpp.o] Error 1
# > In file included from /build/source/include/mtxclient/crypto/client.hpp:17,
# > from /build/source/lib/crypto/utils.cpp:17:
# > /build/source/include/mtx/identifiers.hpp:12:10: fatal error: compare: No such file or directory
# > 12 | #include <compare>
# > | ^~~~~~~~~
# > compilation terminated.
# > make[2]: *** [CMakeFiles/matrix_client.dir/build.make:132: CMakeFiles/matrix_client.dir/lib/crypto/utils.cpp.o] Error 1
# > make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/matrix_client.dir/all] Error 2
# > make: *** [Makefile:136: all] Error 2
# For full logs, run 'nix log /nix/store/gwidl0c9ksxjgx0dgwnjssix4ikq73v5-mtxclient-0.9.0.drv'.
# error: 1 dependencies of derivation '/nix/store/4i2d1qdh4x6n23h1jbcbhm8q9q2hch9a-nheko-0.11.0.drv' failed to build
# error: 1 dependencies of derivation '/nix/store/k4f7k7cvjp8rb7clhlfq3yxgs6lbfmk7-home-manager-path.drv' failed to build
# error: 1 dependencies of derivation '/nix/store/67d9k554188lh4ddl4ar6j74mpc3r4sv-home-manager-generation.drv' failed to build
# error: 1 dependencies of derivation '/nix/store/5qjxzhsw1jvh2d7jypbcam9409ivb472-user-environment.drv' failed to build
# error: 1 dependencies of derivation '/nix/store/hrb3qpdbisqh0lzlyz1g9g4164khmqwn-etc.drv' failed to build
# error: 1 dependencies of derivation '/nix/store/ny21xyicbgim5wy7ksg2hibd9gn7i01b-nixos-system-moby-23.05pre-git.drv' failed to build
nheko;
})

67
overlays/pkgs.nix Normal file
View File

@@ -0,0 +1,67 @@
(next: prev:
let
sane = rec {
#### my own, non-upstreamable packages:
sane-scripts = prev.callPackage ../pkgs/sane-scripts { };
feeds = prev.callPackage ../pkgs/feeds { };
tow-boot-pinephone = prev.callPackage ../pkgs/tow-boot-pinephone { };
tow-boot-rpi4 = prev.callPackage ../pkgs/tow-boot-rpi4 { };
bootpart-uefi-x86_64 = prev.callPackage ../pkgs/bootpart-uefi-x86_64 { };
bootpart-tow-boot-rpi-aarch64 = prev.callPackage ../pkgs/bootpart-tow-boot-rpi-aarch64 {
# not sure why i can't just do `next.callPackage` instead
inherit tow-boot-rpi4;
};
bootpart-u-boot-rpi-aarch64 = prev.callPackage ../pkgs/bootpart-u-boot-rpi-aarch64 {
# not sure why i can't just do `next.callPackage` instead
inherit ubootRaspberryPi4_64bit;
};
rtl8723cs-firmware = prev.callPackage ../pkgs/rtl8723cs-firmware { };
linux-megous = prev.callPackage ../pkgs/linux-megous {
kernelPatches = [
prev.kernelPatches.bridge_stp_helper
prev.kernelPatches.request_key_helper
];
};
sublime-music-mobile = prev.callPackage ../pkgs/sublime-music-mobile { };
#### customized packages
fluffychat-moby = prev.callPackage ../pkgs/fluffychat-moby { };
gpodder-configured = prev.callPackage ../pkgs/gpodder-configured { };
# nixos-unstable pleroma is too far out-of-date for our db
pleroma = prev.callPackage ../pkgs/pleroma { };
# jackett doesn't allow customization of the bind address: this will probably always be here.
jackett = prev.callPackage ../pkgs/jackett { inherit (prev) jackett; };
# mozilla keeps nerfing itself and removing configuration options
firefox-unwrapped = prev.callPackage ../pkgs/firefox-unwrapped { };
# patch rpi uboot with something that fixes USB HDD boot
ubootRaspberryPi4_64bit = prev.callPackage ../pkgs/ubootRaspberryPi4_64bit { };
gocryptfs = prev.callPackage ../pkgs/gocryptfs { inherit (prev) gocryptfs; };
browserpass = prev.callPackage ../pkgs/browserpass { inherit (prev) browserpass; inherit sane-scripts; };
fractal-latest = prev.callPackage ../pkgs/fractal-latest { };
#### TEMPORARY: PACKAGES WAITING TO BE UPSTREAMED
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(py-final: py-prev: {
feedsearch-crawler = py-final.callPackage ../pkgs/feedsearch-crawler { };
})
];
kaiteki = prev.callPackage ../pkgs/kaiteki { };
lightdm-mobile-greeter = prev.callPackage ../pkgs/lightdm-mobile-greeter { };
browserpass-extension = prev.callPackage ../pkgs/browserpass-extension { };
gopass-native-messaging-host = prev.callPackage ../pkgs/gopass-native-messaging-host { };
tokodon = prev.libsForQt5.callPackage ../pkgs/tokodon { };
signaldctl = prev.callPackage ../pkgs/signaldctl { };
splatmoji = prev.callPackage ../pkgs/splatmoji { };
# trust-dns = prev.callPackage ../pkgs/trust-dns { };
# kaiteki = prev.kaiteki;
};
in sane // { inherit sane; }
)

View File

@@ -35,7 +35,7 @@
# but in a way where the least could go wrong. # but in a way where the least could go wrong.
pushd "$sources_dir"; mkdir -p "$name"; popd pushd "$sources_dir"; mkdir -p "$name"; popd
${./update.sh} "$url" "$json_path" ${./update.py} "$url" "$json_path"
cat "$json_path" cat "$json_path"
''; '';
} }

View File

@@ -14,10 +14,7 @@ stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
inherit url; inherit url;
}; };
passthru.updateScript = [ ./update.sh url jsonPath ]; passthru.updateScript = [ ./update.py url jsonPath ];
# passthru.updateScript = callPackage ./update.nix {
# inherit url jsonPath;
# };
meta = { meta = {
description = "metadata about any feeds available at ${feedName}"; description = "metadata about any feeds available at ${feedName}";
homepage = feedName; homepage = feedName;

View File

@@ -1,18 +0,0 @@
{ lib
, curl
, jq
, runtimeShell
, writeScript
# feed-specific args
, jsonPath
, url
}:
let
apiQuery = "https://feedsearch.dev/api/v1/search?url=${url}";
in
writeScript "update-feed" ''
#!${runtimeShell}
PATH=${lib.makeBinPath [ curl jq ]}
curl -X GET '${apiQuery}' | jq '.[-1]' > '${jsonPath}'
''

24
pkgs/feeds/update.py Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.feedsearch-crawler ])"
from feedsearch_crawler import search, sort_urls
from feedsearch_crawler.crawler import coerce_url
import json
import sys
url, jsonPath = sys.argv[1:]
url = coerce_url(url, default_scheme="https")
items = search(url)
items = sort_urls(items)
# print all results
serialized = [item.serialize() for item in items]
for item in serialized:
print(json.dumps(item, sort_keys=True, indent=2))
# save the first result to disk
keep = serialized[0] if serialized else {}
results = json.dumps(keep, sort_keys=True, indent=2)
with open(jsonPath, "w") as out:
out.write(results)

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq
set -xeu -o pipefail
url="$1"
jsonPath="$2"
apiQuery="https://feedsearch.dev/api/v1/search?url=$url"
curl -X GET "$apiQuery" | jq '.[0]' > "$jsonPath"

View File

@@ -0,0 +1,65 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
# nativeBuildInputs python packages
, poetry-core
# propagatedBuildInputs python packages
, aiodns
, aiohttp
, beautifulsoup4
, brotlipy
, cchardet
, feedparser
, python-dateutil
, uvloop
, w3lib
, yarl
}:
buildPythonPackage rec {
pname = "feedsearch-crawler";
version = "2022-05-28";
format = "pyproject";
src = fetchFromGitHub {
owner = "DBeath";
repo = "feedsearch-crawler";
rev = "f49a6f5a07e796e359c4482fd29305b1a019f71f";
hash = "sha256-pzvyeXzqdi8pRjk2+QjKhJfgtxbgVT6C08K9fhVFVmY=";
};
nativeBuildInputs = [
poetry-core
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'w3lib = "^1.22.0"' 'w3lib = "*"' \
--replace 'aiodns = "^2.0.0"' 'aiodns = "*"' \
--replace 'uvloop = "^0.15.2"' 'uvloop = "*"'
'';
propagatedBuildInputs = [
aiodns
aiohttp
beautifulsoup4
brotlipy
cchardet
feedparser
python-dateutil
uvloop
w3lib
yarl
];
pythonImportsCheck = [
"feedsearch_crawler"
];
meta = with lib; {
homepage = "https://feedsearch.dev";
description = "Crawl sites for RSS, Atom, and JSON feeds";
license = licenses.mit;
maintainers = with maintainers; [ colinsane ];
};
}

View File

@@ -1,22 +1,28 @@
{ makeWrapper { makeWrapper
, gpodder , gpodder
, linkFarm
, symlinkJoin , symlinkJoin
, writeShellScript
, config
}: }:
let
remove-extra = linkFarm "gpodder-remove-extra" [
{ name = "bin/gpodder-remove-extra"; path = ./remove_extra.py; }
];
in
# we use a symlinkJoin so that we can inherit the .desktop and icon files from the original gPodder
(symlinkJoin { (symlinkJoin {
name = "gpodder-configured"; name = "gpodder-configured";
paths = [ gpodder ]; paths = [ gpodder remove-extra ];
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];
# gpodder keeps all its feeds in a sqlite3 database. # gpodder keeps all its feeds in a sqlite3 database.
# we can configure the feeds externally by wrapping gpodder and just instructing it to import # we can configure the feeds externally by wrapping gpodder and just instructing it to import
# a feedlist every time we run it. # a feedlist every time we run it.
# repeat imports are deduplicated -- assuming network access (not sure how it behaves when disconnected). # repeat imports are deduplicated by url, even when offline.
postBuild = '' postBuild = ''
makeWrapper $out/bin/gpodder $out/bin/gpodder-configured \ makeWrapper $out/bin/gpodder $out/bin/gpodder-configured \
--run "$out/bin/gpo import ~/.config/gpodderFeeds.opml" --run "$out/bin/gpodder-remove-extra ~/.config/gpodderFeeds.opml" \
--run "$out/bin/gpo import ~/.config/gpodderFeeds.opml" \
# fix up the .desktop file to invoke our wrapped application # fix up the .desktop file to invoke our wrapped application
orig_desktop=$(readlink $out/share/applications/gpodder.desktop) orig_desktop=$(readlink $out/share/applications/gpodder.desktop)

View File

@@ -0,0 +1,79 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [gnome-feeds.listparser])" -p gpodder
from dataclasses import dataclass, field
import listparser
import subprocess
import sys
@dataclass(repr=True)
class Feed:
url: str
title: str # Optional
def __init__(self, url: str, title: str):
self.url = url
self.title = title if title else None
def __eq__(self, other: 'Feed') -> bool:
return self.url == other.url and \
(self.title == other.title or None in [self.title, other.title])
@dataclass(init=True)
class Partitioned:
has_not_wanted: list[Feed] = field(default_factory=list)
wanted_not_has: list[Feed] = field(default_factory=list)
intersection: list[Feed] = field(default_factory=list)
def wanted_feeds(opml_file: str):
parsed = listparser.parse(open(opml_file).read())
return [Feed(url=p['url'], title=p['title']) for p in parsed.feeds]
def has_feeds():
listing = subprocess.check_output(["gpo", "list"]).decode()
feeds = []
title = None
for line in listing.split("\n"):
if line.startswith("# "): # title
title = line[2:].strip()
elif line.startswith("http"): # feed URL:
feeds.append(Feed(url=line, title=title))
title = None
return feeds
def partition_feeds(wanted: list[Feed], has: list[Feed]) -> Partitioned:
p = Partitioned()
for f in wanted + has:
w, h = f in wanted, f in has
if h and not w:
p.has_not_wanted.append(f)
elif w and not h:
p.wanted_not_has.append(f)
else:
assert w and h
p.intersection.append(f)
return p
def remove_feed(feed: Feed):
subprocess.check_output(['gpo', 'unsubscribe', feed.url])
def rationalize_feeds(opml_file: str):
wanted = wanted_feeds(opml_file)
has = has_feeds()
partitioned = partition_feeds(wanted, has)
print("extra feeds:", "" if partitioned.has_not_wanted else "(none)")
for f in partitioned.has_not_wanted:
print(" ", f)
print()
for f in partitioned.has_not_wanted:
remove_feed(f)
if __name__ == "__main__":
wanted_opml, = sys.argv[1:]
rationalize_feeds(wanted_opml)

View File

@@ -5,7 +5,7 @@ with lib;
let let
base = "6.1.0"; base = "6.1.0";
# set to empty if not a release candidate # set to empty if not a release candidate
rc = "-rc7"; rc = "-rc8";
in buildLinux (args // rec { in buildLinux (args // rec {
version = base + rc; version = base + rc;
@@ -16,9 +16,15 @@ in buildLinux (args // rec {
extraMeta.branch = versions.majorMinor version; extraMeta.branch = versions.majorMinor version;
src = fetchFromGitHub { src = fetchFromGitHub {
# HOW TO UPDATE:
# - `git fetch` from megous' github.
# - there should be some new tag, like `orange-pi-6.1-blah`. use that.
# - megi publishes release notes as the most recent commit on any stable branch, so just `git log`.
# - orange-pi is listed as the "main integration branch".
# - specific branches like `pp` (pinephone) are dev branches, and probably less stable.
owner = "megous"; owner = "megous";
repo = "linux"; repo = "linux";
rev = "orange-pi-6.1-20221128-1027"; rev = "orange-pi-6.1-20221211-1046";
hash = "sha256-kEujs4v5rPHPYy4YLyEWHa1Bu0sxoXLgSvmOH9QPWos="; hash = "sha256-TgFXH8bHWHs26rlf7a/zNO9zubFazC8Ie6J1gj4gLgw=";
}; };
} // (args.argsOverride or { })) } // (args.argsOverride or { }))

View File

@@ -1,60 +0,0 @@
(next: prev:
let
sane = rec {
#### my own, non-upstreamable packages:
sane-scripts = prev.callPackage ./sane-scripts { };
feeds = prev.callPackage ./feeds { };
tow-boot-pinephone = prev.callPackage ./tow-boot-pinephone { };
tow-boot-rpi4 = prev.callPackage ./tow-boot-rpi4 { };
bootpart-uefi-x86_64 = prev.callPackage ./bootpart-uefi-x86_64 { };
bootpart-tow-boot-rpi-aarch64 = prev.callPackage ./bootpart-tow-boot-rpi-aarch64 {
# not sure why i can't just do `next.callPackage` instead
inherit tow-boot-rpi4;
};
bootpart-u-boot-rpi-aarch64 = prev.callPackage ./bootpart-u-boot-rpi-aarch64 {
# not sure why i can't just do `next.callPackage` instead
inherit ubootRaspberryPi4_64bit;
};
rtl8723cs-firmware = prev.callPackage ./rtl8723cs-firmware { };
linux-megous = prev.callPackage ./linux-megous {
kernelPatches = [
prev.kernelPatches.bridge_stp_helper
prev.kernelPatches.request_key_helper
];
};
sublime-music-mobile = prev.callPackage ./sublime-music-mobile { };
#### customized packages
fluffychat-moby = prev.callPackage ./fluffychat-moby { };
gpodder-configured = prev.callPackage ./gpodder-configured { };
# nixos-unstable pleroma is too far out-of-date for our db
pleroma = prev.callPackage ./pleroma { };
# jackett doesn't allow customization of the bind address: this will probably always be here.
jackett = prev.callPackage ./jackett { inherit (prev) jackett; };
# mozilla keeps nerfing itself and removing configuration options
firefox-unwrapped = prev.callPackage ./firefox-unwrapped { };
# patch rpi uboot with something that fixes USB HDD boot
ubootRaspberryPi4_64bit = prev.callPackage ./ubootRaspberryPi4_64bit { };
gocryptfs = prev.callPackage ./gocryptfs { inherit (prev) gocryptfs; };
browserpass = prev.callPackage ./browserpass { inherit (prev) browserpass; inherit sane-scripts; };
fractal-latest = prev.callPackage ./fractal-latest { };
#### TEMPORARY: PACKAGES WAITING TO BE UPSTREAMED
kaiteki = prev.callPackage ./kaiteki { };
lightdm-mobile-greeter = prev.callPackage ./lightdm-mobile-greeter { };
browserpass-extension = prev.callPackage ./browserpass-extension { };
gopass-native-messaging-host = prev.callPackage ./gopass-native-messaging-host { };
tokodon = prev.libsForQt5.callPackage ./tokodon { };
signaldctl = prev.callPackage ./signaldctl { };
splatmoji = prev.callPackage ./splatmoji { };
# trust-dns = prev.callPackage ./trust-dns { };
# kaiteki = prev.kaiteki;
};
in sane // { inherit sane; }
)

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.natsort ps.requests ])"
""" """
usage: sane-bt-search <query_string> usage: sane-bt-search <query_string>
@@ -67,5 +68,6 @@ q = " ".join(sys.argv[1:])
client = Client() client = Client()
res = client.query(q) res = client.query(q)
print(f"found {len(res)} result(s)")
for r in res[:5]: for r in res[:5]:
print(r) print(r)

View File

@@ -0,0 +1,32 @@
{
"data": "ENC[AES256_GCM,data:5n4FNKyblSOQCC17LmLNfF49+z6ZxX9bAv/xTsyQTR+NglhEtUa+JFziu2Il0w2pscAO37sBvE9SvsM9jNG0v4GxlxlLrgEuam6Tf7Ch71lDdxDXJWMTR032WqMF7q6rYbflw8D4fkpQ9yDbgDJUErrds1JvbNhcv6oqoJ/TuhiQZLakNTprtRkw4gCDJDsyDakhv440EK80o/O1CnO+xnSmBj6mLxljQ0EeFzwhjVr1UlhWJ4wQC8TNAAvYN5gILYP0U11kROI=,iv:JZougqWF29K9mDE0kwe03FGad1CglSlxQt5xM9l7wK8=,tag:DQXUPqMvvnqP2kyYikI2ZQ==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1tnl4jfgacwkargzeqnhzernw29xx8mkv73xh6ufdyde6q7859slsnzf24x",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2M01sL1JsODFvVWRHOVZX\nTk1wQlRkclFVZnlKK2lBOUQ1M053SUZxUVYwCjVkVmoxdkRvd3YvQmxvMmd6Ly9k\nWlZGc3M1Yi9lZ3ZRUFJiYWNlRjZ6M2cKLS0tIElTRnplV25wTmFkSVU1clRNa0NZ\nNW5IaDJWYVNCdDNhYTFSU0J6RUJQN28K4XJGpANIuIfHZuk4cinpsPeZ8mMI2jBH\nT2JGyRNm9Jyr3muV8oC/I22fAKLev8f9Svc+o/VAO4R6ZTWmTwk+dA==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1j2pqnl8j0krdzk6npe93s4nnqrzwx978qrc0u570gzlamqpnje9sc8le2g",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkQnpqLy83eW9HaExkYWxL\nMHRKY3FsemZQcmVwVWx0a0YvRCtCclZrT1ZRCjJ6UVVjSm85TnVTaHFMRlg0YkNa\nOEQ4eUNyV0lEalVXbi9TVDZLUEVvaXcKLS0tICtvaHhHdmRIY2NNTFBZZ2taS0lX\nak45eW5oT2tIWVNRNmkxbUQ5K2lublUKkLfW5vRfjTpfTOeirLXRik9SJDm92pUX\nXcv9L5klKUb0O3+T0pwb9rYFfhk4eGSxS6ZFQnGrLv0lLTRZq6eocw==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1z8fauff34cdecr6sjkre260luzxcca05kpcwvhx988d306tpcejsp63znu",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhM25NNlRaNDJYZlJkMjVh\nelZPekdjSHJ4ZnZEbnBCZGV4OVN2RVJCOHpNCnVFWFBNTkd4SkJ0SkdvcUdYUzRF\ncnpPUUQyWEpMU0FqQyszTXp0ZFhQeFkKLS0tIDFua2dscEtxQmdUTm14OWlqMjBI\nSXY5cTJEajd3WmNMNlB1eGtQN3RHUEEK3+zoziFJq/rzpnz8ROL5oGqnHUpJTXG8\nhCQEIOA6dO6PjoXUKd6B8bVPzlDLO5daPh0TS5NGiMlZ8qQe706Syw==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1tzlyex2z6t88tg9h82943e39shxhmqeyr7ywhlwpdjmyqsndv3qq27x0rf",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByc1EzcmVzeHYyTkQ3N2Uw\nTERtdENyeGNONVpjU0FKRE1wR0RlSnhNUjM0ClU4MGwvQjFhM2xXYkNITjFMUHdF\naU50YWVjU08zWXhweXVOWU13enpMQlUKLS0tIDdIRm5GV2IxU1AxcFZldDBBeTBt\nZnRJV25IbGo5R1RySmx4ampnNzdYU0EK7PF9BEGfX6T+1Wit9MG+02sGZTXRUR0M\noVC+oHsCAojhnMP17xyDosnJQqwrNKFwKMQbH7mqBW5Ku4hGy56cGQ==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2023-01-16T11:17:12Z",
"mac": "ENC[AES256_GCM,data:SqOusB8Hd713NYDOkRq2Ju6q4ClN0zOeeCTCAAv+EorKHN7vgz15LuCNWj7iLX4EWrWufzHhG7JFtm6q5h64hxlfzisx3JCtMLRlb40PkDip+2gShH7X4eWcdsRw7/a40e2Qnp/hiXrhH11P1pMqbn6drUPmLy307CyRzThVrcw=,iv:gFcF4i4dqk4rOus4ZKUojD/AAkIuWzGDfqEQTej83Co=,tag:AYknOJm7QTEBR6OzN8dsiw==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.7.3"
}
}