Мои NixOS-конфигурации: HomeLab & Personal Devices. Host-based конфигурация с использованием флейков и Sops-секретов.
nix
This repository has been archived on 2026-08-21. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Nix 98.5%
  • Nushell 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-21 23:31:16 +05:00
hosts break: last update in this system 2026-08-21 23:31:16 +05:00
lib update: formatting files using treefmt 2026-06-16 02:19:18 +05:00
nix-secrets@05dd43dbfc update sops 2026-07-26 19:32:10 +05:00
overlays feat: remove mindustry, update entropy package, remove old overlays settings 2026-07-26 21:13:52 +05:00
.envrc feat: add devshell 2026-06-16 02:53:38 +05:00
.gitignore feat: add pre-commit-nix 2026-06-16 02:51:50 +05:00
.gitmodules Add nix-secrets 2026-03-21 23:06:57 +05:00
.sops.yaml Initial Commit 2026-01-25 23:39:15 +05:00
flake.lock break: last update in this system 2026-08-21 23:31:16 +05:00
flake.nix feat: add devshell 2026-06-16 02:53:38 +05:00
LICENSE Add LICENSE 2026-01-28 03:47:48 +05:00
README.md docs: format README.md 2026-05-20 21:04:39 +05:00
treefmt.nix feat(home/opencode): replace claude-code with opencode configuration 2026-06-18 00:44:28 +05:00

NixOS Configurations

Host-based NixOS configuration for homelab and personal devices using flakes, home-manager, and sops-nix.

Hosts

  • fisher - Homelab server (x86_64-linux, user: guppy). Runs Nextcloud, Vaultwarden, Forgejo (with runner), Matrix, Minecraft, FreshRSS, nginx, PostgreSQL, Docker, Prometheus + Grafana.
  • book - Personal laptop (x86_64-linux, user: geekiot). Desktop environment with Niri compositor, Helix/Zed/VSCodium, Librewolf, Kitty, and gaming tools.

Structure

.
├── flake.nix                  # Flake entry point, host definitions
├── .sops.yaml                 # sops-nix age key configuration
├── nix-secrets/               # sops-secrets for hosts (used by custom zsh-command)
├── lib/
│   ├── make_system.nix        # System builder (NixOS + home-manager + sops)
│   └── utils/                 # Utility functions (scan_paths, etc.)
├── overlays/                  # Shared package overlays
└── hosts/
    ├── common/                # Shared configs across all hosts
    │   ├── nixos/             #   Common system modules
    │   ├── home/              #   Common home-manager modules (git, ssh, zsh, etc.)
    │   ├── data/              #   Common data (paths, defaults)
    │   └── secrets/           #   Shared encrypted secrets
    ├── book/                  # Laptop configuration
    │   ├── nixos/             #   System: core, hardware, networking, wm
    │   ├── home/              #   User: editors, browser, terminal, games
    │   ├── data/              #   Host-specific data
    │   ├─── pkgs/             #   Custom packages
    │   └── secrets/           #   Encrypted secrets
    └── fisher/                # Homelab configuration
        ├── nixos/             #   System: core, hardware, networking, services, homelab apps
        ├── home/              #   User config
        ├── data/              #   Host-specific data
        ├── pkgs/              #   Custom packages
        └── secrets/           #   Encrypted secrets

Quick Start

Prerequisites

  • NixOS with flakes enabled (nix.settings.experimental-features = [ "flakes" "nix-command" ])
  • Age key for sops-nix decryption
  • Your own sops-secrets dir nix-secrets/

Deployment

# Build and switch to a host configuration
sudo nixos-rebuild switch --flake .#fisher
sudo nixos-rebuild switch --flake .#book

# Or use my own zsh-command (if you've already installed the system & configure nix-secrets dir)
update

update remote fisher

Secrets

Secrets are encrypted with sops-nix using age keys.

# Edit secrets for a specific host
sops hosts/fisher/secrets/sops.yaml
sops hosts/book/secrets/sops.yaml

# Re-key after adding new keys
sops updatekeys hosts/fisher/secrets/sops.yaml

Each host has its own age key defined in .sops.yaml. Place the corresponding private key at the path specified in the host's data config.

Or place them in the nix-secrets directory to hide them in a Git submodule, as I have done. Then use the update zsh-command to update them.

Key Technologies