see ~/.nixpkgs/config.nix
using https://github.com/rycee/home-manager
mkdir -p /nix/var/nix/{profiles,gcroots}/per-user/$USER
HM_PATH=https://github.com/rycee/home-manager/archive/master.tar.gz
mkdir ~/.config/nixpkgs
cat > ~/.config/nixpkgs/home.nix <<EOF { programs.home-manager.enable = true; programs.home-manager.path = $HM_PATH; } EOF
nix-shell $HM_PATH -A install
a handful of opinionated utilities to facilitate working in a hybrid, (mostly) nix-managed development environment
source bash/nix_shortcuts.sh in bash/zsh to add e.g. these functions:
read-shortcuts <path-to-shell-script>- get overview of functions/aliases
shortcuts- print full overview from previously read scripts
create-nix-shell-skeleton- create a basic helper-enabled
shell.nixfile create-nix-flake-skeleton- create a basic helper-enabled
flake.nixfile
- loads the helper nix functions (
flake-helpers.nix) from a pinned commit of this repo - shortcuts utilities from
nix_shortcuts.sh(not printed) - shortcuts from
jsonnet_shortcuts.sh(not printed) - shortcuts from
package-jsonnet-composition.nix.sh(not printed) - source and run
echo-shortcutsfor scripts you add to theincludeScriptsarray - add the
shellHookof the flake toecho-shortcuts
the motivation behind this per-projects shell shortcuts organization is introduced here
vagrant init nixos/nixos-18.03-x86_64
vagrant plugin install vagrant-disksizeprobably skip this; the provisioner is not as reliable as directly running nixos-rebuild switch
vagrant plugin install vagrant-nixos-plugin
- enable
nixpkgs.config.allowUnfree = true; # for nixosin file:/etc/nixos/configuration.nix; for non-nixos you should set
allowUnfre = true;in file:~/.config/nixpkgs/config.nix
NIXPKGS_ALLOW_UNFREE=1 nix-env -qa | grep vscodeNIXPKGS_ALLOW_UNFREE=1 nix-env -i vscode
one-shot command: setxkbmap -option "ctrl:nocaps"
via xmodmap with mapping Alt_R to mod3
clear mod3 remove mod1 = Alt_R add mod3 = Alt_R
xfconf-query -c xsettings -p /Gtk/KeyThemeName -s Emacs
nix-shell -p alsaLib pkgconfig x11 xorg.libXrandr xorg.libXinerama xorg.libXScrnSaver --run 'xmonad --recompile'
nix-shell -p alsaLib pkgconfig x11 xorg.libXrandr xorg.libXinerama xorg.libXScrnSaver --run 'xmonad --restart'xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa xmonad
running e.g. firefox from the command line spits out a lot of warnings. in particular, theme warnings can be fixed with:
export GTK_THEME=Adwaita firefox
see linking of Emacs theme in circa file:playbook.yml::103
- link setup/nix to $HOME/.nixpkgs
- nix-env -i my-custom-nixpkgs