- Start
wpa_supplicantservice
sudo systemctl start wpa_supplicant
- Run
wpa_cli
add_network
0
set_network 0 ssid "myhomenetwork"
OK
set_network 0 psk "mypassword"
OK
enable_network 0
OK
- Partitioning and formatting
parted /dev/sda -- mklabel gpt
parted /dev/sda -- mkpart root ext4 512MB -8GB
parted /dev/sda -- mkpart ESP fat32 1MB 512MB
parted /dev/sda -- set 3 esp on
mkfs.ext4 -L nixos /dev/sda1
mkfs.fat -F 32 -n boot /dev/sda3
- Installing NixOS
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/boot
mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
nixos-generate-config --root /mnt
nixos-install --flake 'path/to/flake.nix#nixos'
nixos-enter --root /mnt -c 'passwd sabit'
Activate nix-shell with bitwarden-cli and jq package
nix-shell -p bitwarden-cli jqInside the shell, login to bitwarden
bw loginAnd then execute the scripts
# Get ssh key from bitwarden
./scripts/get-ssh-key
# Generate sops age key from ssh key
./scripts/gen-sops-age
# Print public key of user and host
./scripts/get-age-pubkeyBefore evaluating nix config, edit config.nix according to your needs.
Build nix config and switch using command below:
sudo nixos-rebuild switch --flake .#<name>Where <name> is the name of your configuration.
To install packages from packages directory, simply head to one of package directory and run:
nix profile install .#<package-name>