Skip to content

About

⚙️ My NixOS config. No darwin

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Repository files navigation

Welcome Image

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

Welcome Image

About

⚙️ My NixOS config. No darwin

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages