add nocodb (untested)
This commit is contained in:
parent
8c7c87968e
commit
3c1c585dc4
3 changed files with 52 additions and 8 deletions
|
|
@ -3,12 +3,13 @@
|
||||||
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
|
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
|
||||||
(modulesPath + "/virtualisation/digital-ocean-config.nix")
|
(modulesPath + "/virtualisation/digital-ocean-config.nix")
|
||||||
# ./o-caddy.nix
|
# ./o-caddy.nix
|
||||||
./o-paste.nix
|
# ./o-paste.nix
|
||||||
./o-git-forgejo.nix
|
./o-git-forgejo.nix
|
||||||
#./o-nocodb.nix
|
./o-nocodb.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
environment.sessionVariables = { EDITOR = "nvim"; };
|
environment.sessionVariables = { EDITOR = "nvim"; };
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
nocodb.url = "github:nocodb/nocodb";
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs }@attrs: {
|
outputs = { self, nixpkgs, nocodb }@attrs: {
|
||||||
nixosConfigurations.matilda-gage = nixpkgs.lib.nixosSystem rec {
|
nixosConfigurations.matilda-gage = nixpkgs.lib.nixosSystem rec {
|
||||||
pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; };};
|
pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; };};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [ ./configuration.nix
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
nocodb.nixosModules.nocodb
|
||||||
# This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs
|
# This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs
|
||||||
({ config, pkgs, options, ... }: { nix.registry.nixpkgs.flake = nixpkgs; })
|
({ config, pkgs, options, ... }: { nix.registry.nixpkgs.flake = nixpkgs; })
|
||||||
];
|
];
|
||||||
|
|
|
||||||
40
o-nocodb.nix
Normal file
40
o-nocodb.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.nocodb.enable = true;
|
||||||
|
services.nocodb.environment = {
|
||||||
|
DB_URL="postgres:///nocodb?host=/run/postgresql";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
ensureDatabases = [ "nocodb" ];
|
||||||
|
ensureUsers = [{
|
||||||
|
name = "nocodb";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}];
|
||||||
|
|
||||||
|
package = with pkgs; postgresql;
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
# virtualisation.oci-containers.containers."nocodb" = {
|
||||||
|
# image = "nocodb/nocodb:latest";
|
||||||
|
# ports = [ "8080:8080" ];
|
||||||
|
# volumes = [ "/home/ntm/nocodb:/usr/app/data/" ];
|
||||||
|
# user = "ntm:ntm";
|
||||||
|
# environment = {
|
||||||
|
# NC_DB="pg://";
|
||||||
|
# NC_AUTH_JWT_SECRET="";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue