summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-07-23 23:14:21 +0200
committerlassulus <git@lassul.us>2023-07-23 23:14:21 +0200
commit5eb006b52dcd839508eb9937f043abc49a29ab1f (patch)
tree5ccbc9a21c099aa8c1e7b2bbee6121c19284cb1e
parent14c0eedc2b93ffcdd8964f61f9db9072e93cb62f (diff)
l atuin: use upstream service
-rw-r--r--lass/2configs/atuin-server.nix36
1 files changed, 4 insertions, 32 deletions
diff --git a/lass/2configs/atuin-server.nix b/lass/2configs/atuin-server.nix
index ad959a311..05d3b4fd4 100644
--- a/lass/2configs/atuin-server.nix
+++ b/lass/2configs/atuin-server.nix
@@ -1,38 +1,10 @@
{ config, lib, pkgs, ... }:
{
- services.postgresql = {
+ services.atuin = {
enable = true;
- dataDir = "/var/state/postgresql/${config.services.postgresql.package.psqlSchema}";
- ensureDatabases = [ "atuin" ];
- ensureUsers = [{
- name = "atuin";
- ensurePermissions."DATABASE atuin" = "ALL PRIVILEGES";
- }];
- };
- systemd.tmpfiles.rules = [
- "d /var/state/postgresql 0700 postgres postgres -"
- ];
- users.groups.atuin = {};
- users.users.atuin = {
- uid = pkgs.stockholm.lib.genid_uint31 "atuin";
- isSystemUser = true;
- group = "atuin";
- home = "/run/atuin";
- createHome = true;
+ host = "0.0.0.0";
+ maxHistoryLength = 1000000;
+ openFirewall = true;
};
- systemd.services.atuin = {
- wantedBy = [ "multi-user.target" ];
- environment = {
- ATUIN_HOST = "0.0.0.0";
- ATUIN_PORT = "8888";
- ATUIN_OPEN_REGISTRATION = "true";
- ATUIN_DB_URI = "postgres:///atuin";
- };
- serviceConfig = {
- User = "atuin";
- ExecStart = "${pkgs.atuin}/bin/atuin server start";
- };
- };
- networking.firewall.allowedTCPPorts = [ 8888 ];
}