diff --git a/hosts/hetzner-vm/hetzner-vm.nix b/hosts/hetzner-vm/hetzner-vm.nix index 3ae847b..2e6d67a 100644 --- a/hosts/hetzner-vm/hetzner-vm.nix +++ b/hosts/hetzner-vm/hetzner-vm.nix @@ -2,6 +2,7 @@ { imports = with tree; [ + users.root users.chaoticryptidz profiles.tailscale diff --git a/hosts/lappy/lappy.nix b/hosts/lappy/lappy.nix index 7c09e51..e9213b4 100644 --- a/hosts/lappy/lappy.nix +++ b/hosts/lappy/lappy.nix @@ -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; [ diff --git a/outputs.nix b/outputs.nix index b3f4986..26d8370 100644 --- a/outputs.nix +++ b/outputs.nix @@ -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"; diff --git a/profiles/tailscale/tailscale.nix b/profiles/tailscale/tailscale.nix index f6d6317..65ba8ba 100644 --- a/profiles/tailscale/tailscale.nix +++ b/profiles/tailscale/tailscale.nix @@ -1 +1,4 @@ -{ ... }: { services.tailscale.enable = true; } +{ ... }: { + services.tailscale.enable = true; + networking.firewall.trustedInterfaces = [ "tailscale0" ]; +} diff --git a/scripts/deploy-all.sh b/scripts/deploy-all.sh old mode 100644 new mode 100755 index e69de29..3b5973c --- a/scripts/deploy-all.sh +++ b/scripts/deploy-all.sh @@ -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" \ No newline at end of file diff --git a/users/chaoticryptidz/chaoticryptidz.nix b/users/chaoticryptidz.nix similarity index 100% rename from users/chaoticryptidz/chaoticryptidz.nix rename to users/chaoticryptidz.nix diff --git a/users/root.nix b/users/root.nix new file mode 100644 index 0000000..b647dcf --- /dev/null +++ b/users/root.nix @@ -0,0 +1,7 @@ +{ config, ... }: { + users.users.root = { + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL4L1eBZzYXZNGBucTn/eOFp48el9JPiYt9iXQDpBSg/ chaoticryptidz@owo.monster" + ]; + }; +}