Skip to content

Instantly share code, notes, and snippets.

💭
no space left on device

Tom Lazar tomster

💭
no space left on device
Block or report user

Report or block tomster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 4gen.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
View nixosinstallation
sgdisk -Z -n1:0:+512M -t1:EF00 -c1:EFI -n2:0:0 -t2:E800 -c2:LUKS -p /dev/nvme0n1
cryptsetup luksFormat --key-size 512 --hash sha512 --verify-passphrase /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cdisk
zpool create -o ashift=12 -o altroot=/mnt -m none -O atime=off -O relatime=on -O compression=lz4 tank /dev/mapper/cdisk # take note of hostid
zfs create -o mountpoint=none tank/root
zfs create -o mountpoint=legacy tank/root/nixos
zfs create -o mountpoint=legacy tank/home
zfs create -o compression=off -V 1G tank/swap
mkfs.vfat -F 32 -n EFI /dev/nvme0n1p1
mkswap -L SWAP /dev/zvol/tank/swap
View gist:b5b04a4808b0d663b3a5
# rofi -dump-xresources
! Enabled modi
rofi.modi: window,run,ssh
! Window opacity
rofi.opacity: 100
! Window width
rofi.width: 50
! Number of lines
rofi.lines: 15
! Number of columns
@tomster
tomster / nixbuild.yml
Last active Jul 5, 2018
Ansible playbook to build nix on FreeBSD
View nixbuild.yml
---
- hosts:
- nixhost
tasks:
- name: Ensure dependency packages are installed
pkgng:
name: "{{item}}"
state: present
with_items:
@tomster
tomster / jailhost-nix.yml
Created Jul 23, 2014
install nix inside a freebsd jail
View jailhost-nix.yml
---
- hosts: jailhost-nix
tasks:
- name: install dependencies
pkgng: name={{item}} state=present
with_items:
- curl
- perl5
- openssl
- bash
@tomster
tomster / gist:8544009
Created Jan 21, 2014
my current .gitconfig
View gist:8544009
# ~/.gitconfig
[user]
name = Tom Lazar
email = tomster@pyfidelity.com
[branch]
autosetupmerge = true
autosetuprebase = remote
[push]
default = current
@tomster
tomster / gist:7585211
Last active Jul 5, 2018
bootstrap a freebsd 9.2 host with ansible. it requires a password for the root user to be set for which it will prompt you (-k). you must use the paramiko transport to allow password based login. based on https://gist.github.com/illenseer/6390361
View gist:7585211
---
# run this with ansible-playbook -i ansible_hosts bootstrap.yml -k -c paramiko
- hosts: jails_host
gather_facts: false
remote_user: root
tasks:
- name: install pkgng
raw: "pkg_info | grep -v 'pkg-' > /dev/null ; if $? pkg_add -r pkg; rehash ; pkg2ng; echo 'WITH_PKGNG=yes' >> /etc/make.conf; echo 'packagesite: http://pkgbeta.freebsd.org/freebsd%3A9%3Ax86%3A64/latest' >> /usr/local/etc/pkg.conf; pkg update ; pkg upgrade -y"
- name: install python27
raw: "pkg install -y python27"
@tomster
tomster / buildout.cfg
Created Feb 22, 2012
sample buildout for working on and developing Kotti & deform
View buildout.cfg
[buildout]
extensions = mr.developer
parts = debug
auto-checkout = *
repo = pyfidelity
[sources]
Kotti = git git@github.com:pyfidelity/Kotti.git
deform = git git@github.com:pyfidelity/deform.git
deform_bootstrap = git git@github.com:pyfidelity/deform_bootstrap.git
@tomster
tomster / .gitconfig
Created Sep 25, 2011
An example git configuration including convenience aliases, some saner default behavior, a neat shell prompt and tab completion that can display the name of the tracking remote
View .gitconfig
# ~/.gitconfig
[branch]
autosetupmerge = true
[push]
default = current
[core]
excludesfile = .gitignore
@tomster
tomster / git-dropbox
Created Jan 1, 2011
Create a symlink of the current .git inside your Dropbox, now all your local commits will automatically be backed up to Dropbox (without your dropbox being littered with development cruft, like temporary build files)
View git-dropbox
#!/usr/bin/env python
# encoding: utf-8
""" Create a symlink of the current .git inside your Dropbox, now all your
local commits will automatically be backed up to Dropbox (without your dropbox
being littered with development cruft, like temporary build files)
"""
from os import getcwd, path, mkdir, symlink, chdir
You can’t perform that action at this time.