summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-11-13 22:45:18 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2025-11-13 22:45:18 +0100
commitf8a9228baa4f68c7639ef703e15f97bf146c53ee (patch)
tree6efca90bf896a6747f64b97ed2b9055f2d910508 /hosts
parentf92d022f5c03f719492fa4901d21190c3a576187 (diff)
downloadnixos-f8a9228baa4f68c7639ef703e15f97bf146c53ee.tar
nixos-f8a9228baa4f68c7639ef703e15f97bf146c53ee.tar.gz
nixos-f8a9228baa4f68c7639ef703e15f97bf146c53ee.tar.bz2
nixos-f8a9228baa4f68c7639ef703e15f97bf146c53ee.tar.xz
nixos-f8a9228baa4f68c7639ef703e15f97bf146c53ee.zip
...
Diffstat (limited to 'hosts')
-rw-r--r--hosts/sif/default.nix10
-rw-r--r--hosts/surtr/email/default.nix35
2 files changed, 9 insertions, 36 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index fb2dddc6..ce0d6355 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -402,10 +402,10 @@ in {
402 402
403 thinkfan.enable = true; 403 thinkfan.enable = true;
404 404
405 logind = { 405 logind.settings.Login = {
406 lidSwitch = "suspend"; 406 HandleLidSwitch = "suspend";
407 lidSwitchDocked = "ignore"; 407 HandleLidSwitchDocked = "ignore";
408 lidSwitchExternalPower = "ignore"; 408 HandleLidSwitchExternalPower = "ignore";
409 }; 409 };
410 410
411 atd = { 411 atd = {
@@ -572,7 +572,7 @@ in {
572 # setLdLibraryPath = true; 572 # setLdLibraryPath = true;
573 }; 573 };
574 574
575 firmware = [ pkgs.firmwareLinuxNonfree ]; 575 firmware = [ pkgs.linux-firmware ];
576 576
577 keyboard.uhk.enable = true; 577 keyboard.uhk.enable = true;
578 nitrokey.enable = true; 578 nitrokey.enable = true;
diff --git a/hosts/surtr/email/default.nix b/hosts/surtr/email/default.nix
index b4b2b5c8..c09e1511 100644
--- a/hosts/surtr/email/default.nix
+++ b/hosts/surtr/email/default.nix
@@ -539,7 +539,7 @@ in {
539 539
540 users.groups.${config.services.redis.servers.rspamd.user}.members = [ config.services.rspamd.user ]; 540 users.groups.${config.services.redis.servers.rspamd.user}.members = [ config.services.rspamd.user ];
541 541
542 environment.systemPackages = with pkgs; [ dovecot_pigeonhole dovecot_fts_xapian ]; 542 environment.systemPackages = with pkgs; [ dovecot_pigeonhole dovecot-fts-flatcurve ];
543 services.dovecot2 = { 543 services.dovecot2 = {
544 enable = true; 544 enable = true;
545 enablePAM = false; 545 enablePAM = false;
@@ -547,7 +547,7 @@ in {
547 sslServerKey = "/run/credentials/dovecot.service/surtr.yggdrasil.li.key.pem"; 547 sslServerKey = "/run/credentials/dovecot.service/surtr.yggdrasil.li.key.pem";
548 sslCACert = toString ./ca/ca.crt; 548 sslCACert = toString ./ca/ca.crt;
549 mailLocation = "maildir:/var/lib/mail/%u/maildir:UTF-8:INDEX=/var/lib/dovecot/indices/%u"; 549 mailLocation = "maildir:/var/lib/mail/%u/maildir:UTF-8:INDEX=/var/lib/dovecot/indices/%u";
550 mailPlugins.globally.enable = [ "fts" "fts_xapian" ]; 550 mailPlugins.globally.enable = [ "fts" "fts_flatcurve" ];
551 protocols = [ "lmtp" "sieve" ]; 551 protocols = [ "lmtp" "sieve" ];
552 sieve = { 552 sieve = {
553 extensions = ["copy" "imapsieve" "variables" "imap4flags" "vacation" "vacation-seconds" "vnd.dovecot.debug"]; 553 extensions = ["copy" "imapsieve" "variables" "imap4flags" "vacation" "vacation-seconds" "vnd.dovecot.debug"];
@@ -726,13 +726,10 @@ in {
726 } 726 }
727 727
728 plugin { 728 plugin {
729 plugin = fts fts_xapian 729 plugin = fts fts_flatcurve
730 fts = xapian 730 fts = yes
731 fts_xapian = partial=3 full=20 attachments=1 verbose=1
732 731
733 fts_autoindex = yes 732 fts_autoindex = yes
734
735 fts_enforced = no
736 } 733 }
737 734
738 service indexer-worker { 735 service indexer-worker {
@@ -741,30 +738,6 @@ in {
741 ''; 738 '';
742 }; 739 };
743 740
744 systemd.services.dovecot-fts-xapian-optimize = {
745 description = "Optimize dovecot indices for fts_xapian";
746 requisite = [ "dovecot.service" ];
747 after = [ "dovecot.service" ];
748 startAt = "*-*-* 22:00:00 Europe/Berlin";
749 serviceConfig = {
750 Type = "oneshot";
751 ExecStart = "${getExe' pkgs.dovecot "doveadm"} fts optimize -A";
752 PrivateDevices = true;
753 PrivateNetwork = true;
754 ProtectKernelTunables = true;
755 ProtectKernelModules = true;
756 ProtectControlGroups = true;
757 ProtectHome = true;
758 ProtectSystem = true;
759 PrivateTmp = true;
760 };
761 };
762 systemd.timers.dovecot-fts-xapian-optimize = {
763 timerConfig = {
764 RandomizedDelaySec = 4 * 3600;
765 };
766 };
767
768 environment.etc = { 741 environment.etc = {
769 "dovecot/sieve_before.d/tag-junk.sieve".text = '' 742 "dovecot/sieve_before.d/tag-junk.sieve".text = ''
770 require ["imap4flags"]; 743 require ["imap4flags"];