configure rabbi gerzi

This commit is contained in:
Yisroel Baum 2026-07-02 11:51:07 +03:00
parent 4b043686fe
commit bf009cbcdd
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
4 changed files with 68 additions and 10 deletions

View file

@ -5,3 +5,7 @@ creation_rules:
key_groups: key_groups:
- age: - age:
- *server - *server
- path_regex: secrets/rabbi-gerzi\.env$
key_groups:
- age:
- *server

View file

@ -20,6 +20,10 @@
url = "git+https://git.yisroelbaum.com/yisroelbaum/MyResume"; url = "git+https://git.yisroelbaum.com/yisroelbaum/MyResume";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
rabbi-gerzi = {
url = "git+https://git.yisroelbaum.com/yisroelbaum/Rabbi_Gerzi";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
@ -30,20 +34,24 @@
sops-nix, sops-nix,
tide, tide,
resume, resume,
rabbi-gerzi,
... ...
}: }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
domainName = "yisroelbaum.com"; domainName = "yisroelbaum.com";
in { in
{
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
modules = [ modules = [
./configuration.nix ./configuration.nix
./discourse.nix ./discourse.nix
./tide.nix ./tide.nix
./rabbi-gerzi.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
tide.nixosModules.tide tide.nixosModules.tide
rabbi-gerzi.nixosModules.default
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
@ -52,9 +60,11 @@
]; ];
specialArgs = { inherit domainName resume; }; specialArgs = { inherit domainName resume; };
}; };
devShells."${system}".default = let devShells."${system}".default =
let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in pkgs.mkShell { in
pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
nixos-rebuild nixos-rebuild
sops sops

34
rabbi-gerzi.nix Normal file
View file

@ -0,0 +1,34 @@
{
config,
domainName,
...
}:
{
services.rabbi-gerzi = {
enable = true;
frontend = {
hostName = "rabbigerzi.${domainName}";
nginx = {
forceSSL = true;
enableACME = true;
};
};
backend = {
hostName = "rabbigerziapi.${domainName}";
environmentFile = config.sops.secrets."rabbi-gerzi-env".path;
nginx = {
forceSSL = true;
enableACME = true;
};
};
};
sops.secrets."rabbi-gerzi-env" = {
sopsFile = ./secrets/rabbi-gerzi.env;
format = "dotenv";
key = "";
mode = "0400";
owner = config.services.rabbi-gerzi.user;
group = config.services.rabbi-gerzi.group;
};
}

View file

@ -21,3 +21,13 @@ host's age key.
`tide.yaml` is encrypted and committed. `tide.yaml.example` is `tide.yaml` is encrypted and committed. `tide.yaml.example` is
the plaintext template. the plaintext template.
## Rabbi Gerzi
Create `rabbi-gerzi.env` as a SOPS-encrypted dotenv file with:
```dotenv
APP_KEY=base64:...
RABBI_GERZI_INITIAL_ADMIN_EMAIL=...
RABBI_GERZI_INITIAL_ADMIN_PASSWORD=...
```