Skip to content

Instantly share code, notes, and snippets.

@manveru
manveru / configuration.nix
Last active July 26, 2020 23:41
Updating vim plugins for nix
{ pkgs }:
let plugins = pkgs.callPackage ./plugins.nix {};
in {
customRC = ''${builtins.readFile ./vimrc}'';
vam = {
knownPlugins = pkgs.vimPlugins // plugins;
pluginDictionaries = [{
names = [
"Tagbar"
"css-pretty"
class DSL < BasicObject
RUBY_VERSION = ::RUBY_VERSION
attr_reader :envs
def initialize
@envs = ::Hash.new { |h, k| h[k] = [] }
@groups = [:default]
end
@manveru
manveru / npm2nix.nix
Created June 22, 2016 13:23
use it like $(nix-build npm2nix.nix)/bin/npm2nix -i package.json -d -5 -c npm.nix
with (import <nixpkgs> {});
let
npm2nixRepo = fetchFromGitHub {
owner = "svanderburg";
repo = "npm2nix";
rev = "758b286acfb077051a17aa9579adc558deeebbd4";
sha256 = "0gmvpxvp75fqw7w7x0c1ywc1zghd1hl6iimbv4xnjwlxgh704yg6";
};
npm2nixOut = (import "${npm2nixRepo}/release.nix" {}).package."${builtins.currentSystem}".outPath;
in stdenv.mkDerivation {
source 'http://rubygems.org'
gem 'nokogiri'
source 'http://rubygems.org'
gem 'bcrypt'
{ stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation rec {
name = "tuxedo-wmi-${kernel.version}-${version}";
version = "1.5.1";
src = fetchFromGitHub {
owner = "metmayhem";
repo = "tuxedo-wmi";
rev = "a6ab8d4160b16ab75e2a820e1d69e71934017515";
@manveru
manveru / bundix.rb
Last active January 27, 2016 21:46
#!/usr/bin/env ruby
require 'bundler'
require 'json'
require 'open-uri'
require 'open3'
require 'pp'
class Bundix
VERSION = '2.0.0'
{
packageOverrides = pkgs:
let
bundlerGem = { buildRubyGem, makeWrapper, ruby, coreutils }:
buildRubyGem {
name = "bundler-1.9.10";
namePrefix = "";
sha256 = "0ygpfvk51x96a8r3jknx7vf6afabxqp8byayvkka3rqkwv0jssqs";
dontPatchShebangs = true;
postInstall = ''
xi ~/ops % nixops deploy -d trivial
webserver> Waiting for VM "nixops-0755b111-7bff-11e5-b063-02421be13bea-webserver" to power on...
webserver> VM "nixops-0755b111-7bff-11e5-b063-02421be13bea-webserver" has been successfully started.
error: command ‘['VBoxManage', 'startvm', u'nixops-0755b111-7bff-11e5-b063-02421be13bea-webserver']’ failed on machine ‘webserver’ (exit code 1)
xi ~/tmp/steamcmd % file linux32/steamcmd
linux32/steamcmd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.34, BuildID[sha1]=17188c02dec11be2af104afd625f39a2c89b54c7, not stripped
xi ~/tmp/steamcmd % linux32/steamcmd
zsh: no such file or directory: linux32/steamcmd