Skip to content

Instantly share code, notes, and snippets.

@Nekroze
Nekroze / sanoid.nix
Created October 21, 2019 09:39
wip sanoid nix expression
{ stdenv, fetchFromGitHub, perl, perlPackages, openssh, pv, gzip, lzop, makeWrapper, zfstools, zfs, mbuffer, procps }:
stdenv.mkDerivation rec {
version = "2.0.1";
name = "sanoid-${version}";
#src = fetchFromGitHub {
# #rev = "v${version}";
# rev = "681820ceab202c64406e841931b5cdab22b97154";
# owner = "jimsalterjrs";
@Nekroze
Nekroze / guess-last-git-branch.sh
Created May 16, 2018 04:17
Should output the closest git branch on origin remote to the currently checked out commit
git log --pretty=format:'%d' --abbrev-commit | grep -oE "origin\/\w+(_\w+)?" | head -n 1
@Nekroze
Nekroze / Keybase.md
Created October 23, 2017 21:48
Keybase Proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@Nekroze
Nekroze / jupyter.nix
Created May 19, 2016 10:33
Jupyer Nixos Module
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.jupyter;
in
{
@Nekroze
Nekroze / README.md
Last active May 20, 2016 01:06
LDC Calypso Nix Expression

This is a description of a reproducable build environment for [ldc][1] and [ldc calypso][2]

Nix

[Nix][3] is required to produce the build environment and works on many operating systems.

While awesome [Nix][3] is still niche and a bit complex to start with but the part I like is that while it can be hard to write its pretty easy to ready and maintain [Nix expressions][4].

To execute a repoducable build run:

@Nekroze
Nekroze / kvm.nix
Last active April 3, 2022 05:36
NixOS Declarative KVM Guests
## Builder for NixOS configurations defined at the end of the file to be built into KVM VM's
{ system ? builtins.currentSystem }:
let
loadcfg = cfgfile: { config, pkgs, ...}: {
imports = [ <nixos/modules/virtualisation/qemu-vm.nix> cfgfile ];
config = {
networking.extraHosts = ''
176.32.0.254 template
'';