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

chore: move /etc/nixos to ~/dots

dunkirk.sh 812e64b7 a9f61bf0

verified
+6 -5
README.md
··· 60 60 ``` 61 61 62 62 setup atuin and import previous shell history 63 + 63 64 ```bash 64 65 atuin login 65 66 atuin import ··· 161 162 Move the config to your local directory, link to `/etc/nixos`, and change permissions 162 163 163 164 ```bash 164 - mkdir ~/etc; sudo mv /etc/nixos ~/etc 165 - sudo ln -s ~/etc/nixos /etc 166 - sudo chown -R $(id -un):users ~/etc/nixos 167 - sudo chown kierank -R ~/etc/nixos 168 - sudo chown kierank -R ~/etc/nixos/.* 165 + sudo mv /etc/nixos ~/dots 166 + sudo ln -s ~/dots /etc/nixos 167 + sudo chown -R $(id -un):users ~/dots 168 + sudo chown kierank -R ~/dots 169 + sudo chown kierank -R ~/dots/.* 169 170 ``` 170 171 171 172 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
··· 130 130 echo "" 131 131 echo "After reboot, you'll need to complete these post-installation tasks:" 132 132 echo "1. Change your password" 133 - echo "2. Move config to local directory: mkdir ~/etc; sudo mv /etc/nixos ~/etc" 134 - echo "3. Link to /etc/nixos: sudo ln -s ~/etc/nixos /etc" 135 - echo "4. Change permissions: sudo chown -R \$(id -un):users ~/etc/nixos" 133 + echo "2. Move config to local directory: sudo mv /etc/nixos ~/dots" 134 + echo "3. Link to /etc/nixos: sudo ln -s ~/dots /etc" 135 + echo "4. Change permissions: sudo chown -R \$(id -un):users ~/dots" 136 136 echo "5. Setup fingerprint reader (optional): sudo fprintd-enroll -f right-index-finger \$(whoami)" 137 137 138 138 read -p "Press Enter to unmount and reboot..." 139 139 sudo umount -R /mnt 140 - sudo reboot 140 + sudo reboot
+1 -1
moonlark/configuration.nix
··· 210 210 enable = true; 211 211 clean.enable = true; 212 212 clean.extraArgs = "--keep-since 4d --keep 3"; 213 - flake = "/home/kierank/etc/nixos"; 213 + flake = "/home/kierank/dots"; 214 214 }; 215 215 216 216 services.gnome.gnome-keyring.enable = true;
+6 -7
post-install.sh
··· 27 27 echo "Configuration is already properly set up." 28 28 else 29 29 echo "Moving configuration to home directory..." 30 - mkdir -p ~/etc 31 - sudo mv /etc/nixos ~/etc/ 32 - sudo ln -s ~/etc/nixos /etc/ 30 + sudo mv /etc/nixos ~/dots 31 + sudo ln -s ~/dots /etc/ 33 32 echo "Fixing permissions..." 34 - sudo chown -R $(id -un):users ~/etc/nixos 35 - sudo chown -R $(id -un) ~/etc/nixos/.* 33 + sudo chown -R $(id -un):users ~/dots 34 + sudo chown -R $(id -un) ~/dots/.* 36 35 echo "Configuration files moved and linked successfully!" 37 36 fi 38 37 ··· 67 66 read -p "Do you want to rebuild the system to apply all changes? (y/n): " rebuild_system 68 67 if [[ "$rebuild_system" =~ ^[Yy]$ ]]; then 69 68 echo "Rebuilding system..." 70 - cd ~/etc/nixos 69 + cd ~/dots 71 70 72 71 # Get the hostname to use for the rebuild 73 72 hostname=$(hostname) ··· 81 80 82 81 print_step "Post-installation complete!" 83 82 echo "Your NixOS setup is now complete! You may need to restart some applications or services for all changes to take effect." 84 - echo "To rebuild your system in the future, run: cd ~/etc/nixos && sudo nixos-rebuild switch --flake .#$(hostname)" 83 + echo "To rebuild your system in the future, run: cd ~/dots && sudo nixos-rebuild switch --flake .#$(hostname)" 85 84 echo "Enjoy your new NixOS installation!"