A Nix Flakes-based configuration supporting full NixOS installations and standalone Home Manager environments.
# Install Nix with Flakes
sh <(curl -L https://nixos.org/nix/install) --daemon
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
# Clone and install
git clone https://github.com/jinglemansweep/nix.git ~/nix
cd ~/nix
nix run home-manager -- switch --flake .#louis# Clone configuration
git clone https://github.com/jinglemansweep/nix.git ~/nix
cd ~/nix
# Apply configuration
sudo nixos-rebuild switch --flake .#latitude
# or: sudo nixos-rebuild switch --flake .#lounge
# or: sudo nixos-rebuild switch --flake .#dev
# or: sudo nixos-rebuild switch --flake .#docker-runnercd ~/nix
nix flake update
sudo nixos-rebuild switch --flake .#latitudecd ~/nix
nix flake update
home-manager switch --flake .#louis.
├── .github/workflows/
│ └── nix-check.yml # Flake check and linting
├── .pre-commit-config.yaml # Pre-commit hooks
├── flake.nix # Main flake entry point
├── flake.lock
├── hosts/ # NixOS host configurations
│ ├── common/ # Shared NixOS configuration
│ │ ├── default.nix # Base system configuration
│ │ └── desktop.nix # Desktop-specific system config
│ ├── dev/ # Proxmox VM (headless, nix-ld for VS Code Remote SSH)
│ ├── docker-runner/ # Proxmox VM (minimal Docker Swarm runner)
│ ├── latitude/ # Dell Latitude 7420
│ └── lounge/ # HP EliteDesk 800 G2 Mini
├── home/ # Home Manager entry points
│ ├── common/ # Shared home configuration (SOPS, XDG)
│ ├── docker-runner.nix # Docker runner (base + docker tools only)
│ ├── nixos.nix # NixOS desktop (includes desktop modules)
│ ├── server.nix # NixOS server (shell only)
│ └── standalone.nix # Standalone (ChromeOS/WSL)
├── modules/
│ ├── nixos/ # NixOS system modules
│ │ ├── desktop/
│ │ │ ├── common.nix # Shared desktop config, system packages
│ │ │ ├── gnome.nix # GNOME desktop module
│ │ │ └── sway.nix # Sway window manager module
│ │ ├── systemd/
│ │ │ ├── default.nix # Systemd service imports
│ │ │ ├── docker-backup.nix # Docker volume backup service
│ │ │ └── nix-gc.nix # Automated garbage collection
│ │ ├── mounts.nix # NFS automounts for Synology NAS
│ │ └── virtualisation.nix # Docker and Podman configuration
│ └── home/ # Home Manager modules
│ ├── shell/
│ │ ├── base.nix # Git, tmux, bash, starship, neovim, GPG, SSH
│ │ ├── development.nix # Languages, LSPs, AI CLI, DevOps, database clients
│ │ └── docker.nix # Container management tools (lazydocker)
│ ├── desktop/
│ │ ├── default.nix # Alacritty terminal, udiskie, imports
│ │ ├── browsers.nix # Firefox with extensions and bookmarks
│ │ ├── development.nix # VSCode and Zed editor with extensions
│ │ ├── gnome.nix # GNOME extensions and dconf settings
│ │ ├── media.nix # Kodi with NFS media sources
│ │ └── sway.nix # Sway window manager configuration
│ ├── env.nix # Environment variable configuration
│ └── secrets.nix # SOPS secrets with age encryption
├── dotfiles/
│ ├── claude/ # Claude Code configuration
│ │ ├── CLAUDE.md
│ │ ├── commands/
│ │ ├── agents/
│ │ ├── skills/
│ │ ├── settings.json
│ │ └── mcp_settings.json
│ └── direnv/
│ └── direnvrc # Custom load_secrets helpers
├── secrets/
│ └── secrets.yaml # Age-encrypted secrets (SOPS)
└── scripts/
└── partition.sh # Disk partitioning helper
bat, btop, borgbackup, delta, eza, fd, fzf, gh, git, github-copilot-cli, htop, imagemagick, jq, keychain, lazydocker, lazygit, ncdu, neofetch, neovim, opentofu, pre-commit, rclone, restic, ripgrep, rsync, screen, starship, terragrunt, tmux, tree, vim, yq
Database clients: psql (PostgreSQL), mysql (MariaDB), redis-cli
Python 3, Node.js, Go, gcc, gnumake, cmake, pkg-config, autoconf, automake, sqlite
Language servers: nil (Nix), pyright (Python), typescript-language-server, yaml-language-server, terraform-ls, dockerfile-language-server, bash-language-server, vscode-langservers-extracted
AI CLI: claude-code, codex, gemini-cli, opencode
MicroPython/CircuitPython: picocom, esptool, picotool, mpremote, mosquitto
Testing: playwright-driver
AWS CLI, kubectl, helm, k9s, infisical
Firefox (with uBlock Origin, Bitwarden), Google Chrome, VSCode, Alacritty, LibreOffice, GIMP, Pinta, VLC, mpv, ffmpeg, Kodi, Cura, Thonny, Tiled, Evince, Baobab
- Prefix key:
Ctrl+a - Split horizontal:
Prefix + | - Split vertical:
Prefix + - - Navigate panes:
Alt + Arrow keys
- User: Louis King jinglemansweep@gmail.com
- Pull strategy: merge (rebase disabled)
GNOME (default) and Sway window manager are available. Select at the login screen.
Download the NixOS ISO from nixos.org.
# On Linux/macOS (replace /dev/sdX with your USB device)
sudo dd if=nixos-minimal-*.iso of=/dev/sdX bs=4M status=progress conv=fsyncBoot from the USB and run:
# For UEFI systems with a single disk
sudo parted /dev/nvme0n1 -- mklabel gpt
sudo parted /dev/nvme0n1 -- mkpart ESP fat32 1MB 512MB
sudo parted /dev/nvme0n1 -- set 1 esp on
sudo parted /dev/nvme0n1 -- mkpart primary 512MB -8GB
sudo parted /dev/nvme0n1 -- mkpart primary linux-swap -8GB 100%
# Format partitions
sudo mkfs.fat -F 32 -n boot /dev/nvme0n1p1
sudo mkfs.ext4 -L nixos /dev/nvme0n1p2
sudo mkswap -L swap /dev/nvme0n1p3# Mount partitions
sudo mount /dev/disk/by-label/nixos /mnt
sudo mkdir -p /mnt/boot
sudo mount /dev/disk/by-label/boot /mnt/boot
sudo swapon /dev/disk/by-label/swap
# Clone this repository
git clone https://github.com/jinglemansweep/nix.git /tmp/nix
# Install NixOS
sudo nixos-install --flake /tmp/nix#latitude
# or: sudo nixos-install --flake /tmp/nix#lounge
# Set root password when prompted, then reboot
sudo rebootAfter rebooting:
# Set user password
sudo passwd louis
# Clone config to home directory for future updates
git clone https://github.com/jinglemansweep/nix.git ~/nix- Create a new directory under
hosts/:
mkdir -p hosts/new-host- Create
hosts/new-host/default.nix:
# Description of new host
{ config, pkgs, lib, inputs, ... }:
{
imports = [
./hardware-configuration.nix
];
networking.hostName = "new-host";
# Host-specific configuration here
}- Generate
hardware-configuration.nixon the target machine:
nixos-generate-config --show-hardware-config > hosts/new-host/hardware-configuration.nix- Add the new host to
flake.nix:
nixosConfigurations = {
# ... existing hosts ...
new-host = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs userConfig; };
modules = [
./hosts/new-host
./hosts/common
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs userConfig; };
users.${userConfig.username} = import ./home/nixos.nix;
};
}
];
};
};# Build a VM image
nix build .#nixosConfigurations.latitude.config.system.build.vm
# Run the VM
./result/bin/run-*-vm# Install hooks (one-time setup)
pre-commit install
# Run all checks manually
pre-commit run --all-filesThe hooks run:
- nixpkgs-fmt: Nix code formatter
- statix: Static analysis for Nix anti-patterns
- deadnix: Detects unused bindings and dead code
# Check flake syntax and evaluations
nix flake check
# Static analysis for Nix anti-patterns
nix run nixpkgs#statix -- check .
# Detect unused bindings and dead code
nix run nixpkgs#deadnix -- --fail --no-lambda-pattern-names .