diff options
Diffstat (limited to 'nix/add-system.sh')
| -rwxr-xr-x | nix/add-system.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nix/add-system.sh b/nix/add-system.sh new file mode 100755 index 0000000..bd7d0cf --- /dev/null +++ b/nix/add-system.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +sed -i "/# add hostnames here/i \ \"$1\"" "$HOME/monorepo/nix/flake.nix" +sed -i "/# add hostnames here/i \ \"$1\"" "$HOME/monorepo/config/nix.org" + +mkdir -p "$HOME/monorepo/nix/systems/$1" + +cat > "$HOME/monorepo/nix/systems/$1/default.nix" <<EOF +{ ... }: +{ + imports = [ + ../includes.nix + ../../disko/drive-simple.nix + ]; + # CHANGEME + config.monorepo.vars.drive = "/dev/sda"; +} +EOF + +cp "$HOME/monorepo/nix/systems/continuity/home.nix" "$HOME/monorepo/nix/systems/$1/home.nix" |
