├── .dir-locals.el ├── .editorconfig ├── .envrc ├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ └── build.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .sops.yaml ├── .stow-local-ignore ├── .yamllint ├── Makefile ├── Makefile.home-manager ├── Makefile.nixos ├── Makefile.ubuntu ├── TODO.txt ├── VERSION ├── bin └── fix-underscores ├── cachix ├── .gitignore ├── .stow-local-ignore └── cachix.dhall.enc ├── config ├── applications.nix ├── bash.nix ├── bat.nix ├── browserpass.nix ├── bugwarrior.nix ├── clis.nix ├── direnv.nix ├── dunst.nix ├── emacs │ ├── default.nix │ └── init.el ├── firefox.nix ├── fish │ ├── abbrs.nix │ ├── aliases.nix │ ├── default.nix │ ├── interactiveShellInit.fish │ └── shellInit.fish ├── fonts.nix ├── fzf.nix ├── git │ ├── aliases.nix │ ├── commit.template │ ├── config.nix │ ├── default.nix │ ├── git-pass-mapping.ini │ ├── lab.nix │ └── packages.nix ├── gpg.nix ├── htop.nix ├── jq.nix ├── keyboard.nix ├── kitty.nix ├── man.nix ├── nix.nix ├── password-store.nix ├── rebar3.nix ├── rofi.nix ├── screen-locker.nix ├── starship.nix ├── taskwarrior │ ├── default.nix │ └── on-exit-git.sh ├── xmobar │ └── xmobarrc └── xmonad │ ├── .envrc │ ├── .gitignore │ ├── Makefile │ ├── default.nix │ ├── emacs.el │ ├── matrix.png │ ├── package.yaml │ ├── skyrim.jpg │ ├── skyrim.raw │ ├── xmonad-session │ ├── xmonad.desktop │ └── xmonad.hs ├── default.nix ├── flake.lock ├── flake.nix ├── latexmkrc ├── machines ├── hacktop │ ├── .stow-local-ignore │ ├── configuration.nix │ ├── home.nix │ └── secrets │ │ ├── .stow-local-ignore │ │ └── mohacker.hashedPassword.enc ├── nixps │ ├── .stow-local-ignore │ ├── configuration.nix │ ├── hardware-configuration.nix │ ├── home.nix │ └── secrets │ │ ├── .stow-local-ignore │ │ ├── bootyjams.club.enc │ │ └── yurrriq.hashedPassword.enc ├── sruxps │ ├── .stow-local-ignore │ ├── configuration.nix │ ├── hardware-configuration.nix │ ├── home.nix │ └── secrets │ │ ├── .stow-local-ignore │ │ └── bootyjams.club.enc └── yara │ └── configuration.nix ├── modules ├── bootyjams.nix ├── darwin.nix ├── location.nix ├── nix.nix ├── nixos.nix └── virtualisation.nix ├── pkgs └── development │ └── node-packages │ ├── Makefile │ ├── default.nix │ ├── node-env.nix │ ├── node-packages.json │ └── node-packages.nix ├── scripts └── format-biber.sh ├── src ├── .gitignore ├── config │ ├── applications.nw │ ├── bash.nw │ ├── bat.nw │ ├── browserpass.nw │ ├── bugwarrior.nw │ ├── clis.nw │ ├── direnv.nw │ ├── dunst.nw │ ├── emacs.tex │ ├── emacs │ │ ├── default.nw │ │ └── init.nw │ ├── firefox.nw │ ├── fish.tex │ ├── fish │ │ ├── abbrs.nw │ │ ├── aliases.nw │ │ ├── default.nw │ │ ├── interactiveShellInit.nw │ │ └── shellInit.nw │ ├── fonts.nw │ ├── fzf.nw │ ├── git.tex │ ├── git │ │ ├── aliases.nw │ │ ├── config.nw │ │ ├── default.nw │ │ ├── lab.nw │ │ └── packages.nw │ ├── gpg.nw │ ├── htop.nw │ ├── jq.nw │ ├── keyboard.nw │ ├── kitty.nw │ ├── man.nw │ ├── nix.nw │ ├── password-store.nw │ ├── rebar3.nw │ ├── rofi.nw │ ├── screen-locker.nw │ ├── starship.nw │ ├── taskwarrior.tex │ ├── taskwarrior │ │ ├── default.nw │ │ └── on-exit-git.nw │ └── xmonad │ │ └── default.nw ├── dotfiles.bib ├── dotfiles.tex ├── flake.nw ├── glossary.tex ├── machines │ ├── hacktop │ │ ├── configuration.nw │ │ └── home.nw │ ├── nixps │ │ ├── configuration.nw │ │ └── home.nw │ └── sruxps │ │ ├── configuration.nw │ │ └── home.nw ├── modules │ ├── bootyjams.nw │ ├── darwin.nw │ ├── location.nw │ ├── nix.nw │ ├── nixos.nw │ └── virtualisation.nw ├── packages.nw └── preamble.tex ├── xorg.conf.d ├── 00-keyboard.conf └── 40-touchpad.conf └── xsessions └── xmonad.desktop /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ;;; Directory Local Variables 2 | ;;; For more information see (info "(emacs) Directory Variables") 3 | 4 | ((nil 5 | (eval progn 6 | (direnv-update-environment) 7 | (rainbow-mode 1))) 8 | ("config/xmobar" 9 | (nil 10 | (mode . haskell) 11 | (eval progn 12 | (emojify-mode 1)))) 13 | ("config/xmonad" 14 | (nil 15 | (mode . interactive-haskell) 16 | (eval progn 17 | (emojify-mode 1)))) 18 | ("src" 19 | (nil 20 | (eval progn 21 | (global-emojify-mode 0) 22 | (global-emojify-mode-line-mode 0))))) 23 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [{*.el,*.enc,*.hs,*.nw}] 12 | indent_size = none 13 | 14 | [*.json] 15 | indent_size = 4 16 | 17 | [Makefile*] 18 | indent_style = tab 19 | 20 | [VERSION] 21 | insert_final_newline = false 22 | 23 | [node-packages.json] 24 | indent_size = none 25 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | machine="$(grep -l "$(hostname)" machines/*/configuration.nix | sed -E 's,machines/(.+)/configuration.nix,\1,')" 2 | export machine 3 | watch_file config/emacs/init.el 4 | use flake 5 | PATH_add bin 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.enc diff=sopsdiffer 2 | *.png filter=lfs diff=lfs merge=lfs -text 3 | pkgs/development/node-packages/*.nix linguist-generated 4 | *.jpg filter=lfs diff=lfs merge=lfs -text 5 | *.raw filter=lfs diff=lfs merge=lfs -text 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Publish PDF to site 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | - name: Install Nix 15 | uses: cachix/install-nix-action@V27 16 | with: 17 | github_access_token: ${{ secrets.GITHUB_TOKEN }} 18 | nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/tarball/master 19 | - uses: cachix/cachix-action@v14 20 | with: 21 | name: yurrriq 22 | skipPush: true 23 | - name: Build PDF 24 | run: | 25 | nix build 26 | mkdir site 27 | cp -rv result/* site/ 28 | - name: Deploy to GitHub Pages 29 | if: success() 30 | uses: crazy-max/ghaction-github-pages@v4 31 | with: 32 | target_branch: gh-pages 33 | build_dir: site 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .direnv/ 2 | /docs/ 3 | /machines/*/secrets/* 4 | !/machines/*/secrets/*.enc 5 | result* 6 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - hooks: 3 | - id: check-hooks-apply 4 | - id: check-useless-excludes 5 | repo: meta 6 | - hooks: 7 | - id: trailing-whitespace 8 | - exclude: |- 9 | (^VERSION|.*\.hashedPassword)$ 10 | id: end-of-file-fixer 11 | - files: ^.pre-commit-config.yaml$ 12 | id: check-yaml 13 | name: Check pre-commit config 14 | repo: https://github.com/pre-commit/pre-commit-hooks 15 | rev: v4.0.1 16 | - hooks: 17 | - entry: nix fmt 18 | id: treefmt 19 | language: system 20 | name: Format code with treefmt 21 | - description: Use Biber to format .bib files 22 | entry: scripts/format-biber.sh 23 | files: '.+\.bib$' 24 | id: biber-format 25 | language: script 26 | name: Format .bib files 27 | - always_run: true 28 | description: Ensure Noweb sources are up to date 29 | entry: make srcs 30 | id: make-srcs 31 | language: system 32 | name: make srcs 33 | - always_run: true 34 | description: Ensure conformance to .editorconfig 35 | entry: editorconfig-checker 36 | id: editorconfig-checker 37 | language: system 38 | name: editorconfig-checker 39 | pass_filenames: false 40 | repo: local 41 | -------------------------------------------------------------------------------- /.sops.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | creation_rules: 3 | - path_regex: .*/machines/hacktop/.*\.enc$ 4 | pgp: 2E8D082C324D5F5459CD27E755BF5D49549F04AD 5 | - path_regex: .*/machines/nixps/.*\.enc$ 6 | pgp: F88372B24A806FF23BCB3A4E2DDDF8606958B3F9 7 | - path_regex: machines/sruxps/.*\.enc$ 8 | pgp: EFD6F1EDC84D2FA935E38570462054AB8B682702 9 | - path_regex: cachix/.*\.enc$ 10 | pgp: >- 11 | 2E8D082C324D5F5459CD27E755BF5D49549F04AD, 12 | F88372B24A806FF23BCB3A4E2DDDF8606958B3F9, 13 | EFD6F1EDC84D2FA935E38570462054AB8B682702 14 | -------------------------------------------------------------------------------- /.stow-local-ignore: -------------------------------------------------------------------------------- 1 | bin 2 | cachix 3 | default.nix 4 | .direnv 5 | .dir-locals.el 6 | .editorconfig 7 | .envrc 8 | .git 9 | .gitattributes 10 | .github 11 | .gitignore 12 | latexmkrc 13 | machines 14 | Makefile 15 | Makefile.home-manager 16 | Makefile.nixos 17 | Makefile.ubuntu 18 | .pre-commit-config.yaml 19 | result 20 | scripts 21 | .sops.yaml 22 | src 23 | .stow-local-ignore 24 | TODO.txt 25 | VERSION 26 | xorg.conf.d 27 | xsessions 28 | .yamllint 29 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | extends: default 2 | 3 | rules: 4 | document-start: disable 5 | indentation: 6 | indent-sequences: false 7 | key-ordering: {} 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PATH := $(PWD)/bin:$(PATH) 2 | cpif ?= | cpif 3 | kernel_version := $(shell uname -v) 4 | 5 | 6 | ifneq (,$(findstring B,$(MAKEFLAGS))) 7 | latexmk_flags = -gg 8 | endif 9 | 10 | 11 | stow_flags := -R 12 | ifneq (,$(findstring trace,$(MAKEFLAGS))) 13 | stow_flags += -v 14 | endif 15 | stow := stow ${stow_flags} 16 | 17 | 18 | NW_SRCS := $(shell find src -name '*.nw') 19 | 20 | WEIRD_SRCS := \ 21 | default.nix \ 22 | pkgs/development/node-packages/node-packages.json 23 | SRCS := $(filter-out ${WEIRD_SRCS}, $(shell awk '/<<[^ *]+\.\w+>>=$$/{ gsub(/(<<|>>=)/, ""); print $$0 }' ${NW_SRCS} | sort -u)) 24 | NIX_SRCS := $(filter %.nix, ${SRCS}) # pkgs/development/node-packages/node-packages.nix 25 | SH_SRCS := $(filter %.sh, ${SRCS}) 26 | OTHER_SRCS := $(filter-out ${NIX_SRCS} ${SH_SRCS} ${TEX_SRCS}, ${SRCS}) 27 | TEX_SRCS := $(patsubst src/%.nw,src/%.tex,${NW_SRCS}) 28 | 29 | 30 | .PHONY: all 31 | all:: srcs docs/dotfiles.pdf 32 | 33 | 34 | .PHONY: deps 35 | deps: 36 | nix flake update --commit-lock-file 37 | 38 | 39 | .PHONY: srcs 40 | srcs: nix-srcs ${SH_SRCS} ${OTHER_SRCS} ${WEIRD_SRCS} 41 | 42 | 43 | .PHONY: nix-srcs 44 | nix-srcs: ${NIX_SRCS} 45 | 46 | 47 | .PHONY: nixpkgs-fmt 48 | nixpkgs-fmt: nix-srcs 49 | nixpkgs-fmt ${NIX_SRCS} 50 | 51 | 52 | .PHONY: tex 53 | tex: ${TEX_SRCS} 54 | 55 | 56 | .PHONY: clean 57 | clean: 58 | @ rm -f ${TEX_SRCS} src/dotfiles.nwi 59 | @ latexmk -c -f docs/dotfiles.pdf 60 | @ rm -fr docs/_minted-dotfiles 61 | 62 | 63 | .PHONY: clobber 64 | clobber: 65 | @ rm -fr docs 66 | 67 | 68 | .PHONY: install 69 | install: all clean 70 | @ cp -vr docs/* ${PREFIX} 71 | @ echo "theme: jekyll-theme-hacker" >${PREFIX}/_config.yml 72 | @ echo "[PDF](./dotfiles.pdf)" >${PREFIX}/index.md 73 | 74 | 75 | docs/%.pdf: export TZ='America/Chicago' 76 | docs/%.pdf: src/%.tex src/preamble.tex src/glossary.tex src/%.bib ${TEX_SRCS} 77 | @ mkdir -p $(@D) 78 | latexmk $(latexmk_flags) -cd -f -outdir=$(CURDIR)/$(@D) -pdf $< 79 | @ noindex src/dotfiles 80 | latexmk $(latexmk_flags) -cd -f -outdir=$(CURDIR)/$(@D) -pdf $< 81 | 82 | 83 | # .INTERMEDIATE: ${TEX_SRCS} 84 | src/%.tex: src/%.nw 85 | @ noweave -delay -latex -n -filter fix-underscores $^ ${cpif} $@ 86 | 87 | 88 | pkgs/development/node-packages/node-packages.json: src/packages.nw 89 | @ mkdir -p $(@D) 90 | @ notangle -R$@ $< ${cpif} $@ 91 | 92 | 93 | pkgs/development/node-packages/node-packages.nix: pkgs/development/node-packages/node-packages.json 94 | @ ${MAKE} -C $(@D) 95 | 96 | 97 | default.nix: src/packages.nw 98 | @ notangle -R$@ $< ${cpif} $@ 99 | 100 | 101 | ${SRCS}:: 102 | @ mkdir -p $(@D) 103 | @ notangle -R$@ src/$(basename $@).nw ${cpif} $@ 104 | 105 | 106 | ${SH_SRCS}:: 107 | chmod a+x $@ 108 | 109 | 110 | .PHONY: .stow-local-ignore 111 | .stow-local-ignore: 112 | @ ls -A1 | sed '/^\(config\|flake\.\(nix\|lock\)\|modules\|nix\|overlays\|pkgs\)$$/d' >$@ 113 | 114 | stow:: .stow-local-ignore cachix 115 | 116 | 117 | %: %.enc 118 | @ sops -d $< >${@:.enc=} 119 | 120 | 121 | .PHONY: build diff dry-build stow switch test 122 | 123 | ifneq (,$(findstring NixOS,${kernel_version})) 124 | include Makefile.nixos 125 | else 126 | include Makefile.home-manager 127 | endif 128 | 129 | ifeq (,$(findstring Ubuntu,${kernel_version})) 130 | include Makefile.ubuntu 131 | endif 132 | 133 | 134 | .PHONY: bump-version 135 | bump-version: part ?= patch 136 | bump-version: 137 | semver bump ${part} $(file VERSION 138 | 139 | 140 | .PHONY: cachix 141 | cachix: cachix/cachix.dhall 142 | @ mkdir -p ~/.config/$@ $@ 143 | @ ${stow} -t ~/.config/$@ $@ 144 | 145 | 146 | stow:: cachix 147 | -------------------------------------------------------------------------------- /Makefile.home-manager: -------------------------------------------------------------------------------- 1 | # -*- mode: makefile -*- 2 | 3 | username ?= eric 4 | 5 | build switch: 6 | @ home-manager --impure --flake .#${username} $@ 7 | 8 | diff: build 9 | @ home-manager generations | \ 10 | head -n1 | \ 11 | awk '{ print $$NF }' | \ 12 | xargs -I% nix store diff-closures % ./result 13 | 14 | # FIXME 15 | # switch: xsessions 16 | -------------------------------------------------------------------------------- /Makefile.nixos: -------------------------------------------------------------------------------- 1 | # -*- mode: makefile -*- 2 | 3 | machine ?= sruxps 4 | nixos_dir ?= /etc/nixos 5 | 6 | all:: generate-config 7 | 8 | build dry-build: stow 9 | @ nixos-rebuild --option pure-eval false $@ 10 | 11 | switch test: stow 12 | @ sudo nixos-rebuild --option pure-eval false $@ 13 | 14 | diff: build 15 | @ nix store diff-closures /run/current-system ./result 16 | 17 | .PHONY: generate-config 18 | generate-config: machines/${machine}/hardware-configuration.nix 19 | 20 | machines/${machine}/hardware-configuration.nix: 21 | nixos-generate-config --root ${PWD} --dir $(@D) 22 | nixpkgs-fmt $@ 23 | 24 | .PHONY: secrets 25 | secrets: $(patsubst %.enc,%,$(wildcard machines/${machine}/secrets/*.enc)) 26 | @ sudo mkdir -p ${nixos_dir}/$@ 27 | @ sudo ${stow} -t ${nixos_dir}/$@ -d machines/${machine} $@ 28 | 29 | stow:: secrets 30 | 31 | stow:: 32 | @ sudo mkdir -p ${nixos_dir}/$@ 33 | @ sudo ${stow} -t ${nixos_dir} . 34 | @ sudo ${stow} -t ${nixos_dir} -d machines ${machine} 35 | -------------------------------------------------------------------------------- /Makefile.ubuntu: -------------------------------------------------------------------------------- 1 | # -*- mode: makefile -*- 2 | 3 | stow:: xorg.conf.d # FIXME: xsessions 4 | 5 | xorg.conf.d: 6 | @ sudo ${stow} -t /etc/X11/$@ $@ 7 | 8 | xsessions: 9 | @ sudo ${stow} -t /usr/share/$@ $@ 10 | -------------------------------------------------------------------------------- /TODO.txt: -------------------------------------------------------------------------------- 1 | # https://gist.github.com/freizl/3246474#file-xmonad-desktop-L1 2 | 3 | setxkbmap -option "ctrl:nocaps,compose:ralt" 4 | 5 | # λ xinput list --name-only | grep -m1 Touchpad | xargs -I% xinput list --id-only '%' 6 | # 13 7 | 8 | xinput --set-prop 13 "libinput Accel Speed" 1 9 | xinput --set-prop 13 "libinput Tapping Enabled" 1 10 | 11 | sudo apt install curl git 12 | 13 | sh <(curl -L https://nixos.org/nix/install) --daemon 14 | 15 | echo "export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH}" >>~/.bashrc 16 | 17 | mkdir -p ~/.config/nix 18 | echo "experimental-features = flakes nix-command" >>~/.config/nix/nix.conf 19 | 20 | nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.11.tar.gz home-manager 21 | nix-channel --update 22 | nix-shell '' -A install 23 | 24 | rmdir ~/.local/share/applications 25 | ln -s ~/.nix-profile/share/applications ~/.local/share/ 26 | 27 | # nix profile install nixpkgs#direnv 28 | sudo apt install direnv -y 29 | 30 | direnv allow 31 | 32 | sudo snap install zoom-client 33 | 34 | # Fix/replace xbacklight 35 | 36 | # programs.ssh and/or this ~/.ssh/config 37 | # Host 10.*.*.* 38 | # LogLevel QUIET 39 | # StrictHostKeyChecking accept-new 40 | # UserKnownHostsFile /dev/null 41 | 42 | sudo apt install i3lock xmonad -y 43 | 44 | sudo hostnamectl set-hostname MSP1-LINUX-(sudo dmidecode -s system-serial-numb 45 | 46 | xrandr --output eDP-1 --scale '2' 47 | systemctl --user restart random-background.service 48 | 49 | sudo apt remove gnome-remote-desktop evince -y 50 | sudo apt autoremove -y 51 | sudo apt autoclean -y 52 | 53 | echo '{"ServerURL": "...", "Username": "...", "Secret": "'$(pass ...)'"}' | docker-credential-pass store 54 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 8.17.1 -------------------------------------------------------------------------------- /bin/fix-underscores: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env -S gawk -f 2 | 3 | /@(file|defn|use) .*/ { gsub("_", "\\_", $0); print; next } 4 | 5 | /^@.*/ { print } 6 | -------------------------------------------------------------------------------- /cachix/.gitignore: -------------------------------------------------------------------------------- 1 | cachix.dhall 2 | -------------------------------------------------------------------------------- /cachix/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .+.enc$ 3 | -------------------------------------------------------------------------------- /cachix/cachix.dhall.enc: -------------------------------------------------------------------------------- 1 | { 2 | "data": "ENC[AES256_GCM,data:VCbyOCzmzdOEIEP9SlIzox8VI9PqOhF63PoNCyRrrmCm+Lzrhi8/eDh1bnO0Zqzrr3X0PKQz/M+a0v9Sm+4qP5FvZxse7W1DMk5thP+QLMRvV6Zn9VTIo0qI0NOOt3o1XMwWw4WMOKiIiKJPPocvJs8fmAhOKoWOEA7TagRs7HWjPlmjYxMsFhYbmZJuXHD/i6jN5gWj89mmcjzBflk6PrdS3p86H7HJSYsOVt44yJrCAiHoKVadKfcEaQ5W607XaM9SV+ZpYkFnn40PJVilcoyIHmn1V74pNf36LzikzmdA6UGnIhHGS5KmCB5VHLuV1CcISjL2AIQmihqjQNRLgMNxQlurI7Ql3sP0KM51ryBLiaFCJx+eqpTQpTpx30gGPdgwYC0T+9cuFGAdPWKMQXn6iQRgs1547uT57gO/8QbPtZe0ikE3K6mqbdH9efxubtaNzS62hD8JFMODf9ETj1SYx/+hpPr9Z+QsfHf7JPiSjDwtuWO9yLVJYtpYPU6pIxbmntgqh/z2KKs0y9uxfIZpFwzzuKL+QzP/3nTigoiEHG944q0QAfgzGaJT6vN2B0bHoXBB3CYPvZpUkt8gR6bo9Toa9lPRv6RtO/Q26bp1KQIkjkPDCU7UQTVhYvF6TyG2gxbNHrEwq95O4ZYPA1uefBQmt/Ee8zWTXtCcjnneuM9BCvDIMMg+4LiuVJvjCKa/+R7JksvXtW29fnhE3bt7cT4KbUpFeMVs4ZJ2nbBRzutc0IHY9SJcuWhtZd1rs+RdyQ0mXcPu43d+5B8hPHyqduCdTrPr6eK/Ezc66LXuwme24CFxdRe21MAG/Iozr2n4lx9FlnOb2q1M+DP17Jsq0TiMR26lOkYQ7CUySdrlB7/aIA==,iv:6aWf0uC6XKX6emjYcAt5lISibDfKoSHlxJIoFilSdFM=,tag:XKHqMCgxJ5+3r8k583Hj/Q==,type:str]", 3 | "sops": { 4 | "kms": null, 5 | "gcp_kms": null, 6 | "azure_kv": null, 7 | "hc_vault": null, 8 | "lastmodified": "2021-02-14T05:31:34Z", 9 | "mac": "ENC[AES256_GCM,data:lt9It1OV9A/jLbGoAsuyr0MjGr/LREIHo0pk1DcUznZghbBawNOrivkOBA8+8LDhGoN+MASrcDlb52aPehUL+M3Tx5gwpkf8g8zh5F4jyRmFBqu4jOZqtuxbS6kXoo9tgYFB67EgZ+wwBmRWUEw4afQ9w4IYTVAsSo4k9dbaKww=,iv:ygT9k+9dgyj3ZLRyk4JCO4t74ZsNAlPeMV+Hq5t8v9Q=,tag:U3G9ika/T5YIIHpCCFPR8g==,type:str]", 10 | "pgp": [ 11 | { 12 | "created_at": "2020-03-09T05:41:26Z", 13 | "enc": "-----BEGIN PGP MESSAGE-----\n\nwcFMA9MSF/2ln3SVARAAfEnba4G1KHTWKxR2k5vZzalkD4bTlfwFkReIwgtpU8c7\nYlQvdXvMMmMTi70rUeQsHQJVSZDYxbnqIP7NGbiYUxd7JmlTzT7Fg+QuW6iSuvE8\n+lO8i0TBhi8YG5udqrG3HzrLNpfNByQdFm7X7KhEWe4EBGIGrZf0Edgr1IJku0iK\nfx5/xrj4DxkGWnZWzjau8bSxDpg33BPsCqcVJw41bHJWhJCH1XDOqZG6ll1EBKjL\n9+hLSdeb6YMIdaQzX26pVAeLSF1ATpuPxrV7EknwHXQi+jHMimk6jO16CipQMQ6z\nmhIZAY2ul4v4v2+tHPE3/1I9PxuHsfkg7vJqSXuVgzZUuGjNtiEfKZ2L2m11ohJG\nrB4vup3oisSgDtPalgRmICPnbIh+7de8Q8FvV+/qPXhm30WWK22V4BYQz87bTWWf\nTM1KmVaW7bEmEiV1rEofC7hd0W5dGfM3dvcU3HJ+mLR62zAiLzz/7TqN4sSsLU8r\nJp9Cy3cFZ3eGDGhlKiwikS5e3QH2JBOGlHYHfTohMtnB/gDUfiOZa/NN0OMldJNz\nkpN7Hrwsj5cPzDHu6thB2m+q+TV1B6NMd152s5Nj3IQ+VNV72lC9i+N/ViQB9bVs\nQcMgY3joxv99ZaKb+e5SXt+bFaFDYTI2DmS+AsbpVUKVR+V68C6SAkzEaZcpB8vS\n4AHkySwIpINvVpoH8C+SmGGTwOGaPOBZ4N3hnmDgZOJ3fRfi4MDlfQZrPcl21q1r\ntFKH5DDrYOyuVIde3WR6t6Hi/3BA8WPgQ+TuH2mkxLdEY10Wt1jG2uwH4mY3lNjh\nBa8A\n=6D/I\n-----END PGP MESSAGE-----", 14 | "fp": "2E8D082C324D5F5459CD27E755BF5D49549F04AD" 15 | }, 16 | { 17 | "created_at": "2020-03-09T05:41:26Z", 18 | "enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMAxqqD5tFz73GAQ//cYoiNlTErfoGA6vk/P5qi8LbTdGcTKuwgAwAjSJ2XC5A\nwYs6UxyAVLP4tux6asiZfPZ19pTNVPJnFkM0U8HzyvsYuI36+F7mDkA4beoNyd6B\ngXyoh62e+LUacmREYIIxNdDLRQqhdmylHyl2jE7Rlc9lxtYrqbxUdlj/uDqHK8Ss\nEDa3vFhYGhq3STv1wpe/aOAixjQajj4pxAKLEkru52OeRIYqSeUf2fhUD5eFDi7d\nNKNVg2+trgb2WWIr++jwf++d3ollGktnxuFuSE20ywIzJRa5a4PVcsMmypxNAmuV\nazfgRi+fP/iY1MGrf89O5Atl6fdiTkdaFcPk1nlEFkbEcAiPNCrANJ0LpXc4The8\nmTnOccrW2cpVc+YPMQ5lfyatQCUhrLusRgBJWWUh10i7l5cghqSPCJ5OhpvFTtGJ\nWMTUpjYxJrH0IRLVLPTHolw0E2Pll04JRwwFNoJNrh0clH9HKzc5dXenEq0OF2FY\nnBcmDjuONjE9mYIbygbmJZBbpugpHsw4UWNqkPUp7XcFH8u1FQ3VKObxFb2KDLZr\ntdWe5dzJQY6nRRfMl+gIWEQx6hwqSwzWqNEbEdiMNtVg45BjRzP1tKPpaJlBso89\nhBvfn/gbm0LaXO5kBpeYZmmAoNC749xSeM0YWb8LNJRbNsIUo2oWxFrf6+zSvSzS\nXgESo+VcD0xxcmB+STCA/cXPomBA3Mn3+Z5JEI7hXO0kD0lTPWT1g3rPEuFxIhI2\nOcShf7i3cNHieGoc8xxOyIY852gz7o+eJu3oWjTaNt+dzbLAZP9MFckotzkvDmg=\n=m9iQ\n-----END PGP MESSAGE-----\n", 19 | "fp": "F88372B24A806FF23BCB3A4E2DDDF8606958B3F9" 20 | }, 21 | { 22 | "created_at": "2020-03-09T05:41:26Z", 23 | "enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA9xqWgcQXNt5ARAAmQtbybG+t6MW0xDgIBN6oFy6RG6s7qUjDQAD8Qkq0sLU\nUgpc+z0YiBU7Pr5rwbwzPHNXc90+2n1MflLq1FPI19U0WBoaPI6N02F19RaLOJKV\nIHc5kVOoT5k2omCsJ/cXuTGvCKCbDW2jcZ3WvhpWiylt87Zey9I9rPko2AprNizz\nEQfPIAeG5hn9PtEyGB7QEwwr6NUpExpJFOUCHt4rjoEWi7el45Kk16alRYt3WMMn\nSnS+0+p4SsMiGGyiQxnmxz9k68J4KI+T3TpHDaKZKRkU9vcxpRK3VGe5xpfrGzLW\nUyrk7oRuYMP6Vp+ErFT0W+f3IzvW/0zJ3G1n9dqoOjnwvpeHa1gK3TD5l5EYwMp1\noqWmi8AGFt/5HIOcA4WKTDioWn1Xew2j3nO1yN3c40VFixkDtDB3kQem36qNIB57\nlPq8OaoClE5WP6eQY3qovP3KgwUKR+lbLoUX/1YPpbSdMgaM4nLNC2EYjUf+dodB\nXsgRMVAP4Wu+x+h0sOUsFspCCTXSxT131x/i3Y/A6eLfL0SvudHTjG+HBI+bP8Jz\nNw2Cj9eReuy3wFHV+OluuV6k1Q3u61Fkig1V8WOTMBZ1pXh0bh4/2vJPM7Bhtec3\n3GUJDIyEHgBBUJDLGZ2Kxpuwvjt87xSABxZlrMpr89at6APuvSALnNv2ESxDZmvS\nXgG9IY0Kn+i5LaC7NUUDj7AhT4RpfIYzhzjwqpBSblEtRuityAkewwXzCEZjoCpY\nTX/+M94Rr/Lh1YMxP+YCxEcQDrqt5f4wR5W/YaOQd/YHPv+MBOeK3sn54JdzKoE=\n=1qaM\n-----END PGP MESSAGE-----\n", 24 | "fp": "EFD6F1EDC84D2FA935E38570462054AB8B682702" 25 | } 26 | ], 27 | "unencrypted_suffix": "_unencrypted", 28 | "version": "3.6.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /config/applications.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | home.packages = with pkgs; ( 4 | [ 5 | clementine 6 | spotify 7 | pavucontrol 8 | slack 9 | ] 10 | ) ++ lib.optionals stdenv.isLinux ( 11 | [ 12 | qpdfview 13 | ] 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /config/bash.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | 5 | programs.bash.enable = true; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /config/bat.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | 5 | programs.bat = { 6 | enable = true; 7 | config = { 8 | map-syntax = "*.yaml.gotmpl:YAML"; 9 | pager = "less -FR"; 10 | style = "changes"; 11 | theme = "Monokai Extended"; 12 | }; 13 | }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /config/browserpass.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | 5 | home.packages = with pkgs; [ 6 | browserpass 7 | ]; 8 | 9 | programs.browserpass = { 10 | enable = true; 11 | browsers = [ "firefox" ]; 12 | }; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /config/bugwarrior.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | 5 | home.packages = with pkgs; [ 6 | bugwarrior 7 | ]; 8 | 9 | imports = [ 10 | ./password-store.nix 11 | ./taskwarrior 12 | ]; 13 | 14 | programs.taskwarrior = { 15 | config = { 16 | context.other = "jiraurl.none or -work"; 17 | context.work = "jiraurl.any or +work"; 18 | uda = { 19 | jiracreatedts = { 20 | label = "Created At"; 21 | type = "date"; 22 | }; 23 | jiradescription = { 24 | label = "Jira Description"; 25 | type = "string"; 26 | }; 27 | jiraestimate = { 28 | label = "Estimate"; 29 | type = "numeric"; 30 | }; 31 | jirafixversion = { 32 | label = "Fix Version"; 33 | type = "string"; 34 | }; 35 | jiraid = { 36 | label = "Jira Issue ID"; 37 | type = "string"; 38 | }; 39 | jiraissuetype = { 40 | label = "Issue Type"; 41 | type = "string"; 42 | }; 43 | jirastatus = { 44 | label = "Jira Status"; 45 | type = "string"; 46 | }; 47 | jirasummary = { 48 | label = "Jira Summary"; 49 | type = "string"; 50 | }; 51 | jiraurl = { 52 | label = "Jira URL"; 53 | type = "string"; 54 | }; 55 | }; 56 | }; 57 | }; 58 | 59 | xdg.configFile."bugwarrior/bugwarriorrc".text = '' 60 | [general] 61 | targets = sportradar_jira 62 | taskrc = ${config.home.homeDirectory}/.taskrc 63 | inline_links = False 64 | annotation_links = True 65 | annotation_comments = True 66 | legacy_matching = False 67 | log.level = DEBUG 68 | log.file = ${config.home.homeDirectory}/log/bugwarrior.log 69 | annotation_length = 80 70 | 71 | [sportradar_jira] 72 | service = jira 73 | jira.base_uri = https://jira.sportradar.ag 74 | jira.username = e.bailey 75 | jira.password = @oracle:eval:pass jira.sportradar.ag 76 | jira.query = ((assignee = currentUser() OR reporter = currentUser()) OR (summary ~ currentUser() OR description ~ currentUser() OR comment ~ currentUser())) AND resolution = Unresolved 77 | jira.version = 8 78 | jira.add_tags = work 79 | jira.description_template = {{jiraid}}: {{jirasummary}} 80 | ''; 81 | 82 | } 83 | -------------------------------------------------------------------------------- /config/clis.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = with pkgs; ( 4 | [ 5 | (aspellWithDicts (dicts: [ dicts.en dicts.es dicts.nb dicts.sv ])) 6 | ansifilter 7 | bind 8 | curl 9 | deadnix 10 | httpie 11 | gnutar 12 | gzip 13 | unzip 14 | clac 15 | coreutils 16 | expect 17 | gawk 18 | gnumake 19 | gnused 20 | moreutils 21 | ripgrep 22 | shellcheck 23 | shfmt 24 | tree 25 | watch 26 | xclip 27 | yq 28 | mdcat 29 | # smos 30 | nix-output-monitor 31 | nixpkgs-fmt 32 | nixpkgs-review 33 | wirelesstools 34 | ] 35 | ) ++ lib.optionals stdenv.isLinux [ 36 | libnotify 37 | lm_sensors 38 | mtr 39 | networkmanager-openconnect 40 | openconnect 41 | ]; 42 | } 43 | -------------------------------------------------------------------------------- /config/direnv.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | 5 | programs.direnv = { 6 | enable = true; 7 | enableZshIntegration = false; 8 | nix-direnv.enable = true; 9 | }; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /config/dunst.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | services.dunst = { 5 | enable = true; 6 | iconTheme = { 7 | package = pkgs.paper-icon-theme; 8 | name = "Paper"; 9 | size = "48x48"; 10 | }; 11 | settings = { 12 | global = { 13 | font = "Iosevka Custom 10"; 14 | markup = "yes"; 15 | plain_text = "no"; 16 | format = "%s\\n%b"; 17 | sort = "yes"; 18 | indicate_hidden = "yes"; 19 | alignment = "center"; 20 | bounce_freq = 0; 21 | show_age_threshold = 30; 22 | word_wrap = "yes"; 23 | ignore_newline = "no"; 24 | stack_duplicates = "yes"; 25 | hide_duplicates_count = "yes"; 26 | origin = "bottom-right"; 27 | width = "300"; 28 | height = "100"; 29 | notification_limit = 3; 30 | offset = "15x70"; 31 | shrink = "no"; 32 | transparency = 15; 33 | idle_threshold = 0; 34 | follow = "keyboard"; 35 | sticky_history = "yes"; 36 | history_length = 15; 37 | show_indicators = "no"; 38 | startup_notification = false; 39 | dmenu = "/run/current-system/sw/bin/dmenu -p dunst:"; 40 | browser = "/etc/profiles/per-user/e.bailey/bin/firefox -new-tab"; 41 | icon_position = "left"; 42 | max_icon_size = 80; 43 | frame_width = 0; 44 | frame_color = "#8EC07C"; 45 | }; 46 | shortcuts = { 47 | close = "mod4+space"; 48 | close_all = "mod4+mod1+space"; 49 | # context = "ctrl+shift+period"; 50 | history = "ctrl+grave"; 51 | }; 52 | urgency_low = { 53 | frame_color = "#3B7C87"; 54 | foreground = "#3B7C87"; 55 | background = "#2B313C"; 56 | timeout = 4; 57 | }; 58 | urgency_normal = { 59 | frame_color = "#5B8234"; 60 | foreground = "#5B8234"; 61 | background = "#2B313C"; 62 | timeout = 6; 63 | }; 64 | urgency_critical = { 65 | frame_color = "#B7472A"; 66 | foreground = "#B7472A"; 67 | background = "#191311"; 68 | timeout = 8; 69 | }; 70 | slack = { 71 | appname = "Slack"; 72 | body = "*critical*"; 73 | frame_color = "#B7472A"; 74 | foreground = "#B7472A"; 75 | background = "#191311"; 76 | urgency = "critical"; 77 | }; 78 | }; 79 | }; 80 | } 81 | -------------------------------------------------------------------------------- /config/emacs/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | 5 | home.file.".emacs.d/init.el".source = ./init.el; 6 | 7 | home.packages = with pkgs; [ 8 | graphviz 9 | noweb 10 | sqlite 11 | ]; 12 | 13 | home.sessionVariables = rec { 14 | EDITOR = ''emacsclient -nw -a \"\"''; 15 | GIT_EDITOR = EDITOR; 16 | VISUAL = ''emacsclient -cna \"\"''; 17 | }; 18 | 19 | programs.emacs = { 20 | enable = true; 21 | package = pkgs.emacsWithPackagesFromUsePackage { 22 | alwaysEnsure = true; 23 | config = ./init.el; 24 | override = epkgs: epkgs // { 25 | noweb-mode = pkgs.noweb; 26 | }; 27 | }; 28 | }; 29 | 30 | programs.fish.shellAliases = lib.mkIf (config.programs.fish.enable) rec { 31 | e = "emacsclient -na \"\""; 32 | ec = e + " -c"; 33 | et = "emacsclient -nw -a \"\""; 34 | }; 35 | 36 | services.emacs.enable = ! pkgs.stdenv.isDarwin; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /config/emacs/init.el: -------------------------------------------------------------------------------- 1 | (server-start) 2 | (setq server-window 'pop-to-buffer-same-window) 3 | (column-number-mode 1) 4 | (add-to-list 'exec-path "/run/current-system/sw/bin") 5 | (menu-bar-mode 0) 6 | (scroll-bar-mode 0) 7 | (tool-bar-mode 0) 8 | (set-face-attribute 'default t :family "Iosevka Custom" :height 110) 9 | (require 'package) 10 | (setq-default frames-only-mode t 11 | indent-tabs-mode nil 12 | package-archives nil 13 | package-enable-at-startup nil) 14 | (package-initialize) 15 | 16 | (eval-when-compile 17 | (require 'use-package)) 18 | 19 | (setq-default use-package-always-defer t 20 | use-package-always-ensure t) 21 | (let ((backup-directory (concat user-emacs-directory "backup"))) 22 | (unless (file-exists-p backup-directory) 23 | (make-directory backup-directory t)) 24 | (setq backup-directory-alist `(("" . ,backup-directory)))) 25 | 26 | (setq auto-save-default t 27 | auto-save-interval 200 28 | auto-save-timeout 20 29 | backup-by-copying t 30 | delete-by-moving-to-trash t 31 | delete-old-versions t 32 | kept-new-versions 6 33 | kept-old-versions 2 34 | make-backup-files t 35 | vc-make-backup-files t 36 | version-control t) 37 | 38 | (define-minor-mode sensitive-mode 39 | "For sensitive files like password lists. 40 | It disables backup creation and auto saving. 41 | 42 | With no argument, this command toggles the mode. 43 | Non-null prefix argument turns on the mode. 44 | Null prefix argument turns off the mode." 45 | :init-value nil 46 | :lighter" 🔒" 47 | (if (symbol-value sensitive-mode) 48 | (progn 49 | ;; disable backups 50 | (set (make-local-variable 'backup-inhibited) t) 51 | ;; disable auto-save 52 | (if auto-save-default 53 | (auto-save-mode -1))) 54 | ;; resort to default value of backup-inhibited 55 | (kill-local-variable 'backup-inhibited) 56 | ;; resort to default auto save setting 57 | (if auto-save-default 58 | (auto-save-mode 1)))) 59 | (dolist (pattern '("^\\(/dev/shm/\\|/tmp/\\)" 60 | "\\.\\(enc\\|gpg\\|hashedPassword\\)$")) 61 | (add-to-list 'auto-mode-alist (cons pattern 'sensitive-mode))) 62 | 63 | (setq custom-file "~/.emacs.d/private/local/custom.el") 64 | (load-theme 'wombat) 65 | (global-set-key (kbd "C-x C-k") 'kill-this-buffer) 66 | (global-set-key (kbd "s-u") 'revert-buffer) 67 | (use-package better-defaults) 68 | 69 | (use-package direnv 70 | :ensure t 71 | :config 72 | (direnv-mode)) 73 | 74 | (use-package dockerfile-mode) 75 | 76 | (use-package fill-column-indicator 77 | :config 78 | (setq-default fill-column 80) 79 | (global-display-fill-column-indicator-mode)) 80 | 81 | ;; (use-package frames-only-mode) 82 | 83 | (use-package kubernetes-tramp) 84 | 85 | (use-package paredit) 86 | 87 | (use-package rainbow-delimiters) 88 | (use-package rainbow-mode) 89 | (use-package elixir-mode) 90 | (use-package fish-mode) 91 | (use-package gap-mode) 92 | (use-package go-mode) 93 | (use-package haskell-mode) 94 | (use-package idris-mode) 95 | (use-package j-mode) 96 | (use-package markdown-mode) 97 | (use-package nix-mode 98 | :mode ("\\.nix\\'")) 99 | (use-package rust-mode) 100 | (use-package terraform-mode) 101 | (setq c-default-style "k&r" 102 | c-basic-offset 4 103 | emacs-lisp-mode-hook '(fci-mode 104 | paredit-mode 105 | rainbow-delimiters-mode) 106 | js-indent-level 2 107 | text-mode-hook '(text-mode-hook-identify)) 108 | 109 | (require 'org-tempo) 110 | 111 | (org-babel-do-load-languages 112 | 'org-babel-load-languages 113 | '((shell . t))) 114 | (use-package avy 115 | :demand 116 | :config 117 | (global-set-key (kbd "C-;") 'avy-goto-char) 118 | (global-set-key (kbd "C-'") 'avy-goto-char-2) 119 | (global-set-key (kbd "M-g f") 'avy-goto-line)) 120 | (use-package crux 121 | :demand 122 | :config (global-set-key (kbd "C-a") 'crux-move-beginning-of-line)) 123 | (use-package deadgrep 124 | :demand 125 | :config (global-set-key (kbd "M-s-f") #'deadgrep)) 126 | (use-package direnv) 127 | (use-package editorconfig 128 | :ensure t 129 | :config 130 | (editorconfig-mode 1)) 131 | (use-package emojify) 132 | (use-package graphviz-dot-mode 133 | :config 134 | (setq graphviz-dot-indent-width 4)) 135 | (use-package hl-todo 136 | :demand 137 | :config (global-hl-todo-mode t)) 138 | (use-package ligature 139 | :config 140 | (ligature-set-ligatures 141 | 'prog-mode 142 | '("-<<" "-<" "-<-" "<--" "<---" "<<-" "<-" "->" "->>" "-->" "--->" "->-" ">-" ">>-" 143 | "=<<" "=<" "=<=" "<==" "<<=" "<=" "=>" "=>>" "==>" "===>" "=>=" ">=" ">>=" 144 | "<->" "<-->" "<--->" "<---->" "<=>" "<==>" "<===>" "<====>" "::" ":::" "__" 145 | "<~~" "" "/>" "~~>" "==" "!=" "/=" "~=" "<>" "===" "!==" "!===" "=/=" "=!=" 146 | "<:" ":=" "*=" "*+" "<*" "<*>" "*>" "<|" "<|>" "|>" "<." "<.>" ".>" "+*" "=*" "=:" ":>" 147 | "(*" "*)" "/*" "*/" "[|" "|]" "{|" "|}" "++" "+++" "\\/" "/\\" "|-" "-|" " doShift (nthWorkspace n) | klass <- klasses]) 107 | [ (1, ["Firefox"]), 108 | (5, ["Slack"]), 109 | (6, ["zoom"]), 110 | (8, ["Signal"]), 111 | (9, ["Clementine", "Spotify", "spotify"]) 112 | ] 113 | 114 | manageScratchPad :: ManageHook 115 | manageScratchPad = 116 | scratchpadManageHook (W.RationalRect (1 / 6) (1 / 6) (2 / 3) (2 / 3)) 117 | 118 | scratchpads :: [NamedScratchpad] 119 | scratchpads = 120 | [ NS 121 | "emacs" 122 | "emacsclient -a '' -nc -F '((name . \"emacs-scratch\"))'" 123 | (title =? "emacs-scratch") 124 | (customFloating $ W.RationalRect (1 / 6) (1 / 6) (2 / 3) (2 / 3)), 125 | NS 126 | "kitty" 127 | "kitty --name=scratchpad" 128 | (resource =? "scratchpad") 129 | (customFloating $ W.RationalRect (1 / 6) (1 / 6) (2 / 3) (2 / 3)) 130 | ] 131 | 132 | myKeys :: XConfig l -> Map (KeyMask, KeySym) (X ()) 133 | myKeys cfg = 134 | mkKeymap cfg $ 135 | [ ("", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle"), 136 | ("", spawn "pactl set-sink-volume @DEFAULT_SINK@ -5%"), 137 | ("", spawn "pactl set-sink-volume @DEFAULT_SINK@ +5%"), 138 | ("", spawn "playerctl previous"), 139 | ("", spawn "playerctl play-pause"), 140 | ("", spawn "playerctl next"), 141 | -- FIXME: ("", spawn "xbacklight -10"), 142 | -- FIXME: ("", spawn "xbacklight +10"), 143 | ("", spawn "flameshot gui"), 144 | ("M-S--", namedScratchpadAction scratchpads "emacs"), 145 | ("M--", namedScratchpadAction scratchpads "kitty"), 146 | ("M-", asks (cfgDir . directories) >>= spawn . wrap "i3lock --raw 3840x2400:rgb --image " "/skyrim.raw"), 147 | ("M-", spawn "dunstctl close"), 148 | ("M-M1-", spawn "dunstctl close-all"), 149 | ("M-M1-b", spawn "rofi-bluetooth"), 150 | ("C-`", spawn "dunstctl history-pop"), 151 | ("M-", spawn (terminal cfg)), 152 | ("M-", spawn "rofi -show window"), 153 | ("M-S-", toggleFloat), 154 | ("M-S-b", sendMessage (JumpToLayout "BSP")), 155 | ("M-S-c", spawn "rofi -modi calc -show calc"), 156 | ("M-S-e", spawn "emacsclient -nc -e '(switch-to-buffer nil)'"), 157 | ("M-S-l", sendMessage NextLayout), 158 | ("M-S-p", spawn "rofi-pass"), 159 | ("M-S-q", kill), 160 | ("M-S-r", spawn "rofi-rbw"), 161 | ("M-S-s", spawn "rofi-systemd"), 162 | ("M-S-t", spawn "rofi -modi top -show top"), 163 | ("M-e", sendMessage (JumpToLayout "Tall")), 164 | ("M-f", sendMessage (JumpToLayout "Full")), 165 | ("M-h", sendMessage (JumpToLayout "Mirror Tall")), 166 | ("M-j", rotSlavesDown), 167 | ("M-k", rotSlavesUp), 168 | ("M-m", windows W.focusMaster), 169 | ("M-w", sendMessage (JumpToLayout "TwoPane")), 170 | ("M1-", spawn "rofi -modi combi,window -show combi -combi-modi run,drun"), 171 | ("C-M-M1-x", spawn "xmonad --restart"), 172 | ("C-M-M1-c", spawn "systemctl --user restart picom.service"), 173 | ("C-M-", moveTo Prev (Not emptyWS)), 174 | ("C-M-", moveTo Next (Not emptyWS)), 175 | ("C-M-M1-", shiftAndMoveTo Prev emptyWS), 176 | ("C-M-M1-", shiftAndMoveTo Next emptyWS), 177 | ("C-M-M1-f", shiftAndMoveTo Next emptyWS) 178 | ] 179 | ++ [ ( intercalate "-" (catMaybes [Just "M", maybeShift, Just key]), 180 | windows (f workspace) 181 | ) 182 | | (workspace, key) <- 183 | zip (workspaces cfg) (show <$> reverse (0 : [9, 8 .. 1 :: Int])), 184 | (f, maybeShift) <- 185 | [(W.greedyView, Nothing), (W.shift, Just "S")] 186 | ] 187 | 188 | shiftAndMoveTo :: Direction1D -> WSType -> X () 189 | shiftAndMoveTo dir t = doTo dir t getSortByIndex shiftAndMove 190 | 191 | shiftAndMove :: WorkspaceId -> X () 192 | shiftAndMove n = windows (W.shift n) *> windows (W.greedyView n) 193 | 194 | toggleFloat :: X () 195 | toggleFloat = withFocused $ \this -> 196 | do 197 | isFloating <- gets (M.member this . W.floating . windowset) 198 | if isFloating 199 | then withFocused $ windows . W.sink 200 | else float this 201 | 202 | nthWorkspace :: Int -> String 203 | nthWorkspace = (myWorkspaces !!) . subtract 1 204 | 205 | myWorkspaces :: [String] 206 | myWorkspaces = 207 | [ "🌐", 208 | "💻", 209 | "🤖", 210 | "🏌", 211 | "📟", 212 | "🏎", 213 | "☢", 214 | "🗨", 215 | "🎶" 216 | ] 217 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | { stdenv 2 | , nix-gitignore 3 | , makeFontsConf 4 | , iosevka-custom 5 | , gawk 6 | , noweb 7 | , python3Packages 8 | , texlive 9 | , which 10 | }: 11 | 12 | stdenv.mkDerivation rec { 13 | pname = "yurrriq-dotfiles"; 14 | version = builtins.readFile ./VERSION; 15 | src = nix-gitignore.gitignoreSource [ 16 | ".git/" 17 | "docs" 18 | "result*" 19 | "machines/*/secrets/" 20 | ] ./.; 21 | 22 | FONTCONFIG_FILE = makeFontsConf { 23 | fontDirectories = [ iosevka-custom ]; 24 | }; 25 | 26 | configurePhase = '' 27 | substituteInPlace ./bin/fix-underscores \ 28 | --replace '/usr/bin/env -S gawk' '${gawk}/bin/gawk' 29 | ''; 30 | 31 | nativeBuildInputs = [ 32 | gawk 33 | noweb 34 | python3Packages.pygments 35 | ( 36 | texlive.combine { 37 | inherit noweb; 38 | inherit (texlive) scheme-small 39 | braket 40 | catchfile 41 | datatool 42 | datetime 43 | dirtytalk 44 | fancyref 45 | fmtcount 46 | framed 47 | frankenstein 48 | fvextra 49 | glossaries 50 | glossaries-extra 51 | hardwrap 52 | ifplatform 53 | latexmk 54 | mathpazo 55 | mfirstuc 56 | minted 57 | substr 58 | titlesec 59 | tkz-base 60 | todonotes 61 | tufte-latex 62 | xetex 63 | xindy 64 | xfor 65 | xstring 66 | ; 67 | } 68 | ) 69 | which 70 | ]; 71 | 72 | makeFlags = [ 73 | "PREFIX=${placeholder "out"}" 74 | ]; 75 | 76 | } 77 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "emacs-overlay": { 4 | "inputs": { 5 | "flake-utils": [ 6 | "flake-utils" 7 | ], 8 | "nixpkgs": [ 9 | "nixpkgs" 10 | ], 11 | "nixpkgs-stable": [ 12 | "nixpkgs-stable" 13 | ] 14 | }, 15 | "locked": { 16 | "lastModified": 1724202316, 17 | "narHash": "sha256-4MJT6A6rxjvz4DUt5J/80seHt0BUkVqK+o30iyk4sJE=", 18 | "owner": "nix-community", 19 | "repo": "emacs-overlay", 20 | "rev": "083cb4ec5e6801bb54f0776fff5229ab72f75bc2", 21 | "type": "github" 22 | }, 23 | "original": { 24 | "owner": "nix-community", 25 | "repo": "emacs-overlay", 26 | "type": "github" 27 | } 28 | }, 29 | "flake-utils": { 30 | "inputs": { 31 | "systems": "systems" 32 | }, 33 | "locked": { 34 | "lastModified": 1710146030, 35 | "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", 36 | "owner": "numtide", 37 | "repo": "flake-utils", 38 | "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", 39 | "type": "github" 40 | }, 41 | "original": { 42 | "owner": "numtide", 43 | "repo": "flake-utils", 44 | "type": "github" 45 | } 46 | }, 47 | "home-manager": { 48 | "inputs": { 49 | "nixpkgs": [ 50 | "nixpkgs" 51 | ] 52 | }, 53 | "locked": { 54 | "lastModified": 1720042825, 55 | "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=", 56 | "owner": "nix-community", 57 | "repo": "home-manager", 58 | "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073", 59 | "type": "github" 60 | }, 61 | "original": { 62 | "owner": "nix-community", 63 | "ref": "release-24.05", 64 | "repo": "home-manager", 65 | "type": "github" 66 | } 67 | }, 68 | "nixgl": { 69 | "inputs": { 70 | "flake-utils": [ 71 | "flake-utils" 72 | ], 73 | "nixpkgs": [ 74 | "nixpkgs" 75 | ] 76 | }, 77 | "locked": { 78 | "lastModified": 1713543440, 79 | "narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", 80 | "owner": "guibou", 81 | "repo": "nixGL", 82 | "rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", 83 | "type": "github" 84 | }, 85 | "original": { 86 | "owner": "guibou", 87 | "repo": "nixGL", 88 | "type": "github" 89 | } 90 | }, 91 | "nixos-hardware": { 92 | "locked": { 93 | "lastModified": 1724067415, 94 | "narHash": "sha256-WJBAEFXAtA41RMpK8mvw0cQ62CJkNMBtzcEeNIJV7b0=", 95 | "owner": "nixos", 96 | "repo": "nixos-hardware", 97 | "rev": "b09c46430ffcf18d575acf5c339b38ac4e1db5d2", 98 | "type": "github" 99 | }, 100 | "original": { 101 | "owner": "nixos", 102 | "repo": "nixos-hardware", 103 | "type": "github" 104 | } 105 | }, 106 | "nixpkgs": { 107 | "locked": { 108 | "lastModified": 1724216024, 109 | "narHash": "sha256-8CDFuA00v8r4r2adf18uE92Zfr2nMXQzJDq3t8Hvk3U=", 110 | "owner": "nixos", 111 | "repo": "nixpkgs", 112 | "rev": "1bee20d2b571ab1bf5b006e43b87b50b28d598be", 113 | "type": "github" 114 | }, 115 | "original": { 116 | "owner": "nixos", 117 | "ref": "release-24.05", 118 | "repo": "nixpkgs", 119 | "type": "github" 120 | } 121 | }, 122 | "nixpkgs-stable": { 123 | "locked": { 124 | "lastModified": 1724216024, 125 | "narHash": "sha256-8CDFuA00v8r4r2adf18uE92Zfr2nMXQzJDq3t8Hvk3U=", 126 | "owner": "nixos", 127 | "repo": "nixpkgs", 128 | "rev": "1bee20d2b571ab1bf5b006e43b87b50b28d598be", 129 | "type": "github" 130 | }, 131 | "original": { 132 | "owner": "nixos", 133 | "ref": "release-24.05", 134 | "repo": "nixpkgs", 135 | "type": "github" 136 | } 137 | }, 138 | "nur": { 139 | "locked": { 140 | "lastModified": 1724219095, 141 | "narHash": "sha256-+HhSPWqM1VJlQTNwgJE2RmTVUMoF6FuCRKzzTgxjNcM=", 142 | "owner": "nix-community", 143 | "repo": "nur", 144 | "rev": "cb4a85f95c647cf5aa7ce75b77ff2c049137160a", 145 | "type": "github" 146 | }, 147 | "original": { 148 | "owner": "nix-community", 149 | "repo": "nur", 150 | "type": "github" 151 | } 152 | }, 153 | "root": { 154 | "inputs": { 155 | "emacs-overlay": "emacs-overlay", 156 | "flake-utils": "flake-utils", 157 | "home-manager": "home-manager", 158 | "nixgl": "nixgl", 159 | "nixos-hardware": "nixos-hardware", 160 | "nixpkgs": "nixpkgs", 161 | "nixpkgs-stable": "nixpkgs-stable", 162 | "nur": "nur", 163 | "treefmt-nix": "treefmt-nix" 164 | } 165 | }, 166 | "systems": { 167 | "locked": { 168 | "lastModified": 1681028828, 169 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 170 | "owner": "nix-systems", 171 | "repo": "default", 172 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 173 | "type": "github" 174 | }, 175 | "original": { 176 | "owner": "nix-systems", 177 | "repo": "default", 178 | "type": "github" 179 | } 180 | }, 181 | "treefmt-nix": { 182 | "inputs": { 183 | "nixpkgs": [ 184 | "nixpkgs" 185 | ] 186 | }, 187 | "locked": { 188 | "lastModified": 1723808491, 189 | "narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=", 190 | "owner": "numtide", 191 | "repo": "treefmt-nix", 192 | "rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a", 193 | "type": "github" 194 | }, 195 | "original": { 196 | "owner": "numtide", 197 | "repo": "treefmt-nix", 198 | "type": "github" 199 | } 200 | } 201 | }, 202 | "root": "root", 203 | "version": 7 204 | } 205 | -------------------------------------------------------------------------------- /latexmkrc: -------------------------------------------------------------------------------- 1 | # -*- mode: perl -*- 2 | 3 | $bibtex_use = 2; 4 | $clean_ext .= ' %R.ist %R.xdy %R.xdv'; 5 | $pdflatex = q/xelatex %O -file-line-error -interaction=nonstopmode -shell-escape -synctex=1 %S/; 6 | 7 | add_cus_dep('glo', 'gls', 0, 'run_makeglossaries'); 8 | add_cus_dep('acn', 'acr', 0, 'run_makeglossaries'); 9 | 10 | sub run_makeglossaries { 11 | $dir = dirname($_[0]); 12 | $file = basename($_[0]); 13 | if ( $silent ) { 14 | system "makeglossaries -q -d '$dir' '$file'"; 15 | } 16 | else { 17 | system "makeglossaries -d '$dir' '$file'"; 18 | }; 19 | } 20 | 21 | push @generated_exts, 'glo', 'gls', 'glg'; 22 | push @generated_exts, 'acn', 'acr', 'alg'; 23 | push @generated_exts, 'tdo'; 24 | -------------------------------------------------------------------------------- /machines/hacktop/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | secrets 2 | -------------------------------------------------------------------------------- /machines/hacktop/configuration.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | let 3 | username = "mohacker"; 4 | in 5 | { 6 | 7 | imports = [ 8 | ../../nix 9 | ../../modules/common.nix 10 | ../../modules/darwin.nix 11 | ../../modules/location.nix 12 | ../../modules/packages.nix 13 | 14 | ]; 15 | 16 | airportCode = "MSP"; 17 | 18 | environment.darwinConfig = "$HOME/.config/nixpkgs/machines/hacktop/configuration.nix"; 19 | 20 | environment.pathsToLink = [ 21 | "/lib/aspell" 22 | "/share/emacs/site-lisp" 23 | "/share/fish" 24 | ]; 25 | 26 | home-manager.useUserPackages = true; 27 | home-manager.users."${username}" = args: 28 | import ./home.nix (args // { inherit pkgs; }); 29 | 30 | nix = { 31 | buildCores = 8; 32 | 33 | distributedBuilds = false; 34 | 35 | maxJobs = 8; 36 | 37 | nixPath = lib.mkForce [ 38 | "darwin=${darwin}" 39 | "darwin-config=/etc/nixos/configuration.nix" 40 | "home-manager=${home-manager}" 41 | "nixpkgs=${nixpkgs}" 42 | "nixpkgs-overlays=/etc/nixos/overlays" 43 | "nur=${nur}" 44 | "nurpkgs=${nurpkgs}" 45 | ]; 46 | 47 | trustedUsers = [ "root" username ]; 48 | }; 49 | 50 | nixpkgs.overlays = 51 | let 52 | path = ; 53 | in 54 | with builtins; 55 | map 56 | (n: import (path + ("/" + n))) 57 | ( 58 | filter 59 | ( 60 | n: match ".*\\.nix" n != null 61 | || pathExists (path + ("/" + n + "/default.nix")) 62 | ) 63 | (attrNames (readDir path)) 64 | ) 65 | ++ ( 66 | with (import { }).overlays; [ 67 | nur 68 | git 69 | node 70 | ] 71 | ); 72 | 73 | services = { 74 | activate-system.enable = true; 75 | nix-daemon = { 76 | enable = true; 77 | tempDir = "/nix/tmp"; 78 | }; 79 | }; 80 | 81 | } 82 | -------------------------------------------------------------------------------- /machines/hacktop/home.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | 5 | imports = [ 6 | ../../config/bat.nix 7 | ../../config/direnv.nix 8 | ../../config/emacs 9 | # TODO: ../../config/firefox.nix 10 | ../../config/fish 11 | ../../config/fzf.nix 12 | ../../config/git 13 | ../../config/gpg.nix 14 | ../../config/htop.nix 15 | ../../config/jq.nix 16 | ../../config/kitty.nix 17 | ../../config/man.nix 18 | ../../config/nixpkgs 19 | ../../config/rebar3.nix 20 | # TODO: ../../config/taskwarrior 21 | # TODO: ../../config/vim.nix 22 | ]; 23 | 24 | accounts.email.accounts.primary = { 25 | address = "eric@ericb.me"; 26 | gpg.key = "60F0AEB0D089C2911183CAF9D2D7DFEA3D4FB51C"; 27 | primary = true; 28 | realName = "Eric Bailey"; 29 | }; 30 | 31 | home.packages = with pkgs; ( 32 | [ 33 | carla 34 | ghc 35 | reaper 36 | ] ++ ( 37 | with nodePackages; [ 38 | nodePackages."mermaid.cli" 39 | vmd 40 | ] 41 | ) 42 | ); 43 | 44 | _module.args.pkgs = lib.mkForce pkgs; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /machines/hacktop/secrets/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | .*.enc$ 2 | .stow-local-ignore 3 | -------------------------------------------------------------------------------- /machines/hacktop/secrets/mohacker.hashedPassword.enc: -------------------------------------------------------------------------------- 1 | { 2 | "data": "ENC[AES256_GCM,data:/+LwV8Spz5f+j2axxZ09G9AUWm86wXuju91Dq4qlz00l1eIAGMEH1ccELT4eylYAEu5mtrfywJ2e1rS4t/4a9aH+eaO5/b0O0/CVffNjHWb6Cb+05yj2FY2m8qH9GEyz4P10lhy46Vjscys=,iv:MQSVNO1va0SKoVQLH2KMwip3zWn54GecG4shOOtAMJ4=,tag:iWvrBNlcSYE3PRLn7/g9bg==,type:str]", 3 | "sops": { 4 | "kms": null, 5 | "gcp_kms": null, 6 | "azure_kv": null, 7 | "lastmodified": "2020-02-16T23:35:51Z", 8 | "mac": "ENC[AES256_GCM,data:Py6gO7oXL32aDiKBtsEGMFHX43FcTytahBB6lMVh7/zgptEA/DtQYjH4JDuYN3SAuDe6/yg7OjO5ule0btV3xERyjcQSXbB6QDaByBFSDqO4X/+dVp1O5FFU/Wr89O7d2tQaj6c2JXU4jRHHpxfb/gcYXn4svyKrpG6nT7xE0FI=,iv:h6GMFzA/pFA0u7ReQHcH3jriS6PyZUPiAP8qR+TvgMg=,tag:KRqI8bwKFk7SCizOkZdBxw==,type:str]", 9 | "pgp": [ 10 | { 11 | "created_at": "2020-02-16T23:35:51Z", 12 | "enc": "-----BEGIN PGP MESSAGE-----\n\nwcFMA9MSF/2ln3SVARAAVFen7OHblUoUVRTe2wM14EDn41yHjJo5tc1nRYxIt+GW\nNrHSME+s3VA6rs9kZHj/fll3N27+zDN6cGkAtrZilcqxKSRkifABHZa1C/O/rB76\n9vSkhYiFRpyG/5n4KKpB30i+ru6lkoeq6jt3mI+0G2MA57x8IVv2rd3vnHnvMVZZ\n5/0LWj6KiLHIvTDMT7WypcwGJrk3spxdMZvlb2zJat0kH6udFC6scVkm80OW9XXa\njmXtSsCgZTw7kjuEhlHWZc0toS3AqxzEgCvZyVJtQqo+A5TmM2lHfVEX05RrjeA6\njqduJd3qItkbQpT1RoWEZpq3GQVB3/1JthKnXlF1gQZLWlP2ziRbhJ8ShDwunVKk\nc5mkV7i8fDTkj0doy4Mm187B2BrFVEkoqZlcSVwA2lVG0z48FFqAPtmlM4vBnBq/\n/TEwZKtgZvzRQoQz/I5Z57XxMKSg4g2uRHlwVJyqAY0+LoVD/VYa+YvPZjynAUJT\nAu8FgB1DkbwA4JR3iHn0vULs3oXoqRHQvISTByZeN/qJRaIk5FEpIHCepbJMhzsO\nzejSHGbR3oGAuO+I/R5INNIa98aV5/MQqjrnFtFj89Dk0koYXtaaK/x1V9ak1VGC\nu98ISfJdA0em9SCSGKEQdY8+jLCWXC4dQJu+fLz/dDpfWH3gi1pJ96OBix34zxLS\n4AHk498hWchEJ8sLbdXDohX1OeFIqODc4BzhhhfgGeJwABdv4BzldiCPyZ/dKDyL\nFH/2r7QtXNsIcw6/io10UcLCYZY14/3gV+Q7jHEVd/CxrxNogRw6QDJ14hFYI1Ph\nmiUA\n=uDZO\n-----END PGP MESSAGE-----", 13 | "fp": "2E8D082C324D5F5459CD27E755BF5D49549F04AD" 14 | } 15 | ], 16 | "unencrypted_suffix": "_unencrypted", 17 | "version": "3.3.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /machines/nixps/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | secrets 2 | -------------------------------------------------------------------------------- /machines/nixps/configuration.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | let 3 | username = "yurrriq"; 4 | in 5 | { 6 | airportCode = "MSP"; 7 | boot.blacklistedKernelModules = [ "nouveau" "nvidia" "psmouse" ]; 8 | boot.initrd.luks.devices.root.device = "/dev/nvme0n1p2"; 9 | environment.homeBinInPath = true; 10 | environment.pathsToLink = [ 11 | "/lib/aspell" 12 | "/share/emacs/site-lisp" 13 | "/share/fish" 14 | ]; 15 | fileSystems."/" = { 16 | device = "/dev/disk/by-uuid/024a1168-9949-4cb2-bbd1-4b19a9d49ef2"; 17 | fsType = "ext4"; 18 | }; 19 | 20 | fileSystems."/boot" = { 21 | device = "/dev/disk/by-uuid/7574-B246"; 22 | fsType = "vfat"; 23 | }; 24 | 25 | fileSystems."/var/lib/docker/plugins" = { 26 | device = "/var/lib/docker/plugins"; 27 | fsType = "none"; 28 | options = [ "bind" ]; 29 | }; 30 | 31 | fileSystems."/var/lib/docker/overlay2" = { 32 | device = "/var/lib/docker/overlay2"; 33 | fsType = "none"; 34 | options = [ "bind" ]; 35 | }; 36 | hardware.bumblebee.enable = false; 37 | hardware.nvidiaOptimus.disable = false; 38 | services.blueman.enable = true; 39 | hardware.bluetooth = { 40 | enable = true; 41 | settings = { 42 | General = { 43 | Enable = "Source,Sink,Media,Socket"; 44 | }; 45 | }; 46 | }; 47 | services.fwupd.enable = true; 48 | hardware.pulseaudio.support32Bit = true; 49 | hardware.opengl.driSupport32Bit = true; 50 | home-manager.users."${username}" = import ./home.nix; 51 | networking = { 52 | firewall = { 53 | enable = true; 54 | allowedTCPPortRanges = [ 55 | # { from = 8000; to = 8000; } 56 | ]; 57 | }; 58 | hostName = "nixps"; 59 | networkmanager.enable = true; 60 | }; 61 | nix = { 62 | settings = { 63 | cores = 8; 64 | trusted-users = [ "root" username ]; 65 | }; 66 | }; 67 | security.sudo = { 68 | enable = true; 69 | extraConfig = '' 70 | ${username} ALL=(ALL) NOPASSWD: ALL 71 | ''; 72 | }; 73 | services.displayManager.autoLogin = { 74 | enable = true; 75 | user = username; 76 | }; 77 | services.xserver = { 78 | monitorSection = '' 79 | DisplaySize 508 285 80 | ''; 81 | dpi = 220; 82 | upscaleDefaultCursor = true; 83 | videoDrivers = [ "modesetting" ]; 84 | }; 85 | users.mutableUsers = false; 86 | users.users."${username}" = { 87 | name = username; 88 | hashedPassword = lib.fileContents "/etc/nixos/secrets/${username}.hashedPassword"; 89 | isNormalUser = true; 90 | extraGroups = [ 91 | "audio" 92 | "disk" 93 | "docker" 94 | "http" 95 | "networkmanager" 96 | "systemd-journal" 97 | "video" 98 | "wheel" 99 | ]; 100 | uid = 1000; 101 | shell = "/etc/profiles/per-user/${username}/bin/fish"; 102 | }; 103 | virtualisation.libvirtd.enable = true; 104 | } 105 | -------------------------------------------------------------------------------- /machines/nixps/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ 9 | (modulesPath + "/installer/scan/not-detected.nix") 10 | ]; 11 | 12 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" ]; 13 | boot.initrd.kernelModules = [ "dm-snapshot" ]; 14 | boot.kernelModules = [ "kvm-intel" ]; 15 | boot.extraModulePackages = [ ]; 16 | 17 | swapDevices = 18 | [{ device = "/dev/disk/by-uuid/86e29ab0-7bd5-470a-959d-75067973a9a3"; }]; 19 | 20 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 21 | # (the default) this is the recommended approach. When using systemd-networkd it's 22 | # still possible to use this option, but it's recommended to use it in conjunction 23 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 24 | networking.useDHCP = lib.mkDefault true; 25 | # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; 26 | 27 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 28 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 29 | } 30 | -------------------------------------------------------------------------------- /machines/nixps/home.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | { 3 | accounts.email.accounts = { 4 | personal = { 5 | address = "eric@ericb.me"; 6 | gpg.key = "F88372B24A806FF23BCB3A4E2DDDF8606958B3F9"; 7 | primary = true; 8 | realName = "Eric Bailey"; 9 | }; 10 | work.address = "e.bailey@sportradar.com"; 11 | }; 12 | home.packages = with pkgs; [ 13 | amdvlk 14 | calibre 15 | electronplayer 16 | fd 17 | frescobaldi 18 | gnutls 19 | lutris 20 | musescore 21 | openscad 22 | powertop 23 | protontricks 24 | reaper 25 | signal-desktop 26 | steam 27 | tellico 28 | winetricks 29 | zoom-us 30 | ]; 31 | home.stateVersion = "23.11"; 32 | programs.rbw = { 33 | enable = true; 34 | settings = { 35 | base_url = "https://api.bitwarden.com/"; 36 | email = config.accounts.email.accounts.personal.address; 37 | identity_url = "https://identity.bitwarden.com/"; 38 | notifications_url = "https://notifications.bitwarden.com/"; 39 | pinentry = pkgs.pinentry; 40 | }; 41 | }; 42 | services.picom.enable = true; 43 | } 44 | -------------------------------------------------------------------------------- /machines/nixps/secrets/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | .*.enc$ 2 | .stow-local-ignore 3 | -------------------------------------------------------------------------------- /machines/nixps/secrets/bootyjams.club.enc: -------------------------------------------------------------------------------- 1 | { 2 | "data": "ENC[AES256_GCM,data:BtDwPNMWbQfFHPhkhzOUdr7FOoaWEPOyBnI11ikLGYDUmyaMa///xuuwgQ==,iv:+tarV/lThso7+hCIA5D2A7UbAXO20ay7d1pXsb57dk8=,tag:tV+hCNE5gcrxWlxO1XFrqA==,type:str]", 3 | "sops": { 4 | "kms": null, 5 | "gcp_kms": null, 6 | "azure_kv": null, 7 | "hc_vault": null, 8 | "age": null, 9 | "lastmodified": "2021-08-08T02:29:31Z", 10 | "mac": "ENC[AES256_GCM,data:+4oDLYzjEdezy5lfGCxJKPtborKt7Npl0coNeTllAzPjIZ35zaNfubi+RcVUi5hXhSBI5jDWRorAt0ukylLCgl/jelMUgUNCWTOk4LnLcU99dS9I4Dttsyy+gs3NNci8S7tdAwr4usuPBXS0OGLqYlSW3F7xzsLzEJRF0A+T4OM=,iv:iAO0bJuKxqeGftrQHB9wzajuZmMQvS+ydWcZSUW2z0w=,tag:P8WkyzXRgNsnui0mQ9T5BA==,type:str]", 11 | "pgp": [ 12 | { 13 | "created_at": "2021-08-08T02:22:56Z", 14 | "enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMAxqqD5tFz73GAQ//WdVIT1cZyES/zsbkvtz6b4wJtfoYYDXB2ZusVDxgEXCx\nUMIIcVqjTZP9q1YBPkUacVBCPRAHvGED+H3zjYfczRkLIQUh3z0l+1UUEJ7YXA5v\nogjUtut3ObUWThRbtUE3Y2KAHVUmxdFs0iS3IKdB/MKcxe8d6inMVW8lPbIKZ1gg\na5qQShmYC9a0fNvKxPRtU+HaXcsFVmazKifBCuf+R9DMR74XkTQzEmNAjpQaf/lv\n+R/GvTAHA6idvlHoVK7nZHBEkk8y5bw5YLiX31q5dK10LjTV+IjS0kY+Ai6kQXHR\nQOM9xbLS/Ry9LCmQCR17tU1d5fyyvV7AzGKVfO4M4gdt2hZveUMXJz+KYCzXbmyW\nyuGnDkvfCB/MVaHl6niAE2uJH+EVx09Q6FNhQOqUxEGFQ3r7iZkM3/tBeY27OlZT\n97XXADv1Kp9thZkhQWMaZFJU5UEGqbB6OtSK6M1tHhMad6Kxd3Pr1eSJ6SlmUuOy\nw0mtL5yzwKcxTFAAxQ2/KbTwihdHmf+Ir9xXi0chiHB6NB1sW6ZjUnB13aDt8lb5\nyO3Rf90E0tctUxUpYN+vyKkEGcch2hpcDrfUzZEvQmLgaTm/3937tVlA24x8pT0Q\nlEz9oN+QzFwdLxQ+6FU9lGCzvOYLwQ/Ka5M6Sby2D/v4hU3CiqhIj1gpTdKQPh/S\nXAGJKwGSRiTjfhFlUk0PL0wnTLwNADCxKYVE9U9EaPdkkBIrAgxRjSpsBm/PSqX8\nWbTNVl0QznAa24+X2kmHYToWlvqUPTkxo43hXrmHklwmLSB7G0WVxVQ2lCMZ\n=7hC7\n-----END PGP MESSAGE-----\n", 15 | "fp": "F88372B24A806FF23BCB3A4E2DDDF8606958B3F9" 16 | } 17 | ], 18 | "unencrypted_suffix": "_unencrypted", 19 | "version": "3.7.1" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /machines/nixps/secrets/yurrriq.hashedPassword.enc: -------------------------------------------------------------------------------- 1 | { 2 | "data": "ENC[AES256_GCM,data:Ik6Ac0lPqLvlBlS3h38fKFmhY59gd3U4K9B9khy5h8DRu2ti0TlL8g+wWLh6BgeA7tnPHSR4bzlsOANtMFCZ5qQ4diQCc58g1Gf8HIyzgw+GHweFMcaBJt/4eQB0gkhfvVCs5qKPVA==,iv:mBeOPy67Nm8FqwYqctgtq3lnhaug2o6b4KeZ31dmgVQ=,tag:m4usjTXzeKx674HKdwkX/Q==,type:str]", 3 | "sops": { 4 | "kms": null, 5 | "gcp_kms": null, 6 | "azure_kv": null, 7 | "lastmodified": "2020-02-16T23:35:54Z", 8 | "mac": "ENC[AES256_GCM,data:DSaQxfSU09LN/tP/YU1FAgAvIUmaDK+KBJ77f78QrUwtmVHV2Nt3xNAgcF+BSliHhD3nMjWoA+oqHpm18cusJEJlhzFNfhLRRvgd6+vmSNO1n05hCFKW4gmjBoyl9xRHpHXhDvCwlxUSZ4gBe9gH0iWj4n45kp00AiOGXfEHyMI=,iv:z2Ng/m6iKhv6wimN6YndN+4yobcjU8nDJr04D/CWWJg=,tag:tdewpjZJ/vatiLGc0PRTVA==,type:str]", 9 | "pgp": [ 10 | { 11 | "created_at": "2020-02-16T23:35:53Z", 12 | "enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMAxqqD5tFz73GAQ//Y5VTI0+9XB+rLdTckG1NziOrHcZVgBSpk+G6ZMVFlV8m\nO5H/sTaRYGSGFGL1NeXAWuQRtGjzSvRvHiyYimueCyWcw6cKNWb64+CSYFJYkf56\n+DD+E+pmsMpK7ViaX9vg1+RcZddWV9lJycvtc2jCJneuvjIWBEBOLl/+oS5ktoUO\nobGb/9zyqAlmvENeL7vvCWQmFMKCE0r35wMVXPB54orPhNTnOrmUF36AJCh9gRI+\ncd7jTxA5aQdGm2fm8ouJSJYbcOSj8SzQalC5ezAFlwy8gk9uL7opjsaaXs7QiQw4\nEIeELA9QDyE95K6HH3N3K1jMBCFyLrMngTnI6tevpXjArhQuuPmabhpYcvIrAAb5\nW8/NX4fJayDuHXIGA0OczxkvEoA0ZCLtVEb/6MD6bdvIixQu1hLuPY3ZRIx3tHLW\niEKOWlk8lkxo7MtmorBOfVwVgP1+KPrOR5c1lKELzlBHKFHRCXC+AKOrUQ6z2JAt\n+flY0Km1prTTbU6d1sgBdST7XyEIjlbwXM/lrDROu5pRUZQWqwaFargyApnaolKv\nec0BvQdU9tSLpJ9At6HyxjfKb+X4pN/V8VrXdjE3IPsaHAFXg55waW75BDpqbv2D\n34Uy6GHs0e9nh6UaE5TGNnGYa0GdUllltCFaPvQzQdBh7EwQLL5A2OlTvMKjhMTS\nXgF1e99Z00O806iAzTVkJzg8AA4sYHMolwHo0H3U/kvxtF8FaKZmZw+T+PJd8qIt\nkcOHXdSRuJi9fBhMnXZSCOXiQKpuoP9DQfVU1pNSw3Jpy3w87cPV4MQzDPo8ibs=\n=tsWI\n-----END PGP MESSAGE-----\n", 13 | "fp": "F88372B24A806FF23BCB3A4E2DDDF8606958B3F9" 14 | } 15 | ], 16 | "unencrypted_suffix": "_unencrypted", 17 | "version": "3.3.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /machines/sruxps/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | secrets 2 | -------------------------------------------------------------------------------- /machines/sruxps/configuration.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | let 3 | username = "e.bailey"; 4 | in 5 | { 6 | airportCode = "MSP"; 7 | boot.initrd.luks.devices = { 8 | cryptkey.device = "/dev/disk/by-uuid/2a44a760-206c-448d-a126-527b8b63f5d0"; 9 | 10 | cryptroot = { 11 | device = "/dev/disk/by-uuid/6cd51820-547b-4378-b566-47f8cdbc46df"; 12 | keyFile = "/dev/mapper/cryptkey"; 13 | }; 14 | 15 | cryptswap = { 16 | device = "/dev/disk/by-uuid/7d80e701-3a6b-4bb0-b8a3-dd5dfb432cdd"; 17 | keyFile = "/dev/mapper/cryptkey"; 18 | }; 19 | }; 20 | boot.kernel.sysctl = { 21 | "vm.swappiness" = 1; 22 | }; 23 | boot.kernelModules = [ 24 | "coretemp" 25 | "i915.enable_psr=0" 26 | ]; 27 | boot.kernelParams = [ "acpi_rev_override" "mem_sleep_default=deep" "intel_iommu=igfx_off" ]; 28 | environment.homeBinInPath = true; 29 | environment.pathsToLink = [ 30 | "/lib/aspell" 31 | "/share/emacs/site-lisp" 32 | "/share/fish" 33 | # FIXME: "/share/icons" 34 | ]; 35 | environment.systemPackages = with pkgs; [ 36 | kubelogin 37 | ]; 38 | fileSystems."/" = { 39 | device = "/dev/disk/by-uuid/75e8b8ef-8143-4f93-a60b-c5d53adb80d3"; 40 | fsType = "ext4"; 41 | options = [ "noatime" "nodiratime" "discard" ]; 42 | }; 43 | 44 | fileSystems."/boot" = { 45 | device = "/dev/disk/by-uuid/DF46-7ADE"; 46 | fsType = "vfat"; 47 | }; 48 | hardware.bluetooth = { 49 | enable = true; 50 | settings = { 51 | General = { 52 | Enable = "Source,Sink,Media,Socket"; 53 | }; 54 | }; 55 | }; 56 | hardware.acpilight.enable = true; 57 | hardware.opengl.enable = true; 58 | home-manager.users."${username}" = import ./home.nix; 59 | networking.hostName = "MSP-EBAILEY01"; 60 | nix = { 61 | binaryCaches = [ 62 | "https://sportradar.cachix.org" 63 | ]; 64 | binaryCachePublicKeys = [ 65 | "sportradar.cachix.org-1:6MyCzOfUMeMTxU5QnogkyYOBtr5f5atW/qeS+TjmUfE=" 66 | ]; 67 | trustedUsers = [ "root" username ]; 68 | }; 69 | security.sudo = { 70 | enable = true; 71 | extraConfig = '' 72 | ${username} ALL=(ALL) NOPASSWD: ALL 73 | ''; 74 | }; 75 | services.blueman.enable = true; 76 | 77 | services.fwupd.enable = true; 78 | 79 | services.lorri.enable = false; 80 | 81 | services.thermald.enable = lib.mkForce false; # FIXME 82 | 83 | services.tlp.enable = true; 84 | 85 | services.xserver = { 86 | config = '' 87 | Section "Device" 88 | Identifier "Intel Graphics" 89 | Driver "intel" 90 | Option "TearFree" "true" 91 | Option "SwapbuffersWait" "true" 92 | BusID "PCI:0:2:0" 93 | EndSection 94 | ''; 95 | 96 | displayManager.autoLogin = { 97 | enable = true; 98 | user = username; 99 | }; 100 | 101 | monitorSection = '' 102 | DisplaySize 406 228 103 | ''; 104 | 105 | screenSection = '' 106 | Option "AllowIndirectGLXProtocol" "off" 107 | Option "TripleBuffer" "on" 108 | ''; 109 | }; 110 | users.mutableUsers = false; 111 | users.users."${username}" = { 112 | name = username; 113 | hashedPassword = lib.fileContents "/etc/nixos/secrets/${username}.hashedPassword"; 114 | isNormalUser = true; 115 | extraGroups = [ 116 | "audio" 117 | "disk" 118 | "docker" 119 | "http" 120 | "networkmanager" 121 | "systemd-journal" 122 | "vboxusers" 123 | "video" 124 | "wheel" 125 | ]; 126 | uid = 1001; 127 | shell = "/etc/profiles/per-user/${username}/bin/fish"; 128 | }; 129 | virtualisation.virtualbox.host.enable = true; 130 | } 131 | -------------------------------------------------------------------------------- /machines/sruxps/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { lib, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ 9 | (modulesPath + "/installer/scan/not-detected.nix") 10 | ]; 11 | 12 | boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" ]; 13 | boot.initrd.kernelModules = [ ]; 14 | boot.kernelModules = [ "kvm-intel" ]; 15 | boot.extraModulePackages = [ ]; 16 | 17 | swapDevices = 18 | [{ device = "/dev/disk/by-uuid/68896b3e-7f2d-4fe3-b5d2-97c68a8ff88e"; }]; 19 | } 20 | -------------------------------------------------------------------------------- /machines/sruxps/home.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../../config/screen-locker.nix 5 | ]; 6 | accounts.email.accounts = { 7 | personal.address = "eric@ericb.me"; 8 | work = { 9 | address = "e.bailey@sportradar.com"; 10 | gpg.key = "EFD6F1EDC84D2FA935E38570462054AB8B682702"; 11 | primary = true; 12 | realName = "Eric Bailey"; 13 | }; 14 | }; 15 | home.file.".docker/config.json".text = '' 16 | { 17 | "credHelpers": { 18 | "docker.io": "pass", 19 | "gitlab.sportradar.ag:4567": "pass" 20 | } 21 | } 22 | ''; 23 | home.file."src/gitlab.sportradar.ag/.envrc".text = '' 24 | case $(kubectl config current-context) in 25 | *k8s.srus*|sapi*nov1*) 26 | export AWS_PROFILE=msp 27 | ;; 28 | *) 29 | export AWS_PROFILE=default 30 | esac 31 | 32 | export CI_SERVER_HOST=gitlab.sportradar.ag 33 | export CI_JOB_TOKEN=$(pass "$CI_SERVER_HOST"/token/api) 34 | export CI_REGISTRY="$CI_SERVER_HOST":4567 35 | export CI_REGISTRY_USER=gitlab-ci-token 36 | export CI_REGISTRY_PASSWORD="$CI_JOB_TOKEN" 37 | export GITLAB_TOKEN="$CI_JOB_TOKEN" 38 | # export JIRA_API_TOKEN="$(pass jira.sportradar.ag/e.bailey)" 39 | # export JIRA_AUTH_TYPE=bearer 40 | export GITLAB_REGISTRY_ACCESS_TOKEN="$CI_REGISTRY_PASSWORD" 41 | ''; 42 | home.keyboard = { 43 | options = [ 44 | "ctrl:nocaps" 45 | "compose:ralt" 46 | ]; 47 | }; 48 | home.packages = with pkgs; [ 49 | aws-iam-authenticator 50 | awscli2 51 | python3Packages.ec2instanceconnectcli 52 | btop 53 | fd 54 | gomplate 55 | powertop 56 | progress 57 | scc 58 | docker-credential-helpers 59 | # TODO: podman-compose 60 | krew 61 | kubectl 62 | kubectx 63 | kubelogin 64 | kustomize 65 | # NOTE: unfree license now 66 | # lens 67 | stern 68 | vault 69 | fortune 70 | prometheus-alertmanager 71 | bind 72 | curl 73 | httpie 74 | cachix 75 | nix 76 | home-manager 77 | nixgl.nixGLIntel 78 | networkmanager 79 | ]; 80 | home.stateVersion = "23.11"; 81 | services.picom = { 82 | enable = true; 83 | settings = { 84 | unredir-if-possible = true; 85 | }; 86 | vSync = true; 87 | }; 88 | home.sessionPath = [ 89 | "${config.home.homeDirectory}/bin" 90 | ]; 91 | 92 | nix.enable = true; 93 | 94 | programs.kitty.settings.font_size = 10; 95 | 96 | services.random-background = { 97 | enable = true; 98 | imageDirectory = "/usr/share/backgrounds/"; 99 | display = "scale"; 100 | }; 101 | 102 | targets.genericLinux.enable = true; 103 | 104 | xresources.properties = { 105 | "Xft.dpi" = 290; 106 | }; 107 | programs.rbw = { 108 | enable = true; 109 | settings = { 110 | email = config.accounts.email.accounts.personal.address; 111 | }; 112 | }; 113 | } 114 | -------------------------------------------------------------------------------- /machines/sruxps/secrets/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | .*.enc$ 2 | .stow-local-ignore 3 | -------------------------------------------------------------------------------- /machines/sruxps/secrets/bootyjams.club.enc: -------------------------------------------------------------------------------- 1 | { 2 | "data": "ENC[AES256_GCM,data:7vwhi5hUi358xrTkUAonPBtTeJF+vctxR19Hg4vblzlLXCrsHftwIjeh2g==,iv:W21jGLeQ9tbk7+uf30JI0lAyMmcJz737vMdgAGj3Now=,tag:mtS+a8Wvfe252Dyqw6Gcuw==,type:str]", 3 | "sops": { 4 | "kms": null, 5 | "gcp_kms": null, 6 | "azure_kv": null, 7 | "hc_vault": null, 8 | "lastmodified": "2021-03-17T06:19:12Z", 9 | "mac": "ENC[AES256_GCM,data:taRUAGxMeQkYLMEtu5GlkuPxFCFP23PXI2JL4DAq07UBymKLfdnjFvpSVdcgrKWM7u+MPm/O+eWmW8t4OQ6RsmWz0BK3xEgO8vx+tthyRHCfGHxbwUFo8rKfVyPZ0WEpWLayhjF34naAgsUgXz4Ng1hD8hsMR3C+rdMk/gdY4VY=,iv:PNvHRsVrSM18zM4D8N84qqfDZ1FqL6Z0lgDCekW5YPY=,tag:XSUVG/ttlXMMerwH1iQf4g==,type:str]", 10 | "pgp": [ 11 | { 12 | "created_at": "2021-03-17T06:19:01Z", 13 | "enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA9xqWgcQXNt5ARAAsUJY5Z298AZon3IygpvSjV+bkhcQ6E4doKvrpMIP6WJU\nQD44uTgRud45jetCC7d2vdGAdoHPQh0RW573tXS5O+MMeTade+/YkOI8a3ER7aHZ\ntA/+nR67zJ3MTogcGSoRPJMV+ESW04nGqbXS0/92bhKht709eFB6UfU3aRDt0qgY\nLcIwrtz6yDBIOLlsg6vP3jWbh/vi112Sadf+N6wh6929+DgnrNgnPpzSXXpSJBLt\n/DJRvVcH7UNTHszf1NLFkEWCYe38dizAIOxNZmZDBOtUaZqXPGWbS2MPPQBvrzm8\n229OKxfKMRB2uHRM+tD2HINjmO7KqOW6i17BSQoM/CDi3kRELWprmPy6QCiOOXab\nSz1TpmM9ArygQNCBfvRXNmCQ63JRVSc8akZOuY90f5wUQW0dD6cHksILqE3xjmNT\nq6e9OmKogAuPkhX6E2HXfMa/DkJqO9EzOnC8eS37g07SOO9OMbvfnU5gXEulHcGf\nh1d6lf4ZuUfAkcw/tqRWOPQQAuuAn1sK9tHiDzpJ8ohH857y2itLMaqoo5vmDqnD\nFjI5QldbZkyeFhOcB6zdB5o3YIHyCWtNpIOYzac4oEj7rBqLFEUG5Ys+vePYjWzK\n7/MNvX7EhyTvdvTNJZCxMckAf4EJB7Scc+h798qsqQEf3j+8+180NlTaJpL2LdjS\nXgEqX53cDaozb6R3CAFWZrTLrsmjNZN0QchPfqNZr3xaUcl84OHvGo7/LlK/lLim\nDQ6AQOo9gF02N3GfQym1vcDxgqCh+ZpN9w/SQdts53Rz7fwz4DBdjzwvHaFPWDM=\n=UUl+\n-----END PGP MESSAGE-----\n", 14 | "fp": "EFD6F1EDC84D2FA935E38570462054AB8B682702" 15 | } 16 | ], 17 | "unencrypted_suffix": "_unencrypted", 18 | "version": "3.6.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /machines/yara/configuration.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ ]; 5 | 6 | ec2.hvm = true; 7 | 8 | environment.systemPackages = with pkgs; [ 9 | bashInteractive 10 | git 11 | httpie 12 | ]; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/bootyjams.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | let 3 | username = lib.head (lib.attrNames config.home-manager.users); 4 | in 5 | { 6 | environment.systemPackages = with pkgs; [ 7 | nfs-utils 8 | ]; 9 | fileSystems = 10 | let 11 | mkMount = path: { 12 | device = "//192.168.1.147${path}"; 13 | fsType = "cifs"; 14 | options = [ 15 | "credentials=/etc/nixos/secrets/bootyjams.club" 16 | "gid=${toString config.ids.gids.users}" 17 | "noauto" 18 | "rw" 19 | "uid=${toString config.users.users.${username}.uid}" 20 | "vers=2.0" 21 | # "x-systemd.device-timeout=5s" 22 | "x-systemd.idle-timeout=600" 23 | "x-systemd.mount-timeout=5s" 24 | ]; 25 | }; 26 | in 27 | { 28 | "/mnt/music" = mkMount "/homes/eric/music"; 29 | "/mnt/reaper" = mkMount "/REAPER Media"; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /modules/darwin.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | services.chunkwm = { 5 | enable = true; 6 | extraConfig = '' 7 | chunkc core::log_file /usr/local/var/log/chunkwm.log 8 | chunkc core::log_level info 9 | chunkc tiling::rule --owner "Cisco AnyConnect Secure Mobility Client" --state float & 10 | chunkc tiling::rule --owner Emacs --except "^$" --state tile & 11 | ''; 12 | package = pkgs.chunkwm.core; 13 | plugins = { 14 | dir = "/run/current-system/sw/bin/chunkwm-plugins/"; 15 | list = [ "ffm" "tiling" ]; 16 | "tiling".config = '' 17 | chunkc set desktop_padding_step_size 0 18 | chunkc set desktop_gap_step_size 0 19 | chunkc set global_desktop_mode bsp 20 | chunkc set global_desktop_offset_top 0 21 | chunkc set global_desktop_offset_bottom 0 22 | chunkc set global_desktop_offset_left 0 23 | chunkc set global_desktop_offset_right 0 24 | chunkc set global_desktop_offset_gap 0 25 | chunkc set bsp_spawn_left 1 26 | chunkc set bsp_optimal_ratio 1.618 27 | chunkc set bsp_split_mode optimal 28 | chunkc set bsp_split_ratio 0.66 29 | chunkc set window_focus_cycle all 30 | chunkc set mouse_follows_focus 1 31 | chunkc set window_region_locked 1 32 | ''; 33 | }; 34 | }; 35 | services.skhd = { 36 | enable = true; 37 | package = pkgs.skhd; 38 | skhdConfig = '' 39 | alt - space : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~ 40 | 41 | ctrl + alt + cmd - up : chunkc tiling::window --warp north 42 | ctrl + alt + cmd - right : chunkc tiling::window --warp east 43 | ctrl + alt + cmd - down : chunkc tiling::window --warp south 44 | ctrl + alt + cmd - left : chunkc tiling::window --warp west 45 | 46 | shift + alt + cmd - up : chunkc tiling::window --focus north 47 | shift + alt + cmd - right : chunkc tiling::window --focus east 48 | shift + alt + cmd - down : chunkc tiling::window --focus south 49 | shift + alt + cmd - left : chunkc tiling::window --focus west 50 | 51 | ctrl + alt + cmd - e : chunkc tiling::desktop --equalize 52 | ctrl + alt + cmd - f : chunkc tiling::window --toggle float 53 | ctrl + alt + cmd - m : chunkc tiling::window --toggle fullscreen 54 | 55 | shift + cmd - 1 : chunkc tiling::window --send-to-desktop 1 56 | shift + cmd - 2 : chunkc tiling::window --send-to-desktop 2 57 | shift + cmd - 3 : chunkc tiling::window --send-to-desktop 3 58 | shift + cmd - 4 : chunkc tiling::window --send-to-desktop 4 59 | shift + cmd - 5 : chunkc tiling::window --send-to-desktop 5 60 | shift + cmd - 6 : chunkc tiling::window --send-to-desktop 6 61 | ''; 62 | }; 63 | system.defaults = { 64 | NSGlobalDomain = { 65 | AppleKeyboardUIMode = 3; 66 | 67 | ApplePressAndHoldEnabled = false; 68 | InitialKeyRepeat = 10; 69 | KeyRepeat = 1; 70 | 71 | NSAutomaticDashSubstitutionEnabled = false; 72 | NSAutomaticQuoteSubstitutionEnabled = false; 73 | NSAutomaticSpellingCorrectionEnabled = true; 74 | 75 | NSNavPanelExpandedStateForSaveMode = true; 76 | NSNavPanelExpandedStateForSaveMode2 = true; 77 | }; 78 | dock = { 79 | autohide = true; 80 | mru-spaces = false; 81 | orientation = "right"; 82 | showhidden = true; 83 | }; 84 | finder = { 85 | AppleShowAllExtensions = true; 86 | FXEnableExtensionChangeWarning = false; 87 | QuitMenuItem = true; 88 | }; 89 | trackpad.Clicking = true; 90 | }; 91 | } 92 | -------------------------------------------------------------------------------- /modules/location.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | let 3 | airportCode = config.airportCode; 4 | in 5 | { 6 | options.airportCode = lib.mkOption { 7 | default = "MSP"; 8 | type = lib.types.enum [ "ATL" "LHR" "LJU" "MSP" "TRD" ]; 9 | }; 10 | config = lib.mkMerge [ 11 | ( 12 | lib.mkIf (airportCode == "MSP") { 13 | location = { 14 | latitude = 44.98; 15 | longitude = -93.27; 16 | }; 17 | time.timeZone = "America/Chicago"; 18 | } 19 | ) 20 | ( 21 | lib.mkIf (airportCode == "ATL") { 22 | location = { 23 | latitude = 33.77; 24 | longitude = -84.37; 25 | }; 26 | time.timeZone = "America/New_York"; 27 | } 28 | ) 29 | ( 30 | lib.mkIf (airportCode == "LHR") { 31 | location = { 32 | latitude = 51.51; 33 | longitude = -0.09; 34 | }; 35 | time.timeZone = "Europe/London"; 36 | } 37 | ) 38 | ( 39 | lib.mkIf (airportCode == "LJU") { 40 | location = { 41 | latitude = 46.09; 42 | longitude = 14.55; 43 | }; 44 | time.timeZone = "Europe/Ljubljana"; 45 | } 46 | ) 47 | ( 48 | lib.mkIf (airportCode == "TRD") { 49 | location = { 50 | latitude = 63.43; 51 | longitude = 10.40; 52 | }; 53 | time.timeZone = "Europe/Oslo"; 54 | } 55 | ) 56 | ]; 57 | } 58 | -------------------------------------------------------------------------------- /modules/nix.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | nix = { 4 | settings = { 5 | substituters = [ 6 | "https://yurrriq.cachix.org" 7 | ]; 8 | trusted-public-keys = [ 9 | "yurrriq.cachix.org-1:evpJ5wKluf7QOCcv69VkIxCOtHgubrqXlZpp3JAXLBE=" 10 | ]; 11 | }; 12 | # TODO: daemonNiceLevel = 19; 13 | extraOptions = '' 14 | experimental-features = flakes nix-command 15 | ''; 16 | gc = { 17 | automatic = true; 18 | options = "--delete-older-than 30d"; 19 | }; 20 | optimise.automatic = true; 21 | }; 22 | environment.systemPackages = with pkgs; [ 23 | cachix 24 | ]; 25 | } 26 | -------------------------------------------------------------------------------- /modules/nixos.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | boot = { 5 | loader.systemd-boot.enable = lib.mkDefault true; 6 | loader.efi.canTouchEfiVariables = lib.mkDefault true; 7 | tmp.cleanOnBoot = true; 8 | }; 9 | console.font = "Lat2-Terminus16"; 10 | console.useXkbConfig = true; 11 | location.provider = "manual"; 12 | networking.networkmanager.enable = true; 13 | services = { 14 | logind.lidSwitch = "hibernate"; 15 | kbfs.enable = true; 16 | redshift = { 17 | enable = true; 18 | temperature.night = 2300; 19 | }; 20 | thermald.enable = lib.mkDefault true; 21 | libinput = { 22 | enable = true; 23 | touchpad = { 24 | accelSpeed = "1.0"; 25 | disableWhileTyping = true; 26 | naturalScrolling = false; 27 | tapping = true; 28 | }; 29 | }; 30 | xserver = { 31 | enable = true; 32 | 33 | autorun = true; 34 | 35 | displayManager = { 36 | lightdm.enable = true; 37 | session = [ 38 | { 39 | name = "home-manager"; 40 | manage = "window"; 41 | start = '' 42 | ${pkgs.runtimeShell} $HOME/.hm-xsession & 43 | waitPID=$! 44 | ''; 45 | } 46 | ]; 47 | }; 48 | 49 | videoDrivers = lib.mkDefault [ "intel" ]; 50 | 51 | xkb.options = "ctrl:nocaps,compose:ralt"; 52 | }; 53 | }; 54 | hardware.pulseaudio = { 55 | enable = true; 56 | # FIXME 57 | # extraModules = [ pkgs.pulseaudio-modules-bt ]; 58 | package = pkgs.pulseaudioFull; 59 | }; 60 | sound.enable = true; 61 | system.stateVersion = "23.11"; 62 | } 63 | -------------------------------------------------------------------------------- /modules/virtualisation.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | let 3 | username = lib.head (lib.attrNames config.home-manager.users); 4 | in 5 | { 6 | environment.systemPackages = 7 | lib.optionals config.virtualisation.podman.enable [ pkgs.crun ] ++ 8 | lib.optionals config.virtualisation.libvirtd.enable [ pkgs.virt-manager ]; 9 | programs.dconf.enable = config.virtualisation.libvirtd.enable; 10 | users.users."${username}".extraGroups = [ "libvirtd" ]; 11 | virtualisation = { 12 | docker = { 13 | enable = lib.mkDefault false; 14 | liveRestore = lib.mkDefault false; 15 | }; 16 | podman = { 17 | enable = lib.mkDefault (!config.virtualisation.docker.enable); 18 | dockerCompat = lib.mkDefault true; 19 | }; 20 | virtualbox.host.enable = lib.mkDefault false; 21 | virtualbox.host.enableExtensionPack = lib.mkDefault (config.virtualisation.virtualbox.host.enable); 22 | libvirtd.enable = lib.mkDefault false; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /pkgs/development/node-packages/Makefile: -------------------------------------------------------------------------------- 1 | node-packages.nix: node-packages.json 2 | node2nix --nodejs-14 -i $< 3 | -------------------------------------------------------------------------------- /pkgs/development/node-packages/default.nix: -------------------------------------------------------------------------------- 1 | # This file has been generated by node2nix 1.11.1. Do not edit! 2 | 3 | { pkgs ? import { 4 | inherit system; 5 | } 6 | , system ? builtins.currentSystem 7 | , nodejs ? pkgs."nodejs-14_x" 8 | }: 9 | 10 | let 11 | nodeEnv = import ./node-env.nix { 12 | inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; 13 | inherit pkgs nodejs; 14 | libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; 15 | }; 16 | in 17 | import ./node-packages.nix { 18 | inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; 19 | inherit nodeEnv; 20 | } 21 | -------------------------------------------------------------------------------- /pkgs/development/node-packages/node-packages.json: -------------------------------------------------------------------------------- 1 | [ 2 | "codeowners" 3 | ] 4 | -------------------------------------------------------------------------------- /scripts/format-biber.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | [ -z "$1" ] && { 6 | echo "No argument supplied" 7 | exit 1 8 | } 9 | 10 | [ -f "$1" ] || { 11 | echo "$1 not found" 12 | exit 1 13 | } 14 | 15 | type biber >/dev/null 2>&1 || { 16 | echo "Please install biber" 17 | exit 1 18 | } 19 | 20 | biber \ 21 | --nolog \ 22 | --output-align \ 23 | --output-fieldcase=lower \ 24 | --output-file /dev/stdout \ 25 | --output-resolve \ 26 | --output-safechars \ 27 | --quiet --quiet \ 28 | --tool \ 29 | "$1" | 30 | head -n-1 | 31 | sponge "$1" 32 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | *.nwi 2 | *.tex 3 | !config/emacs.tex 4 | !config/fish.tex 5 | !config/git.tex 6 | !config/taskwarrior.tex 7 | !dotfiles.tex 8 | !glossary.tex 9 | !preamble.tex 10 | -------------------------------------------------------------------------------- /src/config/applications.nw: -------------------------------------------------------------------------------- 1 | \section{Applications} 2 | 3 | <>= 4 | { lib, pkgs, ... }: 5 | { 6 | home.packages = with pkgs; ( 7 | [ 8 | <> 9 | ] 10 | ) ++ lib.optionals stdenv.isLinux ( 11 | [ 12 | <> 13 | ] 14 | ); 15 | } 16 | @ 17 | 18 | \subsection{Common applications} 19 | 20 | \hrefootnote{https://www.clementine-player.org}{Clementine} is my favorite music 21 | player for local (network) files, and Spotify is my streaming service of choice. 22 | 23 | <>= 24 | clementine 25 | spotify 26 | @ 27 | 28 | I find \hrefootnote{https://gitlab.freedesktop.org/pulseaudio/pavucontrol}{Pulse Audio Volume Control} to be a necessary evil, for the moment. 29 | 30 | <>= 31 | pavucontrol 32 | @ 33 | 34 | Slack is great for communicating with open source communities, and we also use 35 | it at work, so it's convenient to just install it everywhere. 36 | 37 | <>= 38 | slack 39 | @ 40 | 41 | \subsection{Linux-specific applications} 42 | 43 | Install \hrefootnote{https://launchpad.net/qpdfview}{qpdfview} only on Linux. 44 | 45 | <>= 46 | qpdfview 47 | @ 48 | -------------------------------------------------------------------------------- /src/config/bash.nw: -------------------------------------------------------------------------------- 1 | \section{Bash} 2 | 3 | Enable the Bash module. 4 | 5 | <>= 6 | { ... }: 7 | 8 | { 9 | 10 | programs.bash.enable = true; 11 | 12 | } 13 | @ 14 | -------------------------------------------------------------------------------- /src/config/bat.nw: -------------------------------------------------------------------------------- 1 | \section{bat} 2 | 3 | Enable the \hrefootnote{https://github.com/sharkdp/bat}{bat} module. 4 | 5 | <>= 6 | { ... }: 7 | 8 | { 9 | 10 | programs.bat = { 11 | enable = true; 12 | config = { 13 | <> 14 | }; 15 | }; 16 | 17 | } 18 | @ 19 | 20 | 21 | Use YAML syntax for \fish{.yaml.gotmpl} files. 22 | 23 | <>= 24 | map-syntax = "*.yaml.gotmpl:YAML"; 25 | @ 26 | 27 | 28 | For the pager, use \bash{less}. 29 | 30 | <>= 31 | pager = "less -FR"; 32 | @ 33 | 34 | 35 | Set the style to \bash{changes}. 36 | 37 | <>= 38 | style = "changes"; 39 | @ 40 | 41 | 42 | Use the Monokai Extended theme. 43 | 44 | <>= 45 | theme = "Monokai Extended"; 46 | @ 47 | -------------------------------------------------------------------------------- /src/config/browserpass.nw: -------------------------------------------------------------------------------- 1 | \section{Browserpass} 2 | 3 | <>= 4 | { pkgs, ... }: 5 | 6 | { 7 | 8 | home.packages = with pkgs; [ 9 | browserpass 10 | ]; 11 | 12 | programs.browserpass = { 13 | enable = true; 14 | browsers = [ "firefox" ]; 15 | }; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/config/bugwarrior.nw: -------------------------------------------------------------------------------- 1 | \section{bugwarrior} 2 | 3 | <>= 4 | { config, pkgs, ... }: 5 | 6 | { 7 | 8 | @ 9 | 10 | <>= 11 | home.packages = with pkgs; [ 12 | bugwarrior 13 | ]; 14 | 15 | @ 16 | 17 | <>= 18 | imports = [ 19 | ./password-store.nix 20 | ./taskwarrior 21 | ]; 22 | 23 | @ 24 | 25 | <>= 26 | programs.taskwarrior = { 27 | config = { 28 | context.other = "jiraurl.none or -work"; 29 | context.work = "jiraurl.any or +work"; 30 | uda = { 31 | jiracreatedts = { 32 | label = "Created At"; 33 | type = "date"; 34 | }; 35 | jiradescription = { 36 | label = "Jira Description"; 37 | type = "string"; 38 | }; 39 | jiraestimate = { 40 | label = "Estimate"; 41 | type = "numeric"; 42 | }; 43 | jirafixversion = { 44 | label = "Fix Version"; 45 | type = "string"; 46 | }; 47 | jiraid = { 48 | label = "Jira Issue ID"; 49 | type = "string"; 50 | }; 51 | jiraissuetype = { 52 | label = "Issue Type"; 53 | type = "string"; 54 | }; 55 | jirastatus = { 56 | label = "Jira Status"; 57 | type = "string"; 58 | }; 59 | jirasummary = { 60 | label = "Jira Summary"; 61 | type = "string"; 62 | }; 63 | jiraurl = { 64 | label = "Jira URL"; 65 | type = "string"; 66 | }; 67 | }; 68 | }; 69 | }; 70 | 71 | @ 72 | 73 | <>= 74 | xdg.configFile."bugwarrior/bugwarriorrc".text = '' 75 | [general] 76 | targets = sportradar_jira 77 | taskrc = ${config.home.homeDirectory}/.taskrc 78 | inline_links = False 79 | annotation_links = True 80 | annotation_comments = True 81 | legacy_matching = False 82 | log.level = DEBUG 83 | log.file = ${config.home.homeDirectory}/log/bugwarrior.log 84 | annotation_length = 80 85 | 86 | [sportradar_jira] 87 | service = jira 88 | jira.base_uri = https://jira.sportradar.ag 89 | jira.username = e.bailey 90 | jira.password = @oracle:eval:pass jira.sportradar.ag 91 | jira.query = ((assignee = currentUser() OR reporter = currentUser()) OR (summary ~ currentUser() OR description ~ currentUser() OR comment ~ currentUser())) AND resolution = Unresolved 92 | jira.version = 8 93 | jira.add_tags = work 94 | jira.description_template = {{jiraid}}: {{jirasummary}} 95 | ''; 96 | 97 | @ 98 | 99 | <>= 100 | } 101 | @ 102 | 103 | %% Local Variables: 104 | %% noweb-code-mode: nix-mode 105 | %% End: 106 | -------------------------------------------------------------------------------- /src/config/clis.nw: -------------------------------------------------------------------------------- 1 | \section{Configure CLIs} 2 | 3 | <>= 4 | { pkgs, ... }: 5 | { 6 | home.packages = with pkgs; ( 7 | [ 8 | (aspellWithDicts (dicts: [ dicts.en dicts.es dicts.nb dicts.sv ])) 9 | ansifilter 10 | bind 11 | curl 12 | deadnix 13 | httpie 14 | gnutar 15 | gzip 16 | unzip 17 | clac 18 | coreutils 19 | expect 20 | gawk 21 | gnumake 22 | gnused 23 | moreutils 24 | ripgrep 25 | shellcheck 26 | shfmt 27 | tree 28 | watch 29 | xclip 30 | yq 31 | mdcat 32 | # smos 33 | nix-output-monitor 34 | nixpkgs-fmt 35 | nixpkgs-review 36 | wirelesstools 37 | ] 38 | ) ++ lib.optionals stdenv.isLinux [ 39 | libnotify 40 | lm_sensors 41 | mtr 42 | networkmanager-openconnect 43 | openconnect 44 | ]; 45 | } 46 | @ 47 | -------------------------------------------------------------------------------- /src/config/direnv.nw: -------------------------------------------------------------------------------- 1 | \section{direnv} 2 | 3 | Configure \hrefootnote{https://direnv.net}{direnv}, including bash and fish 4 | integration, by default, and disable the zsh integration, since I don't use zsh. 5 | 6 | <>= 7 | { ... }: 8 | 9 | { 10 | 11 | programs.direnv = { 12 | enable = true; 13 | enableZshIntegration = false; 14 | nix-direnv.enable = true; 15 | }; 16 | 17 | } 18 | @ 19 | -------------------------------------------------------------------------------- /src/config/dunst.nw: -------------------------------------------------------------------------------- 1 | \section{Dunst} 2 | 3 | <>= 4 | { pkgs, ... }: 5 | 6 | { 7 | services.dunst = { 8 | enable = true; 9 | <> 10 | settings = { 11 | global = { 12 | <> 13 | }; 14 | <> 15 | <> 16 | <> 17 | }; 18 | }; 19 | } 20 | @ 21 | 22 | <>= 23 | iconTheme = { 24 | package = pkgs.paper-icon-theme; 25 | name = "Paper"; 26 | size = "48x48"; 27 | }; 28 | @ 29 | 30 | <>= 31 | font = "Iosevka Custom 10"; 32 | markup = "yes"; 33 | plain_text = "no"; 34 | format = "%s\\n%b"; 35 | sort = "yes"; 36 | indicate_hidden = "yes"; 37 | alignment = "center"; 38 | bounce_freq = 0; 39 | show_age_threshold = 30; 40 | word_wrap = "yes"; 41 | ignore_newline = "no"; 42 | stack_duplicates = "yes"; 43 | hide_duplicates_count = "yes"; 44 | origin = "bottom-right"; 45 | width = "300"; 46 | height = "100"; 47 | notification_limit = 3; 48 | offset = "15x70"; 49 | shrink = "no"; 50 | transparency = 15; 51 | idle_threshold = 0; 52 | follow = "keyboard"; 53 | sticky_history = "yes"; 54 | history_length = 15; 55 | show_indicators = "no"; 56 | startup_notification = false; 57 | dmenu = "/run/current-system/sw/bin/dmenu -p dunst:"; 58 | browser = "/etc/profiles/per-user/e.bailey/bin/firefox -new-tab"; 59 | icon_position = "left"; 60 | max_icon_size = 80; 61 | frame_width = 0; 62 | frame_color = "#8EC07C"; 63 | @ 64 | 65 | <>= 66 | shortcuts = { 67 | close = "mod4+space"; 68 | close_all = "mod4+mod1+space"; 69 | # context = "ctrl+shift+period"; 70 | history = "ctrl+grave"; 71 | }; 72 | @ 73 | 74 | <>= 75 | urgency_low = { 76 | frame_color = "#3B7C87"; 77 | foreground = "#3B7C87"; 78 | background = "#2B313C"; 79 | timeout = 4; 80 | }; 81 | urgency_normal = { 82 | frame_color = "#5B8234"; 83 | foreground = "#5B8234"; 84 | background = "#2B313C"; 85 | timeout = 6; 86 | }; 87 | urgency_critical = { 88 | frame_color = "#B7472A"; 89 | foreground = "#B7472A"; 90 | background = "#191311"; 91 | timeout = 8; 92 | }; 93 | @ 94 | 95 | <>= 96 | slack = { 97 | appname = "Slack"; 98 | body = "*critical*"; 99 | frame_color = "#B7472A"; 100 | foreground = "#B7472A"; 101 | background = "#191311"; 102 | urgency = "critical"; 103 | }; 104 | @ 105 | 106 | %% Local Variables: 107 | %% noweb-code-mode: nix-mode 108 | %% End: 109 | -------------------------------------------------------------------------------- /src/config/emacs.tex: -------------------------------------------------------------------------------- 1 | \section{Emacs} 2 | \label{sec:emacs} 3 | \input{config/emacs/default} 4 | \input{config/emacs/init} 5 | -------------------------------------------------------------------------------- /src/config/emacs/default.nw: -------------------------------------------------------------------------------- 1 | %% -*- noweb-code-mode: nix-mode -*- 2 | 3 | <>= 4 | { config, lib, pkgs, ... }: 5 | 6 | { 7 | 8 | home.file.".emacs.d/init.el".source = ./init.el; 9 | 10 | home.packages = with pkgs; [ 11 | graphviz 12 | noweb 13 | sqlite 14 | ]; 15 | 16 | home.sessionVariables = rec { 17 | EDITOR = ''emacsclient -nw -a \"\"''; 18 | GIT_EDITOR = EDITOR; 19 | VISUAL = ''emacsclient -cna \"\"''; 20 | }; 21 | 22 | programs.emacs = { 23 | enable = true; 24 | package = pkgs.emacsWithPackagesFromUsePackage { 25 | alwaysEnsure = true; 26 | config = ./init.el; 27 | override = epkgs: epkgs // { 28 | noweb-mode = pkgs.noweb; 29 | }; 30 | }; 31 | }; 32 | 33 | programs.fish.shellAliases = lib.mkIf (config.programs.fish.enable) rec { 34 | e = "emacsclient -na \"\""; 35 | ec = e + " -c"; 36 | et = "emacsclient -nw -a \"\""; 37 | }; 38 | 39 | services.emacs.enable = ! pkgs.stdenv.isDarwin; 40 | 41 | } 42 | @ 43 | -------------------------------------------------------------------------------- /src/config/firefox.nw: -------------------------------------------------------------------------------- 1 | \section{Firefox} 2 | \label{sec:firefox} 3 | 4 | <>= 5 | { pkgs, ... }: 6 | 7 | { 8 | 9 | programs.firefox = { 10 | enable = true; 11 | profiles = { 12 | default = { 13 | extensions = with pkgs.nur.repos.rycee.firefox-addons; [ 14 | browserpass 15 | darkreader 16 | lastpass-password-manager 17 | privacy-badger 18 | ]; 19 | settings = { 20 | # http://kb.mozillazine.org/About:config_entries 21 | "browser.ctrlTab.recentlyUsedOrder" = false; 22 | "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; 23 | "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; 24 | "browser.newtabpage.activity-stream.feeds.section.topstories" = false; 25 | "browser.newtabpage.activity-stream.feeds.snippets" = false; 26 | # FIXME: "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = null; 27 | "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; 28 | "browser.newtabpage.activity-stream.showSearch" = false; 29 | # FIXME: "browser.newtabpage.pinned" = "[]"; 30 | # FIXME: "browser.search.defaultenginename" = "DuckDuckGo"; 31 | # FIXME: "browser.search.defaulturl" = "https://duckduckgo.com/?q="; 32 | "browser.search.hiddenOneOffs" = "Google,Bing,Amazon.com,eBay,Twitter,Wikipedia (en)"; 33 | # FIXME: git "browser.search.selectedEngine" = "DuckDuckGo"; 34 | "browser.search.suggest.enabled" = false; 35 | "browser.startup.page" = 3; 36 | "browser.tabs.unloadOnLowMemory" = true; 37 | "browser.urlbar.placeholderName" = "DuckDuckGo"; 38 | "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; 39 | "font.size.variable.x-western" = 12; 40 | "signon.rememberSignons" = false; 41 | }; 42 | }; 43 | }; 44 | }; 45 | 46 | } 47 | @ 48 | -------------------------------------------------------------------------------- /src/config/fish.tex: -------------------------------------------------------------------------------- 1 | \section{fish} 2 | \input{config/fish/default} 3 | \input{config/fish/abbrs} 4 | \input{config/fish/aliases} 5 | \input{config/fish/shellInit} 6 | \input{config/fish/interactiveShellInit} 7 | -------------------------------------------------------------------------------- /src/config/fish/abbrs.nw: -------------------------------------------------------------------------------- 1 | \subsection{Fish abbreviations} 2 | 3 | \say{% 4 | \fish{abbr} manages abbreviations - user-defined words that are replaced with 5 | longer phrases after they are entered. 6 | 7 | For example, a frequently-run command like \fish{git checkout} can be 8 | abbreviated to \fish{gco}. After entering \fish{gco} and pressing 9 | \texttt{Space} or \texttt{Enter}, the full text \fish{git checkout} will 10 | appear in the command line.% 11 | }% FIXME: \cite{fish_abbr} 12 | 13 | <>= 14 | { ... }: 15 | 16 | { 17 | 18 | programs.fish.shellAbbrs = { 19 | <> 20 | <> 21 | <> 22 | <> 23 | }; 24 | 25 | } 26 | @ 27 | 28 | \newthought{\hrefootnote{https://direnv.net/}{direnv} is great} for 29 | directory-specific environments, and saving keystrokes is great, too. 30 | 31 | <>= 32 | da = "direnv allow"; 33 | dn = "direnv deny"; 34 | dr = "direnv reload"; 35 | @ 36 | 37 | \newthought{\fish{kubectl} is very cumbersome} to type all the time. 38 | Using fish abbrevations, save some precious keystrokes. 39 | It's definitely \href{https://xkcd.com/1205/}{worth the time}. 40 | 41 | <>= 42 | kc = "kubectl"; 43 | kcd = "kubectl drain --delete-emptydir-data --ignore-daemonsets"; 44 | kcn = "kubectl --namespace"; 45 | kcnp = "kubectl get pods --field-selector=spec.nodeName="; 46 | kcx = "kubectl --context"; 47 | kg = "kubectl get"; 48 | kgp = "kubectl get pods"; 49 | kgy = "kubectl get -o yaml"; 50 | kn = "kubens"; 51 | kns = "kubens"; 52 | krr = "kubectl rollout restart"; 53 | krs = "kubectl rollout status"; 54 | kt = "stern"; 55 | kx = "kubectx"; 56 | @ 57 | 58 | \newthought{It's useful to run \fish{nix build}} with various flags. 59 | Why not save some keystrokes for those tasks, too? 60 | 61 | <>= 62 | nb = "nix build"; 63 | nbd = "nix build --dry-run"; 64 | nbn = "nix build --no-link"; 65 | nbo = "nix build -o"; 66 | nfc = "nix flake check --log-format internal-json --verbose &| nom --json"; 67 | @ 68 | 69 | \newthought{I'm not quite used to} all the \fish{ripgrep} flags yet. 70 | I'm also a lazy typist, so define some memorable abbreviations. 71 | 72 | \say{% 73 | Searches case insensitively if the pattern is all lowercase. 74 | Search case sensitively otherwise.% 75 | }% FIXME: \cite{ripgrep} 76 | 77 | <>= 78 | rg = "rg -S"; 79 | @ 80 | 81 | <>= 82 | rga = "rg --hidden --iglob !.git"; 83 | rgf = "rg -F"; 84 | @ 85 | 86 | \say{Never print the file path with the matched lines}, and 87 | \say{[s]uppress line numbers.}% FIXME: \cite{ripgrep} 88 | 89 | <>= 90 | rgin = "rg -IN"; 91 | @ 92 | 93 | \begin{minted}{fish} 94 | λ rg -IN name: helmfile.d/*.yaml | sort -u 95 | - name: cert-manager 96 | - name: cluster-autoscaler 97 | - name: elastalert 98 | - name: elasticsearch-client 99 | - name: elasticsearch-curator 100 | - name: elasticsearch-exporter 101 | - name: elasticsearch-master 102 | - name: external-dns 103 | - name: fluentd-elasticsearch 104 | - name: hubble 105 | - name: kibana 106 | - name: kube-resource-report 107 | - name: metrics-server 108 | - name: nginx-ingress-core 109 | - name: prometheus-operator 110 | \end{minted} 111 | 112 | <>= 113 | rgn = "rg --no-heading"; 114 | @ 115 | -------------------------------------------------------------------------------- /src/config/fish/aliases.nw: -------------------------------------------------------------------------------- 1 | \newthought{Define} some shell aliases. 2 | 3 | <>= 4 | { ... }: 5 | 6 | { 7 | 8 | programs.fish.shellAliases = { 9 | <> 10 | }; 11 | 12 | } 13 | @ 14 | 15 | Help me replace autojump with zoxide. 16 | 17 | <>= 18 | j = "z"; 19 | @ 20 | 21 | I've aliased \bash{k} to \bash{clear} for years and am too stubborn to change, 22 | even though all the cool kids alias \fish{k} to \fish{kubectl} these days. 23 | 24 | <>= 25 | k = "clear"; 26 | @ 27 | 28 | Define some short eza\todoo{add link} aliases. 29 | 30 | <>= 31 | l = "eza --color=auto -G"; 32 | ll = "eza --color=auto -la"; 33 | @ 34 | 35 | I liked \fish{pbcopy} and \fish{pbpaste} on Darwin, 36 | so I ``ported'' them to NixOS. 37 | 38 | <>= 39 | pbcopy = "xclip -sel clipboard"; 40 | pbpaste = "xclip -sel clipboard -o"; 41 | @ 42 | -------------------------------------------------------------------------------- /src/config/fish/default.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { lib, pkgs, ... }: 3 | 4 | { 5 | 6 | imports = [ 7 | ./abbrs.nix 8 | ./aliases.nix 9 | ]; 10 | 11 | home = { 12 | packages = with pkgs; [ 13 | eza 14 | ]; 15 | sessionVariables = { 16 | SHELL = "fish"; 17 | TERMINAL = "kitty"; 18 | }; 19 | }; 20 | 21 | programs.fish = 22 | let 23 | inherit (lib.strings) fileContents; 24 | in 25 | { 26 | enable = true; 27 | interactiveShellInit = fileContents ./interactiveShellInit.fish; 28 | shellInit = fileContents ./shellInit.fish; 29 | }; 30 | 31 | programs.zoxide.enable = true; 32 | 33 | } 34 | @ 35 | -------------------------------------------------------------------------------- /src/config/fish/interactiveShellInit.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | function clone 3 | function __update 4 | test -d $argv[1]; and cd $argv[1]; and git fetch --all; and git pull 5 | end 6 | 7 | function __usage 8 | echo "Usage: clone [username] [repository] [[destination]]" 9 | end 10 | 11 | set --local num_args (count $argv) 12 | 13 | if test $num_args -ge 2 14 | set --local user $argv[1] 15 | set --local repo $argv[2] 16 | 17 | if test $num_args -eq 2 18 | set dest ~/src/$user/$repo 19 | else if test $num_args -eq 3 20 | set dest $argv[3]/$user/$repo 21 | else 22 | __usage 23 | end 24 | 25 | echo $dest 26 | 27 | git clone git@github.com:$user/$repo.git $dest; or __update $dest; or __usage 28 | else 29 | __usage 30 | end 31 | end 32 | @ 33 | 34 | <>= 35 | function latest -d 'Print the latest release (on GitHub) for a given user and repo.' 36 | # TODO: __usage 37 | 38 | set --local num_args (count $argv) 39 | 40 | if test $num_args -eq 2 41 | set --local user $argv[1] 42 | set --local repo $argv[2] 43 | http https://api.github.com/repos/$user/$repo/releases/latest | jq -r '.tag_name' 44 | end 45 | end 46 | @ 47 | 48 | <>= 49 | command -sq aws; and command -sq jq; and \ 50 | function describe-cert -d 'List the domains for a given ACM certificate' 51 | test (count $argv) -ne 1; and return 52 | aws acm describe-certificate --certificate-arn $argv[1] | 53 | jq -r '.Certificate | .SubjectAlternativeNames[]' 54 | end 55 | @ 56 | 57 | <>= 58 | command -sq fluidsynth; and function playmidi 59 | fluidsynth -i ~/lib/arachno-soundfont/Arachno\ SoundFont\ -\ Version\ 1.0.sf2 $argv 60 | end 61 | @ 62 | 63 | <>= 64 | command -sq kitty; and function icat 65 | kitty +kitten icat $argv 66 | end 67 | @ 68 | 69 | <>= 70 | command -sq kubectl; and begin 71 | # TODO: Add option to print server versions too. 72 | function k8s::versions 73 | printf "kubectl %s\n" (command kubectl version --client --short) 74 | printf "helm %s\n" (command helm version --client --short) 75 | command helmfile --version 76 | printf "kops %s\n" (command kops version) 77 | end 78 | 79 | function kcterm -d 'Terminate a Kubernetes node' 80 | test (count $argv) -ne 1; and return 81 | kubectl get node -o jsonpath='{.spec.providerID}' $argv[1] | 82 | cut -d'/' -f5 | 83 | xargs aws ec2 terminate-instances --instance-ids 84 | end 85 | end 86 | @ 87 | 88 | <>= 89 | # FIXME: functions rvm >/dev/null 2>&1; and rvm default 90 | @ 91 | 92 | <>= 93 | set fish_greeting 94 | @ 95 | 96 | <>= 97 | command -sq task; and command -sq jq; and function tj \ 98 | -d 'Open the Jira ticket associated with a Taskwarrior task' 99 | test (count $argv) -ne 1; and return 100 | open (task $argv[1] export | jq -r '.[0].jiraurl') 101 | end 102 | @ 103 | 104 | %% Local Variables: 105 | %% noweb-code-mode: fish-mode 106 | %% End: 107 | -------------------------------------------------------------------------------- /src/config/fish/shellInit.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | for p in /run/current-system/sw/bin ~/bin 3 | if not contains $p $fish_user_paths 4 | set -U fish_user_paths $p $fish_user_paths 5 | end 6 | end 7 | 8 | set -U fish_user_paths /run/wrappers/bin $fish_user_paths 9 | 10 | 11 | function fish_title 12 | echo "$PWD | $_" | sed "s|$HOME|~|g" 13 | end 14 | @ 15 | -------------------------------------------------------------------------------- /src/config/fonts.nw: -------------------------------------------------------------------------------- 1 | \section{Configure font(s)} 2 | 3 | <>= 4 | { pkgs, ... }: 5 | { 6 | fonts.fontconfig.enable = true; 7 | home.packages = with pkgs; [ 8 | iosevka-custom 9 | ]; 10 | } 11 | @ 12 | -------------------------------------------------------------------------------- /src/config/fzf.nw: -------------------------------------------------------------------------------- 1 | \section{fzf} 2 | 3 | <>= 4 | { ... }: 5 | 6 | { 7 | 8 | programs.fzf = { 9 | enable = true; 10 | enableZshIntegration = false; 11 | }; 12 | 13 | } 14 | @ 15 | -------------------------------------------------------------------------------- /src/config/git.tex: -------------------------------------------------------------------------------- 1 | \section{Git} 2 | \input{config/git/default} 3 | \input{config/git/packages} 4 | \input{config/git/config} 5 | \input{config/git/aliases} 6 | -------------------------------------------------------------------------------- /src/config/git/aliases.nw: -------------------------------------------------------------------------------- 1 | %% -*- noweb-code-mode: nix-mode -*- 2 | 3 | \subsection{Aliases} 4 | 5 | <>= 6 | { config, lib, ... }: 7 | 8 | { 9 | 10 | programs.fish.shellAbbrs = lib.mkIf (config.programs.fish.enable) { 11 | g = "git"; 12 | ga = "gita"; 13 | gaf = "gita fetch"; 14 | gall = "gita ll"; 15 | gd = "git diff"; 16 | gdc = "git diff --cached"; 17 | gm = "git merge"; 18 | gs = "git status --short --untracked-files=no"; 19 | gt = "git tree"; 20 | }; 21 | 22 | programs.git.aliases = rec { 23 | ap = "add --patch"; 24 | bm = "branch --merged"; 25 | bnm = "branch --no-merged"; 26 | ca = "commit --amend"; 27 | cam = "${ca} --message"; 28 | can = "${ca} --no-edit"; 29 | cann = "${can} --no-verify"; 30 | cans = "${can} --gpg-sign"; 31 | cas = "${ca} --gpg-sign"; 32 | casm = "${cas} --message"; 33 | cm = "commit --message"; 34 | cnm = "commit --no-verify --message"; 35 | co = "checkout"; 36 | cob = "${co} -b"; 37 | # FIXME: conflicts with git-extras 38 | # cp = "cherry-pick"; 39 | cpa = "cherry-pick --abort"; 40 | cpc = "cherry-pick --continue"; 41 | cpm = "cherry-pick -xm1"; 42 | cpx = "cherry-pick -x"; 43 | csm = "commit --gpg-sign --message"; 44 | d = "diff"; 45 | dad = "add"; 46 | dc = "diff --cached"; 47 | ds = "diff --stat"; 48 | # ffco = "flow feature checkout"; 49 | # ffr = "flow feature rebase"; 50 | # ffs = "flow feature start"; 51 | # frf = "flow release finish"; 52 | # frfs = "flow release finish -s"; 53 | # frs = "flow release start"; 54 | r = "reset"; 55 | rb = "rebase"; 56 | rba = "rebase --abort"; 57 | rbc = "rebase --continue"; 58 | rbi = "rebase --interactive"; 59 | rbs = "rebase --skip"; 60 | rest = "reset"; 61 | rh = "reset --hard"; 62 | sa = "stash apply"; 63 | sk = "stash --keep-index"; 64 | sl = "stash list"; 65 | sp = "stash pop"; 66 | spa = "stash --patch"; 67 | ss = "stash save"; 68 | st = "status --short"; 69 | stu = "status --short --untracked-files=no"; 70 | stat = "status"; 71 | tree = "log --all --graph --oneline"; 72 | }; 73 | 74 | } 75 | @ 76 | -------------------------------------------------------------------------------- /src/config/git/config.nw: -------------------------------------------------------------------------------- 1 | Configure Git. 2 | 3 | <>= 4 | { config, lib, pkgs, ... }: 5 | 6 | { 7 | 8 | programs.git = { 9 | delta = { 10 | enable = true; 11 | options = { 12 | plus-style = "syntax #012800"; 13 | minus-style = "syntax #340001"; 14 | syntax-theme = "Monokai Extended"; 15 | navigate = true; 16 | }; 17 | }; 18 | 19 | extraConfig = { 20 | color = { 21 | diff-highlight = { 22 | oldNormal = "red bold"; 23 | oldHighlight = "red bold 52"; 24 | newNormal = "green bold"; 25 | newHighlight = "green bold 22"; 26 | }; 27 | 28 | diff = { 29 | meta = 227; 30 | frag = "magenta bold"; 31 | commit = "227 bold"; 32 | old = "red bold"; 33 | new = "green bold"; 34 | whitespace = "red reverse"; 35 | }; 36 | 37 | status = { 38 | added = "green"; 39 | changed = "yellow"; 40 | untracked = "cyan"; 41 | }; 42 | ui = true; 43 | }; 44 | 45 | commit.template = "${config.xdg.dataHome}/git/commit.template"; 46 | 47 | credential = { 48 | helper = "${pkgs.gitAndTools.pass-git-helper}/bin/pass-git-helper"; 49 | useHttpPath = true; 50 | }; 51 | 52 | diff = { 53 | gpg = { 54 | textconv = "gpg --no-tty --decrypt"; 55 | }; 56 | sopsdiffer = { 57 | textconv = "sops -d"; 58 | }; 59 | }; 60 | 61 | difftool = { 62 | dyff.cmd = "dyff --color auto between --omit-header \"$LOCAL\" \"$REMOTE\""; 63 | pdfdiffer.cmd = "diff-pdf --view \"$LOCAL\" \"$REMOTE\""; 64 | prompt = false; 65 | trustExitCode = true; 66 | }; 67 | 68 | fetch.prune = true; 69 | 70 | init.defaultBranch = "main"; 71 | 72 | pull.ff = "only"; 73 | 74 | rerere.enabled = true; 75 | 76 | url."git@gitlab.sportradar.ag:" = { 77 | insteadOf = "https://gitlab.sportradar.ag/"; 78 | }; 79 | }; 80 | 81 | includes = 82 | let 83 | inherit (config.accounts.email) accounts; 84 | personal = { 85 | signing.key = 86 | lib.optional 87 | (lib.hasAttrByPath [ "gpg" "key" ] accounts.personal) 88 | accounts.personal.gpg.key; 89 | user.email = accounts.personal.address; 90 | }; 91 | work = { 92 | signing.key = 93 | lib.optional 94 | (lib.hasAttrByPath [ "gpg" "key" ] accounts.work) 95 | accounts.work.gpg.key; 96 | user.email = accounts.work.address; 97 | }; 98 | in 99 | [ 100 | { 101 | condition = "gitdir:~/src/git.sr.ht/"; 102 | contents = personal; 103 | } 104 | { 105 | condition = "gitdir:~/src/github.com/"; 106 | contents = personal; 107 | } 108 | { 109 | condition = "gitdir:~/src/gitlab.com/"; 110 | contents = personal; 111 | } 112 | { 113 | condition = "gitdir:~/src/gitlab.sportradar.ag/"; 114 | contents = work; 115 | } 116 | ]; 117 | 118 | lfs.enable = true; 119 | 120 | userName = 121 | (builtins.head 122 | (lib.filter (account: account.primary) 123 | (lib.attrValues config.accounts.email.accounts))).realName; 124 | }; 125 | 126 | xdg.configFile."git/attributes".text = '' 127 | *.gpg filter=gpg diff=gpg 128 | ''; 129 | 130 | xdg.configFile."pass-git-helper/git-pass-mapping.ini" = { 131 | source = ./git-pass-mapping.ini; 132 | }; 133 | 134 | xdg.dataFile."git/commit.template" = { 135 | source = ./commit.template; 136 | }; 137 | 138 | } 139 | @ 140 | -------------------------------------------------------------------------------- /src/config/git/default.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { config, ... }: 3 | 4 | { 5 | imports = [ 6 | ./aliases.nix 7 | ./config.nix 8 | ./lab.nix 9 | ./packages.nix 10 | ]; 11 | 12 | programs.git = { 13 | enable = true; 14 | ignores = [ 15 | "*~" 16 | ".DS_Store" 17 | ]; 18 | }; 19 | 20 | } 21 | @ 22 | -------------------------------------------------------------------------------- /src/config/git/lab.nw: -------------------------------------------------------------------------------- 1 | \subsection{Configure (Git)Lab CLI} 2 | 3 | <>= 4 | { config, lib, pkgs, ... }: 5 | 6 | let 7 | tomlFormat = pkgs.formats.toml { }; 8 | in 9 | 10 | { 11 | home.packages = [ 12 | pkgs.gitAndTools.lab 13 | ]; 14 | } // lib.mkIf (config.programs.password-store.enable) { 15 | xdg.configFile."lab/lab.toml".source = tomlFormat.generate "lab-config" { 16 | core = { 17 | host = "https://gitlab.sportradar.ag"; 18 | load_token = "pass gitlab.sportradar.ag/token/api"; 19 | user = "e.bailey"; 20 | }; 21 | }; 22 | } 23 | @ 24 | -------------------------------------------------------------------------------- /src/config/git/packages.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { pkgs, ... }: 3 | 4 | { 5 | home.packages = with pkgs; ( 6 | [ 7 | diff-pdf 8 | dyff 9 | git 10 | github-cli 11 | kdiff3 12 | nix-prefetch-git 13 | nix-prefetch-github 14 | sops 15 | ] ++ ( 16 | with gitAndTools; [ 17 | git-extras 18 | gita 19 | hub 20 | lab 21 | ] 22 | ) 23 | ); 24 | 25 | } 26 | @ 27 | -------------------------------------------------------------------------------- /src/config/gpg.nw: -------------------------------------------------------------------------------- 1 | \section{GPG} 2 | 3 | <>= 4 | { config, lib, pkgs, ... }: 5 | 6 | { 7 | 8 | programs.gpg = { 9 | enable = true; 10 | settings = { 11 | default-key = 12 | (builtins.head 13 | (lib.filter (account: account.primary) 14 | (lib.attrValues config.accounts.email.accounts))).gpg.key; 15 | keyid-format = "long"; 16 | no-emit-version = true; 17 | }; 18 | }; 19 | 20 | services.gpg-agent = { 21 | enable = true; 22 | defaultCacheTtl = 28800; 23 | enableSshSupport = true; 24 | maxCacheTtl = 28800; 25 | pinentryPackage = pkgs.pinentry; 26 | }; 27 | 28 | } 29 | @ 30 | -------------------------------------------------------------------------------- /src/config/htop.nw: -------------------------------------------------------------------------------- 1 | \section{htop} 2 | 3 | <>= 4 | { ... }: 5 | 6 | { 7 | 8 | programs.htop = { 9 | enable = true; 10 | settings = { 11 | color_scheme = 6; 12 | cpu_count_from_zero = true; 13 | highlight_base_name = true; 14 | show_cpu_usage = true; 15 | }; 16 | }; 17 | 18 | } 19 | @ 20 | 21 | %% Local Variables: 22 | %% noweb-code-mode: nix-mode 23 | %% End: 24 | -------------------------------------------------------------------------------- /src/config/jq.nw: -------------------------------------------------------------------------------- 1 | \section{jq} 2 | 3 | <>= 4 | { ... }: 5 | 6 | { 7 | 8 | programs.jq.enable = true; 9 | 10 | } 11 | @ 12 | -------------------------------------------------------------------------------- /src/config/keyboard.nw: -------------------------------------------------------------------------------- 1 | \section{Keyboard} 2 | 3 | <>= 4 | { ... }: 5 | 6 | { 7 | 8 | home.keyboard.options = [ 9 | "compose:ralt" 10 | "ctrl:nocaps" 11 | ]; 12 | 13 | } 14 | @ 15 | -------------------------------------------------------------------------------- /src/config/kitty.nw: -------------------------------------------------------------------------------- 1 | \section{kitty} 2 | 3 | <>= 4 | { lib, pkgs, ... }: 5 | 6 | { 7 | 8 | programs.kitty = { 9 | enable = true; 10 | extraConfig = '' 11 | include theme.conf 12 | ''; 13 | font = { 14 | name = "Iosevka Custom"; 15 | package = pkgs.iosevka-custom; 16 | }; 17 | keybindings = { 18 | "kitty_mod+enter" = "new_window_with_cwd"; 19 | "kitty_mod+k" = '' 20 | combine : clear_terminal scrollback active : send_text normal \x0c 21 | ''; 22 | "kitty_mod+w" = "close_window_with_confirmation"; 23 | }; 24 | shellIntegration = { 25 | enableFishIntegration = true; 26 | mode = "no-cursor enabled"; 27 | }; 28 | settings = { 29 | cursor_shape = "block"; 30 | editor = ''emacsclient -nw -a ""''; 31 | font_size = lib.mkDefault 20; 32 | kitty_mod = "ctrl+shift"; 33 | scrollback_lines = -1; 34 | shell = "."; 35 | term = "xterm"; 36 | window_border_width = 0; 37 | }; 38 | }; 39 | 40 | <> 41 | 42 | } 43 | @ 44 | 45 | \subsection{Theme} 46 | 47 | Download (and patch) the \hrefootnote{https://github.com/dexpota/kitty-themes/\#wombat}{Wombat theme}. 48 | 49 | <>= 50 | xdg.configFile."kitty/theme.conf".source = pkgs.fetchurl { 51 | url = "https://raw.githubusercontent.com/dexpota/kitty-themes/c4bee86c/themes/Wombat.conf"; 52 | hash = "sha256-macm9bb/9zWLeFANXqiYPc5IS40A7ZbhXr/DooJARsQ="; 53 | postFetch = '' 54 | <> 55 | ''; 56 | }; 57 | @ 58 | 59 | Tweak some of the colors, based on \href{https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/themes/wombat-theme.el?h=emacs-27.1}{Emacs's wombat theme}. 60 | 61 | <>= 62 | ${pkgs.gawk}/bin/gawk -i inplace ' 63 | /^background/ { sub($2, "#242424") } 64 | /^foreground/ { sub($2, "#f6f3e8") } 65 | /^cursor/ { sub($2, "#656565") } 66 | /^selection_background/ { sub($2, "#444444") } 67 | /^color0/ { sub($2, "#242424") } 68 | /^color8/ { sub($2, "#303030") } 69 | /^selection_foreground/ { sub($2, "#f6f3e8") } 70 | { print } 71 | ' $out 72 | @ 73 | -------------------------------------------------------------------------------- /src/config/man.nw: -------------------------------------------------------------------------------- 1 | \section{man} 2 | 3 | <>= 4 | { ... }: 5 | 6 | { 7 | 8 | programs.man.enable = true; 9 | 10 | } 11 | @ 12 | -------------------------------------------------------------------------------- /src/config/nix.nw: -------------------------------------------------------------------------------- 1 | \section{Configure Nix} 2 | 3 | <>= 4 | { config, pkgs, ... }: 5 | 6 | { 7 | nix = { 8 | settings = { 9 | experimental-features = [ 10 | "flakes" 11 | "nix-command" 12 | ]; 13 | 14 | substituters = [ 15 | "https://cache.nixos.org" 16 | "https://devenv.cachix.org" 17 | "https://nix-community.cachix.org" 18 | "https://numtide.cachix.org" 19 | "https://pre-commit-hooks.cachix.org" 20 | "https://sportradar.cachix.org" 21 | "https://yurrriq.cachix.org" 22 | ]; 23 | trusted-public-keys = [ 24 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 25 | "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" 26 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 27 | "numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE=" 28 | "pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc=" 29 | "sportradar.cachix.org-1:6MyCzOfUMeMTxU5QnogkyYOBtr5f5atW/qeS+TjmUfE=" 30 | "yurrriq.cachix.org-1:evpJ5wKluf7QOCcv69VkIxCOtHgubrqXlZpp3JAXLBE=" 31 | ]; 32 | trusted-users = [ 33 | "root" 34 | config.home.username 35 | ]; 36 | }; 37 | }; 38 | } 39 | @ 40 | -------------------------------------------------------------------------------- /src/config/password-store.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { config, pkgs, ... }: 3 | 4 | { 5 | home.packages = with pkgs; [ 6 | gitAndTools.pass-git-helper 7 | ]; 8 | 9 | programs.password-store = { 10 | enable = true; 11 | package = pkgs.pass.withExtensions (exts: with exts; [ 12 | pass-genphrase 13 | pass-otp 14 | pass-tomb 15 | pass-update 16 | ]); 17 | settings = { 18 | PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; 19 | }; 20 | }; 21 | 22 | } 23 | @ 24 | -------------------------------------------------------------------------------- /src/config/rebar3.nw: -------------------------------------------------------------------------------- 1 | \section{rebar3} 2 | 3 | <>= 4 | { ... }: 5 | 6 | { 7 | 8 | xdg.configFile."rebar3/rebar.config".text = '' 9 | {plugins, [rebar3_hex]}. 10 | ''; 11 | 12 | } 13 | @ 14 | -------------------------------------------------------------------------------- /src/config/rofi.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { config, lib, pkgs, ... }: 3 | 4 | { 5 | imports = [ 6 | ./fonts.nix 7 | ]; 8 | 9 | home.packages = with pkgs; [ 10 | rofi-bluetooth 11 | rofi-systemd 12 | ] ++ lib.optionals config.programs.rbw.enable [ 13 | rofi-rbw 14 | xdotool 15 | ]; 16 | 17 | programs.rofi = { 18 | enable = true; 19 | font = "Iosevka Custom 18"; 20 | pass = { 21 | enable = true; 22 | extraConfig = '' 23 | help_color="#003152" 24 | ''; 25 | stores = [ "~/.password-store" ]; 26 | }; 27 | plugins = with pkgs; [ 28 | rofi-calc 29 | rofi-top 30 | ]; 31 | theme = "purple"; 32 | }; 33 | } 34 | @ 35 | -------------------------------------------------------------------------------- /src/config/screen-locker.nw: -------------------------------------------------------------------------------- 1 | \section{screen-locker} 2 | 3 | <>= 4 | { config, pkgs, ... }: 5 | 6 | { 7 | 8 | home.file.".xmonad/skyrim.raw".source = ./xmonad/skyrim.raw; 9 | 10 | home.packages = with pkgs; [ 11 | # FIXME 12 | # i3lock 13 | ]; 14 | 15 | services.screen-locker = { 16 | enable = true; 17 | inactiveInterval = 5; 18 | # FIXME: ${pkgs.i3lock}/bin/i3lock 19 | lockCmd = '' 20 | i3lock \ 21 | --image ${config.home.homeDirectory}/.xmonad/skyrim.raw \ 22 | --raw 3840x2400:rgb 23 | ''; 24 | }; 25 | 26 | } 27 | @ 28 | -------------------------------------------------------------------------------- /src/config/starship.nw: -------------------------------------------------------------------------------- 1 | \section{Starship} 2 | 3 | \hrefootnote{https://starship.rs}{Starship} is the minimal, blazing-fast, and 4 | infinitely customizable prompt for any shell! 5 | 6 | <>= 7 | { ... }: 8 | { 9 | programs.starship = { 10 | enable = true; 11 | settings = { 12 | add_newline = false; 13 | character = { 14 | success_symbol = "[λ](bold green)"; 15 | error_symbol = "[λ](bold red)"; 16 | }; 17 | format = builtins.concatStringsSep "" [ 18 | "$username" 19 | "$hostname" 20 | "$shlvl" 21 | "$kubernetes" 22 | "$directory" 23 | # "$vcsh" 24 | "$git_branch" 25 | "$git_commit" 26 | "$git_state" 27 | "$git_status" 28 | # "$hg_branch" 29 | # "$docker_context" 30 | "$package" 31 | # "$cmake" 32 | # "$dart" 33 | # "$deno" 34 | # "$dotnet" 35 | "$elixir" 36 | # "$elm" 37 | "$erlang" 38 | "$golang" 39 | "$helm" 40 | "$java" 41 | # "$julia" 42 | # "$kotlin" 43 | # "$nim" 44 | "$nodejs" 45 | "$ocaml" 46 | "$perl" 47 | # "$php" 48 | "$purescript" 49 | "$python" 50 | # "$red" 51 | "$ruby" 52 | "$rust" 53 | # "$scala" 54 | # "$swift" 55 | "$terraform" 56 | # "$vagrant" 57 | # "$zig" 58 | "$nix_shell" 59 | # "$conda" 60 | "$memory_usage" 61 | "$aws" 62 | # "$gcloud" 63 | # "$openstack" 64 | "$env_var" 65 | # "$crystal" 66 | # "$custom" 67 | "$cmd_duration" 68 | # "$line_break" 69 | # "$lua" 70 | "$jobs" 71 | # "$battery" 72 | "$time" 73 | "$line_break" # added 74 | "$status" 75 | # "$shell" 76 | "$character" 77 | ]; 78 | git_branch.symbol = "🌱 "; 79 | git_commit.tag_disabled = false; 80 | git_status = { 81 | ahead = ''⇡''${count}''; 82 | behind = ''⇣''${count}''; 83 | diverged = ''⇕⇡''${ahead_count}⇣''${behind_count}''; 84 | staged = "+$count"; 85 | }; 86 | kubernetes.disabled = false; 87 | nix_shell = { 88 | format = "via [$symbol$state]($style) "; 89 | impure_msg = "ι"; 90 | pure_msg = "ρ"; 91 | symbol = "❄️"; 92 | }; 93 | time.disabled = false; 94 | }; 95 | }; 96 | } 97 | @ 98 | -------------------------------------------------------------------------------- /src/config/taskwarrior.tex: -------------------------------------------------------------------------------- 1 | \section{Taskwarrior} 2 | \input{config/taskwarrior/default} 3 | \input{config/taskwarrior/on-exit-git} 4 | -------------------------------------------------------------------------------- /src/config/taskwarrior/default.nw: -------------------------------------------------------------------------------- 1 | \subsection{Config} 2 | 3 | <>= 4 | { config, lib, pkgs, ... }: 5 | 6 | { 7 | 8 | @ 9 | 10 | Install \hrefootnote{https://timewarrior.net}{Timewarrior}. 11 | 12 | <>= 13 | home.packages = with pkgs; [ 14 | timewarrior 15 | ]; 16 | 17 | @ 18 | 19 | 20 | \newthought{Since home-manager generates a read-only \bash{.taskrc} file}, and 21 | using \hrefootnote{https://taskwarrior.org/docs/context.html}{contexts} requires 22 | Taskwarrior to be able to modify the it, use the following hacky workaround. 23 | 24 | Set \bash{$TASKRC} to \bash{~/.taskrc-dirty}, which must contain at least 25 | \ini{include ~/.config/task/taskrc}. 26 | 27 | <>= 28 | home.sessionVariables = { 29 | TASKRC = "~/.taskrc-dirty"; 30 | }; 31 | 32 | @ 33 | 34 | 35 | \newthought{Define} short Taskwarrior shell aliases. 36 | 37 | <>= 38 | programs.fish.shellAliases = lib.mkIf (config.programs.fish.enable) rec { 39 | p = "task ls limit:page"; 40 | po = "timew summary :week"; 41 | pp = tbd; 42 | t = "task limit:page"; 43 | ta = "task add"; 44 | tbd = "task burndown.daily"; 45 | te = "env VISUAL=$EDITOR task edit"; 46 | tl = "task list"; 47 | tm = "task mod"; 48 | tw = "timew"; 49 | }; 50 | 51 | @ 52 | 53 | 54 | \newthought{Configure Taskwarrior}, using 55 | \hrefootnote{https://github.com/rycee/home-manager}{home-manager}. 56 | 57 | <>= 58 | programs.taskwarrior = { 59 | enable = true; 60 | colorTheme = "solarized-dark-256"; 61 | config = { 62 | context.other = "-work"; 63 | context.work = "+work"; 64 | }; 65 | }; 66 | 67 | @ 68 | 69 | 70 | \newthought{Link} the \nameref{subsec:on-exit-git-hook}. 71 | \footnote{See next subssection.} 72 | 73 | <>= 74 | xdg.dataFile."task/hooks/on-exit-git.sh" = { 75 | executable = true; 76 | source = ./on-exit-git.sh; 77 | }; 78 | 79 | @ 80 | 81 | <>= 82 | xdg.dataFile."task/hooks/on-modify.timewarrior" = { 83 | executable = true; 84 | source = let inherit (pkgs.timewarrior) version; in 85 | with pkgs; stdenv.mkDerivation { 86 | pname = "taskwarrior-on-modify.timewarrior"; 87 | inherit version; 88 | nativeBuildInputs = [ makeWrapper ]; 89 | buildInputs = [ python3 ]; 90 | src = fetchurl { 91 | url = "https://raw.githubusercontent.com/GothenburgBitFactory/timewarrior/v${version}/ext/on-modify.timewarrior"; 92 | sha512 = "sha512-GsDqetyfQOUU+VTZbgdKH1X6n5tM7q3Q0B5X/zk+JHgzw6vVk48IxGvCaDnpIJXCASIgSGsKLxLvv7RPDdlPAw=="; 93 | }; 94 | dontUnpack = true; 95 | installPhase = '' 96 | install -m755 $src $out 97 | substituteInPlace $out --replace "/usr/bin/env " ${python3}/bin/ 98 | ''; 99 | }; 100 | }; 101 | 102 | } 103 | @ 104 | -------------------------------------------------------------------------------- /src/config/taskwarrior/on-exit-git.nw: -------------------------------------------------------------------------------- 1 | \subsection{on-exit Git hook}\label{subsec:on-exit-git-hook} 2 | 3 | \newthought{First}, use a fairly portable Bash shebang, and be safe.\footnote{% 4 | \bash{-e}xit immediately upon failure, treat \bash{-u}nset variables as an 5 | error, disable \bash{-f}ile globbing, and fail if any part of a pipeline fails 6 | (\bash{-o pipefail}).% 7 | } 8 | 9 | <>= 10 | #! /usr/bin/env bash 11 | 12 | set -eufo pipefail 13 | @ 14 | 15 | 16 | Run in debug mode\footnote{i.e. echo commands}, 17 | if the environment variable \bash{DEBUG} is nonempty. 18 | 19 | <>= 20 | if [ -n "${DEBUG:-}" ]; then 21 | set -x 22 | fi 23 | @ 24 | 25 | 26 | \newthought{Parse} the command line arguments. 27 | 28 | Don't include the [[api]] version, [[rc]] file, or Taskwarrior [[version]]. 29 | \marginnote{% 30 | N.B. The positional arguments are formatted as \bash{name:value}.% 31 | } 32 | 33 | \begin{minted}{bash} 34 | api="${1#api:}" 35 | rc="${4#rc:}" 36 | version="${6#version:}" 37 | \end{minted} 38 | 39 | 40 | Parse and store the values of the arguments, [[args]], [[command]], and [[data]] 41 | directory. 42 | 43 | <>= 44 | args="${2#args:}" 45 | command="${3#command:}" 46 | data="${5#data:}" 47 | 48 | @ 49 | 50 | 51 | \newthought{Throughout this script}, run \bash{git} as if it were started in 52 | the Taskwarrior [[data]] directory, i.e. \bash{git -C "$data"}. 53 | 54 | \marginnote{% 55 | If there are no changes, \bash{exit} successfully, 56 | printing an informative message if running in debug mode.% 57 | } 58 | 59 | \marginnote{% 60 | \bash{git diff} \bash{exit}s with status code \bash{0} if 61 | there are no differences between the working tree and the index.% 62 | } 63 | 64 | <>= 65 | if git -C "$data" diff --quiet; then 66 | if [ -n "${DEBUG:-}" ]; then 67 | echo 'No changes to commit' 68 | fi 69 | exit 0 70 | @ 71 | 72 | 73 | If present, stage the changes or die trying. 74 | 75 | <>= 76 | elif ! git -C "$data" add -A; then 77 | echo 'Failed to add files to the index' 78 | exit 100 79 | @ 80 | 81 | 82 | Try to commit the changes, or else. 83 | 84 | \marginnote{% 85 | Quietly store the current contents of the index in a new commit, 86 | along with a log message describing the changes.% 87 | } 88 | 89 | <>= 90 | elif ! git -C "$data" commit -qm "$command: ${args#task "$command"}"; then 91 | echo 'Failed to record changes to the repository' 92 | exit 101 93 | @ 94 | 95 | 96 | If running in debug mode, print a brief summary of the commit. 97 | 98 | <>= 99 | elif [ -n "${DEBUG:-}" ]; then 100 | git -C "$data" log --oneline -1 101 | fi 102 | @ 103 | -------------------------------------------------------------------------------- /src/config/xmonad/default.nw: -------------------------------------------------------------------------------- 1 | \section{xmonad} 2 | 3 | <>= 4 | { config, lib, pkgs, ... }: 5 | 6 | { 7 | 8 | # FIXME 9 | # imports = [ 10 | # ../dunst.nix 11 | # ../fonts.nix 12 | # ../rofi.nix 13 | # ../screen-locker.nix 14 | # ]; 15 | 16 | home.packages = with pkgs; [ 17 | flameshot 18 | # font-awesome_4 19 | haskellPackages.xmobar 20 | playerctl 21 | # FIXME: xorg.xbacklight 22 | ]; 23 | 24 | home.pointerCursor = { 25 | package = pkgs.vanilla-dmz; 26 | name = "Vanilla-DMZ-AA"; 27 | size = 36; 28 | x11.enable = true; 29 | }; 30 | 31 | xdg.configFile."xmobar/xmobarrc" = { 32 | source = ../xmobar/xmobarrc; 33 | # NOTE: https://github.com/nix-community/home-manager/issues/1399 34 | onChange = '' 35 | if [[ -v DISPLAY ]]; then 36 | echo "Restarting xmonad" 37 | $DRY_RUN_CMD ${config.xsession.windowManager.command} --restart 38 | fi 39 | ''; 40 | }; 41 | 42 | xsession = { 43 | enable = true; 44 | initExtra = lib.mkIf (config.targets.genericLinux.enable) '' 45 | xrandr -s 1920x1200 --output eDP-1 --scale 2 46 | xmonad --restart 47 | systemctl --user restart picom.service random-background.service 48 | ''; 49 | scriptPath = ".hm-xsession"; 50 | windowManager.xmonad = { 51 | enable = true; 52 | extraPackages = hpkgs: [ hpkgs.xmonad-contrib ]; 53 | config = ./xmonad.hs; 54 | }; 55 | }; 56 | 57 | } 58 | @ 59 | -------------------------------------------------------------------------------- /src/dotfiles.bib: -------------------------------------------------------------------------------- 1 | @misc{wysocki_2017, 2 | author = {Wysocki, Rafael J.}, 3 | publisher = {The kernel development community}, 4 | url = {https://www.kernel.org/doc/html/v4.19/admin-guide/pm/cpufreq.html\#cpu-performance-scaling-in-linux}, 5 | date = {2017}, 6 | title = {{CPU Performance Scaling} -- {The Linux Kernel} documentation}, 7 | } 8 | 9 | @misc{fish_abbr, 10 | publisher = {fish-shell developers}, 11 | url = {https://fishshell.com/docs/current/cmds/abbr.html}, 12 | date = {2019}, 13 | title = {{abbr} - {manage fish abbreviations}}, 14 | } 15 | 16 | @misc{ripgrep, 17 | author = {Gallant, Andrew}, 18 | url = {https://www.mankier.com/1/rg}, 19 | date = {2020}, 20 | title = {{rg} - Man Page}, 21 | } 22 | -------------------------------------------------------------------------------- /src/dotfiles.tex: -------------------------------------------------------------------------------- 1 | %% FIXME: remove nobib 2 | \documentclass[a4paper,nobib,titlepage,xelatex]{tufte-book} 3 | \input{preamble} 4 | \title{dotfiles} 5 | \date{% 6 | January 30, 2020 7 | \thanks{Last updated \today} 8 | } 9 | \setcounter{tocdepth}{2} 10 | \begin{document} 11 | \frontmatter 12 | \maketitle 13 | \tableofcontents 14 | \mainmatter 15 | 16 | \newpage 17 | 18 | \chapter{Flake} 19 | \include*{flake} 20 | 21 | \chapter{Packages} 22 | \label{chap:packages} 23 | \include*{packages} 24 | 25 | \chapter{Machines} 26 | \section{NiXPS} 27 | \label{sec:nixps} 28 | \include*{machines/nixps/configuration} 29 | \include*{machines/nixps/home} 30 | \section{SRUXPS} 31 | \label{sec:sruxps} 32 | \include*{machines/sruxps/configuration} 33 | \include*{machines/sruxps/home} 34 | 35 | \chapter{Modules} 36 | \include*{modules/location} 37 | \include*{modules/nixos} 38 | %% \include*{modules/darwin} 39 | \include*{modules/nix} 40 | \include*{modules/virtualisation} 41 | \include*{modules/bootyjams} 42 | 43 | \chapter{Software configuration} 44 | \include*{config/applications} 45 | \include*{config/bash} 46 | \include*{config/bat} 47 | \include*{config/browserpass} 48 | \include*{config/bugwarrior} 49 | \include*{config/direnv} 50 | \include*{config/dunst} 51 | \include*{config/emacs} 52 | \include*{config/firefox} 53 | \include*{config/fish} 54 | \include*{config/fzf} 55 | \include*{config/git} 56 | \include*{config/gpg} 57 | \include*{config/htop} 58 | \include*{config/jq} 59 | \include*{config/keyboard} 60 | \include*{config/kitty} 61 | \include*{config/man} 62 | \include*{config/password-store} 63 | \include*{config/rebar3} 64 | \include*{config/starship} 65 | \include*{config/taskwarrior} 66 | \include*{config/xmonad/default} 67 | 68 | \backmatter 69 | 70 | %% \newpage 71 | %% %% \chapter*{Chunks} 72 | %% \begin{multicols}{2}[\chapter*{Chunks}] 73 | %% \nowebchunks 74 | %% \end{multicols} 75 | 76 | %% \chapter*{Index} 77 | %% \begin{multicols}{2}[\chapter*{Index}] 78 | %% \nowebindex 79 | %% \end{multicols} 80 | 81 | \phantomsection 82 | \printglossaries 83 | 84 | %% FIXME 85 | %% \nocite{*} 86 | %% \bibliographystyle{plainnat} 87 | %% \bibliography{dotfiles.bib} 88 | 89 | \newpage 90 | \listoftodos[To-Do] 91 | \end{document} 92 | -------------------------------------------------------------------------------- /src/glossary.tex: -------------------------------------------------------------------------------- 1 | \newglossaryentry{cpufreq}{ 2 | name={CPUFreq}, 3 | description={% 4 | \glsentrylong{cpufreq}, managed using governors. 5 | \\ 6 | \say{% 7 | Scaling governors implement algorithms to estimate the required CPU 8 | capacity. As a rule, each governor implements one, possibly 9 | parametrized, scaling algorithm.% 10 | }% FIXME: \cite{wysocki_2017}% 11 | }, 12 | first={\glsentryname{cpufreq} (\glsentrylong{cpufreq})}, 13 | long={CPU Frequency scaling} 14 | } 15 | 16 | \newacronym{luks}{LUKS}{Linux Unified Key Setup} 17 | 18 | \newglossaryentry{module}{ 19 | name={module}, 20 | description={% 21 | \say{% 22 | Each NixOS module is a file that handles one logical aspect of the 23 | configuration, such as a specific kind of hardware, a service, or network 24 | settings.% 25 | }\footnote{\url{https://nixos.org/nixos/manual/index.html\#sec-writing-modules}}% 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/machines/hacktop/configuration.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { lib, pkgs, ... }: 3 | @ 4 | 5 | <>= 6 | let 7 | username = "mohacker"; 8 | in 9 | { 10 | 11 | @ 12 | 13 | <>= 14 | imports = [ 15 | ../../nix 16 | ../../modules/common.nix 17 | ../../modules/darwin.nix 18 | ../../modules/location.nix 19 | ../../modules/packages.nix 20 | 21 | ]; 22 | 23 | @ 24 | 25 | <>= 26 | airportCode = "MSP"; 27 | 28 | @ 29 | 30 | <>= 31 | environment.darwinConfig = "$HOME/.config/nixpkgs/machines/hacktop/configuration.nix"; 32 | 33 | @ 34 | 35 | <>= 36 | environment.pathsToLink = [ 37 | "/lib/aspell" 38 | "/share/emacs/site-lisp" 39 | "/share/fish" 40 | ]; 41 | 42 | @ 43 | 44 | <>= 45 | home-manager.useUserPackages = true; 46 | home-manager.users."${username}" = args: 47 | import ./home.nix (args // { inherit pkgs; }); 48 | 49 | @ 50 | 51 | <>= 52 | nix = { 53 | buildCores = 8; 54 | 55 | distributedBuilds = false; 56 | 57 | maxJobs = 8; 58 | 59 | nixPath = lib.mkForce [ 60 | "darwin=${darwin}" 61 | "darwin-config=/etc/nixos/configuration.nix" 62 | "home-manager=${home-manager}" 63 | "nixpkgs=${nixpkgs}" 64 | "nixpkgs-overlays=/etc/nixos/overlays" 65 | "nur=${nur}" 66 | "nurpkgs=${nurpkgs}" 67 | ]; 68 | 69 | trustedUsers = [ "root" username ]; 70 | }; 71 | 72 | @ 73 | 74 | <>= 75 | nixpkgs.overlays = 76 | let 77 | path = ; 78 | in 79 | with builtins; 80 | map 81 | (n: import (path + ("/" + n))) 82 | ( 83 | filter 84 | ( 85 | n: match ".*\\.nix" n != null 86 | || pathExists (path + ("/" + n + "/default.nix")) 87 | ) 88 | (attrNames (readDir path)) 89 | ) 90 | ++ ( 91 | with (import { }).overlays; [ 92 | nur 93 | git 94 | node 95 | ] 96 | ); 97 | 98 | @ 99 | 100 | <>= 101 | services = { 102 | activate-system.enable = true; 103 | nix-daemon = { 104 | enable = true; 105 | tempDir = "/nix/tmp"; 106 | }; 107 | }; 108 | 109 | @ 110 | 111 | <>= 112 | } 113 | @ 114 | -------------------------------------------------------------------------------- /src/machines/hacktop/home.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { lib, pkgs, ... }: 3 | 4 | { 5 | 6 | @ 7 | 8 | <>= 9 | imports = [ 10 | ../../config/bat.nix 11 | ../../config/direnv.nix 12 | ../../config/emacs 13 | # TODO: ../../config/firefox.nix 14 | ../../config/fish 15 | ../../config/fzf.nix 16 | ../../config/git 17 | ../../config/gpg.nix 18 | ../../config/htop.nix 19 | ../../config/jq.nix 20 | ../../config/kitty.nix 21 | ../../config/man.nix 22 | ../../config/nixpkgs 23 | ../../config/rebar3.nix 24 | # TODO: ../../config/taskwarrior 25 | # TODO: ../../config/vim.nix 26 | ]; 27 | 28 | @ 29 | 30 | <>= 31 | accounts.email.accounts.primary = { 32 | address = "eric@ericb.me"; 33 | gpg.key = "60F0AEB0D089C2911183CAF9D2D7DFEA3D4FB51C"; 34 | primary = true; 35 | realName = "Eric Bailey"; 36 | }; 37 | 38 | @ 39 | 40 | <>= 41 | home.packages = with pkgs; ( 42 | [ 43 | carla 44 | ghc 45 | reaper 46 | ] ++ ( 47 | with nodePackages; [ 48 | nodePackages."mermaid.cli" 49 | vmd 50 | ] 51 | ) 52 | ); 53 | 54 | @ 55 | 56 | <>= 57 | _module.args.pkgs = lib.mkForce pkgs; 58 | 59 | @ 60 | 61 | <>= 62 | } 63 | @ 64 | -------------------------------------------------------------------------------- /src/machines/nixps/configuration.nw: -------------------------------------------------------------------------------- 1 | \subsection{NixOS configuration} 2 | 3 | The NiXPS configuration is an expression that takes, at least, \nix{config}, 4 | \nix{lib}, and \nix{pkgs}. 5 | 6 | <>= 7 | { lib, pkgs, ... }: 8 | let 9 | username = "yurrriq"; 10 | in 11 | { 12 | <> 13 | <> 14 | <> 15 | <> 16 | <> 17 | <> 18 | <> 19 | <> 20 | <> 21 | <> 22 | <> 23 | <> 24 | <> 25 | <> 26 | <> 27 | <> 28 | virtualisation.libvirtd.enable = true; 29 | } 30 | @ 31 | 32 | Configure the \hyperref[sec:location]{\nix{location}} \gls{module}. 33 | 34 | <>= 35 | airportCode = "MSP"; 36 | @ 37 | 38 | <>= 39 | boot.blacklistedKernelModules = [ "nouveau" "nvidia" "psmouse" ]; 40 | @ 41 | 42 | Configure the \hrefootnote{https://gitlab.com/cryptsetup/cryptsetup/}{\acrshort{luks}} devices. 43 | 44 | <>= 45 | boot.initrd.luks.devices.root.device = "/dev/nvme0n1p2"; 46 | @ 47 | 48 | Include \bash{~/bin/} in \bash{$PATH}. 49 | 50 | <>= 51 | environment.homeBinInPath = true; 52 | @ 53 | 54 | Link some extra paths. 55 | 56 | <>= 57 | environment.pathsToLink = [ 58 | "/lib/aspell" 59 | "/share/emacs/site-lisp" 60 | "/share/fish" 61 | ]; 62 | @ 63 | 64 | <>= 65 | fileSystems."/" = { 66 | device = "/dev/disk/by-uuid/024a1168-9949-4cb2-bbd1-4b19a9d49ef2"; 67 | fsType = "ext4"; 68 | }; 69 | 70 | fileSystems."/boot" = { 71 | device = "/dev/disk/by-uuid/7574-B246"; 72 | fsType = "vfat"; 73 | }; 74 | 75 | fileSystems."/var/lib/docker/plugins" = { 76 | device = "/var/lib/docker/plugins"; 77 | fsType = "none"; 78 | options = [ "bind" ]; 79 | }; 80 | 81 | fileSystems."/var/lib/docker/overlay2" = { 82 | device = "/var/lib/docker/overlay2"; 83 | fsType = "none"; 84 | options = [ "bind" ]; 85 | }; 86 | @ 87 | 88 | <>= 89 | hardware.bumblebee.enable = false; 90 | hardware.nvidiaOptimus.disable = false; 91 | @ 92 | 93 | <>= 94 | services.blueman.enable = true; 95 | hardware.bluetooth = { 96 | enable = true; 97 | settings = { 98 | General = { 99 | Enable = "Source,Sink,Media,Socket"; 100 | }; 101 | }; 102 | }; 103 | @ 104 | 105 | <>= 106 | services.fwupd.enable = true; 107 | @ 108 | 109 | Tweak PulseAudio and OpenGL settings for \hrefootnote{https://store.steampowered.com/linux}{Steam}. 110 | 111 | <>= 112 | hardware.pulseaudio.support32Bit = true; 113 | hardware.opengl.driSupport32Bit = true; 114 | @ 115 | 116 | <>= 117 | home-manager.users."${username}" = import ./home.nix; 118 | @ 119 | 120 | <>= 121 | networking = { 122 | firewall = { 123 | enable = true; 124 | allowedTCPPortRanges = [ 125 | # { from = 8000; to = 8000; } 126 | ]; 127 | }; 128 | hostName = "nixps"; 129 | networkmanager.enable = true; 130 | }; 131 | @ 132 | 133 | <>= 134 | nix = { 135 | settings = { 136 | cores = 8; 137 | trusted-users = [ "root" username ]; 138 | }; 139 | }; 140 | @ 141 | 142 | <>= 143 | security.sudo = { 144 | enable = true; 145 | extraConfig = '' 146 | ${username} ALL=(ALL) NOPASSWD: ALL 147 | ''; 148 | }; 149 | @ 150 | 151 | <>= 152 | services.displayManager.autoLogin = { 153 | enable = true; 154 | user = username; 155 | }; 156 | @ 157 | 158 | <>= 159 | services.xserver = { 160 | monitorSection = '' 161 | DisplaySize 508 285 162 | ''; 163 | dpi = 220; 164 | upscaleDefaultCursor = true; 165 | videoDrivers = [ "modesetting" ]; 166 | }; 167 | @ 168 | 169 | <>= 170 | users.mutableUsers = false; 171 | users.users."${username}" = { 172 | name = username; 173 | hashedPassword = lib.fileContents "/etc/nixos/secrets/${username}.hashedPassword"; 174 | isNormalUser = true; 175 | extraGroups = [ 176 | "audio" 177 | "disk" 178 | "docker" 179 | "http" 180 | "networkmanager" 181 | "systemd-journal" 182 | "video" 183 | "wheel" 184 | ]; 185 | uid = 1000; 186 | shell = "/etc/profiles/per-user/${username}/bin/fish"; 187 | }; 188 | @ 189 | 190 | %% Local Variables: 191 | %% noweb-code-mode: nix-mode 192 | %% End: 193 | -------------------------------------------------------------------------------- /src/machines/nixps/home.nw: -------------------------------------------------------------------------------- 1 | \subsection{home-manager configuration} 2 | 3 | <>= 4 | { config, pkgs, ... }: 5 | { 6 | <> 7 | <> 8 | home.stateVersion = "23.11"; 9 | <> 10 | services.picom.enable = true; 11 | } 12 | @ 13 | 14 | <>= 15 | accounts.email.accounts = { 16 | personal = { 17 | address = "eric@ericb.me"; 18 | gpg.key = "F88372B24A806FF23BCB3A4E2DDDF8606958B3F9"; 19 | primary = true; 20 | realName = "Eric Bailey"; 21 | }; 22 | work.address = "e.bailey@sportradar.com"; 23 | }; 24 | @ 25 | 26 | <>= 27 | home.packages = with pkgs; [ 28 | amdvlk 29 | calibre 30 | electronplayer 31 | fd 32 | frescobaldi 33 | gnutls 34 | lutris 35 | musescore 36 | openscad 37 | powertop 38 | protontricks 39 | reaper 40 | signal-desktop 41 | steam 42 | tellico 43 | winetricks 44 | zoom-us 45 | ]; 46 | @ 47 | 48 | <>= 49 | programs.rbw = { 50 | enable = true; 51 | settings = { 52 | base_url = "https://api.bitwarden.com/"; 53 | email = config.accounts.email.accounts.personal.address; 54 | identity_url = "https://identity.bitwarden.com/"; 55 | notifications_url = "https://notifications.bitwarden.com/"; 56 | pinentry = pkgs.pinentry; 57 | }; 58 | }; 59 | @ 60 | -------------------------------------------------------------------------------- /src/machines/sruxps/configuration.nw: -------------------------------------------------------------------------------- 1 | \subsection{NixOS configuration} 2 | 3 | The SRUXPS configuration is an expression that takes, at least, \nix{config}, 4 | \nix{lib}, and \nix{pkgs}. 5 | 6 | <>= 7 | { config, lib, pkgs, ... }: 8 | let 9 | username = "e.bailey"; 10 | in 11 | { 12 | <> 13 | <> 14 | <> 15 | <> 16 | boot.kernelParams = [ "acpi_rev_override" "mem_sleep_default=deep" "intel_iommu=igfx_off" ]; 17 | <> 18 | <> 19 | <> 20 | <> 21 | hardware.acpilight.enable = true; 22 | hardware.opengl.enable = true; 23 | <> 24 | <> 25 | <> 26 | <> 27 | <> 28 | <> 29 | virtualisation.virtualbox.host.enable = true; 30 | } 31 | @ 32 | 33 | \todoo{Describe the location module} 34 | 35 | <>= 36 | airportCode = "MSP"; 37 | @ 38 | 39 | Configure the \href{https://gitlab.com/cryptsetup/cryptsetup/}{\acrshort{luks}} 40 | devices. 41 | 42 | <>= 43 | boot.initrd.luks.devices = { 44 | cryptkey.device = "/dev/disk/by-uuid/2a44a760-206c-448d-a126-527b8b63f5d0"; 45 | 46 | cryptroot = { 47 | device = "/dev/disk/by-uuid/6cd51820-547b-4378-b566-47f8cdbc46df"; 48 | keyFile = "/dev/mapper/cryptkey"; 49 | }; 50 | 51 | cryptswap = { 52 | device = "/dev/disk/by-uuid/7d80e701-3a6b-4bb0-b8a3-dd5dfb432cdd"; 53 | keyFile = "/dev/mapper/cryptkey"; 54 | }; 55 | }; 56 | @ 57 | 58 | \url{https://docs.oracle.com/en/operating-systems/oracle-linux/7/admin/section_h4v_3yt_tr.html} 59 | 60 | <>= 61 | boot.kernel.sysctl = { 62 | "vm.swappiness" = 1; 63 | }; 64 | @ 65 | 66 | <>= 67 | boot.kernelModules = [ 68 | "coretemp" 69 | "i915.enable_psr=0" 70 | ]; 71 | @ 72 | 73 | <>= 74 | environment.homeBinInPath = true; 75 | environment.pathsToLink = [ 76 | "/lib/aspell" 77 | "/share/emacs/site-lisp" 78 | "/share/fish" 79 | # FIXME: "/share/icons" 80 | ]; 81 | @ 82 | 83 | <>= 84 | environment.systemPackages = with pkgs; [ 85 | kubelogin 86 | ]; 87 | @ 88 | 89 | \todoo{btrfs clean boot?} 90 | 91 | <>= 92 | fileSystems."/" = { 93 | device = "/dev/disk/by-uuid/75e8b8ef-8143-4f93-a60b-c5d53adb80d3"; 94 | fsType = "ext4"; 95 | options = [ "noatime" "nodiratime" "discard" ]; 96 | }; 97 | 98 | fileSystems."/boot" = { 99 | device = "/dev/disk/by-uuid/DF46-7ADE"; 100 | fsType = "vfat"; 101 | }; 102 | @ 103 | 104 | <>= 105 | hardware.bluetooth = { 106 | enable = true; 107 | settings = { 108 | General = { 109 | Enable = "Source,Sink,Media,Socket"; 110 | }; 111 | }; 112 | }; 113 | @ 114 | 115 | <>= 116 | home-manager.users."${username}" = import ./home.nix; 117 | @ 118 | 119 | <>= 120 | networking.hostName = "MSP-EBAILEY01"; 121 | @ 122 | 123 | <>= 124 | nix = { 125 | binaryCaches = [ 126 | "https://sportradar.cachix.org" 127 | ]; 128 | binaryCachePublicKeys = [ 129 | "sportradar.cachix.org-1:6MyCzOfUMeMTxU5QnogkyYOBtr5f5atW/qeS+TjmUfE=" 130 | ]; 131 | trustedUsers = [ "root" username ]; 132 | }; 133 | @ 134 | 135 | <>= 136 | security.sudo = { 137 | enable = true; 138 | extraConfig = '' 139 | ${username} ALL=(ALL) NOPASSWD: ALL 140 | ''; 141 | }; 142 | @ 143 | 144 | <>= 145 | services.blueman.enable = true; 146 | 147 | services.fwupd.enable = true; 148 | 149 | services.lorri.enable = false; 150 | 151 | services.thermald.enable = lib.mkForce false; # FIXME 152 | 153 | services.tlp.enable = true; 154 | 155 | services.xserver = { 156 | config = '' 157 | Section "Device" 158 | Identifier "Intel Graphics" 159 | Driver "intel" 160 | Option "TearFree" "true" 161 | Option "SwapbuffersWait" "true" 162 | BusID "PCI:0:2:0" 163 | EndSection 164 | ''; 165 | 166 | displayManager.autoLogin = { 167 | enable = true; 168 | user = username; 169 | }; 170 | 171 | monitorSection = '' 172 | DisplaySize 406 228 173 | ''; 174 | 175 | screenSection = '' 176 | Option "AllowIndirectGLXProtocol" "off" 177 | Option "TripleBuffer" "on" 178 | ''; 179 | }; 180 | @ 181 | 182 | <>= 183 | users.mutableUsers = false; 184 | users.users."${username}" = { 185 | name = username; 186 | hashedPassword = lib.fileContents "/etc/nixos/secrets/${username}.hashedPassword"; 187 | isNormalUser = true; 188 | extraGroups = [ 189 | "audio" 190 | "disk" 191 | "docker" 192 | "http" 193 | "networkmanager" 194 | "systemd-journal" 195 | "vboxusers" 196 | "video" 197 | "wheel" 198 | ]; 199 | uid = 1001; 200 | shell = "/etc/profiles/per-user/${username}/bin/fish"; 201 | }; 202 | @ 203 | 204 | %% Local Variables: 205 | %% noweb-code-mode: nix-mode 206 | %% End: 207 | -------------------------------------------------------------------------------- /src/machines/sruxps/home.nw: -------------------------------------------------------------------------------- 1 | \subsection{home-manager configuration} 2 | 3 | <>= 4 | { config, lib, pkgs, ... }: 5 | { 6 | <> 7 | <> 8 | <> 9 | <> 10 | <> 11 | home.packages = with pkgs; [ 12 | <> 13 | ]; 14 | home.stateVersion = "23.11"; 15 | <> 16 | <> 17 | <> 18 | } 19 | @ 20 | 21 | <>= 22 | imports = [ 23 | ../../config/screen-locker.nix 24 | ]; 25 | @ 26 | 27 | <>= 28 | accounts.email.accounts = { 29 | personal.address = "eric@ericb.me"; 30 | work = { 31 | address = "e.bailey@sportradar.com"; 32 | gpg.key = "EFD6F1EDC84D2FA935E38570462054AB8B682702"; 33 | primary = true; 34 | realName = "Eric Bailey"; 35 | }; 36 | }; 37 | @ 38 | 39 | <>= 40 | home.file.".docker/config.json".text = '' 41 | { 42 | "credHelpers": { 43 | "docker.io": "pass", 44 | "gitlab.sportradar.ag:4567": "pass" 45 | } 46 | } 47 | ''; 48 | @ 49 | 50 | 51 | <>= 52 | home.file."src/gitlab.sportradar.ag/.envrc".text = '' 53 | case $(kubectl config current-context) in 54 | *k8s.srus*|sapi*nov1*) 55 | export AWS_PROFILE=msp 56 | ;; 57 | *) 58 | export AWS_PROFILE=default 59 | esac 60 | 61 | export CI_SERVER_HOST=gitlab.sportradar.ag 62 | export CI_JOB_TOKEN=$(pass "$CI_SERVER_HOST"/token/api) 63 | export CI_REGISTRY="$CI_SERVER_HOST":4567 64 | export CI_REGISTRY_USER=gitlab-ci-token 65 | export CI_REGISTRY_PASSWORD="$CI_JOB_TOKEN" 66 | export GITLAB_TOKEN="$CI_JOB_TOKEN" 67 | # export JIRA_API_TOKEN="$(pass jira.sportradar.ag/e.bailey)" 68 | # export JIRA_AUTH_TYPE=bearer 69 | export GITLAB_REGISTRY_ACCESS_TOKEN="$CI_REGISTRY_PASSWORD" 70 | ''; 71 | @ 72 | 73 | <>= 74 | home.keyboard = { 75 | options = [ 76 | "ctrl:nocaps" 77 | "compose:ralt" 78 | ]; 79 | }; 80 | @ 81 | 82 | \newthought{Install some tools for authenticating} with AWS and Azure. 83 | 84 | \begin{itemize} 85 | \item The AWS IAM Authenticator is used for interacting with EKS clusters. 86 | \item EC2 Instance Connect allows you to use your AWS CLI credentials to SSH 87 | into EC2 instances. 88 | \item AWS Azure Login ... 89 | \item \hrefootnote{https://github.com/yurrriq/naal}{naal} is my tool for 90 | non-interactive AWS Azure login. 91 | \end{itemize} 92 | 93 | <>= 94 | aws-iam-authenticator 95 | awscli2 96 | python3Packages.ec2instanceconnectcli 97 | @ 98 | 99 | \newthought{Install some miscellaneous tools.} 100 | 101 | \begin{itemize} 102 | \item ... 103 | \item powertop might improve battery life. 104 | \item I haven't used Dhall in a while, but it's still interesting. 105 | \item 106 | \hrefootnote{https://wireless.wiki.kernel.org/en/users/documentation/iw}{iw} 107 | is useful for troubleshooting wireless issues, like in Trondheim. 108 | \end{itemize} 109 | 110 | <>= 111 | btop 112 | fd 113 | gomplate 114 | powertop 115 | progress 116 | scc 117 | @ 118 | 119 | <<*>>= 120 | dhall 121 | dhall-json 122 | iw 123 | @ 124 | 125 | \newthought{Install some Docker tools.} 126 | \begin{itemize} 127 | \item \fish{docker-credential-pass} for store Docker credentials with \fish{pass}. 128 | \item I might need \hrefootnote{https://docs.docker.com/compose/}{Docker 129 | Compose} again someday, but not lately. Plus, it doesn't (currently) work with 130 | Podman. 131 | \end{itemize} 132 | <>= 133 | docker-credential-helpers 134 | @ 135 | 136 | <<*>>= 137 | docker-compose 138 | @ 139 | 140 | <>= 141 | # TODO: podman-compose 142 | @ 143 | 144 | \newthought{Install some convenient Kubernetes tools.} 145 | 146 | <>= 147 | krew 148 | kubectl 149 | kubectx 150 | kubelogin 151 | kustomize 152 | # NOTE: unfree license now 153 | # lens 154 | stern 155 | @ 156 | 157 | <>= 158 | vault 159 | @ 160 | 161 | \newthought{Install some tools for testing alert pipelines.} 162 | 163 | <>= 164 | fortune 165 | prometheus-alertmanager 166 | @ 167 | 168 | \newthought{Install some miscellaneous GUI programs.} 169 | \begin{itemize} 170 | \item Zoom is annoying but useful. 171 | \item It would be cool to play with \hrefootnote{https://nyxt.atlas.engineer/}{Nyxt} 172 | some lazy day. 173 | \end{itemize} 174 | 175 | <<*>>= 176 | # FIXME 177 | # zoom-us 178 | @ 179 | 180 | <<*>>= 181 | nyxt 182 | @ 183 | 184 | 185 | \hrefootnote{https://super-productivity.com}{Super Productivity} is a nice tool 186 | for time/work tracking and syncing with Jira. 187 | 188 | <<*>>= 189 | super-productivity 190 | @ 191 | 192 | 193 | \todor{Organize this better} 194 | 195 | <>= 196 | bind 197 | curl 198 | httpie 199 | cachix 200 | nix 201 | home-manager 202 | nixgl.nixGLIntel 203 | networkmanager 204 | @ 205 | 206 | <>= 207 | services.picom = { 208 | enable = true; 209 | settings = { 210 | unredir-if-possible = true; 211 | }; 212 | vSync = true; 213 | }; 214 | @ 215 | 216 | <>= 217 | home.sessionPath = [ 218 | "${config.home.homeDirectory}/bin" 219 | ]; 220 | 221 | nix.enable = true; 222 | 223 | programs.kitty.settings.font_size = 10; 224 | 225 | services.random-background = { 226 | enable = true; 227 | imageDirectory = "/usr/share/backgrounds/"; 228 | display = "scale"; 229 | }; 230 | 231 | targets.genericLinux.enable = true; 232 | 233 | xresources.properties = { 234 | "Xft.dpi" = 290; 235 | }; 236 | @ 237 | 238 | <>= 239 | programs.rbw = { 240 | enable = true; 241 | settings = { 242 | email = config.accounts.email.accounts.personal.address; 243 | }; 244 | }; 245 | @ 246 | -------------------------------------------------------------------------------- /src/modules/bootyjams.nw: -------------------------------------------------------------------------------- 1 | <>= 2 | { config, lib, pkgs, ... }: 3 | let 4 | username = lib.head (lib.attrNames config.home-manager.users); 5 | in 6 | { 7 | environment.systemPackages = with pkgs; [ 8 | nfs-utils 9 | ]; 10 | fileSystems = 11 | let 12 | mkMount = path: { 13 | device = "//192.168.1.147${path}"; 14 | fsType = "cifs"; 15 | options = [ 16 | "credentials=/etc/nixos/secrets/bootyjams.club" 17 | "gid=${toString config.ids.gids.users}" 18 | "noauto" 19 | "rw" 20 | "uid=${toString config.users.users.${username}.uid}" 21 | "vers=2.0" 22 | # "x-systemd.device-timeout=5s" 23 | "x-systemd.idle-timeout=600" 24 | "x-systemd.mount-timeout=5s" 25 | ]; 26 | }; 27 | in 28 | { 29 | "/mnt/music" = mkMount "/homes/eric/music"; 30 | "/mnt/reaper" = mkMount "/REAPER Media"; 31 | }; 32 | } 33 | @ 34 | -------------------------------------------------------------------------------- /src/modules/darwin.nw: -------------------------------------------------------------------------------- 1 | \section{Darwin} 2 | <>= 3 | { pkgs, ... }: 4 | 5 | { 6 | <> 7 | <> 8 | <> 9 | } 10 | @ 11 | 12 | <>= 13 | services.chunkwm = { 14 | enable = true; 15 | extraConfig = '' 16 | chunkc core::log_file /usr/local/var/log/chunkwm.log 17 | chunkc core::log_level info 18 | chunkc tiling::rule --owner "Cisco AnyConnect Secure Mobility Client" --state float & 19 | chunkc tiling::rule --owner Emacs --except "^$" --state tile & 20 | ''; 21 | package = pkgs.chunkwm.core; 22 | plugins = { 23 | dir = "/run/current-system/sw/bin/chunkwm-plugins/"; 24 | list = [ "ffm" "tiling" ]; 25 | "tiling".config = '' 26 | chunkc set desktop_padding_step_size 0 27 | chunkc set desktop_gap_step_size 0 28 | chunkc set global_desktop_mode bsp 29 | chunkc set global_desktop_offset_top 0 30 | chunkc set global_desktop_offset_bottom 0 31 | chunkc set global_desktop_offset_left 0 32 | chunkc set global_desktop_offset_right 0 33 | chunkc set global_desktop_offset_gap 0 34 | chunkc set bsp_spawn_left 1 35 | chunkc set bsp_optimal_ratio 1.618 36 | chunkc set bsp_split_mode optimal 37 | chunkc set bsp_split_ratio 0.66 38 | chunkc set window_focus_cycle all 39 | chunkc set mouse_follows_focus 1 40 | chunkc set window_region_locked 1 41 | ''; 42 | }; 43 | }; 44 | @ 45 | 46 | <>= 47 | services.skhd = { 48 | enable = true; 49 | package = pkgs.skhd; 50 | skhdConfig = '' 51 | alt - space : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~ 52 | 53 | ctrl + alt + cmd - up : chunkc tiling::window --warp north 54 | ctrl + alt + cmd - right : chunkc tiling::window --warp east 55 | ctrl + alt + cmd - down : chunkc tiling::window --warp south 56 | ctrl + alt + cmd - left : chunkc tiling::window --warp west 57 | 58 | shift + alt + cmd - up : chunkc tiling::window --focus north 59 | shift + alt + cmd - right : chunkc tiling::window --focus east 60 | shift + alt + cmd - down : chunkc tiling::window --focus south 61 | shift + alt + cmd - left : chunkc tiling::window --focus west 62 | 63 | ctrl + alt + cmd - e : chunkc tiling::desktop --equalize 64 | ctrl + alt + cmd - f : chunkc tiling::window --toggle float 65 | ctrl + alt + cmd - m : chunkc tiling::window --toggle fullscreen 66 | 67 | shift + cmd - 1 : chunkc tiling::window --send-to-desktop 1 68 | shift + cmd - 2 : chunkc tiling::window --send-to-desktop 2 69 | shift + cmd - 3 : chunkc tiling::window --send-to-desktop 3 70 | shift + cmd - 4 : chunkc tiling::window --send-to-desktop 4 71 | shift + cmd - 5 : chunkc tiling::window --send-to-desktop 5 72 | shift + cmd - 6 : chunkc tiling::window --send-to-desktop 6 73 | ''; 74 | }; 75 | @ 76 | 77 | \todo[backgroundcolor=orange!50,bordercolor=orange,linecolor=orange]{% 78 | Dig through \url{https://github.com/mathiasbynens/dotfiles/blob/master/.macos}% 79 | } 80 | 81 | Set \nix{AppleKeyboardUIMode = 3} to enable full keyboard access, e.g. tab in 82 | dialogs. Disable press-and-hold, in favor of key repeat. 83 | 84 | <>= 85 | system.defaults = { 86 | NSGlobalDomain = { 87 | AppleKeyboardUIMode = 3; 88 | 89 | ApplePressAndHoldEnabled = false; 90 | InitialKeyRepeat = 10; 91 | KeyRepeat = 1; 92 | 93 | NSAutomaticDashSubstitutionEnabled = false; 94 | NSAutomaticQuoteSubstitutionEnabled = false; 95 | NSAutomaticSpellingCorrectionEnabled = true; 96 | 97 | NSNavPanelExpandedStateForSaveMode = true; 98 | NSNavPanelExpandedStateForSaveMode2 = true; 99 | }; 100 | dock = { 101 | autohide = true; 102 | mru-spaces = false; 103 | orientation = "right"; 104 | showhidden = true; 105 | }; 106 | finder = { 107 | AppleShowAllExtensions = true; 108 | FXEnableExtensionChangeWarning = false; 109 | QuitMenuItem = true; 110 | }; 111 | trackpad.Clicking = true; 112 | }; 113 | @ 114 | -------------------------------------------------------------------------------- /src/modules/location.nw: -------------------------------------------------------------------------------- 1 | \section{Location} \label{sec:location} 2 | 3 | <>= 4 | { config, lib, ... }: 5 | let 6 | airportCode = config.airportCode; 7 | in 8 | { 9 | <> 10 | config = lib.mkMerge [ 11 | <> 12 | ]; 13 | } 14 | @ 15 | 16 | Configure the list of airport codes for places I tend to work. 17 | The default is \nix{"MSP"}, since that's where I live. 18 | 19 | <>= 20 | options.airportCode = lib.mkOption { 21 | default = "MSP"; 22 | type = lib.types.enum [ "ATL" "LHR" "LJU" "MSP" "TRD" ]; 23 | }; 24 | @ 25 | 26 | When I'm in Minneapolis I usually\footnote{always during a pandemic} work from home, 27 | but sometimes I work from the Sportradar office in Minneapolis. 28 | 29 | <>= 30 | ( 31 | lib.mkIf (airportCode == "MSP") { 32 | location = { 33 | latitude = 44.98; 34 | longitude = -93.27; 35 | }; 36 | time.timeZone = "America/Chicago"; 37 | } 38 | ) 39 | @ 40 | 41 | Obviously I don't actually work from the Cook Out on Ponce de Leon Ave in Atlanta, 42 | but I do sometimes work from Decatur, the ATL airport, or Boone, 43 | and this is close enough for time zones. 44 | 45 | <>= 46 | ( 47 | lib.mkIf (airportCode == "ATL") { 48 | location = { 49 | latitude = 33.77; 50 | longitude = -84.37; 51 | }; 52 | time.timeZone = "America/New_York"; 53 | } 54 | ) 55 | @ 56 | 57 | Sometimes I visit the Sportradar office in London, UK. 58 | 59 | <>= 60 | ( 61 | lib.mkIf (airportCode == "LHR") { 62 | location = { 63 | latitude = 51.51; 64 | longitude = -0.09; 65 | }; 66 | time.timeZone = "Europe/London"; 67 | } 68 | ) 69 | @ 70 | 71 | Sometimes I visit the Sportradar office in Ljubljana, Slovenia. 72 | 73 | <>= 74 | ( 75 | lib.mkIf (airportCode == "LJU") { 76 | location = { 77 | latitude = 46.09; 78 | longitude = 14.55; 79 | }; 80 | time.timeZone = "Europe/Ljubljana"; 81 | } 82 | ) 83 | @ 84 | 85 | Sometimes I visit the Sportradar office in Trondheim, Norway. 86 | <>= 87 | ( 88 | lib.mkIf (airportCode == "TRD") { 89 | location = { 90 | latitude = 63.43; 91 | longitude = 10.40; 92 | }; 93 | time.timeZone = "Europe/Oslo"; 94 | } 95 | ) 96 | @ 97 | 98 | 99 | %% Local Variables: 100 | %% noweb-code-mode: nix-mode 101 | %% End: 102 | -------------------------------------------------------------------------------- /src/modules/nix.nw: -------------------------------------------------------------------------------- 1 | \section{Nix} 2 | 3 | <>= 4 | { pkgs, ... }: 5 | { 6 | nix = { 7 | settings = { 8 | <> 9 | }; 10 | # TODO: daemonNiceLevel = 19; 11 | <> 12 | <> 13 | optimise.automatic = true; 14 | }; 15 | <> 16 | } 17 | @ 18 | 19 | 20 | Install \hrefootnote{https://cachix.org}{Cachix} and configure \hrefootnote{https://yurrriq.cachix.org}{my personal binary cache}. 21 | 22 | <>= 23 | environment.systemPackages = with pkgs; [ 24 | cachix 25 | ]; 26 | @ 27 | 28 | <>= 29 | substituters = [ 30 | "https://yurrriq.cachix.org" 31 | ]; 32 | trusted-public-keys = [ 33 | "yurrriq.cachix.org-1:evpJ5wKluf7QOCcv69VkIxCOtHgubrqXlZpp3JAXLBE=" 34 | ]; 35 | @ 36 | 37 | 38 | Enable Flakes and the Nix command. 39 | 40 | <>= 41 | extraOptions = '' 42 | experimental-features = flakes nix-command 43 | ''; 44 | @ 45 | 46 | 47 | Configure garbage collection to run automatically and delete generations older than 30 days. 48 | 49 | <>= 50 | gc = { 51 | automatic = true; 52 | options = "--delete-older-than 30d"; 53 | }; 54 | @ 55 | -------------------------------------------------------------------------------- /src/modules/nixos.nw: -------------------------------------------------------------------------------- 1 | \section{NixOS} 2 | 3 | This modules manages some common configuration on NixOS systems. 4 | 5 | <>= 6 | { lib, pkgs, ... }: 7 | 8 | { 9 | <> 10 | <> 11 | <> 12 | <> 13 | <> 14 | <> 15 | system.stateVersion = "23.11"; 16 | } 17 | @ 18 | 19 | Delete all files in \bash{/tmp} during boot, and steal some useful bits from \href{https://github.com/NixOS/nixos-hardware/blob/master/dell/xps/15-9560/xps-common.nix}{\bash{xps-common.nix}}. 20 | 21 | <>= 22 | boot = { 23 | loader.systemd-boot.enable = lib.mkDefault true; 24 | loader.efi.canTouchEfiVariables = lib.mkDefault true; 25 | tmp.cleanOnBoot = true; 26 | }; 27 | @ 28 | 29 | Configure the console to use a more legible font, and to use the keymap from the X server keyboard settings. 30 | Notably this means caps lock will behave as I expect (remapped to control). 31 | 32 | <>= 33 | console.font = "Lat2-Terminus16"; 34 | console.useXkbConfig = true; 35 | @ 36 | 37 | \todoo{Link/document this} 38 | <>= 39 | location.provider = "manual"; 40 | @ 41 | 42 | Use NetworkManager (intead of WPA Supplicant). 43 | 44 | <>= 45 | networking.networkmanager.enable = true; 46 | @ 47 | 48 | 49 | Hibernate when the laptop lid is closed, mount the Keybase filesystem, enable Redshift, and configure the X server. 50 | 51 | <>= 52 | services = { 53 | logind.lidSwitch = "hibernate"; 54 | kbfs.enable = true; 55 | redshift = { 56 | enable = true; 57 | temperature.night = 2300; 58 | }; 59 | thermald.enable = lib.mkDefault true; 60 | <> 61 | }; 62 | @ 63 | 64 | Enable the X server, start it automatically, 65 | 66 | <>= 67 | <> 68 | xserver = { 69 | enable = true; 70 | 71 | autorun = true; 72 | 73 | <> 74 | 75 | videoDrivers = lib.mkDefault [ "intel" ]; 76 | 77 | xkb.options = "ctrl:nocaps,compose:ralt"; 78 | }; 79 | @ 80 | 81 | Enable lightdm as the display manager. 82 | 83 | <>= 84 | displayManager = { 85 | lightdm.enable = true; 86 | session = [ 87 | <> 88 | ]; 89 | }; 90 | @ 91 | 92 | Use \href{https://discourse.nixos.org/t/opening-i3-from-home-manager-automatically/4849}{the workaround described on Discourse} to run xmonad from home-manager. 93 | 94 | <>= 95 | { 96 | name = "home-manager"; 97 | manage = "window"; 98 | start = '' 99 | ${pkgs.runtimeShell} $HOME/.hm-xsession & 100 | waitPID=$! 101 | ''; 102 | } 103 | @ 104 | 105 | <>= 106 | libinput = { 107 | enable = true; 108 | touchpad = { 109 | accelSpeed = "1.0"; 110 | disableWhileTyping = true; 111 | naturalScrolling = false; 112 | tapping = true; 113 | }; 114 | }; 115 | @ 116 | 117 | Enable the PulseAudio soudn server, including extra Bluetooth modules. 118 | Also enable ALSA sound. 119 | 120 | <>= 121 | hardware.pulseaudio = { 122 | enable = true; 123 | # FIXME 124 | # extraModules = [ pkgs.pulseaudio-modules-bt ]; 125 | package = pkgs.pulseaudioFull; 126 | }; 127 | sound.enable = true; 128 | @ 129 | 130 | 131 | %% Local Variables: 132 | %% noweb-code-mode: nix-mode 133 | %% End: 134 | -------------------------------------------------------------------------------- /src/modules/virtualisation.nw: -------------------------------------------------------------------------------- 1 | \section{Virtualisation} 2 | \label{sec:virtualisation} 3 | 4 | <>= 5 | { config, lib, pkgs, ... }: 6 | let 7 | username = lib.head (lib.attrNames config.home-manager.users); 8 | in 9 | { 10 | environment.systemPackages = 11 | <> ++ 12 | <>; 13 | <> 14 | <> 15 | virtualisation = { 16 | <> 17 | <> 18 | <> 19 | <> 20 | }; 21 | } 22 | @ 23 | 24 | \todoo{Document podman vs dockerd} 25 | 26 | \subsection{Docker} 27 | 28 | Prefer to disable the Docker daemon. 29 | 30 | <>= 31 | docker = { 32 | enable = lib.mkDefault false; 33 | liveRestore = lib.mkDefault false; 34 | }; 35 | @ 36 | 37 | \subsection{Podman} 38 | 39 | It seems there is a bug in podman such that it doesn't properly handle 40 | \bash{~/.config/containers/containers.conf}, so install \bash{crun} system-wide. 41 | 42 | \begin{minted}{text} 43 | WARN[0000] Found default OCIruntime /nix/store/.../bin/crun path which is missing from [engine.runtimes] in containers.conf 44 | \end{minted} 45 | 46 | <>= 47 | lib.optionals config.virtualisation.podman.enable [ pkgs.crun ] 48 | @ 49 | 50 | Install Podman by default, if the Docker daemon is disabled. 51 | 52 | <>= 53 | podman = { 54 | enable = lib.mkDefault (!config.virtualisation.docker.enable); 55 | dockerCompat = lib.mkDefault true; 56 | }; 57 | @ 58 | 59 | \subsection{VirtualBox} 60 | 61 | <>= 62 | virtualbox.host.enable = lib.mkDefault false; 63 | virtualbox.host.enableExtensionPack = lib.mkDefault (config.virtualisation.virtualbox.host.enable); 64 | @ 65 | 66 | \subsection{virt-manager} 67 | 68 | <>= 69 | lib.optionals config.virtualisation.libvirtd.enable [ pkgs.virt-manager ] 70 | @ 71 | 72 | <>= 73 | libvirtd.enable = lib.mkDefault false; 74 | @ 75 | 76 | <>= 77 | programs.dconf.enable = config.virtualisation.libvirtd.enable; 78 | @ 79 | 80 | <>= 81 | users.users."${username}".extraGroups = [ "libvirtd" ]; 82 | @ 83 | -------------------------------------------------------------------------------- /src/packages.nw: -------------------------------------------------------------------------------- 1 | \section{The yurrriq-dotfiles (PDF) derivation} 2 | \label{sec:yurrriq-dotfiles-derivation} 3 | 4 | <>= 5 | { stdenv 6 | , nix-gitignore 7 | , makeFontsConf 8 | , iosevka-custom 9 | , gawk 10 | , noweb 11 | , python3Packages 12 | , texlive 13 | , which 14 | }: 15 | 16 | stdenv.mkDerivation rec { 17 | pname = "yurrriq-dotfiles"; 18 | version = builtins.readFile ./VERSION; 19 | src = nix-gitignore.gitignoreSource [ 20 | ".git/" 21 | "docs" 22 | "result*" 23 | "machines/*/secrets/" 24 | ] ./.; 25 | 26 | FONTCONFIG_FILE = makeFontsConf { 27 | fontDirectories = [ iosevka-custom ]; 28 | }; 29 | 30 | configurePhase = '' 31 | substituteInPlace ./bin/fix-underscores \ 32 | --replace '/usr/bin/env -S gawk' '${gawk}/bin/gawk' 33 | ''; 34 | 35 | nativeBuildInputs = [ 36 | gawk 37 | noweb 38 | python3Packages.pygments 39 | ( 40 | texlive.combine { 41 | inherit noweb; 42 | inherit (texlive) scheme-small 43 | braket 44 | catchfile 45 | datatool 46 | datetime 47 | dirtytalk 48 | fancyref 49 | fmtcount 50 | framed 51 | frankenstein 52 | fvextra 53 | glossaries 54 | glossaries-extra 55 | hardwrap 56 | ifplatform 57 | latexmk 58 | mathpazo 59 | mfirstuc 60 | minted 61 | substr 62 | titlesec 63 | tkz-base 64 | todonotes 65 | tufte-latex 66 | xetex 67 | xindy 68 | xfor 69 | xstring 70 | ; 71 | } 72 | ) 73 | which 74 | ]; 75 | 76 | makeFlags = [ 77 | "PREFIX=${placeholder "out"}" 78 | ]; 79 | 80 | } 81 | @ 82 | 83 | \section{Additional Node packages} 84 | \label{sec:node-packages} 85 | 86 | Augment the upstream \nix{nodePackages}. At the moment, add only 87 | \hrefootnote{https://www.npmjs.com/package/codeowners}{codeowners}. 88 | 89 | <>= 90 | [ 91 | "codeowners" 92 | ] 93 | @ %def codeowners 94 | -------------------------------------------------------------------------------- /src/preamble.tex: -------------------------------------------------------------------------------- 1 | \usepackage[ddmmyyyy]{datetime} 2 | \renewcommand{\dateseparator}{.} 3 | 4 | \usepackage{fontspec} 5 | \setmonofont[Mapping=tex-text,Scale]{Iosevka Custom} 6 | 7 | \usepackage{hyperref} 8 | \newcommand{\hrefootnote}[2]{\href{#1}{#2}\footnote{\url{#1}}} 9 | \makeatletter 10 | \hypersetup{ 11 | pdffitwindow=true, 12 | pdfstartview={FitH}, 13 | pdfauthor={Eric Bailey }, 14 | pdfsubject={% 15 | My literate dotfiles, managed by Nix and home-manager.% 16 | }, 17 | pdfkeywords={Nix, NixOS, literate programming, noweb, dotfiles, reproducible, 18 | configuration, home-manager}, 19 | pdfinfo={ 20 | CreationDate={D:20200130011545}, 21 | ModificationDate={D:\pdfdate}, 22 | }, 23 | colorlinks=true 24 | } 25 | \makeatother 26 | 27 | \usepackage[english]{fancyref} 28 | 29 | \usepackage[outputdir=../docs]{minted} 30 | \usemintedstyle{tango} 31 | \setminted{baselinestretch=1,fontsize=\small,autogobble} 32 | 33 | \newmintedfile[inputbash]{bash}{linenos,fontsize=\small} 34 | \newmintinline[bash]{bash}{} 35 | \newmintinline[elisp]{elisp}{} 36 | \newmintinline[fish]{fish}{} 37 | \newmintinline[hs]{haskell}{} 38 | \newmintinline[ini]{ini}{} 39 | \newmintinline[nix]{nix}{} 40 | 41 | 42 | %% HACK: https://tex.stackexchange.com/a/200725/45537 43 | \usepackage{ifxetex} 44 | \ifxetex 45 | \newcommand{\textls}[2][5]{% 46 | \begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup 47 | } 48 | \renewcommand{\allcapsspacing}[1]{\textls[15]{#1}} 49 | \renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}} 50 | \renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}} 51 | \renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}} 52 | \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}} 53 | \fi 54 | 55 | 56 | \usepackage{noweb} 57 | %% \noweboptions{externalindex} 58 | \noweboptions{smallcode,shortxref,hideunuseddefs,noidentxref,nomargintag,webnumbering} 59 | 60 | 61 | \usepackage[colorinlistoftodos,prependcaption,textsize=small]{todonotes} 62 | \newcommand{\todocolor}[3]{% 63 | \todo[backgroundcolor=#1!50,bordercolor=#1,linecolor=#1]{#3}% 64 | \message{#2: #3}% 65 | } 66 | \newcommand{\todor}[1]{\todocolor{red}{FIXME}{#1}} 67 | \newcommand{\todoo}[1]{\todocolor{orange}{TODO}{#1}} 68 | 69 | 70 | \usepackage{dirtytalk} 71 | 72 | \usepackage[acronym,nopostdot,toc,xindy]{glossaries} 73 | \usepackage{glossaries-extra} 74 | \makeglossaries 75 | \input{glossary} 76 | \renewcommand*{\glstextformat}[1]{\textsl{#1}} 77 | 78 | 79 | \usepackage{newclude} 80 | 81 | 82 | \setlength\parindent{0pt} 83 | 84 | 85 | \author{Eric Bailey} 86 | -------------------------------------------------------------------------------- /xorg.conf.d/00-keyboard.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "system-keyboard" 3 | MatchIsKeyboard "on" 4 | Option "XkbOptions" "compose:ralt,ctrl:nocaps" 5 | EndSection 6 | -------------------------------------------------------------------------------- /xorg.conf.d/40-touchpad.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "touchpad" 3 | Driver "libinput" 4 | MatchIsTouchpad "on" 5 | Option "AccelSpeed" "1" 6 | Option "Tapping" "on" 7 | EndSection 8 | -------------------------------------------------------------------------------- /xsessions/xmonad.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=XMonad 4 | Comment=Lightweight tiling window manager 5 | Exec=/home/eric/.hm-xsession 6 | # Icon=xmonad.png 7 | Type=XSession 8 | --------------------------------------------------------------------------------