add deploy-all script

This commit is contained in:
ChaotiCryptidz 2021-12-28 22:59:28 +00:00
parent e1ddf66b7d
commit efa5b68eb0
7 changed files with 29 additions and 4 deletions

View file

@ -2,6 +2,7 @@
{
imports = with tree; [
users.root
users.chaoticryptidz
profiles.tailscale

View file

@ -2,7 +2,9 @@
{
imports = with tree; [
users.root
users.chaoticryptidz
profiles.tailscale
profiles.gui
profiles.laptop
@ -15,9 +17,11 @@
# for sci-hub and whenever websites break
profiles.tor
# profiles.sshd
profiles.sshd
];
networking.firewall.enable = true;
home-manager.users.root = { imports = with tree; [ home.base ]; };
home-manager.users.chaoticryptidz = {
imports = with tree; [

View file

@ -30,7 +30,7 @@ in {
nixosConfigurations = import ./hosts ({ inherit tree; } // inputs);
deploy.nodes.lappy = {
hostname = "localhost";
hostname = "100.115.10.34";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
@ -38,7 +38,7 @@ in {
};
};
deploy.nodes.hetzner-vm = {
hostname = "65.21.182.73";
hostname = "100.116.159.25";
username = "root";
profiles.system = {
user = "root";

View file

@ -1 +1,4 @@
{ ... }: { services.tailscale.enable = true; }
{ ... }: {
services.tailscale.enable = true;
networking.firewall.trustedInterfaces = [ "tailscale0" ];
}

10
scripts/deploy-all.sh Normal file → Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
REPO_ROOT="${SCRIPT_DIR}/.."
cd $REPO_ROOT
git add .
deploy ".#lappy"
deploy ".#hetzner-vm"

7
users/root.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, ... }: {
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL4L1eBZzYXZNGBucTn/eOFp48el9JPiYt9iXQDpBSg/ chaoticryptidz@owo.monster"
];
};
}