Compare commits
5 Commits
3968bda374
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c1faaf1764 | |||
| 6d159b312c | |||
| 5648b01016 | |||
| e8bbeb7581 | |||
| 75b737a413 |
22
README.md
22
README.md
@@ -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```
|
||||
|
||||
@@ -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"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
19
update.sh
Normal 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
|
||||
Reference in New Issue
Block a user