about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-12-03 02:52:28 +0300
committerAzat Bahawi <azat@bahawi.net>2023-12-03 02:52:28 +0300
commitcec9f7acd5e5e365563212c5144394f71dd90b27 (patch)
tree667b308a7241ab2e8f3fa4e2b53cc7888e876c68 /modules
parent2023-11-29 (diff)
2023-12-03
Diffstat (limited to 'modules')
-rw-r--r--modules/common/bat.nix1
-rw-r--r--modules/common/common/nix.nix2
-rw-r--r--modules/common/default.nix1
-rw-r--r--modules/common/emacs/default.nix29
-rw-r--r--modules/common/emacs/doom/config.el5
-rw-r--r--modules/common/eza.nix21
-rw-r--r--modules/common/fonts.nix2
-rw-r--r--modules/common/profiles/default.nix2
-rw-r--r--modules/common/profiles/dev/default.nix3
-rw-r--r--modules/darwin/profiles/headful.nix5
-rw-r--r--modules/nixos/common/locale.nix25
-rw-r--r--modules/nixos/default.nix1
-rw-r--r--modules/nixos/dwm.nix66
-rw-r--r--modules/nixos/emacs.nix24
-rw-r--r--modules/nixos/firefox/addons.nix6
-rw-r--r--modules/nixos/fonts.nix8
-rw-r--r--modules/nixos/kde.nix1
-rw-r--r--modules/nixos/loki.nix4
-rw-r--r--modules/nixos/profiles/headful.nix3
-rw-r--r--modules/nixos/soju.nix30
-rw-r--r--modules/nixos/syncthing.nix28
-rw-r--r--modules/nixos/wayland.nix19
-rw-r--r--modules/nixos/x11.nix7
23 files changed, 189 insertions, 104 deletions
diff --git a/modules/common/bat.nix b/modules/common/bat.nix
index d95f709..2dc0913 100644
--- a/modules/common/bat.nix
+++ b/modules/common/bat.nix
@@ -13,6 +13,7 @@ in {
       baj = "bat --language=json --tabs 2";
       bay = "bat --language=yaml --tabs 2";
       bas = "bat --language=syslog";
+      less = "bat";
     };
 
     hm.programs.bat = {
diff --git a/modules/common/common/nix.nix b/modules/common/common/nix.nix
index 39e3282..3735174 100644
--- a/modules/common/common/nix.nix
+++ b/modules/common/common/nix.nix
@@ -54,6 +54,8 @@ with lib; {
 
       warn-dirty = false;
 
+      keep-going = true;
+
       substituters = [
         "https://azahi.cachix.org"
         "https://cache.iog.io"
diff --git a/modules/common/default.nix b/modules/common/default.nix
index b360049..3b42031 100644
--- a/modules/common/default.nix
+++ b/modules/common/default.nix
@@ -7,6 +7,7 @@ _: {
     ./curl.nix
     ./direnv.nix
     ./emacs
+    ./eza.nix
     ./fonts.nix
     ./git.nix
     ./gnupg.nix
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
index 94c7729..5402b34 100644
--- a/modules/common/emacs/default.nix
+++ b/modules/common/emacs/default.nix
@@ -66,13 +66,15 @@ in {
                 extraBins = with pkgs;
                   [
                     (aspellWithDicts (p: with p; [en ru])) # :checkers (spell +aspell)
+                    # wordnet # :tools (lookup +dictionary +offline)
                     asmfmt # :editor format
-                    bashdb # :lang sh :tools debugger
                     cargo # :lang rust
                     clang-tools # :lang (cc +lsp) :editor format
                     cmake # :lang cc :term vterm
                     cmake-format # :lang cc :editor format
                     cmigemo # :lang japanese
+                    config.hm.programs.emacs.package # !doom
+                    config.nix.package # !doom
                     dockerfile-language-server-nodejs # :tools (docker +lsp)
                     dockfmt # :tools docker :editor format
                     editorconfig-core-c # :tools editorconfig
@@ -137,7 +139,6 @@ in {
                     texlab # lang (tex +lsp)
                     texlive.combined.scheme-full # :lang org tex
                     unzip # :tools debugger
-                    wordnet # :tools (lookup +dictionary +offline)
                     yaml-language-server # :lang (yaml +lsp)
                     zig # :lang zig :editor format
                     zls # :lang (zig +lsp)
@@ -151,6 +152,11 @@ in {
                     then [gdb] # :tools debugger
                     else [lldb] # :tools debugger
                   );
+
+                parinferRustLibrary =
+                  if (hasSuffix "linux" this.system)
+                  then "${pkgs.parinfer-rust}/lib/libparinfer_rust.so"
+                  else "${pkgs.parinfer-rust}/lib/libparinfer_rust.dylib";
               in ''
                 ;; Integrate packages which are required by various modules
                 ;; without polluting the user's profile.
@@ -181,7 +187,7 @@ in {
 
                 ;; :editor parinfer
                 (setq parinfer-rust-auto-download nil
-                      parinfer-rust-library "${pkgs.parinfer-rust}/lib/libparinfer_rust.so")
+                      parinfer-rust-library "${parinferRustLibrary}")
 
                 ;; :lang nix
                 ;; HACK Trick `nix-mode' to use alejandra instead of nixfmt.
@@ -239,18 +245,7 @@ in {
       programs = {
         emacs = {
           enable = true;
-          package =
-            (pkgs.emacs29.override (finalAttrs: {
-              stdenv = pkgs.useMoldLinker finalAttrs.stdenv;
-            }))
-            .overrideAttrs (_: final: {
-              configureFlags =
-                (final.configureFlags or [])
-                ++ [
-                  "--without-mailutils"
-                  "--without-pop"
-                ];
-            });
+          package = pkgs.emacs29;
         };
 
         bash.initExtra = mkAfter ''
@@ -268,6 +263,10 @@ in {
                   vterm_cmd find-file "$(realpath "''${@:-.}")"
               }
           fi
+
+          # Not sourced from inside Emacs for some reason. Maybe it's not
+          # considered an interactive shell?
+          [[ -f ~/.profile ]] && . ~/.profile
         '';
       };
     };
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index dee3d3d..7d92aea 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -196,8 +196,9 @@
       (mapcar (lambda (server)
                 `(,server
                   :server-buffer-name ,server
-                  :host "shire.net"
-                  :port 6667
+                  :host "azahi.cc"
+                  :port 6697
+                  :tls t
                   :user ,(concat circe-default-user "/" server)
                   :pass ,(lambda (&rest _)
                            (+pass-get-secret "server/soju.manwe.shire.net/azahi"))))
diff --git a/modules/common/eza.nix b/modules/common/eza.nix
new file mode 100644
index 0000000..be590b4
--- /dev/null
+++ b/modules/common/eza.nix
@@ -0,0 +1,21 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.eza;
+in {
+  options.nixfiles.modules.eza.enable = mkEnableOption "eza, an alternative to ls";
+
+  config = mkIf cfg.enable {
+    nixfiles.modules.common.shell.aliases = rec {
+      ls = "eza --smart-group --dereference";
+      ll = "${ls} --long --grid";
+      la = "${ll} --header --all";
+    };
+
+    hm.home.packages = [pkgs.eza];
+  };
+}
diff --git a/modules/common/fonts.nix b/modules/common/fonts.nix
index 1e204e5..6bd3e71 100644
--- a/modules/common/fonts.nix
+++ b/modules/common/fonts.nix
@@ -28,8 +28,6 @@ with lib; {
         source-han-sans
         source-han-serif
         noto-fonts
-        noto-fonts-emoji
-        twitter-color-emoji
         font-awesome
       ];
     };
diff --git a/modules/common/profiles/default.nix b/modules/common/profiles/default.nix
index ad5e841..2b24752 100644
--- a/modules/common/profiles/default.nix
+++ b/modules/common/profiles/default.nix
@@ -73,6 +73,8 @@ in {
     ];
 
     nixfiles.modules = {
+      bat.enable = true;
+      eza.enable = true;
       htop.enable = true;
       tmux.enable = true;
       vim.enable = true;
diff --git a/modules/common/profiles/dev/default.nix b/modules/common/profiles/dev/default.nix
index 822778f..2d0c0f6 100644
--- a/modules/common/profiles/dev/default.nix
+++ b/modules/common/profiles/dev/default.nix
@@ -17,7 +17,6 @@ in {
 
   config = mkIf cfg.enable {
     nixfiles.modules = {
-      common.nix.allowedUnfreePackages = ["terraform"];
       bat.enable = true;
       curl.enable = true;
       direnv.enable = true;
@@ -90,8 +89,6 @@ in {
         sops
         httpie
         logcli
-        terraform
-        opentofu
       ];
     };
   };
diff --git a/modules/darwin/profiles/headful.nix b/modules/darwin/profiles/headful.nix
index 01b1951..826e45a 100644
--- a/modules/darwin/profiles/headful.nix
+++ b/modules/darwin/profiles/headful.nix
@@ -10,18 +10,21 @@ in {
   config = mkIf cfg.enable {
     nixfiles.modules.homebrew.enable = true;
 
+    # I'm addicted to GNU...
     hm.home.packages = with pkgs; [
       coreutils
       findutils
+      getopt
       gnugrep
       gnused
       gnutar
+      gzip
+      which
     ];
 
     homebrew.casks = [
       {name = "firefox";}
       {name = "iterm2";}
-      {name = "macfuse";}
       {name = "telegram-desktop";}
     ];
   };
diff --git a/modules/nixos/common/locale.nix b/modules/nixos/common/locale.nix
index 09e0686..9d73af4 100644
--- a/modules/nixos/common/locale.nix
+++ b/modules/nixos/common/locale.nix
@@ -23,6 +23,31 @@ with lib; {
     };
   };
 
+  hm.xdg.configFile."fcitx5/profile".text = generators.toINI {} {
+    "Groups/0" = {
+      Name = "Default";
+      DefaultIM = "mozc";
+      "Default Layout" = "us";
+    };
+
+    "Groups/0/Items/0" = {
+      Name = "keyboard-us";
+      Layout = "";
+    };
+
+    "Groups/0/Items/1" = {
+      Name = "mozc";
+      Layout = "us";
+    };
+
+    "Groups/0/Items/2" = {
+      Name = "keyboard-ru-phonetic";
+      Layout = "";
+    };
+
+    GroupOrder."0" = "Default";
+  };
+
   services.xserver = {
     layout = "us";
     xkbOptions = concatStringsSep "," [
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index 35694f4..ee63ba1 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -66,6 +66,7 @@ _: {
     ./unbound.nix
     ./vaultwarden.nix
     ./vim
+    ./wayland.nix
     ./wireguard.nix
     ./x11.nix
     ./xmonad.nix
diff --git a/modules/nixos/dwm.nix b/modules/nixos/dwm.nix
index 459aae5..9c5e283 100644
--- a/modules/nixos/dwm.nix
+++ b/modules/nixos/dwm.nix
@@ -94,28 +94,28 @@ in {
             };
 
             static const Key keys[] = {
-              { MODKEY,           XK_x,      spawn,          {.v = dmenucmd } },
-              { MODKEY,           XK_Return, spawn,          {.v = termcmd } },
-              { MODKEY,           XK_b,      togglebar,      {0} },
-              { MODKEY,           XK_j,      focusstack,     {.i = +1 } },
-              { MODKEY,           XK_k,      focusstack,     {.i = -1 } },
-              { MODKEY|ShiftMask, XK_k,      incnmaster,     {.i = +1 } },
-              { MODKEY|ShiftMask, XK_j,      incnmaster,     {.i = -1 } },
-              { MODKEY,           XK_comma,  setmfact,       {.f = -0.05} },
-              { MODKEY,           XK_period, setmfact,       {.f = +0.05} },
-              { MODKEY,           XK_p,      zoom,           {0} },
-              { MODKEY,           XK_Tab,    view,           {0} },
-              { MODKEY,           XK_d,      killclient,     {0} },
-              { MODKEY,           XK_t,      setlayout,      {.v = &layouts[0]} },
-              { MODKEY,           XK_m,      setlayout,      {.v = &layouts[1]} },
-              { MODKEY,           XK_f,      setlayout,      {.v = &layouts[2]} },
-              { MODKEY,           XK_o,      togglefloating, {0} },
-              { MODKEY,           XK_0,      view,           {.ui = ~0 } },
-              { MODKEY|ShiftMask, XK_0,      tag,            {.ui = ~0 } },
-              { MODKEY,           XK_h,      focusmon,       {.i = -1 } },
-              { MODKEY,           XK_l,      focusmon,       {.i = +1 } },
-              { MODKEY|ShiftMask, XK_h,      tagmon,         {.i = -1 } },
-              { MODKEY|ShiftMask, XK_l,      tagmon,         {.i = +1 } },
+              { MODKEY,           XK_x,      spawn,          {.v = dmenucmd}       },
+              { MODKEY,           XK_Return, spawn,          {.v = termcmd}        },
+              { MODKEY,           XK_b,      togglebar,      {0}                   },
+              { MODKEY,           XK_j,      focusstack,     {.i = +1}             },
+              { MODKEY,           XK_k,      focusstack,     {.i = -1}             },
+              { MODKEY|ShiftMask, XK_k,      incnmaster,     {.i = +1}             },
+              { MODKEY|ShiftMask, XK_j,      incnmaster,     {.i = -1}             },
+              { MODKEY,           XK_comma,  setmfact,       {.f = -0.05}          },
+              { MODKEY,           XK_period, setmfact,       {.f = +0.05}          },
+              { MODKEY,           XK_p,      zoom,           {0}                   },
+              { MODKEY,           XK_Tab,    view,           {0}                   },
+              { MODKEY,           XK_d,      killclient,     {0}                   },
+              { MODKEY,           XK_t,      setlayout,      {.v = &layouts[0]}    },
+              { MODKEY,           XK_m,      setlayout,      {.v = &layouts[1]}    },
+              { MODKEY,           XK_f,      setlayout,      {.v = &layouts[2]}    },
+              { MODKEY,           XK_o,      togglefloating, {0}                   },
+              { MODKEY,           XK_0,      view,           {.ui = ~0}            },
+              { MODKEY|ShiftMask, XK_0,      tag,            {.ui = ~0}            },
+              { MODKEY,           XK_h,      focusmon,       {.i = -1}             },
+              { MODKEY,           XK_l,      focusmon,       {.i = +1}             },
+              { MODKEY|ShiftMask, XK_h,      tagmon,         {.i = -1}             },
+              { MODKEY|ShiftMask, XK_l,      tagmon,         {.i = +1}             },
               TAGKEYS(            XK_1,                      0)
               TAGKEYS(            XK_2,                      1)
               TAGKEYS(            XK_3,                      2)
@@ -125,21 +125,21 @@ in {
               TAGKEYS(            XK_7,                      6)
               TAGKEYS(            XK_8,                      7)
               TAGKEYS(            XK_9,                      8)
-              { MODKEY|ShiftMask, XK_q,      quit,           {0} },
+              { MODKEY|ShiftMask, XK_q,      quit,           {0}                   },
             };
 
             static const Button buttons[] = {
-              { ClkLtSymbol,   0,      Button1, setlayout,      {0} },
+              { ClkLtSymbol,   0,      Button1, setlayout,      {0}                },
               { ClkLtSymbol,   0,      Button3, setlayout,      {.v = &layouts[2]} },
-              { ClkWinTitle,   0,      Button2, zoom,           {0} },
-              { ClkStatusText, 0,      Button2, spawn,          {.v = termcmd } },
-              { ClkClientWin,  MODKEY, Button1, movemouse,      {0} },
-              { ClkClientWin,  MODKEY, Button2, togglefloating, {0} },
-              { ClkClientWin,  MODKEY, Button3, resizemouse,    {0} },
-              { ClkTagBar,     0,      Button1, view,           {0} },
-              { ClkTagBar,     0,      Button3, toggleview,     {0} },
-              { ClkTagBar,     MODKEY, Button1, tag,            {0} },
-              { ClkTagBar,     MODKEY, Button3, toggletag,      {0} },
+              { ClkWinTitle,   0,      Button2, zoom,           {0}                },
+              { ClkStatusText, 0,      Button2, spawn,          {.v = termcmd}     },
+              { ClkClientWin,  MODKEY, Button1, movemouse,      {0}                },
+              { ClkClientWin,  MODKEY, Button2, togglefloating, {0}                },
+              { ClkClientWin,  MODKEY, Button3, resizemouse,    {0}                },
+              { ClkTagBar,     0,      Button1, view,           {0}                },
+              { ClkTagBar,     0,      Button3, toggleview,     {0}                },
+              { ClkTagBar,     MODKEY, Button1, tag,            {0}                },
+              { ClkTagBar,     MODKEY, Button3, toggletag,      {0}                },
             };
           '';
         };
diff --git a/modules/nixos/emacs.nix b/modules/nixos/emacs.nix
index c851389..7d2112b 100644
--- a/modules/nixos/emacs.nix
+++ b/modules/nixos/emacs.nix
@@ -7,19 +7,15 @@ with lib; let
   cfg = config.nixfiles.modules.emacs;
 in {
   config = mkIf cfg.enable {
-    nixfiles.modules = {
-      common.xdg.defaultApplications.emacs = [
-        "application/atom+xml"
-        "application/json"
-        "application/rss+xml"
-        "application/schema+json"
-        "application/xhtml+xml"
-        "application/xml"
-        "text/csv"
-        "text/plain"
-      ];
-
-      x11.enable = true;
-    };
+    nixfiles.modules.common.xdg.defaultApplications.emacs = [
+      "application/atom+xml"
+      "application/json"
+      "application/rss+xml"
+      "application/schema+json"
+      "application/xhtml+xml"
+      "application/xml"
+      "text/csv"
+      "text/plain"
+    ];
   };
 }
diff --git a/modules/nixos/firefox/addons.nix b/modules/nixos/firefox/addons.nix
index fc4d51b..544b5cd 100644
--- a/modules/nixos/firefox/addons.nix
+++ b/modules/nixos/firefox/addons.nix
@@ -892,10 +892,10 @@
   };
   "rikaichamp" = buildFirefoxXpiAddon {
     pname = "rikaichamp";
-    version = "1.15.1";
+    version = "1.16.0";
     addonId = "{59812185-ea92-4cca-8ab7-cfcacee81281}";
-    url = "https://addons.mozilla.org/firefox/downloads/file/4162143/10ten_ja_reader-1.15.1.xpi";
-    sha256 = "cf638be78da479ccd54fe6ace7990a5ba7757562ec48b2a177e24c86d2ee235c";
+    url = "https://addons.mozilla.org/firefox/downloads/file/4200662/10ten_ja_reader-1.16.0.xpi";
+    sha256 = "ac91a5aee5c6a018c397257eb090eaa640feb0a17aa2e0f91248bad7d1a3e6c1";
     meta = with lib; {
       homepage = "https://github.com/birchill/10ten-ja-reader/";
       description = "Quickly translate Japanese by hovering over words. Formerly released as Rikaichamp.";
diff --git a/modules/nixos/fonts.nix b/modules/nixos/fonts.nix
index f9624ec..a333cb3 100644
--- a/modules/nixos/fonts.nix
+++ b/modules/nixos/fonts.nix
@@ -12,7 +12,13 @@ in {
       nixfiles.modules.common.nix.allowedUnfreePackages = ["symbola"];
       hm.fonts.fontconfig.enable = true;
       fonts = {
-        packages = cfg.packages ++ [pkgs.symbola];
+        packages =
+          cfg.packages
+          ++ (with pkgs; [
+            noto-fonts-emoji
+            twitter-color-emoji
+            symbola
+          ]);
 
         fontconfig = {
           enable = true;
diff --git a/modules/nixos/kde.nix b/modules/nixos/kde.nix
index 1a02d9d..adec490 100644
--- a/modules/nixos/kde.nix
+++ b/modules/nixos/kde.nix
@@ -15,7 +15,6 @@ in {
 
       gnupg.pinentry = "qt";
       sound.enable = true;
-      x11.enable = true;
     };
 
     hm = {
diff --git a/modules/nixos/loki.nix b/modules/nixos/loki.nix
index 0a92fbd..6794ba9 100644
--- a/modules/nixos/loki.nix
+++ b/modules/nixos/loki.nix
@@ -87,10 +87,6 @@ in {
           retention_period = "720h";
         };
 
-        cache_config = {
-          enable_fifocache = false;
-        };
-
         schema_config.configs = [
           {
             from = "2020-01-01";
diff --git a/modules/nixos/profiles/headful.nix b/modules/nixos/profiles/headful.nix
index 938b711..a168d0a 100644
--- a/modules/nixos/profiles/headful.nix
+++ b/modules/nixos/profiles/headful.nix
@@ -19,6 +19,9 @@ in {
       dwm.enable = mkDefault false;
       kde.enable = mkDefault true;
       xmonad.enable = mkDefault false;
+
+      # Potentially remove in favor of Wayland in the future.
+      x11.enable = mkDefault true;
     };
 
     hm = {
diff --git a/modules/nixos/soju.nix b/modules/nixos/soju.nix
index b43fbdc..ea95bb3 100644
--- a/modules/nixos/soju.nix
+++ b/modules/nixos/soju.nix
@@ -11,12 +11,6 @@ in {
   options.nixfiles.modules.soju = {
     enable = mkEnableOption "soju";
 
-    protocol = mkOption {
-      description = "Port.";
-      type = with types; enum ["ircs" "irc+insecure"];
-      default = "irc+insecure";
-    };
-
     address = mkOption {
       description = "Address.";
       type = with types; str;
@@ -26,7 +20,7 @@ in {
     port = mkOption {
       description = "Port.";
       type = with types; port;
-      default = 6667;
+      default = 6697;
     };
 
     domain = mkOption {
@@ -50,13 +44,17 @@ in {
     db = "soju";
   in
     mkIf cfg.enable {
-      nixfiles.modules.postgresql = {
-        enable = true;
-        extraPostStart = [
-          ''
-            $PSQL "${db}" -tAc 'GRANT ALL ON SCHEMA "public" TO "${db}"'
-          ''
-        ];
+      nixfiles.modules = {
+        acme.enable = true;
+        nginx.enable = true;
+        postgresql = {
+          enable = true;
+          extraPostStart = [
+            ''
+              $PSQL "${db}" -tAc 'GRANT ALL ON SCHEMA "public" TO "${db}"'
+            ''
+          ];
+        };
       };
 
       services.postgresql = {
@@ -77,7 +75,8 @@ in {
           ExecStart = let
             # https://soju.im/doc/soju.1.html
             configFile = pkgs.writeText "soju.conf" ''
-              listen ${cfg.protocol}://${cfg.address}:${toString cfg.port}
+              listen ircs://${cfg.address}:${toString cfg.port}
+              tls ${with config.certs.${cfg.domain}; "${directory}/fullchain.pem ${directory}/key.pem"}
               ${
                 with cfg.prometheus;
                   optionalString enable
@@ -100,6 +99,7 @@ in {
               "-config ${configFile}"
             ];
           DynamicUser = true;
+          SupplementaryGroups = [config.services.nginx.group];
           AmbientCapabilities = [""];
           CapabilityBoundingSet = [""];
           UMask = "0077";
diff --git a/modules/nixos/syncthing.nix b/modules/nixos/syncthing.nix
index 39579f8..ecc983f 100644
--- a/modules/nixos/syncthing.nix
+++ b/modules/nixos/syncthing.nix
@@ -12,6 +12,12 @@ in {
   options.nixfiles.modules.syncthing = {
     enable = mkEnableOption "Syncthing";
 
+    port = mkOption {
+      description = "Port.";
+      type = with types; port;
+      default = 8384;
+    };
+
     domain = mkOption {
       description = "Domain name sans protocol scheme.";
       type = with types; str;
@@ -41,15 +47,16 @@ in {
         user = my.username;
         inherit (config.my) group;
 
-        dataDir = config.my.home;
+        dataDir = "${config.dirs.config}/syncthing";
+        configDir = config.services.syncthing.dataDir;
 
-        guiAddress = "127.0.0.1:8384";
+        guiAddress = "127.0.0.1:${toString cfg.port}";
 
         cert = config.secrets."syncthing-cert-${this.hostname}".path;
         key = config.secrets."syncthing-key-${this.hostname}".path;
 
-        overrideDevices = true;
-        overrideFolders = true;
+        overrideDevices = false;
+        overrideFolders = false;
 
         settings = {
           options = {
@@ -70,8 +77,11 @@ in {
           devices = mapAttrs (name: attr:
             mkIf (attr.syncthing.id != null && hasAttr "wireguard" attr) {
               inherit (attr.syncthing) id;
-              addresses = ["tcp://${name}.${config.networking.domain}:22000"];
-              introducer = this.isHeadless;
+              compression = "metadata";
+              introducer = false;
+              address = "tcp://${name}.${config.networking.domain}:22000";
+              autoAcceptFolders = true;
+              untrusted = false;
             })
           my.configurations;
 
@@ -107,17 +117,17 @@ in {
                 versioning = trashcan;
               };
               org = {
-                path = "${documents}/org"; # Configured by Emacs.
+                path = "${documents}/org";
                 devices = all;
                 versioning = simple;
               };
               roam = {
-                path = "${documents}/roam"; # Configured by Emacs.
+                path = "${documents}/roam";
                 devices = notOther;
                 versioning = simple;
               };
               elfeed = {
-                path = "${config.my.home}/.elfeed"; # Configured by Emacs.
+                path = "${config.my.home}/.elfeed";
                 devices = notOther;
                 versioning = trashcan;
               };
diff --git a/modules/nixos/wayland.nix b/modules/nixos/wayland.nix
new file mode 100644
index 0000000..5068c25
--- /dev/null
+++ b/modules/nixos/wayland.nix
@@ -0,0 +1,19 @@
+{
+  config,
+  lib,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.wayland;
+in {
+  options.nixfiles.modules.wayland.enable = mkEnableOption "Wayland";
+
+  config = mkIf cfg.enable {
+    assertions = [
+      {
+        assertion = !config.nixfiles.modules.x11.enable;
+        message = "Pick only one!";
+      }
+    ];
+  };
+}
diff --git a/modules/nixos/x11.nix b/modules/nixos/x11.nix
index b1bca8f..b629aeb 100644
--- a/modules/nixos/x11.nix
+++ b/modules/nixos/x11.nix
@@ -10,7 +10,12 @@ in {
   options.nixfiles.modules.x11.enable = mkEnableOption "X11";
 
   config = mkIf cfg.enable {
-    nixfiles.modules.fonts.enable = true;
+    assertions = [
+      {
+        assertion = !config.nixfiles.modules.wayland.enable;
+        message = "Pick only one!";
+      }
+    ];
 
     hm = {
       home.sessionVariables = {

Consider giving Nix/NixOS a try! <3