about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configurations/manwe/default.nix11
-rw-r--r--configurations/melian/default.nix5
-rw-r--r--configurations/varda/default.nix5
-rw-r--r--configurations/yavanna/default.nix5
-rw-r--r--flake.lock6
-rw-r--r--modules/nixfiles/emacs/doom/config.el6
-rw-r--r--modules/nixfiles/emacs/doom/init.el2
-rw-r--r--modules/nixfiles/nsd.nix48
-rw-r--r--readme.org35
9 files changed, 78 insertions, 45 deletions
diff --git a/configurations/manwe/default.nix b/configurations/manwe/default.nix
index 2599d78..47a2040 100644
--- a/configurations/manwe/default.nix
+++ b/configurations/manwe/default.nix
@@ -93,5 +93,14 @@ with lib; {
     };
   };
 
-  swapDevices = [{device = "/dev/sda3";}];
+  swapDevices = [
+    {
+      device = "/dev/sda3";
+    }
+  ];
+
+  zramSwap = {
+    enable = true;
+    memoryPercent = 25;
+  };
 }
diff --git a/configurations/melian/default.nix b/configurations/melian/default.nix
index 94e799e..08cbc8c 100644
--- a/configurations/melian/default.nix
+++ b/configurations/melian/default.nix
@@ -60,6 +60,11 @@ with lib; {
     }
   ];
 
+  zramSwap = {
+    enable = true;
+    memoryPercent = 25;
+  };
+
   boot = {
     kernelPackages = mkForce pkgs.linuxPackages_xanmod_latest;
 
diff --git a/configurations/varda/default.nix b/configurations/varda/default.nix
index 7efeb61..c0789f5 100644
--- a/configurations/varda/default.nix
+++ b/configurations/varda/default.nix
@@ -77,4 +77,9 @@ with lib; {
       size = 4 * 1024;
     }
   ];
+
+  zramSwap = {
+    enable = true;
+    memoryPercent = 25;
+  };
 }
diff --git a/configurations/yavanna/default.nix b/configurations/yavanna/default.nix
index d390e40..aa3118e 100644
--- a/configurations/yavanna/default.nix
+++ b/configurations/yavanna/default.nix
@@ -68,4 +68,9 @@ with lib; {
       size = 4 * 1024;
     }
   ];
+
+  zramSwap = {
+    enable = true;
+    memoryPercent = 25;
+  };
 }
diff --git a/flake.lock b/flake.lock
index b0ba0bb..6bdb354 100644
--- a/flake.lock
+++ b/flake.lock
@@ -24,11 +24,11 @@
     "azahi-cc": {
       "flake": false,
       "locked": {
-        "lastModified": 1656772709,
-        "narHash": "sha256-WY46rBmxd5oZUYOkSoLHDKcIUzm/gqoP0VsTZgJ+S7w=",
+        "lastModified": 1663184812,
+        "narHash": "sha256-iJIqUPeG9R1XghnnT3m0J3vPBZgsw3xkv5hgKnWs3+4=",
         "owner": "azahi",
         "repo": "azahi.cc",
-        "rev": "84169cc00825ff294498f380e0ec28b0bd088c27",
+        "rev": "bcb23428a7960c8683d62fe95af2ed737370f63b",
         "type": "gitlab"
       },
       "original": {
diff --git a/modules/nixfiles/emacs/doom/config.el b/modules/nixfiles/emacs/doom/config.el
index 92659e9..546af9a 100644
--- a/modules/nixfiles/emacs/doom/config.el
+++ b/modules/nixfiles/emacs/doom/config.el
@@ -157,19 +157,19 @@
   `(:host "shire.me"
     :port 6667
     :user "azahi/libera"
-    :pass #'nixfiles/irc-bouncer-password-f))
+    :pass nixfiles/irc-bouncer-password-f))
 
 (set-irc-server! "oftc"
   `(:host "shire.me"
     :port 6667
     :user "azahi/oftc"
-    :pass #'nixfiles/irc-bouncer-password-f))
+    :pass nixfiles/irc-bouncer-password-f))
 
 (set-irc-server! "rizon"
   `(:host "shire.me"
     :port 6667
     :user "azahi/rizon"
-    :pass #'nixfiles/irc-bouncer-password-f))
+    :pass nixfiles/irc-bouncer-password-f))
 
 ;; (use-package! hledger-mode
 ;;   :mode ("\\.journal\\'")
diff --git a/modules/nixfiles/emacs/doom/init.el b/modules/nixfiles/emacs/doom/init.el
index b547cb9..9da7f4b 100644
--- a/modules/nixfiles/emacs/doom/init.el
+++ b/modules/nixfiles/emacs/doom/init.el
@@ -31,7 +31,7 @@
        (evil +everywhere)
        file-templates
        fold
-       (format +onsave)
+       format
        ;; lispy
        ;; multiple-cursors
        parinfer
diff --git a/modules/nixfiles/nsd.nix b/modules/nixfiles/nsd.nix
index 7abae70..acbfd07 100644
--- a/modules/nixfiles/nsd.nix
+++ b/modules/nixfiles/nsd.nix
@@ -63,31 +63,36 @@ in {
               sldIps ? (ips "manwe"),
               extra ? {},
             }: {
-              ${domain}.data = dns.toString domain ({
+              ${domain}.data = dns.toString domain (mkMerge [
+                {
                   TTL = 60 * 60;
 
                   SOA = {
                     nameServer = "${cfg.fqdn}.";
                     adminEmail = "admin+dns@${my.domain.shire}";
-                    serial = 2022081122;
+                    serial = 2022091420;
                   };
 
-                  NS = with my.domain; ["ns1.${shire}" "ns2.${shire}"];
+                  NS = with my.domain; [
+                    "ns1.${shire}"
+                    # "ns2.${shire}"
+                  ];
 
                   CAA = letsEncrypt "admin+caa@${my.domain.shire}";
                 }
-                // sldIps
-                // extra);
+                sldIps
+                extra
+              ]);
             };
           in
             mkMerge [
               (mkZone {
                 domain = my.domain.shire;
-                extra =
+                extra = mkMerge [
                   (mkEmailEntries {
                     dkimKey = "@DKIM_KEY@";
                   })
-                  // {
+                  {
                     subdomains = rec {
                       manwe = ips "manwe";
                       "*.manwe" = manwe;
@@ -110,40 +115,41 @@ in {
                       rss-bridge = manwe;
                       vaultwarden = manwe;
                     };
-                  };
+                  }
+                ];
               })
               (mkZone {
                 domain = my.domain.azahi;
-                extra =
+                extra = mkMerge [
                   (mkEmailEntries {
                     dkimKey = "@DKIM_KEY@";
                   })
-                  // {
-                    subdomains = {
-                      github.CNAME = ["github.com/${my.username}"];
-                      gitlab.CNAME = ["gitlab.com/${my.username}"];
-                    };
-                  };
+                  {
+                    TXT = ["openpgp4fpr:${my.pgp.fingerprint}"]; # https://docs.keyoxide.org/service-providers/dns/
+                  }
+                ];
               })
               (mkZone {
                 domain = my.domain.gondor;
-                extra =
+                extra = mkMerge [
                   (mkEmailEntries {
                     dkimKey = "@DKIM_KEY@";
                   })
-                  // {
+                  {
                     subdomains.frodo = ips "manwe";
-                  };
+                  }
+                ];
               })
               (mkZone {
                 domain = my.domain.rohan;
-                extra =
+                extra = mkMerge [
                   (mkEmailEntries {
                     dkimKey = "@DKIM_KEY@";
                   })
-                  // {
+                  {
                     subdomains.frodo = ips "manwe";
-                  };
+                  }
+                ];
               })
             ];
       };
diff --git a/readme.org b/readme.org
index a2c097a..01cd869 100644
--- a/readme.org
+++ b/readme.org
@@ -11,32 +11,35 @@
 #+exclude_tags: noexport
 #+creator: Emacs 27.2 (Org mode 9.5)
 
-An IaC recipe for my digital infrastructure and configurations. An evolution of
-the "dotfiles" thingy I had going for several years.
+An [[https://en.wikipedia.org/wiki/Infrastructure_as_code][IaC]] recipe for my digital infrastructure. An evolution of the [[https://github.com/azahi/dotfiles][dotfiles]] thingy
+I had going for several years.
 
-If you stumbled on this repository on GitHub, GitLab and such, the version you
-are currently looking at is a /"stripped"/ down rendition of *nixfiles* where IP
-addresses, domain names, secrets and other sensitive information was removed or
-replaced with gibberish. This is done so that you can get a general
-understanding of how stuff is made without me spilling the beans too much...
+If you stumbled across this repository on GitHub, GitLab and such, the version
+you are currently looking at is a /stripped/ down rendition of the actual
+*nixfiles* where IP addresses, domain names, secrets and other sensitive
+information was removed or replaced with gibberish. This is done so that you can
+get a general understanding of how stuff is made without me spilling the beans
+too much... pls no pwn.
 
-If you are looking to get into Nix and NixOS, I /highly/ suggest to take this
-only as a reference and not just mindlessly copy-paste everything.
+If you are looking to get into declarative configuration management with [[https://nixos.org][NixOS]],
+I /highly/ suggest to take this repository /only/ as a reference and not just
+mindlessly copy-paste everything.
 
-* Inspiration and Credits
+For help, reach out directly to [[https://azahi.cc][me]], or come by /#nixos/ over at [[https://libera.chat][Libera.Chat]] or
+join the official NixOS Matrix [[https://matrix.to/#/#community:nixos.org][server]]. Для русскоязычной поддержки есть
+неофициальный Telegram [[https://t.me/ru_nixos][канал]].
 
-Big thanks to everyone involved with Nix/NixOS/Nixpkgs and everything around
-these! Hopefully, the Nix ecosystem will get a lot more traction and the
-long-awaited industry-wide adoption.
+* Inspiration and Credits
 
-[[https://c.tenor.com/zJvexdmTjA4AAAAC/im-doing-my-part-serious.gif]]
+Big thanks to everyone involved with [[https://github.com/NixOS][Nix/NixOS/Nixpkgs]] and everything around
+these! Hopefully, the Nix ecosystem will get a lot more traction and the long
+awaited industry-wide adoption.
 
 Special thanks for these fine people from whom I stole a lot of ideas for this
 project:
 - [[https://github.com/Mic92/dotfiles][Mic92]]
-- [[https://github.com/codygman/hci][codygman]]
 - [[https://github.com/davidtwco/veritas][davidtwco]]
 - [[https://github.com/grahamc/nixos-config][grahamc]]
 - [[https://github.com/gytis-ivaskevicius/nixfiles][gytis-ivaskevicius]]
 - [[https://github.com/hlissner/dotfiles][hlissner]]
-- [[https://github.com/ncfavier/config][ncfavier]]
+- [[https://github.com/ncfavier/config][ncfavier]] (Also big thanks for shilling and helping out)

Consider giving Nix/NixOS a try! <3