Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services.postgresql.ensureUsers."[definition 1-entry 1]".ensurePermissions' does not exist #377980

Open
papanito opened this issue Jan 30, 2025 · 0 comments

Comments

@papanito
Copy link

I follow postgresql.ensureUsers:

 ];
    services.postgresql = {
      enable = true;
      package = pkgs.postgresql_17;
      ensureDatabases = [ "nixcloud" ];
      ensureUsers =[
        {
          name = "nixcloud";
          ensurePermissions = {
            "DATABASE nixcloud" = "ALL PRIVILEGES";
          };
        }
      ];

This however results in an error:

       … while evaluating the attribute 'value'
         at /nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source/lib/modules.nix:846:9:
          845|     in warnDeprecation opt //
          846|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          847|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `assertions':

       … while evaluating definitions from `/nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source/nixos/modules/services/databases/postgresql.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `services.postgresql.ensureUsers."[definition 1-entry 1]".ensurePermissions' does not exist. Definition values:
       - In `/nix/store/dnh4wx7i5f9i2x158dhfr6b92zywqxxh-source/modules/development.nix':
           {
             "DATABASE nixcloud" = "ALL PRIVILEGES";
           }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant