FIX : remove postgresql conf from services.nix

ADD : variable environnement to home.nix
This commit is contained in:
Alexandre LUCAZEAU 2021-12-16 15:16:09 +01:00
parent 7c8f61240d
commit cc815afb96
2 changed files with 10 additions and 19 deletions

View File

@ -29,25 +29,6 @@
updater.enable = true;
};
postgresql = {
enable = true;
package = pkgs.postgresql_10;
enableTCPIP = true;
authentication = pkgs.lib.mkOverride 10 ''
local all all trust
host all all ::1/128 trust
host all all 127.0.0.1/32 trust
'';
initialScript = pkgs.writeText "backend-initScript" ''
CREATE ROLE foreman WITH LOGIN PASSWORD 'word' CREATEDB;
CREATE ROLE sylvain CREATEDB;
ALTER USER foreman WITH SUPERUSER;
CREATE DATABASE foremandb;
GRANT ALL PRIVILEGES ON DATABASE foremandb TO foreman;
'';
};
ntp.enable = true;
tlp.enable = true;

View File

@ -7,4 +7,14 @@
layout = "fr";
variant = "bepo";
};
environment.variables = let
apps = (import ./variables.nix).apps;
in
{
EDITOR = apps.EDITOR;
VISUAL = apps.EDITOR;
TERMINAL = apps.TERMINAL;
BROWSER = apps.BROWSER;
PRIVATE_BROWSER = apps.PRIVATE_BROWSER;
};
}