From e36966c7a74729e057106141db3c5d4d49acf390 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Tue, 29 Nov 2022 16:12:05 +0100 Subject: [PATCH] ADD dev.nix - postgresql database --- hosts/x201/nixos/configuration.nix | 2 +- hosts/x201/nixos/dev.nix | 32 ++++++++++++++++++++++++++++++ hosts/x201/nixpkgs/home.nix | 1 + hosts/x201/nixpkgs/packages.nix | 3 +-- 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 hosts/x201/nixos/dev.nix diff --git a/hosts/x201/nixos/configuration.nix b/hosts/x201/nixos/configuration.nix index 62517b6..8acb98d 100644 --- a/hosts/x201/nixos/configuration.nix +++ b/hosts/x201/nixos/configuration.nix @@ -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 diff --git a/hosts/x201/nixos/dev.nix b/hosts/x201/nixos/dev.nix new file mode 100644 index 0000000..84e3e9f --- /dev/null +++ b/hosts/x201/nixos/dev.nix @@ -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; +# }; + +} diff --git a/hosts/x201/nixpkgs/home.nix b/hosts/x201/nixpkgs/home.nix index 6d2eae5..62a7683 100644 --- a/hosts/x201/nixpkgs/home.nix +++ b/hosts/x201/nixpkgs/home.nix @@ -10,6 +10,7 @@ ./emacs.nix ./i3status.nix ./neovim.nix + ./himalaya.nix ]; home.keyboard = { layout = "fr"; diff --git a/hosts/x201/nixpkgs/packages.nix b/hosts/x201/nixpkgs/packages.nix index 74737ac..5a2aaad 100644 --- a/hosts/x201/nixpkgs/packages.nix +++ b/hosts/x201/nixpkgs/packages.nix @@ -23,13 +23,12 @@ texlive.combined.scheme-full hugo eww - polybar alacritty youtube-dl - barrier zola keepassxc zlib python3 + nodejs ]; }