We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0bd50a commit 3e47b65Copy full SHA for 3e47b65
modules/nixos/nixos/profiles/home-automation/postgresql.nix
@@ -1,12 +1,17 @@
1
# https://nixos.wiki/wiki/Home_Assistant#Using_PostgreSQL
2
-{ config, lib, ... }:
+{ config, lib, pkgs, ... }:
3
{
4
config = lib.mkIf config.profiles.home-automation.enable {
5
services.home-assistant.config.recorder.db_url = "postgresql://@/hass";
6
7
services.postgresql = {
8
enable = true;
9
+
10
+ # https://github.com/NixOS/nixpkgs/issues/216989
11
+ package = pkgs.postgresql_14;
12
13
ensureDatabases = [ "hass" ];
14
15
ensureUsers = [{
16
name = "hass";
17
ensurePermissions = {
0 commit comments