Add Wiki machine to web deployment

This commit is contained in:
Nicolas Jeannerod 2024-11-18 11:55:50 +01:00
parent 2ffab40687
commit 62eea1bf8a
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8
3 changed files with 35 additions and 8 deletions

View file

@ -7,7 +7,7 @@ Their configuration can be updated via NixOps4. Run
nixops4 deployments list nixops4 deployments list
#+end_src #+end_src
to see the available deployments. Given a deployment (eg. ~actions-runners~), run to see the available deployments. Given a deployment (eg. ~git~), run
#+begin_src sh #+begin_src sh
nixops4 apply <deployment> nixops4 apply <deployment>
@ -17,6 +17,7 @@ nixops4 apply <deployment>
- ~git~ :: Machines hosting our Git infrastructure, eg. Forgejo and its actions - ~git~ :: Machines hosting our Git infrastructure, eg. Forgejo and its actions
runners runners
- ~web~ :: Machines hosting our online content, eg. the website or the wiki
* Procolix machines * Procolix machines
@ -29,4 +30,4 @@ infrastructure.
| vm02116 | Forgejo | ~git~ | | vm02116 | Forgejo | ~git~ |
| vm02179 | Forgejo actions runner | ~git~ | | vm02179 | Forgejo actions runner | ~git~ |
| vm02186 | Forgejo actions runner | ~git~ | | vm02186 | Forgejo actions runner | ~git~ |
| vm02187 | Wiki | /none/ | | vm02187 | Wiki | ~web~ |

View file

@ -62,4 +62,29 @@
}; };
}; };
}; };
nixops4Deployments.web =
{ providers, ... }:
{
providers.local = inputs.nixops4-nixos.modules.nixops4Provider.local;
resources = {
vm02187 = {
type = providers.local.exec;
imports = [ inputs.nixops4-nixos.modules.nixops4Resource.nixos ];
ssh = {
host = "185.206.232.187";
opts = "";
hostPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN24ZfdQNklKkIqfMg/+0vqENuDcy6fhT6SfAq01ae83";
};
nixpkgs = inputs.nixpkgs;
nixos.module = {
imports = [
./vm02187/configuration.nix
./vm02187/hardware-configuration.nix
];
};
};
};
};
} }

View file

@ -195,7 +195,13 @@
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.root.hashedPassword = "$y$j9T$WXvLAUqArJJusuC017FCW0$.rfMOeyx/BsClkJFi5hLcynrSk.njWmfiB6Uy.9th3A"; users.users.root = {
hashedPassword = "$y$j9T$WXvLAUqArJJusuC017FCW0$.rfMOeyx/BsClkJFi5hLcynrSk.njWmfiB6Uy.9th3A";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEElREJN0AC7lbp+5X204pQ5r030IbgCllsIxyU3iiKY"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJg5TlS1NGCRZwMjDgBkXeFUXqooqRlM8fJdBAQ4buPg"
];
};
users.users.procolix = { users.users.procolix = {
isNormalUser = true; isNormalUser = true;
@ -233,11 +239,6 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave