Kieran's opinionated (and probably slightly dumb) nix config

chore: move /etc/nixos to ~/dots

dunkirk.sh 812e64b7 a9f61bf0

verified
+6 -5
README.md
···
```
setup atuin and import previous shell history
+
```bash
atuin login
atuin import
···
Move the config to your local directory, link to `/etc/nixos`, and change permissions
```bash
-
mkdir ~/etc; sudo mv /etc/nixos ~/etc
-
sudo ln -s ~/etc/nixos /etc
-
sudo chown -R $(id -un):users ~/etc/nixos
-
sudo chown kierank -R ~/etc/nixos
-
sudo chown kierank -R ~/etc/nixos/.*
+
sudo mv /etc/nixos ~/dots
+
sudo ln -s ~/dots /etc/nixos
+
sudo chown -R $(id -un):users ~/dots
+
sudo chown kierank -R ~/dots
+
sudo chown kierank -R ~/dots/.*
```
17. Setup the fingerprint reader and verify it works (you may need to swipe your finger across the fingerprint sensor instead of simply laying it there)
+4 -4
install.sh
···
echo ""
echo "After reboot, you'll need to complete these post-installation tasks:"
echo "1. Change your password"
-
echo "2. Move config to local directory: mkdir ~/etc; sudo mv /etc/nixos ~/etc"
-
echo "3. Link to /etc/nixos: sudo ln -s ~/etc/nixos /etc"
-
echo "4. Change permissions: sudo chown -R \$(id -un):users ~/etc/nixos"
+
echo "2. Move config to local directory: sudo mv /etc/nixos ~/dots"
+
echo "3. Link to /etc/nixos: sudo ln -s ~/dots /etc"
+
echo "4. Change permissions: sudo chown -R \$(id -un):users ~/dots"
echo "5. Setup fingerprint reader (optional): sudo fprintd-enroll -f right-index-finger \$(whoami)"
read -p "Press Enter to unmount and reboot..."
sudo umount -R /mnt
-
sudo reboot
+
sudo reboot
+1 -1
moonlark/configuration.nix
···
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
-
flake = "/home/kierank/etc/nixos";
+
flake = "/home/kierank/dots";
};
services.gnome.gnome-keyring.enable = true;
+6 -7
post-install.sh
···
echo "Configuration is already properly set up."
else
echo "Moving configuration to home directory..."
-
mkdir -p ~/etc
-
sudo mv /etc/nixos ~/etc/
-
sudo ln -s ~/etc/nixos /etc/
+
sudo mv /etc/nixos ~/dots
+
sudo ln -s ~/dots /etc/
echo "Fixing permissions..."
-
sudo chown -R $(id -un):users ~/etc/nixos
-
sudo chown -R $(id -un) ~/etc/nixos/.*
+
sudo chown -R $(id -un):users ~/dots
+
sudo chown -R $(id -un) ~/dots/.*
echo "Configuration files moved and linked successfully!"
fi
···
read -p "Do you want to rebuild the system to apply all changes? (y/n): " rebuild_system
if [[ "$rebuild_system" =~ ^[Yy]$ ]]; then
echo "Rebuilding system..."
-
cd ~/etc/nixos
+
cd ~/dots
# Get the hostname to use for the rebuild
hostname=$(hostname)
···
print_step "Post-installation complete!"
echo "Your NixOS setup is now complete! You may need to restart some applications or services for all changes to take effect."
-
echo "To rebuild your system in the future, run: cd ~/etc/nixos && sudo nixos-rebuild switch --flake .#$(hostname)"
+
echo "To rebuild your system in the future, run: cd ~/dots && sudo nixos-rebuild switch --flake .#$(hostname)"
echo "Enjoy your new NixOS installation!"