Skip to content

Instantly share code, notes, and snippets.

#!/run/current-system/sw/bin/gawk -f
function enumerate(option, cmd, value, o) {
cmd = "nixos-option " option " 2>/dev/null"
#print cmd
value = ""
while(cmd | getline && (value == "")) {
if($0 == "Value:") {
cmd | getline value
print option " = " substr(value, 1, 50)
environment.systemPackages = with pkgs; [
(import vim.nix)
[other packages]
];
...
environment.variables.EDITOR = "${pkgs.vim_configurable.out}/bin/vim";
environment.systemPackages = with pkgs; [
...
(import pkgs/vim.nix)
...
];
...
{ stdenv, fetchurl, autoconf, automake
} :
stdenv.mkDerivation rec {
version = "4.4";
name = "hashdeep-${version}";
src = fetchurl {
url = "https://github.com/jessek/hashdeep/archive/release-${version}.tar.gz";
sha256 = "0inciwf5av0jzb5z2cp75vaw7n12s20fkjmdcr2qsy4w5as8mnnv";
#!/usr/bin/env nix-shell
#!nix-shell 16.03.nix
#!nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-16.03.tar.gz
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "fffirmware-env";
multiPkgs = pkgs: (with pkgs;
[
fffirmware-env-chrootenv:dfrank@freya:~/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x$ time make -j1 GLUON_TARGET=mpc85xx-generic GLUON_BRANCH=experimental GLUON_REGION=eu V=s
make[1]: Entering directory '/home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/openwrt'
[ -s /home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/build/gluon-opkg-key -a -s /home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/build/gluon-opkg-key.pub ] || \
( mkdir -p $(dirname /home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/build/gluon-opkg-key) && /home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/openwrt/staging_dir/host/bin/usign -G -s /home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/build/gluon-opkg-key -p /home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/build/gluon-opkg-key.pub -c "Gluon opkg key" )
rm /home/dfrank/freifunk/freifunk.nix/gluon-v2016.2.x-ffhh-0.8.x/build/mpc85xx-generic/openwrt/tmp || true
rm: cannot remove '/home/dfrank/freifunk/fr
[nix-shell:~]$ cat test.rb
required = String
case required
when String
puts "performing string checks"
when Integer
puts "performing integer checks"
else
raise "unsupported"
end
# This file has been generated by node2nix 1.5.1. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-4_x"}:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit nodejs;
#!/run/current-system/sw/bin/bash
write_line() {
sleep 0.1${RANDOM}
echo "-> $*"
echo "$*" >&99
sleep 0.1${RANDOM}
}
get_last_reply() {
sleep 1
@tokudan
tokudan / configuration.nix
Created April 6, 2018 21:04 — forked from LnL7/configuration.nix
NixOS configuration overlays
{ config, pkgs, ... }:
let
# Import unstable channel.
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# sudo nix-channel --update nixpkgs-unstable
unstable = import <nixpkgs-unstable> {};
in
{