new file: common/configuration.nix
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
This commit is contained in:
17
install.sh
Executable file
17
install.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
# 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'
|
||||
Reference in New Issue
Block a user