Skip to content

vereis/nix-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

431 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Configuration

This is my personal Nix configuration for Windows (WSL) and Linux (NixOS).

It uses flake-parts to help with organization and modularity:

├── flake.nix
├── lib/                         # Utility functions
│   └── default.nix
├── parts/                       # Flake parts
│   ├── devshell.nix
│   ├── formatter.nix
│   ├── hosts.nix
│   └── overlays.nix
├── hosts/                       # Host-specific configurations
│   ├── linux/                   ## NixOS machine configurations
│   │   ├── configuration.nix
│   │   ├── kyubey/
│   │   ├── madoka/
│   │   └── iroha/
│   ├── wsl/                     ## WSL2 machine configurations
│   │   ├── configuration.nix
│   │   └── homura/
│   └── home.nix
├── modules/                     # Reusable modules
│   ├── hardware/                ## Hardware-specific modules
│   ├── home/                    ## User-specific modules, applications
│   │   ├── gui/
│   │   ├── tui/
│   │   ├── gui.nix              ## GUI applications
│   │   └── tui.nix              ## TUI applications
│   └── services/                ## Background service modules
├── overlays/                    # Overlays
├── secrets/                     # Encrypted secrets
└── bin/                         # Custom scripts, utilities

Installation starts at the top level flake.nix, which uses lib/default.nix and parts/hosts.nix to build configurations for each platform I support.

Each host configuration then gets configured via hosts/<platform>/configuration.nix and hosts/<platform>/<hostname>/, which pulls in reusable modules from modules/.

Usage

  1. Clone this repository
  2. Install nix (ideally via Determinate Systems) or nixos
  3. Decrypt secrets with git-crypt:
    git-crypt unlock <path-to-key>
  4. Install:
    sudo nixos-rebuild switch --flake .#<machine-name>

About

Nix Configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors