Caution
These dots are highly prone to change / breakage. I am not a nix os expert (this is my first time touching nix), so I'm not sure if this will work or not. I'm just trying to get my dots up on github. If you have any suggestions, please let me know.
/etc/nixos
├── home-manager - all the config's that use home manager and stored centraly here
│ ├── app - any apps that have home manager configs like neovim get a file here
│ ├── dots - any config files that need to be symlinked go here eg my hyprland config
│ ├── machines - the different machines by hostname
│ │ └── moonlark - my framework laptop
│ └── wm - window manager config; honestly it could probly be moved to app/hyprland
│ └── hyprland - hyprland config
├── moonlark - the files pertaining to my moonlark machine that aren't home manager related
└── secrets - any secrets that are encrypted with agenix go here
10 directories
I have absolutely no idea I kinda understand now?
- Install NixOS via the official guide
sudo -i
- Enable git with
sed -i 's/^{$/{\n programs.git.enable = true;/' /etc/nixos/configuration.nix
and then runnixos-rebuild switch
- Download the disk config with
curl https://github.com/kcoderhtml/dots/raw/master/moonlark/disk-config.nix -o /tmp/disk-config.nix
- Run disko with
nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disk-config.nix
- Mount disk with
mount | grep /mnt
and thencd /mnt/etc/nixos
- Clone this repo to your
/mnt/etc/nixos
folder withgit clone https://github.com/kcoderhtml/dots.git .
- Add your ssh private key to
/mtn/etc/ssh/id_rsa
- install the flake:
nixos-install --flake .#moonlark --no-root-passwd
- Once it finishes run nix install and then reboot
nixos-install
reboot
- Pray to the nix gods that it works 🙏
- If it worked then you should be able to login with the user
kierank
and the passwordlolzthisaintsecure!
- Change the password with
passwd kierank
- Move the config to your local directory with
mkdir ~/etc; sudo mv /etc/nixos ~/etc
- Link the config back to
/etc/nixos
withsudo ln -s ~/etc/nixos /etc
- Change the config permissions:
sudo chown -R $(id -un):users ~/etc/nixos
,sudo chown kierank -R ~/etc/nixos
, andsudo chown kierank -R ~/etc/nixos/.*
- Setup the fingerprint reader with
sudo fprintd-enroll -f right-index-finger kierank
and then verify it worked withsudo fprintd-verify kierank
(you may need to swipe your finger across the fingerprint sensor instead of simply laying it there)
Thanks a bunch to the following people for their dots, configs, and general inspiration which i've shamelessly stolen from:
- NixOS/nixos-hardware
- hyprland-community/hyprnix
- spikespaz/dotfiles
- Misterio77/nix-starter-configs
- mccd.space install guide
- disco docs
- XDG_CONFIG_HOME setting
- Daru-san/spicetify-nix
- agenix
- wpa_supplicant env file docs
- escaping nix variables
- nerd fonts cheat sheet
- setting the default shell in nix
- hyprwm/contrib
- gtk with home manager
- setting up the proper portals
- tuigreet setup