No description
  • Nix 63.6%
  • Lua 24.3%
  • TypeScript 3.5%
  • Shell 3.5%
  • Python 3%
  • Other 2%
Find a file
2026-10-16 21:57:57 +02:00
.claude [kodi] more settings 2026-09-13 16:59:16 +02:00
collections [multi] added koreader as own module 2026-10-16 19:24:44 +02:00
configuration [doc] delete deprecated readme 2026-04-06 14:30:21 +02:00
docs [sops] fix taking correct key for each host 2026-10-13 22:43:59 +02:00
encrypted [gpg] added recipient 2026-10-15 13:34:24 +02:00
hosts [android] added more packages 2026-10-16 21:57:57 +02:00
lib [nix] link bash library 2026-04-01 10:26:57 +02:00
modules [multi] added koreader as own module 2026-10-16 19:24:44 +02:00
nix-lib [nix] inject secrets directly into the programs, no env vars 2026-10-02 17:51:58 +02:00
overlays [overlay] added unfree to ouch so in can decompress RAR 2026-10-04 11:00:48 +02:00
templates [templates] added templates 2026-06-24 10:02:48 +02:00
users [sops] fix taking correct key for each host 2026-10-13 22:43:59 +02:00
.gitignore [firefox] 1pass working 2026-06-26 09:41:55 +02:00
.sops.yaml [android] added sops to android 2026-10-13 22:09:17 +02:00
cfg.nix [cfg] added general android tools 2026-10-16 17:31:32 +02:00
flake.lock [update] 2026-10-13 16:55:40 +02:00
flake.nix [android] added fdroidcl script 2026-10-16 16:53:32 +02:00
justfile [android] unified android setup from both sides 2026-10-16 17:46:12 +02:00
README.md [sops] fix taking correct key for each host 2026-10-13 22:43:59 +02:00
scrips.nix [android] push koreader plugins 2026-10-16 19:29:00 +02:00

bitSheriff's Setup

built with nix

Therapeutic NixOS for a recovering distro-hopper.

The Philosophy

NixOS is often described as "reproducible," but I prefer "inevitable." This repository serves as the digital blueprint for my infrastructure. A way to ensure that even if I wander, I can always find my way back to a working shell.

The Hosts

I believe a hostname should be more than a UUID; it should have character. When I first encountered NixOS, I was struck by its phonetic resemblance to the Greek Isles (Paxos, Naxos, Samos). It felt only right to name my nodes after the archipelago, mapping the personality of the hardware to the mythology of the land.


🏛️ Rhodos

The Gaming Powerhouse

  • The Myth: Home of the Colossus of Rhodes, a bronze titan and one of the Seven Wonders of the Ancient World.
  • The Hardware: My primary desktop. Much like the Colossus, it is a massive architectural feat (mostly of RGB and silicon) designed to dominate the landscape. It represents the "Sun God" of my local network—radiating heat and high-fidelity frames.

☀️ Delos

The Academic Framework

  • The Myth: The birthplace of Apollo (God of Knowledge) and Artemis. Historically a "floating" island that was eventually anchored to the seabed.
  • The Hardware: My Framework laptop. The "floating" nature of the myth perfectly mirrors the modular, swappable nature of the Framework hardware. As my university daily driver, it carries the spirit of Apollo: light, mobile, and dedicated to the pursuit of knowledge (and the occasional compile-time error).

🏺 Android

The Pocket Colony

  • The Myth: No single island, but the archipelago in miniature—every Cycladic settlement had to survive on whatever scraps of soil and stone it was given, proof that civilization doesn't need a mainland to take root.

  • The Hardware: My phone. Since Android won't host a proper NixOS installation, it relies on nix-on-droid, a project that brings the Nix package manager (built on top of Termux) to Android without requiring root. It's a small, sandboxed outpost of nixpkgs living in my pocket—no mainland, but still governed by the same laws.

  • Installation: Install nix-on-droid from F-Droid, launch it once to let it bootstrap, then point it at this flake to build and activate the configuration:

    just android
    

    which expands to:

    nix-on-droid switch --flake .#android
    

Bootstrapping

How a blank machine becomes one of the islands. The first three methods partition the disk with disko and erase it completely; the last one keeps an existing NixOS installation. (The phone has its own ritual, see Android.)

Before any of the erasing methods:

  • The host has to import its ./disko.nix in hosts/<host>/default.nix, and the fileSystems / swapDevices entries have to be gone from its hardware-configuration.nix (the two conflict). Only do this when reinstalling: a running system rebuilt with a layout it doesn't have won't boot.
  • Every host has its own age key, ~/.age/<hostname>.key, listed in .sops.yaml. The new host's key must reach it, otherwise it can't decrypt its secrets, login password included. The script copies ~/.age/<hostname>.key from the machine it runs on, falls back to the general ~/.age/dotfiles.key, and takes SOPS_AGE_KEY_FILE if the key lives elsewhere (e.g. a USB stick).
  • On encrypted hosts disko asks for the LUKS passphrase during the install, in the terminal the install was started from. Later it is typed on the device itself at every boot, so pick one that survives a keyboard layout change.

1. From another machine, over SSH

The comfortable way, no USB stick needed. Run the script on a machine that already has this configuration and answer its questions (target host, user, which configuration):

nixos-anywhere

It wraps nixos-anywhere: the target only has to be reachable over SSH, whether it runs the NixOS installer or some other Linux.

A target that is only on wifi needs a cable for this, or has to be booted into the NixOS installer and joined to the wifi there first: a running system is switched into an installer in RAM, and that switch drops the wifi connection (nothing is erased in that case, a reboot brings the old system back).

2. On the device itself, from the NixOS installer

Boot the installer and run the same script straight from the flake. Leave host and user empty to install onto the machine in front of you:

SOPS_AGE_KEY_FILE=/path/to/<hostname>.key \
DOTFILES_DIR=github:bitSheriff/dotfiles \
  nix --extra-experimental-features 'nix-command flakes' \
  run github:bitSheriff/dotfiles#nixos-anywhere

This only works from the installer; an installed system can't erase the disk it is running from.

### 3. On top of an existing NixOS installation

Keeps the disk as it is: install NixOS the usual way, clone this repository, put the host's age key at ~/.age/<hostname>.key, then

just setup

which copies the generated hardware configuration into the host's directory, links the repository to /etc/nixos and switches to the chosen configuration.