mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
feat: added reinstall scripts
This commit is contained in:
parent
be599e1ff3
commit
b8f37412b2
2 changed files with 9 additions and 54 deletions
|
@ -1,20 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Define the path to the configuration file
|
||||
CONFIG_FILE="/etc/nixos/configuration.nix"
|
||||
cp /etc/nixos/configuration.nix /etc/nixos/configuration.nix.backup
|
||||
|
||||
# Backup the original configuration file
|
||||
cp "$CONFIG_FILE" "$CONFIG_FILE.bak"
|
||||
sed -i '/services\.printing\.enable = true;/a\ nix.settings.experimental-features = ["nix-command" "flakes"];\n services.openssh.enable = true;' /etc/nixos/configuration.nix
|
||||
sed -i '/thunderbird/a\ git\n vscode\n tomb' /etc/nixos/configuration.nix
|
||||
swapoff -a
|
||||
|
||||
# Add experimental features
|
||||
sed -i '/nix.settings.experimental-features/a\ nix.settings.experimental-features = ["nix-command" "flakes"]; # Added by script' "$CONFIG_FILE"
|
||||
|
||||
# Enable OpenSSH daemon
|
||||
sed -i '/services.openssh.enable = true;/i\ services.openssh.enable = true; # Added by script' "$CONFIG_FILE"
|
||||
|
||||
# Add user packages
|
||||
sed -i '/packages = with pkgs; \[/a\ git # Added by script' "$CONFIG_FILE"
|
||||
sed -i '/git/a\ vscode # Added by script' "$CONFIG_FILE"
|
||||
sed -i '/vscode/a\ tomb # Added by script' "$CONFIG_FILE"
|
||||
|
||||
echo "Configurations have been added to $CONFIG_FILE."
|
||||
echo "/etc/nixos/configuration.nix updated successfully."
|
Loading…
Add table
Add a link
Reference in a new issue