about summary refs log tree commit diff
path: root/modules/nixos
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-07-03 11:27:19 +0300
committerAzat Bahawi <azat@bahawi.net>2023-07-03 11:27:19 +0300
commitc80598d4e4ffea73647b2ea8440a6080596968fe (patch)
treea6ca4bb82ec20df18022988fa359126fc877d5da /modules/nixos
parent2023-06-21 (diff)
2023-07-03
Diffstat (limited to 'modules/nixos')
-rw-r--r--modules/nixos/default.nix1
-rw-r--r--modules/nixos/ntfy.nix9
-rw-r--r--modules/nixos/vim/default.nix39
3 files changed, 40 insertions, 9 deletions
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index f8347cf..466e2e0 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -62,6 +62,7 @@ _: {
     ./throttled.nix
     ./unbound.nix
     ./vaultwarden.nix
+    ./vim
     ./wireguard.nix
     ./x11.nix
     ./xmonad.nix
diff --git a/modules/nixos/ntfy.nix b/modules/nixos/ntfy.nix
index edbe7e5..1682b7e 100644
--- a/modules/nixos/ntfy.nix
+++ b/modules/nixos/ntfy.nix
@@ -64,20 +64,11 @@ in {
       settings = {
         listen-http = "127.0.0.1:${toString cfg.port}";
         base-url = "https://${cfg.domain}";
-        cache-file = "/var/cache/ntfy/cache.db";
         behind-proxy = true;
-        attachment-cache-dir = "/var/cache/ntfy/attachments";
-        auth-file = "/var/lib/ntfy/user.db";
         enable-metrics = cfg.prometheus.enable;
         metrics-listen-http = with cfg.prometheus;
           optionalString cfg.prometheus.enable "${address}:${toString port}";
       };
     };
-
-    systemd.tmpfiles.rules = with config.services.ntfy-sh; [
-      "d /var/lib/ntfy 0700 ${user} ${group} - -"
-      "d /var/cache/ntfy 0700 ${user} ${group} - -"
-      "d /var/cache/ntfy/attachments 0700 ${user} ${group} - -"
-    ];
   };
 }
diff --git a/modules/nixos/vim/default.nix b/modules/nixos/vim/default.nix
new file mode 100644
index 0000000..16e2d51
--- /dev/null
+++ b/modules/nixos/vim/default.nix
@@ -0,0 +1,39 @@
+{
+  config,
+  lib,
+  pkgs,
+  this,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.vim;
+in {
+  config = mkIf cfg.enable {
+    programs.vim.package =
+      (pkgs.vim-full.override {
+        features = "normal";
+        cscopeSupport = false;
+        darwinSupport = false;
+        guiSupport =
+          if this.isHeadful
+          then "gtk3"
+          else false;
+        luaSupport = false;
+        multibyteSupport = false;
+        netbeansSupport = false;
+        nlsSupport = false;
+        perlSupport = false;
+        pythonSupport = false;
+        rubySupport = false;
+        tclSupport = false;
+        ximSupport = false;
+      })
+      .customize {
+        name = "vim";
+        vimrcConfig = with cfg; {
+          customRC = rc;
+          packages.myVimPackage.start = plugins;
+        };
+      };
+  };
+}

Consider giving Nix/NixOS a try! <3