[Nix] Adds MCP config.
This commit is contained in:
17
system/hosts/mcp/pull-and-switch.sh
Executable file
17
system/hosts/mcp/pull-and-switch.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Fail on errors
|
||||
set -e
|
||||
|
||||
# Validate the sudo access
|
||||
sudo -v
|
||||
|
||||
# Switch to the Nixos configuration directory
|
||||
cd /etc/nixos
|
||||
|
||||
# Pull the latest changes from the remote repository
|
||||
sudo git fetch origin main
|
||||
sudo git reset --hard origin/main
|
||||
|
||||
# Switch to the latest configuration
|
||||
sudo nixos-rebuild switch
|
||||
Reference in New Issue
Block a user