Skip to content

Instantly share code, notes, and snippets.

{ config, lib, ... }:
with lib;
let
cfg = config.services.nixBinaryCacheCache;
nginxCfg = config.services.nginx;
@gauteh
gauteh / github-thread.py
Last active October 17, 2017 10:53
Open GitHub issue from Notmuch thread or Message ID
#! /usr/bin/env python
#
# Author: Gaute Hope <eg@gaute.vetsj.com> / 2017-10-08
import os, sys, os.path
import subprocess
import notmuch
import email
import email.parser
import email.policy
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 25, 2024 15:17
Hyperlinks in Terminal Emulators
@grahamc
grahamc / nixos-on-dell-9560.org
Last active December 1, 2017 22:02
NixOS on a Dell 15" 9560 with the 4K screen.
@martijnvermaat
martijnvermaat / nixos.md
Last active March 24, 2024 11:42
Installation of NixOS with encrypted root
@edolstra
edolstra / nix-ui.md
Last active February 2, 2024 23:31
Nix UI

General notes

  • nix-channel and ~/.nix-defexpr are gone. We'll use $NIX_PATH (or user environment specific overrides configured via nix set-path) to look up packages. Since $NIX_PATH supports URLs nowadays, this removes the need for channels: you can just set $NIX_PATH to e.g. https://nixos.org/channels/nixos-15.09/nixexprs.tar.xz and stay up to date automatically.

  • By default, packages are selected by attribute name, rather than the name attribute. Thus nix install hello is basically equivalent to nix-env -iA hello. The attribute name is recorded in the user environment manifest and used in upgrades. Thus (at least by default) hello won't be upgraded to helloVariant.

    @vcunat suggested making this an arbitrary Nix expression rather than an attrpath, e.g. firefox.override { enableFoo = true; }. However, such an expression would not have a key in the user environment, unlike an attrpath. Better to require an explicit flag for this.

TBD: How to deal with search path clashes.

@AndyMoreland
AndyMoreland / init.el
Created December 21, 2015 23:53
Typescript compiler error regexp for emacs M-x compile
(add-hook 'typescript-mode-hook
(lambda ()
(add-to-list 'compilation-error-regexp-alist
'("^\\([_.[:alnum:]-/]*.ts\\)(\\([[:digit:]]+\\),\\([[:digit:]]+\\)).*$" 1 2 3))))
@spaceCamel
spaceCamel / NOTES.md
Last active March 20, 2020 17:20
PulseAudio + Bluetooth Headset

After updating the configuration

nixos-rebuild switch

I had to restart the system for pulseaudio to load the bluetooth module.

pactl list should show the bluetooth module.

As I'm not using a desktop-manager I've configured the device from the command line following ArchLinux instructions

@TheBB
TheBB / loading.org
Last active June 22, 2023 11:53
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the

@jkominek
jkominek / updatestars.py
Last active March 26, 2022 15:21
Maintain a mirror of all your Github stars.
#!/usr/bin/python
#################
# NOTE
# Now at https://github.com/jkominek/updatestars
#################
import requests
import json
import re