mirror of
https://github.com/bahrom04/nix-config.git
synced 2026-10-16 21:24:27 +00:00
⚙️ My NixOS config. No darwin
- Nix 99.6%
- Just 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| .vscode | ||
| checks/matax-disko-ext4 | ||
| homes/x86_64-linux/bahrom | ||
| modules | ||
| overlays | ||
| patches | ||
| shells/default | ||
| systems/x86_64-linux | ||
| .envrc | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| README.md | ||
NixOS
sudo nixos-rebuild switch --flake .#nixos #use hostname here
nix build .#nixosConfigurations.bahrom04.config.system.build.toplevel --show-trace --option tarball-ttl 0 # no caching
Install from live iso. Disko
# Clone the repository
git clone https://github.com/bahrom04/nix-config.git
# Partition disks regarding to configuration
# Replace ? with available hostname
# Please use it inside bootlable usb to prevent disco used disk being busy
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount ./hosts/?/disk-configuration.nix
# For incremental/imperative change of disk (if you desided to remove/add swap. DO NOT TRUST ME!)
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode format ./hosts/?/disk-configuration.nix
# Then install using flake configurations on top of partitioned disks
# Replace ? with available hostname
sudo nixos-install --flake .#?
Code formatter and checkers & delete cache
nix fmt .
nix flake check --all-systems --show-trace
nix repl :lf .
# geting narHash
nix flake prefetch "github:xinux-org/modules"
# getting rev
git rev-parse main
## delete old generations
sudo nix-collect-garbage -d
Edit secrets
nix develop
EDITOR=vim sops ./secrets/secrets.yaml