about summary refs log tree commit diff
path: root/modules/common/common
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-09-16 14:47:29 +0300
committerAzat Bahawi <azat@bahawi.net>2023-09-16 14:47:29 +0300
commit190bf349658ceb6f64c6d69cdccbddfb5491f894 (patch)
tree33a563624d4725cc042f7dc2f805078e8f34818e /modules/common/common
parent2023-09-16 (diff)
2023-09-16
Diffstat (limited to 'modules/common/common')
-rw-r--r--modules/common/common/nix/default.nix52
-rw-r--r--modules/common/common/secrets.nix3
-rw-r--r--modules/common/common/shell/default.nix30
3 files changed, 42 insertions, 43 deletions
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix
index f0add5e..d6cd362 100644
--- a/modules/common/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -82,13 +82,34 @@ with lib; {
 
   nixpkgs.overlays = with inputs; [
     self.overlays.default
-    (_: super:
-      {
-        helm = with super;
-          kubernetes-helm-wrapped.override {
-            plugins = with kubernetes-helmPlugins; [helm-secrets];
+    nur.overlay
+    (
+      _: super: {
+        grc = super.grc.overrideAttrs (_: final: {
+          version = "devel";
+
+          src = super.fetchFromGitHub {
+            owner = "garabik";
+            repo = "grc";
+            rev = "4d6a51fd78ad7e19af8dd12b2a828d1807267079";
+            hash = "sha256-SmOZrgV0lgLryFoxADU15IKJ7jhxXar0MgbsV/z1GaE=";
           };
 
+          patches = [
+            (super.fetchpatch {
+              url = "https://patch-diff.githubusercontent.com/raw/garabik/grc/pull/214.patch";
+              hash = "sha256-VNr9jl5oFbFNJbGsjflwFV3oTbCzJ0lBIZA4eyeoXLY=";
+            })
+          ];
+
+          postPatch =
+            final.postPatch
+            + ''
+              substituteInPlace grc.conf \
+                --replace "^([/\w\.]+\/)" "^([/\w\.\-]+\/)"
+            '';
+        });
+
         alejandra = super.alejandra.overrideAttrs (_: final: {
           patches = final.patches ++ [./patches/alejandra-no-ads.patch];
         });
@@ -99,26 +120,7 @@ with lib; {
 
         inherit (pkgsPr 245433 "sha256-FF1WW0+/pJ15+mPVjv0bkrh0dpHfQU08HNat2gu1PQk=") openmw;
       }
-      // (with super; {
-        # Normalises package names. This is done purely for aesthetics.
-        css-language-server = nodePackages.vscode-css-languageserver-bin;
-        dhall-language-server = dhall-lsp-server;
-        dockerfile-language-server = nodePackages.dockerfile-language-server-nodejs;
-        editorconfig = editorconfig-core-c;
-        go-language-server = gopls;
-        html-language-server = nodePackages.vscode-html-languageserver-bin;
-        inherit (nodePackages) bash-language-server;
-        inherit (nodePackages) vim-language-server;
-        json-language-server = nodePackages.vscode-json-languageserver-bin;
-        k3d = kube3d;
-        kubelogin = kubelogin-oidc;
-        nix-language-server = rnix-lsp;
-        telepresence = telepresence2;
-        tor-browser = tor-browser-bundle-bin;
-      }))
-    agenix.overlays.default
-    nix-vscode-extensions.overlays.default
-    nur.overlay
+    )
   ];
 
   environment.systemPackages = with pkgs;
diff --git a/modules/common/common/secrets.nix b/modules/common/common/secrets.nix
index e15dea8..fdc2501 100644
--- a/modules/common/common/secrets.nix
+++ b/modules/common/common/secrets.nix
@@ -1,5 +1,6 @@
 {
   config,
+  inputs,
   lib,
   pkgs,
   this,
@@ -17,5 +18,7 @@ with lib; {
           config.services.openssh.hostKeys);
 
     environment.systemPackages = with pkgs; [agenix];
+
+    nixpkgs.overlays = [inputs.agenix.overlays.default];
   };
 }
diff --git a/modules/common/common/shell/default.nix b/modules/common/common/shell/default.nix
index 2b034e6..be86bd8 100644
--- a/modules/common/common/shell/default.nix
+++ b/modules/common/common/shell/default.nix
@@ -104,16 +104,6 @@ with lib; {
                   name = "upper";
                   command = ["tr" "'[:lower:]'" "'[:upper:]'"];
                 })
-                (mkAlias {
-                  name = "disk";
-                  command = [
-                    "df"
-                    "--human-readable"
-                    "--exclude-type=tmpfs"
-                    "--exclude-type=devtmpfs"
-                    "2>/dev/null"
-                  ];
-                })
               ]
             ))
           // genAttrs ["grep" "egrep" "fgrep"]
@@ -130,12 +120,16 @@ with lib; {
     home.packages = with pkgs; [grc];
   };
 
-  environment.systemPackages = with pkgs; [
-    bash-completion
-    bc
-    gawk
-    hr
-    moreutils
-    pv
-  ];
+  environment = {
+    etc."grc.conf".source = "${pkgs.grc}/etc/grc.conf";
+
+    systemPackages = with pkgs; [
+      bash-completion
+      bc
+      gawk
+      hr
+      moreutils
+      pv
+    ];
+  };
 }

Consider giving Nix/NixOS a try! <3