No description
- Nix 99.1%
- Shell 0.9%
|
All checks were successful
Nix Flake Check / docker (push) Successful in 1m53s
|
||
|---|---|---|
| .forgejo/workflows | ||
| configs | ||
| hosts | ||
| secrets | ||
| tests | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| globals.nix | ||
| README.md | ||
| TODO.md | ||
Nix Configuration Overview
This repository contains my Nix configurations across various machine types, including NixOS, Nix-darwin, and Nix-standalone with Home Manager.
To customize this configuration for your needs:
- Replace values in
/globals.nixwith your own. - Update the
/secrets/secrets.nixfile by replacing secrets and their filenames as necessary. - Modify the
/configs/home/accounts.nixfile according to your requirements. - Adjust the
/flake.nixfile to match your system configuration.
It is recommended to place this repository in $HOME/Nix, as shell functions expect it there.
To add a new host:
- Make a folder in the
hostsfolder with its hostname. - Setup the host's default.nix file with its specific configs and imports from
/configs. - Set up its flake.nix entry.
The folder structure is:
📁 Nix
├── 📁 configs
│ ├── 📁 darwin (Nix-darwin configs)
│ ├── 📁 home (Home-manager configs)
│ └── 📁 nixos (Nixos configs)
├── 📄 flake.lock (Versioning)
├── 📄 flake.nix (Define which machines are managed)
├── 📄 globals.nix (Global variables)
├── 📁 hosts
│ ├── 📁 host1 (Host1 configs and imports)
│ └── 📁 host2 (Host2 configs and imports)
└── 📁 secrets
├── 📄 default.nix (Imports secrets to hosts)
└── 📄 secrets.nix (Define secret rules here)
A service's file should handle everything the service needs to function. (Firewall rules, user/groups & ownership, etc.). A folder may be used for a service if it helps readability.
Files in /config/darwin should only be used by Nix-darwin systems.
Files in /config/nixos should only be used by Nixos systems.
Files in /config/home may be used by any home-manager systems.