Something went wrong. Try again.
NixOS + home-manager configs, mirrored from GitLab SaaS. gitlab.com/andreijiroh-dev/nixops-config
nix-flake nixos home-manager nixpkgs nix-flakes
Something went wrong. Try again.
767 B · 24 lines
at main
123456789101112131415161718192021222324#!/usr/bin/env bash# This is a utility wrapper script around nixos-rebuild, intended for use within the root directory of the repository# as a local copy/clone. Might implement remote setups soon# SPDX-License-Identifier: MPL-2.0
set -xeHOSTNAME=$(hostname)NIXOS_HOSTNAME=${2:-"$HOSTNAME"}SUDO=${SUDO:"sudo"}
if [[ $EUID != "0" ]]; then echo "Run me as root user again in order to deploy config changes." exit 1fi
if [[ $1 == "switch" ]]; then nixos-rebuild --verbose --show-trace --flake ".#${NIXOS_HOSTNAME}" switchelif [[ $1 == "boot" ]]; then nixos-rebuild --verbose --show-trace --flake ".#${NIXOS_HOSTNAME}" bootelse echo "Unsupport command for this deployment wrapper" echo "Usage: $0 <switch|boot> [hostname]" exit 1fi