Skip to content

Instantly share code, notes, and snippets.

View washort's full-sized avatar

Allen Short washort

View GitHub Profile
{ config, lib, pkgs, ... }:
{
users.users.matrix-appservice-irc.extraGroups = [ "matrix-synapse" ];
systemd.services.matrix-appservice-irc.serviceConfig.SystemCallFilter =
[ "@chown" ];
services.matrix-appservice-irc = {
enable = true;
needBindingCap = true;
registrationUrl = "http://127.0.0.1:8009";
{ config, lib, pkgs, ... }:
let
domain = config.private.domain;
vpn-address = config.private.hosts.${config.networking.hostName}.vpn-address;
ldap_base_dn = builtins.concatStringsSep ","
(builtins.map (s: "dc=" + s) (lib.splitString "." domain));
in {
age.secrets = {
lldap-admin-password = {
file = ../secrets/lldap-admin-password;
{ pkgs ? import <nixpkgs> {} }:
pkgs.emacs26WithPackages (epkgs: (with epkgs.melpaPackages; [
ivy
epkgs.orgPackages.org
org-sync
bind-key
counsel
flycheck
magit
@washort
washort / build.mt
Last active December 13, 2019 04:41
import "lib/codec/utf8" =~ [=> UTF8]
import "buda" =~ [=> makeBuda, => rulesFromMap, => which]
exports (main)
def main(_argv, => makeProcess, => currentProcess, => makeFileResource, => stdio) as DeepFrozen:
#find `monte` and `emacs` if they weren't specified as env vars
def [
(b`MONTE`) => var MONTE := null,
(b`EMACS`) => var EMACS := null,
@washort
washort / buda.mt
Created November 10, 2019 23:08
build system thoughts
import "lib/codec/utf8" =~ [=> UTF8]
import "lib/streams" =~ [=> Sink]
exports (main)
def partialFlow(source, sink) :Vow[Void] as DeepFrozen:
"Flow all packets from `source` to `sink`, like flow(), but don't tell the sink we're done."
if (Ref.isBroken(sink)):
return sink
if (Ref.isBroken(source)):
return source
{
jose = {
buildTool = "mix";
deps = [
"base64url"
];
fetchHex = {
sha256 = "7946d1e5c03a76ac9ef42a6e6a20001d35987afd68c2107bcd8f01a84e75aa73";
url = "https://repo.hex.pm/tarballs/jose-1.8.4.tar";
};
@washort
washort / bitwarden-web.nix
Created February 9, 2019 04:35
bitwarden-web.nix
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name= "bitwarden-web-${version}";
version = "2.8.0d";
src = fetchurl {
url = "https://github.com/dani-garcia/bw_web_builds/releases/download/v${version}/bw_web_v${version}.tar.gz";
sha256 = "042hdwyn1shf973f1d8zyvslrny87pq2n78xryrb1mqg2806s6fz";
};
diff -Nru .cargo-orig/config .cargo/config
--- a/.cargo/config 1969-12-31 18:00:00.000000000 -0600
+++ b/.cargo/config 2019-02-04 22:55:37.237658171 -0600
@@ -0,0 +1,17 @@
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source."https://github.com/dani-garcia/msgpack-rust"]
+git = "https://github.com/dani-garcia/msgpack-rust"
+branch = "master"
@washort
washort / 21.txt
Last active February 2, 2019 17:06
testCapn intermittent failures
rr: Saving execution to trace directory `/home/washort/.local/share/rr/mt-typhon-21'.
Taking initial turn in script...
TRACE: time 1549074526.559192 vat pa
~ "Loader args: [\"run\", \"capn/testCapn\"]"
TRACE: time 1549074526.559356 vat pa
~ "Loading capn/testCapn"rr: Saving execution to trace directory `/home/washort/.local/share/rr/mt-typhon-21'.
completed/running/errors/total: 0/0/0/0 Last source: null Last test: nullTRACTaking initial turn in script...
E: time 1549074532.254664 vat pa
~ TRACE: time 1549074526.559192 vat pa
[nix-shell:~/Projects/typhon]$ while rr record -h python main.py -l mast loader run capn/testCapn; do :; done
rr: Saving execution to trace directory `/home/washort/.local/share/rr/python-36'.
[version:WARNING] Errors getting Mercurial information: Not running from a Mercurial repository!
Traceback (most recent call last):
File "/nix/store/0a5xzivfxv5zz4dfjdr05kcyr9kpaw90-pypy6.0-macropy-1.0.4/site-packages/macropy/core/import_hooks.py", line 76, in find_module
macropy.exporter.export_transformed(code, tree, module_name, file.name)
File "/nix/store/0a5xzivfxv5zz4dfjdr05kcyr9kpaw90-pypy6.0-macropy-1.0.4/site-packages/macropy/core/exporters.py", line 30, in export_transformed
with open(new_path, "w") as f:
IOError: [Errno 2] No such file or directory: 'typhon/exported/objects/files.py'