mirror of
https://github.com/bahrom04/nix-config.git
synced 2026-05-25 04:03:10 +00:00
⚙️ My NixOS config. No darwin
- Nix 99.5%
- Just 0.5%
| .github | ||
| .vscode | ||
| 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
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 disko ./hosts/?/disk-configuration.nix
# Install using flake configurations on top of partitioned disks
# Replace ? with available hostname
sudo nixos-install --flake .#?
nix-darwin
sudo darwin-rebuild switch --flake .#air
--option tarball-ttl 0 # no caching
nix build .#darwinConfigurations.bahrom04.config.system.build.toplevel --show-trace
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