29 lines
1.3 KiB
Bash
29 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
sudo apt update
|
|
sudo apt install xz-utils systemd-container -y
|
|
|
|
sh <(curl -L https://nixos.org/nix/install) --daemon --yes
|
|
source /etc/profile && nix-env --install --attr nixpkgs.lua
|
|
printf "experimental-features = nix-command flakes\nsubstituters = https://attic.wavelens.io/main?priority=5&want-mass-query=true https://cache.nixos.org/\ntrusted-public-keys = main:3VVGDhOgY/x5hn7XIkVhqjEjHvOnU7o1cPlrWv91Mko= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=\n" | sudo tee -a /etc/nix/nix.conf
|
|
|
|
git clone https://github.com/erikarvstedt/extra-container
|
|
extra-container/util/install.sh
|
|
|
|
git clone https://git.wavelens.io/public/nix-ai
|
|
cd nix-ai
|
|
|
|
sudo nix run .#buildContainer_builder -- create --start
|
|
|
|
sleep 10
|
|
|
|
mkdir /var/lib/nixos-containers/builder/home/builder/.ssh
|
|
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYHv/LMo8N6iM3zFvOKrF7ZLp3eAG/cOED0yDzrvgkd openpgp:0x74CCE9B8" >> /var/lib/nixos-containers/builder/home/builder/.ssh/authorized_keys
|
|
sudo chown -R root:root /var/lib/nixos-containers/builder/home/builder/.ssh
|
|
sudo chmod -R 755 /var/lib/nixos-containers/builder/home/builder/.ssh
|
|
|
|
# sudo machinectl shell root@builder
|
|
# printf -- "[BUILDER HOST KEY]\n" >> /etc/ssh/ssh_host_ed25519_key
|
|
# echo "[BUILDER HOST KEY]" >> ~/etc/ssh/ssh_host_ed25519_key.pub
|
|
# exit
|