yet another mirror
Find a file
2025-11-17 08:31:01 +08:00
.config/nvim nvim/lazy: latex plugin 2025-11-08 21:47:39 +08:00
nix vanadium/xmonad: shift windows based on dynamic title property 2025-11-17 08:31:01 +08:00
npins npins: update sources 2025-11-08 10:46:06 +08:00
scripts add script to handle live photo 2025-02-08 18:41:23 +01:00
.envrc Revert "shell: remove .envrc" 2025-07-09 10:54:18 +02:00
.git-blame-ignore-revs gitblame ignore nixfmt 2025-11-08 10:17:14 +08:00
.gitattributes add wallpaper 2024-10-30 20:19:43 +01:00
.gitignore home/git: move spell ignore to repo gitignore 2025-09-18 10:05:45 +08:00
.gitmodules meta: remove unused submodules 2024-11-15 19:06:39 +01:00
.stow-local-ignore stow: ignore npins 2025-09-20 19:10:34 +08:00
.stylua.toml nvim: run stylua 2025-07-08 13:39:02 +02:00
default.nix hetzner_benchmark: init (#21) 2025-11-08 05:50:00 +01:00
Justfile Just: remove sudo usages 2025-11-02 14:49:24 +08:00
LICENSE please don't AI me 2024-10-30 20:19:48 +01:00
README.md hetzner_benchmark: init (#21) 2025-11-08 05:50:00 +01:00
shell.nix hetzner_benchmark: init (#21) 2025-11-08 05:50:00 +01:00

This repo is managed with Nix + GNU stow

Installation Guide (for myself & those who are interested)

  • Generate image & boot We do this because the default one doesn't have all the utilities we want (e.g. disko).

    • generate image nom-build --attr nixosConfigurations.installer.config.system.build.isoImage
    • dd the image to a flash drive (remember to sync)
    • boot off that flash drive
  • Connect to the Internet

    • start wpa_supplicant.service
    • wpa_cli
      add_network
      # wil return a number
      set_network <number> ssid "<ssid>"
      set_network <number> psk "<your password>"
      select_network 0
      # profit
      
      source: https://askubuntu.com/a/833894
  • Format disk (DANGER)

    • modify the disko file to point to the disk to be formatted
  • Installation (iirc the disko auto install has some issues)

    # Are you sure the disko config has the right drive path?
    disko -m disko ./disko.nix # format the drive
    
    # optional for unknown hard ware
    nixos-generate-config --no-filesystems --root /mnt --dir . # disko will take care of the file system configuration
    # put the generated config in the right path and import it
    
    nixos-install --flake .dotfiles#<hostname>
    # profit
    

Installation for Raspberry Pi

Raspberry Pi uses the same configuration as the installer. The (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") allows this.

  • Build the image nixosConfigurations.<name>.config.system.build.sdImage. Disable stuff like Lix to build this. You might want to use raw password once so you don't have agenix decryption problem while trying to have wpa_supplicant have the right passwords.

  • Burn the image to the sd card.

    zstdcat result/sd-image/nixos-image-sd-card-<hash>-aarch64-linux.img.zst |
          doas dd of=/dev/sdb status=progress
    
  • profit

Hetzner, nixos-anywhere

References:

I haven't figured out how to use raid on this machine, as it failed half-way through the installer when I used the raid configuration.

Pitfalls

  • nixos-anywhere will wipe the disk, even if you use the flag --generate-hardware-config.

  • The command is quite long and isn't non-flake friendly. Note that the diskoScript has to come before toplevel derivation. Read more on the order https://github.com/nix-community/nixos-anywhere/issues/597.

    nixos-anywhere \
        --generate-hardware-config nixos-generate-config ./hardware-configuration.nix \
        -i <ssh_identity> \
        --store-paths $(nix-build --no-out-link \
            -A nixosConfigurations.hetzner_benchmark.config.system.build.diskoScript \
            -A nixosConfigurations.hetzner_benchmark.config.system.build.toplevel) \
        <user>@<host>
    

Pitfalls

users.mutableUsers

NEVER set this to true without declaratively setting the passwords. It would change the password to ! and you can't login.

Hosts

  • vanadium: Framework 13 (AMD 7040 Series)

Linux

  • Window Manager : XMonad, flipped master/slave1 layout, 8 workspaces
  • Status Bar : xmobar, minimal configuration with a clock
  • Compositor : picom, for rendering transparency
  • Input Method : fcitx, "Cangjie" input method with a customized table
  • Font : Customized iosevka (thicker regular2 and fun stuff)
  • Terminal : kitty + tmux + fish

Editors and Shell

  • nvim Mainly used for Haskell, Nix, Rust, Typst / Markdown. (in order of frequency of use)
  • tmux with scripts that make it fast to use
  • fish the friendly interactive shell
  • starship for the prompt

Wallpapers

For the sake of not having a huge repo, the images are built and managed by nix using typst. The source can be found here.

Nix

Packages

This repository exports my custom packages under attribute packages. Because it's a monorepo and I have 0 reason to make things stable, pin it if you use any packages.

Binary Cache

You should use my binary cache if you're building my fonts, they take a while (20 minutes on my M1 Max MacBook Pro).

https://leana8959.cachix.org
leana8959.cachix.org-1:CxQSAp8lcgMv8Me459of0jdXRW2tcyeYRKTiiUq8z0M=

Theme

I have made a theme (a fork of Atom's one-light) where all my tools are visually unified. It's neovim part can be found here.

Notable shell scripts

  • tmux-sessionizer: a bash script inspired by ThePrimeagen, allows jumping between different tmux sessions using fzf
  • tmux-last: toggle the last tmux session
  • c2r: clone repository to ~/repo/owner/name, where I can then attach to using sessionizer The sessionizer primitives starts with two underscores and are reused. They are packaged together.

Have fun :)


  1. I dislike this nomenclature, if you know a better one let me know. ↩︎

  2. I don't know how people live with the default weight, it's too thin. ↩︎