Skip to content

Instantly share code, notes, and snippets.

View BerriJ's full-sized avatar
🌞

Jonathan Berrisch BerriJ

🌞
  • University of Duisburg-Essen
  • Wuppertal, Germany
  • 21:48 (UTC +01:00)
View GitHub Profile
@BerriJ
BerriJ / auto-symlinking-nix-directory.md
Created January 4, 2026 19:38 — forked from mawkler/auto-symlinking-nix-directory.md
A home-manager directory that auto-creates dotfile symlinks to it in `~/.config/` based on the file structure

The function below lets you create a directory in your home-manager config that auto-creates symlinks for non-Nix dotfiles from ~/.config/ using xdg.configFile and mkOutOfStoreSymlink. This gives the following advantages:

  1. You can keep all your non-Nix dotfiles in your home-manager repo.
  2. You don't have to do home-manager switch on each dotfile change. Changes are instantly reflected.
  3. You don't need to hard-code the paths for each symlink, the linking is instead file-based. Just add the new dotfile to the directory, and you're done.

For example, if your home-manager config is in ~/nixos/ and looks like this...:

~/nixos
@BerriJ
BerriJ / app.R
Created August 28, 2019 08:13 — forked from PaulC91/app.R
return key trigger actionButton click in shiny example
library(shiny)
ui <- fluidPage(
tags$head(includeScript("returnClick.js")),
textInput("myText", "", placeholder = "Enter text then hit return", width = "100%"),
actionButton("myButton", "Go!"),
verbatimTextOutput("textOutput")
@BerriJ
BerriJ / keymap.c
Created April 22, 2019 08:43 — forked from itspngu/keymap.c
keymap.c file for DZ60 PCB / Including code to facilitate sending nonstandard keys such as those used in some European languages from ANSI boards using "Alt Codes" which would usually be entered through the numpad.
#include "dz60.h"
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
enum custom_keycodes {
KX_UMLAUT_A = SAFE_RANGE,
KX_UMLAUT_O,
KX_UMLAUT_U,
KX_UMLAUT_S,