From 812e64b773c0f856ece83377dba4fb4154593743 Mon Sep 17 00:00:00 2001 From: Kieran Klukas Date: Thu, 3 Jul 2025 20:46:45 -0400 Subject: [PATCH] chore: move /etc/nixos to ~/dots --- README.md | 11 ++++++----- install.sh | 8 ++++---- moonlark/configuration.nix | 2 +- post-install.sh | 13 ++++++------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 19c1c1b..ad17a2d 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ home-manager switch --flake .#nest ``` setup atuin and import previous shell history + ```bash atuin login atuin import @@ -161,11 +162,11 @@ passwd kierank 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) diff --git a/install.sh b/install.sh index 889b96d..767465d 100755 --- a/install.sh +++ b/install.sh @@ -130,11 +130,11 @@ echo "Installation complete! The system will now reboot." 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 \ No newline at end of file +sudo reboot diff --git a/moonlark/configuration.nix b/moonlark/configuration.nix index 746a3e4..8fea280 100644 --- a/moonlark/configuration.nix +++ b/moonlark/configuration.nix @@ -210,7 +210,7 @@ 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; diff --git a/post-install.sh b/post-install.sh index b808456..1f2a007 100755 --- a/post-install.sh +++ b/post-install.sh @@ -27,12 +27,11 @@ if [ -L "/etc/nixos" ]; then 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 @@ -67,7 +66,7 @@ print_step "Rebuilding system" 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) @@ -81,5 +80,5 @@ fi 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!" -- 2.51.2