mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
20 lines
784 B
Bash
Executable file
20 lines
784 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Define the path to the configuration file
|
|
CONFIG_FILE="/etc/nixos/configuration.nix"
|
|
|
|
# Backup the original configuration file
|
|
cp "$CONFIG_FILE" "$CONFIG_FILE.bak"
|
|
|
|
# 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."
|