From 026be4852ee8f38ad91fee391e3c8b93d47a941e Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:22:31 +0200 Subject: [PATCH] test --- hosts/shared/scripts/create_guest_config.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 hosts/shared/scripts/create_guest_config.sh diff --git a/hosts/shared/scripts/create_guest_config.sh b/hosts/shared/scripts/create_guest_config.sh new file mode 100644 index 0000000..718dcb0 --- /dev/null +++ b/hosts/shared/scripts/create_guest_config.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +LAPTOP_CONFIG="./hosts/laptop" +GUEST_CONFIG="./hosts/guest" + +mv "$LAPTOP_CONFIG/configuration.nix" "$GUEST_CONFIG/configuration.nix" +mv "$LAPTOP_CONFIG/variables.nix" "$GUEST_CONFIG/variables.nix" + +# Remove the NVIDIA driver import +cat "$GUEST_CONFIG/configuration.nix" | sed 's/\.\.\/shared\/nvidia/# ..\/shared\/nvidia/' > "$GUEST_CONFIG/configuration.nix" +cat "$GUEST_CONFIG/configuration.nix" | sed 's/\.\.\/shared\/prime/# ..\/shared\/prime/' > "$GUEST_CONFIG/configuration.nix" + +cat "$GUEST_CONFIG/variables.nix" | sed 's/hadi/your username/' > "$GUEST_CONFIG/variables.nix" +cat "$GUEST_CONFIG/variables.nix" | sed 's/Hadi/your username/' > "$GUEST_CONFIG/variables.nix" +cat "$GUEST_CONFIG/variables.nix" | sed 's/112569860+anotherhadi@users.noreply.github.com/your email/' > "$GUEST_CONFIG/variables.nix" +cat "$GUEST_CONFIG/variables.nix" | sed 's/sops = true/sops = false/' > "$GUEST_CONFIG/variables.nix" +cat "$GUEST_CONFIG/variables.nix" | sed 's/nextcloud = true/nextcloud = false/' > "$GUEST_CONFIG/variables.nix"