adding nocodb

This commit is contained in:
Chris Cochrun 2025-05-16 07:12:14 -05:00
parent 932d77fa13
commit 9be0eabea9
3 changed files with 49 additions and 1 deletions

View file

@ -14,6 +14,7 @@
nix-comfyui.url = "github:dyscorv/nix-comfyui"; nix-comfyui.url = "github:dyscorv/nix-comfyui";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11"; simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11";
nocodb.url = "github:nocodb/nocodb";
}; };
outputs = { nixpkgs, outputs = { nixpkgs,
@ -23,6 +24,7 @@
nix-comfyui, nix-comfyui,
deploy-rs, deploy-rs,
simple-nixos-mailserver, simple-nixos-mailserver,
nocodb,
self, self,
... }: ... }:
let let
@ -53,6 +55,7 @@
./system/shen/configuration.nix ./system/shen/configuration.nix
simple-nixos-mailserver.nixosModule simple-nixos-mailserver.nixosModule
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nocodb.nixosModules.nocodb
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;

View file

@ -32,7 +32,7 @@ with lib;
enable = true; enable = true;
dates = "04:40"; dates = "04:40";
allowReboot = true; allowReboot = true;
flake = "${config.users.users.chris.home}/conf"; flake = "/conf";
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ]; flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
rebootWindow = { rebootWindow = {
lower = "04:40"; lower = "04:40";

45
modules/nocodb.nix Normal file
View file

@ -0,0 +1,45 @@
{ config, lib, pkgs, unstable, ... }:
let
dn = "table.tfcconnection.org";
in
with lib;
{
services = {
nocodb = {
enable = true;
environmentFile = /nocoenv;
};
};
services.nginx.virtualHosts.${dn} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.nocodb.environments.PORT}";
proxyWebsockets = true;
};
};
services.postgresql = {
enable = true;
ensureDatabases = [ "nocodb" ];
ensureUsers = [{
name = "nocodb";
ensureDBOwnership = true;
}];
# package = with pkgs; postgresql_15;
authentication = lib.mkForce ''
#type database DBuser origin-address auth-method
# unix socket
local all all trust
# ipv4
host all all 127.0.0.1/32 trust
# ipv6
host all all ::1/128 trust
'';
settings.log_timezone = config.time.timeZone;
};
}