Skip to content

Instantly share code, notes, and snippets.

View cransom's full-sized avatar

Casey Ransom cransom

View GitHub Profile
nixpkgs.config.packageOverrides = pkgs: {
linux_4_1 = pkgs.linux_4_1.override {
kernelPatches = [
{ patch = /etc/nixos/mt-41.patch; name = "mt-41"; extraConfig = "I2C_DESIGNWARE_PLATFORM m"; }
{ patch = /etc/nixos/buttons-41.patch; name = "buttons-41"; }
{ patch = /etc/nixos/Add-Microsoft-Surface-Pro-3-camera-support.patch; name = "surfcam-41"; }
];
};
};

Keybase proof

I hereby claim:

  • I am cransom on github.
  • I am cransom (https://keybase.io/cransom) on keybase.
  • I have a public key ASA3C1YF14LYSGeeA_IKuzvgXm4VSJRx34toKeHHkN5nKQo

To claim this, I am signing this object:

@cransom
cransom / default.nix
Last active April 5, 2016 22:02
bundling bcc in nixos
{ pkgs
, linux
, clang
, cmake
, llvm
, bison
, flex
, iperf
, python
, llvmPackages
boot.kernelPackages = pkgs.linuxPackages_4_6;
nixpkgs.config.packageOverrides = pkgs: {
linux_4_6 = pkgs.linux_4_6.override {
kernelPatches = [
{ patch = ./linux-surfacepro3/wifi.patch; name = "wifi"; }
{ patch = ./linux-surfacepro3/change-default-console-loglevel.patch; name = "loglevel"; }
{ patch = ./linux-surfacepro3/multitouch.patch; name = "multitouch"; }
{ patch = ./linux-surfacepro3/touchscreen_multitouch_fixes1.patch; name = "touchscreen1"; }
{ patch = ./linux-surfacepro3/touchscreen_multitouch_fixes2.patch; name = "touchscreen2"; }
];
[root@router-ogre-cransom-834032d-dev-0:/etc/systemd/system/systemd-timesyncd.service.d]# status systemd-timedated
● systemd-timedated.service - Time & Date Service
Loaded: loaded (/nix/store/vhmfyv475ixsgpnar0a9qi6i3xik7rmg-systemd-229/example/systemd/system/systemd-timedated.service; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2016-06-27 18:03:18 UTC; 34min ago
Docs: man:systemd-timedated.service(8)
man:localtime(5)
http://www.freedesktop.org/wiki/Software/systemd/timedated
Process: 3146 ExecStart=/nix/store/vhmfyv475ixsgpnar0a9qi6i3xik7rmg-systemd-229/lib/systemd/systemd-timedated (code=exited, status=1/FAILURE)
Main PID: 3146 (code=exited, status=1/FAILURE)
@cransom
cransom / default.nix
Created July 28, 2016 15:10 — forked from bennofs/default.nix
Nix self/super override challenges. Solutions: https://gist.github.com/bennofs/65af82328bbd0c0e5db19d2a99070cc7
let
# Imports
nixpkgs = import <nixpkgs> {};
inherit (nixpkgs) lib;
inherit (lib) mapAttrs fix extends;
# Helpers
makeExtendable = base:
fix base // {
extend = f: makeExtendable (extends f base);
#!/usr/bin/env nix-shell
#!nix-shell -p fping -i bash
while true; do
arp -an | grep -v incomplete | cut -f2 -d" "| egrep -o '[0-9]+.[0-9]+.[0-9]+.[0-9]+' | sudo fping -C 30 -D -n -r 0 | tr -d '[]()' | awk '{ print $1, $2, $7 }' |
while read -e line; do
ts=$(echo $line | awk '{ print $1 }' | tr -d '.')000
host=$(echo $line | awk '{ print $2 }' | tr . _ )
ms=$(echo $line | awk '{ print $3 }' )
# This allows a user to run nix-shell in the tech repo and then all
# of their system dependencies will be handled. More info on NixOS:
# https://nixos.org/
# http://nixos.org/nix/manual/#sec-nix-shell
{ pkgs ? import <nixpkgs> {}
}:
(pkgs.buildFHSUserEnv {
name = "ihatevagrant";
130petit:~% journalctl -u postfix -n 100000 | grep point@nick
Oct 26 14:21:04 petit.hubns.net postfix/smtp[31416]: 54C13281639: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[108.177.9.26]:25, delay=0.49, delays=0.17/0/0.07/0.24, dsn=2.0.0, status=sent (250 2.0.0 OK 1509027664 k144si1459871oih.56 - gsmtp)
Oct 26 16:03:21 petit.hubns.net postfix/smtp[8665]: 5D29D281B30: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[108.177.9.26]:25, delay=0.28, delays=0.03/0/0.07/0.17, dsn=2.0.0, status=sent (250 2.0.0 OK 1509033801 s3si1484857oig.271 - gsmtp)
Oct 26 18:04:22 petit.hubns.net postfix/smtp[19826]: 7CC852801FC: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[2607:f8b0:4003:c13::1a]:25, delay=0.51, delays=0.26/0/0.07/0.17, dsn=2.0.0, status=sent (250 2.0.0 OK 1509041062 a53si1792824ote.217 - gsmtp)
Oct 26 22:16:18 petit.hubns.net postfix/smtp[17642]: 620F9281D50: to=<[email protected]>, orig_t