ADD dev.nix - postgresql database

main
Alexandre LUCAZEAU 2022-11-29 16:12:05 +01:00
parent 1c83e1e487
commit e36966c7a7
4 changed files with 35 additions and 3 deletions

View File

@ -12,6 +12,7 @@
./services.nix
./scanner.nix
../modules/common.nix
./dev.nix
];
# Use the GRUB 2 boot loader.
@ -87,7 +88,6 @@ fonts = {
terminus_font
proggyfonts
dejavu_fonts
font-awesome-ttf
font-awesome
nerdfonts
source-code-pro

32
hosts/x201/nixos/dev.nix Normal file
View File

@ -0,0 +1,32 @@
{config, pkgs, ...}:
{
# home.packages = with pkgs; [
# nodejs
# ];
# Enable PostgreSQL
services.postgresql = {
enable = true;
package = pkgs.postgresql_14 ;
enableTCPIP = true;
authentication = "
local all all trust
host all all 127.0.0.1/32 trust
";
# Ensure the database, user, and permissions always exist
ensureDatabases = [ "pizzajoffredb" ];
ensureUsers = [
{ name = "pizzajoffre";
ensurePermissions."DATABASE devpj" = "ALL PRIVILEGES";
}
];
};
# services.pgadmin = {
# openFirewall = true;
# enable = true;
# initialEmail = "pizzajoffre@gmail.com";
# initialPasswordFile = /run/pgadmin;
# };
}

View File

@ -10,6 +10,7 @@
./emacs.nix
./i3status.nix
./neovim.nix
./himalaya.nix
];
home.keyboard = {
layout = "fr";

View File

@ -23,13 +23,12 @@
texlive.combined.scheme-full
hugo
eww
polybar
alacritty
youtube-dl
barrier
zola
keepassxc
zlib
python3
nodejs
];
}