new file: common/hardware-configuration.nix new file: common/home.nix new file: flake.nix new file: hosts/docker/configuration.nix new file: hosts/nixos/configuration.nix new file: hosts/nixos/home.nix new file: hosts/server/configuration.nix new file: install.sh new file: prepare.sh
18 lines
370 B
Bash
Executable File
18 lines
370 B
Bash
Executable File
# set root user password
|
|
|
|
$target = $1
|
|
$configfile = $2
|
|
|
|
ssh-keygen -f "/home/wayne/.ssh/known_hosts" -R $target
|
|
|
|
|
|
# copy ssh cert to server
|
|
ssh-copy-id root@$target
|
|
|
|
# Copy cofiguration file
|
|
scp ~/scripts/nixos/$configfile root@$target:/root/configuration.nix
|
|
scp ~/scripts/nixos/prepare.sh root@$target:/root
|
|
|
|
# prepare server
|
|
ssh root@$target 'bash /root/prepare.sh'
|