Skip to content

Instantly share code, notes, and snippets.

View candeira's full-sized avatar

Javier Candeira candeira

View GitHub Profile
@candeira
candeira / nixos.md
Created May 16, 2020 05:47 — forked from martijnvermaat/nixos.md
Installation of NixOS with encrypted root
[kandinski@desire:~/data/work/hack/mal/impls/zigzug]$ pcre2-config --cflags
-I/nix/store/zl4d7qfqn5w0y06vnxcm9617yzfpbmmg-pcre2-10.36-dev/include
[kandinski@desire:~/data/work/hack/mal/impls/zigzug]$ pcre2-config --libs8
-L/nix/store/wz02m7d46hznxzv3wlgppz1syzs9wsmc-pcre2-10.36/lib -lpcre2-8
[kandinski@desire:~/data/work/hack/mal/impls/zigzug]$ zig test -lc -L/nix/store/wz02m7d46hznxzv3wlgppz1syzs9wsmc-pcre2-10.36/lib -lpcre2-8 -I/nix/store/zl4d7qfqn5w0y06vnxcm9617yzfpbmmg-pcre2-10.36-dev/include re.zig
warning: Unrecognized C flag from NIX_CFLAGS_COMPILE: -frandom-seed=ck69i4nqmv
(...)
All 11 tests passed.
@candeira
candeira / ubuntu-ec2-init.sh
Created June 27, 2021 01:08 — forked from ned2/ubuntu-ec2-init.sh
A Bash script for initialising a clean Ubuntu installation and user account with a pyenv-based workflow.
#!/usr/bin/env bash
# Author: Ned Letcher
#
# This bash script is designed to configure a clean Ubuntu installation (eg new
# EC2 instance) with a somewhat opionated set of packages and tools for working
# on Python projects. In addition to installing a range of packages for dev
# work, it installs pyenv for the current user, overwriting the current .profile
# and modifying the existing .bashrc to make sure pyenv is configured correctly.
@candeira
candeira / direnvrc
Created August 9, 2021 23:00
layout_poetry for direnv
# Layout Poetry originally from
# https://github.com/direnv/direnv/issues/592
layout_poetry() {
if [[ ! -f pyproject.toml ]]; then
log_error 'No pyproject.toml found. Use `poetry new` or `poetry init` to cr
exit 2
fi
local VENV=$(poetry env list --full-path | cut -d' ' -f1)
@candeira
candeira / README
Created July 6, 2022 07:51 — forked from jmatsushita/README
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
# Inspired by https://github.com/malob/nixpkgs I highly recommend looking at malob's repo for a more thorough configuration
#
# Let's get started
#
# Let's install nix (at the time of writing this is version 2.5.1
curl -L https://nixos.org/nix/install | sh
# I might not have needed to, but I rebooted