From 3753db2f39022b476f90f43c46d52871bc5236d9 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Fri, 2 Jun 2023 13:18:26 +0200 Subject: [PATCH] Allow getting configuration from http --- nixos-infect | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos-infect b/nixos-infect index 6622363..30c73bb 100644 --- a/nixos-infect +++ b/nixos-infect @@ -323,6 +323,12 @@ infect() { nix-channel --add "https://nixos.org/channels/$NIX_CHANNEL" nixos nix-channel --update + if [[ $NIXOS_CONFIG = http* ]] + then + curl $NIXOS_CONFIG -o /etc/nixos/configuration.nix + unset NIXOS_CONFIG + fi + export NIXOS_CONFIG="${NIXOS_CONFIG:-/etc/nixos/configuration.nix}" nix-env --set \