about summary refs log tree commit diff
path: root/modules/common
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-09-28 03:41:22 +0300
committerAzat Bahawi <azat@bahawi.net>2023-09-28 03:41:22 +0300
commitfa40015d45d721eba1b363fbca3e55881f296b87 (patch)
tree2377044fdc99870678b3752ae05ee037e8cb14ca /modules/common
parent2023-09-20 (diff)
2023-09-28
Diffstat (limited to '')
-rw-r--r--modules/common/common/nix/default.nix50
-rw-r--r--modules/common/profiles/dev/containers.nix2
-rw-r--r--modules/common/profiles/dev/default.nix7
3 files changed, 31 insertions, 28 deletions
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix
index d6cd362..dc99434 100644
--- a/modules/common/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -37,6 +37,7 @@ with lib; {
       experimental-features = concatStringsSep " " [
         "flakes"
         "nix-command"
+        "recursive-nix"
         "repl-flake"
       ];
 
@@ -123,30 +124,31 @@ with lib; {
     )
   ];
 
-  environment.systemPackages = with pkgs;
-    optionals this.isHeadful [
-      nix-top
-      nix-tree
-    ];
+  environment = {
+    systemPackages = with pkgs;
+      optionals this.isHeadful [
+        nix-top
+        nix-tree
+        nixfiles
+      ];
+    variables.NIXFILES = "${config.my.home}/src/nixfiles";
+  };
 
-  hm.home.file.".nix-defexpr/default.nix".text =
-    optionalString this.isHeadful
-    (
+  hm.home.file.".nix-defexpr/default.nix".text = let
+    hostname = strings.escapeNixIdentifier this.hostname;
+  in
+    optionalString this.isHeadful ''
       let
-        hostname = strings.escapeNixIdentifier this.hostname;
-      in ''
-        let
-          self = builtins.getFlake "nixfiles";
-          configurations = self.nixosConfigurations;
-          local = configurations.${hostname};
-        in rec {
-          inherit self;
-          inherit (self) inputs lib;
-          inherit (lib) my;
-          this = my.configurations.${hostname};
-          inherit (local) config;
-          inherit (local.config.system.build) toplevel vm vmWithBootLoader manual;
-        } // configurations // local._module.args
-      ''
-    );
+        self = builtins.getFlake "nixfiles";
+        configurations = self.nixosConfigurations;
+        local = configurations.${hostname};
+      in rec {
+        inherit self;
+        inherit (self) inputs lib;
+        inherit (lib) my;
+        this = my.configurations.${hostname};
+        inherit (local) config;
+        inherit (local.config.system.build) toplevel vm vmWithBootLoader manual;
+      } // configurations // local._module.args
+    '';
 }
diff --git a/modules/common/profiles/dev/containers.nix b/modules/common/profiles/dev/containers.nix
index 06826f9..61a9f09 100644
--- a/modules/common/profiles/dev/containers.nix
+++ b/modules/common/profiles/dev/containers.nix
@@ -44,7 +44,7 @@ in {
           kubelogin-oidc
           kubent
           kubernetes-helm
-          kubescape
+          # kubescape
           kubeseal
           kubespy
           minikube
diff --git a/modules/common/profiles/dev/default.nix b/modules/common/profiles/dev/default.nix
index 442a03a..4f2a80f 100644
--- a/modules/common/profiles/dev/default.nix
+++ b/modules/common/profiles/dev/default.nix
@@ -79,13 +79,14 @@ in {
       };
 
       packages = with pkgs; [
-        htmlq
-        hydra-check
-        jq
         nix-index
         nix-update
         nixpkgs-review
+        hydra-check
+        jq
         yq
+        htmlq
+        sops
       ];
     };
   };

Consider giving Nix/NixOS a try! <3