rename l001->2
This commit is contained in:
parent
737b51da0b
commit
6fa1cec887
9 changed files with 34 additions and 16 deletions
|
@ -117,23 +117,13 @@ in
|
|||
user = "luser";
|
||||
};
|
||||
# LINODE SERVERS
|
||||
# "l001" = {
|
||||
# identityFile = age.secrets.nix2linode.path;
|
||||
# hostname = "10.20.40.##"; TODO
|
||||
# user = "root";
|
||||
# };
|
||||
"l001_" = {
|
||||
"l002_" = {
|
||||
identityFile = age.secrets.nix2linode.path;
|
||||
hostname = "172.234.26.141";
|
||||
user = "root";
|
||||
};
|
||||
"l002_" = {
|
||||
identityFile = age.secrets.nix2l002.path;
|
||||
hostname = "172.232.4.54";
|
||||
user = "luser";
|
||||
};
|
||||
"l002" = {
|
||||
identityFile = age.secrets.nix2l002.path;
|
||||
identityFile = age.secrets.nix2linode.path;
|
||||
hostname = "10.20.40.1";
|
||||
user = "luser";
|
||||
};
|
||||
|
|
25
flake.nix
25
flake.nix
|
@ -50,11 +50,36 @@
|
|||
fi
|
||||
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
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
mod_worktrees
|
||||
mod_status
|
||||
linode_deploy
|
||||
deploy-rs
|
||||
];
|
||||
|
||||
|
|
|
@ -76,6 +76,11 @@
|
|||
proxyPass = "http://localhost:42291";
|
||||
};
|
||||
};
|
||||
"nexus.joshuabell.xyz" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:42291";
|
||||
};
|
||||
};
|
||||
|
||||
# Redirect self IP to domain
|
||||
"172.234.26.141" = {
|
||||
|
@ -127,7 +132,7 @@
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
return = "404";
|
||||
return = "444";
|
||||
};
|
||||
};
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
sshUser = "root";
|
||||
sshOpts = [
|
||||
"-i"
|
||||
"/run/agenix/nix2l002"
|
||||
"/run/agenix/nix2linode"
|
||||
];
|
||||
nodes.${configuration_name} = {
|
||||
hostname = "172.232.11.143";
|
||||
|
@ -56,7 +56,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFLBVLiPbhVG+riNNpkvXnNtOioByV3CQwtY9gu8pstp nix2l002"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
|
||||
];
|
||||
mods = {
|
||||
|
@ -74,7 +73,6 @@
|
|||
];
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFLBVLiPbhVG+riNNpkvXnNtOioByV3CQwtY9gu8pstp nix2l002"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue