Compare commits

..

5 Commits

Author SHA1 Message Date
c1faaf1764 Added how to use sudo to README 2025-02-19 21:44:21 -08:00
6d159b312c fixed update edge case 2025-02-14 00:54:10 -08:00
5648b01016 added update mechanism 2025-02-14 00:52:01 -08:00
e8bbeb7581 updated readme 2025-02-14 00:41:31 -08:00
75b737a413 updates 2025-02-14 00:22:51 -08:00
4 changed files with 46 additions and 3 deletions

View File

@@ -1,7 +1,27 @@
### Install
## Install
```
git clone https://github.com/Rogue-King/nix-shell-config.git
cd nix-shell-config
bash install.sh
```
## Update
```
bash update.sh
```
## Updating Configurations
```home-manager switch```
or just use the alias:
```rebuild```
## Allowing Sudo to run commands
Edit the sudoers file in /etc, (must be root user or have sudo permissions to edit)
append the following to secure_path:
```:/home/yourusername/.nix-profile/bin:/nix/var/nix/profiles/default/bin```

View File

@@ -8,6 +8,8 @@
curl
docker
dust
file
findutils
ghostty
git
neovim
@@ -92,6 +94,7 @@
catp = "bat -p";
btop = "btop --utf-force";
open = "xdg-open";
rebuild = "home-manager switch";
};
initExtra = ''
@@ -106,7 +109,6 @@
oh-my-zsh = {
enable = true;
#plugins = ["thefuck"];
};
};
};

View File

@@ -47,4 +47,6 @@ sudo echo "/home/$USER/.nix-profile/bin/zsh" | sudo tee -a /etc/shells
chsh -s /home/$USER/.nix-profile/bin/zsh $USER
source ~/.zshrc
echo "Restarting Shell, log back in"
exit

19
update.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
git pull
files=("home-manager/home.nix" "home-manager/cli-tools.nix")
for file in "${files[@]}"; do
if [ -f "$file" ]; then
# Use sed to replace 'USER' with the replacement word
sed -i "s/USER/$USER/g" $file
echo "Processed: $file"
else
echo "Error: $file does not exist or is not a regular file."
fi
done
cp -r home-manager/ ~/.config/
home-manager switch