My personal config for all systems running NixOS
- Nix 98.2%
- Python 1.1%
- Shell 0.7%
| docs | ||
| home | ||
| hosts | ||
| modules | ||
| overlays | ||
| pkgs | ||
| rsc | ||
| secrets | ||
| .gitattributes | ||
| .gitignore | ||
| .sops.yaml | ||
| cool-tricks.md | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| vars.nix | ||
Nix-Config
In case Git LFS is not present in the installation medium do the following additional steps before cloning the repo:
nix-shell -p git-lfs
git clone https://git.ghoscht.com/ghoscht/nix-config.git
# following steps are optional, if images in rsc/wallpaper are not present
git lfs install
git lfs pull
# and finally do
git add .
Installation
The NixOS installer image comes with password SSH auth disabled. Simply allowing the public Git keys is a nice workaround.
sudo systemctl start sshd
mkdir ~/.ssh; curl https://git.ghoscht.com/ghoscht.keys > ~/.ssh/authorized_keys
ATTENTION: Disable Sunshine (enable=false), otherwise Cuda Compile will lead to memory issues in the install medium!
The specific config from "hosts" can be installed using the following command. Limiting the download speed is optional, but can come in handy.
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount ./disko/btrfs-swap.nix --arg device '"/dev/nvme0n1"'
sudo nixos-install --option download-speed 5000 --flake .#<CONFIG_NAME_HERE>
RPi Image generation
nix build .#nixosConfigurations.eustachius.config.system.build.sdImage
sudo dd if=./result/sd-image/<IMAGE_NAME>.img of=/dev/<DEVICE_NAME> bs=1M status=progress
Misc
git config lfs.https://git.ghoscht.com/ghoscht/nix-config.git/info/lfs.locksverify true