|
|
Line 7: |
Line 7: |
| The following example configuration will enable Immich locally | | The following example configuration will enable Immich locally |
|
| |
|
| {{file|/etc/nixos/configuration.nix|nix|3=environment.etc."immich-typsense-api-key".text = "12318551487654187654"; | | {{file|/etc/nixos/configuration.nix|nix|3=services.immich.enable = true; |
| services.immich = { | | }}After applying the configuration you can access the instance via http://localhost:3001. |
| enable = true;
| |
| server.typesense.apiKeyFile = "/etc/immich-typsense-api-key";
| |
| };
| |
| | |
| services.typesense = {
| |
| enable = true;
| |
| # In a real setup you should generate an api key for immich
| |
| # and not use the admin key!
| |
| apiKeyFile = "/etc/immich-typsense-api-key";
| |
| settings.server.api-address = "127.0.0.1";
| |
| };
| |
| | |
| services.postgresql = {
| |
| enable = true;
| |
| identMap = ''
| |
| # ArbitraryMapName systemUser DBUser
| |
| superuser_map root postgres
| |
| superuser_map postgres postgres
| |
| # Let other names login as themselves
| |
| superuser_map /^(.*)$ \1
| |
| '';
| |
| authentication = pkgs.lib.mkOverride 10 ''
| |
| local sameuser all peer map=superuser_map
| |
| '';
| |
| ensureDatabases = [ "immich" ];
| |
| ensureUsers = [
| |
| {
| |
| name = "immich";
| |
| ensurePermissions = {
| |
| "DATABASE immich" = "ALL PRIVILEGES";
| |
| };
| |
| }
| |
| ];
| |
| };
| |
| }}After applying the configuration you can access the instance via http://localhost:28981 and login with username <code>admin</code> and password <code>admin</code>. | |
| | |
| [[Category:Server]] | | [[Category:Server]] |
| [[Category:Web Applications]] | | [[Category:Web Applications]] |