This commit is contained in:
Adrian Lauterer 2024-06-19 09:22:51 +02:00
parent 1c389114a1
commit 3b167273ee
4 changed files with 53 additions and 1 deletions

View File

@ -11,6 +11,9 @@
./nvidia.nix ./nvidia.nix
../../profiles/desktop.nix ../../profiles/desktop.nix
../../services/podman.nix ../../services/podman.nix
../../services/postgres.nix
../../services/mysql.nix
../../services/ollama.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.

19
services/mysql.nix Normal file
View File

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
mariadb
mysql-workbench
jetbrains.datagrip
];
services.mysql = {
enable = true;
package = pkgs.mariadb;
};
}

View File

@ -14,6 +14,7 @@
hostname = config.networking.hostName; hostname = config.networking.hostName;
in in
if hostname == "galadriel" then "cuda" if hostname == "galadriel" then "cuda"
else if hostname == "boromir" then "cuda"
else if hostname == "aragorn" then "rocm" else if hostname == "aragorn" then "rocm"
else null); else null);
@ -26,4 +27,4 @@
}; };
basicAuthFile = config.sops.secrets."nginx/defaultpass".path; basicAuthFile = config.sops.secrets."nginx/defaultpass".path;
}; };
} }

29
services/postgres.nix Normal file
View File

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
postgresql
pgadmin4
pgadmin4-desktopmode
pgmanage
postgresql_16
];
services.postgresql = {
enable = true;
package = pkgs.postgresql_16;
ensureDatabases = [ "testing" ];
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all all trust
'';
extraPlugins = with pkgs.postgresql16Packages; [postgis pg_repack pgvector];
};
}