Skip to content

Instantly share code, notes, and snippets.

@bratorange
bratorange / state.sh
Created November 19, 2024 13:11
Simple script to concatenate the state of a git repo into a single file. Usefull for uploading your source code to chatbots.
#!/bin/bash
# Usage:
# $cd $your_repo
# $state.sh
# Project state has been saved to project_state.txt
# Name of this script
script_name=$(basename "$0")
@bratorange
bratorange / nix_env_unstable_guide.md
Last active July 8, 2024 13:49
Adding the nix unstable channel

Using the nipkgs unstable channel

Motivation

There a times when you need to build something from the nix unstable channel. For example the master contains a new package you need, but the next nixpkgs release is somewhere in the future, and you need this package now. In this guide I want to show how to install packages from unstable by using nix-env. Furthermore I hope to give a basic understanding of the channels concept.

What are nix channels?

A channel is a set of expressions which includes severall build, installation and configuration instructions for packages, services and the system itself. The repository normaly used here is nixpkgs. It is developed at https://github.com/NixOS/nixpkgs.

What is the nix unstable channel?

The unstable channel is a copy of the NixOS/nixpkgs master. It is pulled from github once in a while and will be available from a mirror under https://nixos.org/channels/nixpkgs-unstable. Since NixOS uses half-anual released stable channels, some changes (especially new f