about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-07-30 19:44:06 +0300
committerAzat Bahawi <azat@bahawi.net>2023-07-30 19:44:06 +0300
commit5834fee454d8fbe4d3eace6fa4d1f005cef0cbbb (patch)
treedb1f73878ab12627df270bc4bc998740da7f9728 /modules
parent2023-07-20 (diff)
2023-07-30
Diffstat (limited to 'modules')
-rw-r--r--modules/common/common/nix/default.nix1
-rw-r--r--modules/common/default.nix1
-rw-r--r--modules/common/emacs/doom/packages.el6
-rw-r--r--modules/common/fonts.nix4
-rw-r--r--modules/common/neovim/default.nix27
-rw-r--r--modules/common/profiles/dev/containers.nix1
-rw-r--r--modules/common/profiles/headful.nix2
-rw-r--r--modules/nixos/syncthing.nix126
8 files changed, 94 insertions, 74 deletions
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix
index 840bdab..43586d3 100644
--- a/modules/common/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -192,7 +192,6 @@ with lib; {
         json-language-server = np.vscode-json-languageserver-bin;
         k3d = kube3d;
         kubelogin = kubelogin-oidc;
-        lua-language-server = sumneko-lua-language-server;
         nix-language-server = rnix-lsp;
         omnisharp = omnisharp-roslyn;
         telepresence = telepresence2;
diff --git a/modules/common/default.nix b/modules/common/default.nix
index a159a87..b360049 100644
--- a/modules/common/default.nix
+++ b/modules/common/default.nix
@@ -12,6 +12,7 @@ _: {
     ./gnupg.nix
     ./htop.nix
     ./mpv.nix
+    ./neovim
     ./nmap.nix
     ./openssh.nix
     ./password-store.nix
diff --git a/modules/common/emacs/doom/packages.el b/modules/common/emacs/doom/packages.el
index 99ead41..033932c 100644
--- a/modules/common/emacs/doom/packages.el
+++ b/modules/common/emacs/doom/packages.el
@@ -1,11 +1,5 @@
 (disable-packages! writegood-mode)
 
-(unpin! evil-collection)
-(package! evil-collection
-  :recipe (:repo "kepi/evil-collection"
-           :branch "mu4e-development"))
-
-(unpin! org-roam)
 (package! org-roam
   :recipe (:host github
            :repo "org-roam/org-roam"
diff --git a/modules/common/fonts.nix b/modules/common/fonts.nix
index 483de0d..f3a79c2 100644
--- a/modules/common/fonts.nix
+++ b/modules/common/fonts.nix
@@ -81,10 +81,10 @@ in {
   };
 
   config = mkIf cfg.enable {
-    fonts.fonts = with pkgs; [
-      iosevka-bin
+    fonts.packages = with pkgs; [
       (iosevka-bin.override {variant = "aile";})
       (iosevka-bin.override {variant = "etoile";})
+      iosevka-bin
       sarasa-gothic
     ];
   };
diff --git a/modules/common/neovim/default.nix b/modules/common/neovim/default.nix
new file mode 100644
index 0000000..1e5f103
--- /dev/null
+++ b/modules/common/neovim/default.nix
@@ -0,0 +1,27 @@
+{
+  config,
+  inputs,
+  lib,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.neovim;
+in {
+  options.nixfiles.modules.neovim.enable = mkEnableOption "NeoVim";
+
+  config = mkIf cfg.enable {
+    hm = {
+      imports = [inputs.nixvim.homeManagerModules.nixvim];
+
+      programs.nixvim = {
+        enable = true;
+
+        plugins = {
+          lsp.enable = true;
+          nix.enable = true;
+          surround.enable = true;
+        };
+      };
+    };
+  };
+}
diff --git a/modules/common/profiles/dev/containers.nix b/modules/common/profiles/dev/containers.nix
index cc24ab3..da6b0e1 100644
--- a/modules/common/profiles/dev/containers.nix
+++ b/modules/common/profiles/dev/containers.nix
@@ -35,6 +35,7 @@ in {
           datree
           helm
           istioctl
+          k9s
           kubeconform
           kubectl
           kubectl-doctor
diff --git a/modules/common/profiles/headful.nix b/modules/common/profiles/headful.nix
index 935da31..7ec9d42 100644
--- a/modules/common/profiles/headful.nix
+++ b/modules/common/profiles/headful.nix
@@ -19,6 +19,7 @@ in {
       aria2.enable = true;
       emacs.enable = true;
       mpv.enable = true;
+      neovim.enable = true;
       openssh.client.enable = true;
       password-store.enable = true;
       vscode.enable = true;
@@ -34,7 +35,6 @@ in {
         '';
 
         packages = with pkgs; [
-          anki
           comma
           fd
           ripgrep
diff --git a/modules/nixos/syncthing.nix b/modules/nixos/syncthing.nix
index 24bfbb6..399fb6b 100644
--- a/modules/nixos/syncthing.nix
+++ b/modules/nixos/syncthing.nix
@@ -50,76 +50,13 @@ in {
         overrideDevices = true;
         overrideFolders = true;
 
-        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;
-          })
-        my.configurations;
-
-        folders = let
-          filterDevices = f:
-            attrNames (filterAttrs (_: attr:
-              (attr.hostname != this.hostname)
-              && (attr.syncthing.id != null)
-              && f attr)
-            my.configurations);
-          all = filterDevices (_: true);
-          notHeadless = filterDevices (attr: !attr.isHeadless);
-          notOther = filterDevices (attr: !attr.isOther);
-
-          simple = {
-            type = "simple";
-            params.keep = "5";
-          };
-          trashcan = {
-            type = "trashcan";
-            params.cleanoutDays = "7";
-          };
-        in
-          with config.hm.xdg.userDirs; {
-            share = {
-              path = publicShare;
-              devices = notHeadless;
-              versioning = trashcan;
-            };
-            pass = {
-              path = config.hm.programs.password-store.settings.PASSWORD_STORE_DIR;
-              devices = notOther;
-              versioning = trashcan;
-            };
-            org = {
-              path = "${documents}/org";
-              devices = all;
-              versioning = simple;
-            };
-            roam = {
-              path = "${documents}/roam";
-              devices = notOther;
-              versioning = simple;
-            };
-            elfeed = {
-              path = "${config.my.home}/.elfeed";
-              devices = notOther;
-              versioning = trashcan;
-            };
-            books = {
-              path = "${documents}/books";
-              devices = notOther;
-              versioning = trashcan;
-            };
-          };
-
-        extraOptions = {
+        settings = {
           options = {
-            testOption = false;
             autoUpgradeIntervalH = 0;
             crashReportingEnabled = false;
             globalAnnounceEnabled = false;
             relaysEnabled = false;
             setLowPriority = this.isHeadless;
-            stunKeepaliveMinS = 0;
             stunKeepaliveStartS = 0;
             urAccepted = -1;
           };
@@ -128,6 +65,67 @@ in {
             insecureAdminAccess = true;
             insecureSkipHostcheck = this.isHeadless;
           };
+
+          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;
+            })
+          my.configurations;
+
+          folders = let
+            filterDevices = f:
+              attrNames (filterAttrs (_: attr:
+                (attr.hostname != this.hostname)
+                && (attr.syncthing.id != null)
+                && f attr)
+              my.configurations);
+            all = filterDevices (_: true);
+            notHeadless = filterDevices (attr: !attr.isHeadless);
+            notOther = filterDevices (attr: !attr.isOther);
+
+            simple = {
+              type = "simple";
+              params.keep = "5";
+            };
+            trashcan = {
+              type = "trashcan";
+              params.cleanoutDays = "7";
+            };
+          in
+            with config.hm.xdg.userDirs; {
+              share = {
+                path = publicShare;
+                devices = notHeadless;
+                versioning = trashcan;
+              };
+              pass = {
+                path = config.hm.programs.password-store.settings.PASSWORD_STORE_DIR;
+                devices = notOther;
+                versioning = trashcan;
+              };
+              org = {
+                path = "${documents}/org";
+                devices = all;
+                versioning = simple;
+              };
+              roam = {
+                path = "${documents}/roam";
+                devices = notOther;
+                versioning = simple;
+              };
+              elfeed = {
+                path = "${config.my.home}/.elfeed";
+                devices = notOther;
+                versioning = trashcan;
+              };
+              books = {
+                path = "${documents}/books";
+                devices = notOther;
+                versioning = trashcan;
+              };
+            };
         };
       };
 

Consider giving Nix/NixOS a try! <3