rename l001->2

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-01-10 12:46:13 -06:00
parent 737b51da0b
commit 6fa1cec887
9 changed files with 34 additions and 16 deletions

View file

@ -117,23 +117,13 @@ in
user = "luser"; user = "luser";
}; };
# LINODE SERVERS # LINODE SERVERS
# "l001" = { "l002_" = {
# identityFile = age.secrets.nix2linode.path;
# hostname = "10.20.40.##"; TODO
# user = "root";
# };
"l001_" = {
identityFile = age.secrets.nix2linode.path; identityFile = age.secrets.nix2linode.path;
hostname = "172.234.26.141"; hostname = "172.234.26.141";
user = "root"; user = "root";
}; };
"l002_" = {
identityFile = age.secrets.nix2l002.path;
hostname = "172.232.4.54";
user = "luser";
};
"l002" = { "l002" = {
identityFile = age.secrets.nix2l002.path; identityFile = age.secrets.nix2linode.path;
hostname = "10.20.40.1"; hostname = "10.20.40.1";
user = "luser"; user = "luser";
}; };

View file

@ -50,11 +50,36 @@
fi fi
done done
''; '';
mod_status = pkgs.writeShellScriptBin "mod_status" ''
cwd=$(pwd)
root=$(git rev-parse --show-toplevel)
for dir in "$root"/modules/*/; do
cd "$dir"
echo
echo " >> $(basename "$dir"):"
git status
done
cd "$cwd"
'';
linode_deploy = pkgs.writeShellScriptBin "linode_deploy" ''
cwd=$(pwd)
root=$(git rev-parse --show-toplevel)
if [ ! -d "$root/hosts/linode/$1" ]; then
echo "Host $1 does not exist"
exit 1
fi
cd "$root/hosts/linode/$1"
echo "Deploying $(basename "$(pwd)")..."
deploy
cd "$cwd"
'';
in in
{ {
default = pkgs.mkShell { default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
mod_worktrees mod_worktrees
mod_status
linode_deploy
deploy-rs deploy-rs
]; ];

View file

@ -76,6 +76,11 @@
proxyPass = "http://localhost:42291"; proxyPass = "http://localhost:42291";
}; };
}; };
"nexus.joshuabell.xyz" = {
locations."/" = {
proxyPass = "http://localhost:42291";
};
};
# Redirect self IP to domain # Redirect self IP to domain
"172.234.26.141" = { "172.234.26.141" = {
@ -127,7 +132,7 @@
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
return = "404"; return = "444";
}; };
}; };

View file

@ -23,7 +23,7 @@
sshUser = "root"; sshUser = "root";
sshOpts = [ sshOpts = [
"-i" "-i"
"/run/agenix/nix2l002" "/run/agenix/nix2linode"
]; ];
nodes.${configuration_name} = { nodes.${configuration_name} = {
hostname = "172.232.11.143"; hostname = "172.232.11.143";
@ -56,7 +56,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFLBVLiPbhVG+riNNpkvXnNtOioByV3CQwtY9gu8pstp nix2l002"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
]; ];
mods = { mods = {
@ -74,7 +73,6 @@
]; ];
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFLBVLiPbhVG+riNNpkvXnNtOioByV3CQwtY9gu8pstp nix2l002"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
]; ];
}; };