Skip to content

Instantly share code, notes, and snippets.

View evanjs's full-sized avatar

Evan Stoll evanjs

View GitHub Profile
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Sourcing python-recompile-bytecode-hook.sh
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
@evanjs
evanjs / linbox.sh
Created July 14, 2020 15:39
winbox script/expression for nix
#!/usr/bin/env nix-shell
#! nix-shell -p wine -i sh
wine ~/bin/winbox.exe
# non nix (dependencies) version
@evanjs
evanjs / generate.nix
Created July 7, 2020 14:23
nixos-generators helper with logic for esxi image handling, etc
{ format ? "virtualbox"
, cfgFile ? ./configuration.nix
, hubType ? "full"
, ...
}:
let
sources = import (nix/sources.nix) { };
pkgs = import (sources.nixpkgs) { };
nixos-generators = import
(pkgs.fetchFromGitHub {
{ format ? "virtualbox"
, configuration ? ./configuration.nix
, ...
}:
let
sources = import (nix/sources.nix) {};
pkgs = import (sources.nixpkgs) {};
nixos-generators = import (pkgs.fetchFromGitHub {
owner = "evanjs";
repo = "nixos-generators";
@evanjs
evanjs / patch-appliance-esxi.nix
Last active June 4, 2020 17:40
Generate ESXi-compatible virtual appliance
pkgs.runCommand "fix-appliance-esxi" {}
''
mkdir $out
mkdir ova
pushd ova
echo "Tar command: tar -xvf ${vboxImage}/*.ova"
tar -xvf ${vboxImage}/*.ova
ovf=$(ls -1 *.ovf)
@evanjs
evanjs / configuration.nix
Last active June 21, 2020 20:22
nixpkgs terraria module - add home config
{ config, lib, pkgs, ... }:
{
services.sshd.enable = true;
services.terraria = {
enable = true;
home = "/srv/terraria";
};
nixpkgs.config.allowUnfree = true;
networking.firewall.allowedTCPPorts = [ 80 ];
@evanjs
evanjs / nix build with PR head
Last active May 17, 2020 19:33
use HEAD of PR for nixpkgs and run nix build
PR="${1-77714}"
PACKAGE="${2-pillow}"
nix build -I nixpkgs="https://github.com/nixos/nixpkgs/tarball/$(curl https://api.github.com/repos/nixos/nixpkgs/pulls/$PR/commits | jq -r '.[-1]'.sha)" nixpkgs.$PACKAGE
@evanjs
evanjs / raz_off.py
Last active March 10, 2020 18:23
Disable LEDs for all connected Razer devices using openrazer
#! /usr/bin/env nix-shell
#! nix-shell -p "python37.withPackages(ps: with ps; [ openrazer ])" -p openrazer-daemon -i python3
from openrazer.client import DeviceManager
from openrazer.client import constants as razer_constants
device_manager = DeviceManager()
device_manager.sync_effects = False
print(f"Found {len(device_manager.devices)} devices")
@evanjs
evanjs / postman-7.6.0
Created September 5, 2019 01:59
build output for postman-7.6.0
copying path '/nix/store/k0yyx362pj2vzdqsz4vg28ajqqixb35r-mirrors-list' from 'https://cache.nixos.org'...
copying path '/nix/store/50yg4m5g8hhyk5hsgyn9f5ls6fap5lzi-nghttp2-1.39.1' from 'https://cache.nixos.org'...
copying path '/nix/store/0acqnzib0xlk02f6qy5mnbd8zgjwh3i7-stdenv-linux' from 'https://cache.nixos.org'...
copying path '/nix/store/skr27lqknr3cl9zh6wqw2cpzbzjzwvz1-libssh2-1.9.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/1ms6b60c9vljfi00msx499g65ac8xrmd-nghttp2-1.39.1-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/plmxkhhi0c7r6vjx8571dv5g9i3c3zyy-nghttp2-1.39.1-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/1cgqrfsm6lww013p2xwxr9mga3j2wmw1-curl-7.65.3-dev' from 'https://cache.nixos.org'...
building '/nix/store/hqcyjv1bwkn7vgf5494fbdi80cvrhr0q-source.drv'...
trying https://github.com/mozilla/nixpkgs-mozilla/archive/ac8e9d7bbda8fb5e45cae20c5b7e44c52da3ac0c.tar.gz

Keybase proof

I hereby claim:

  • I am evanjs on github.
  • I am evanjs (https://keybase.io/evanjs) on keybase.
  • I have a public key whose fingerprint is 1069 1D56 8B53 2E76 7207 669B 42DE 8B2A A2D4 9DEA

To claim this, I am signing this object: