about summary refs log tree commit diff
path: root/modules/profiles/dev
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2025-02-17 02:21:56 +0300
committerazahi <azat@bahawi.net>2025-02-17 02:21:56 +0300
commit59180328cda59817d71cd58c8f48ead047375064 (patch)
tree2cdd7d1bfa309839ef624c19daf283f510aacf69 /modules/profiles/dev
parent2025-02-05 (diff)
2025-02-17
Diffstat (limited to 'modules/profiles/dev')
-rw-r--r--modules/profiles/dev/containers.nix7
-rw-r--r--modules/profiles/dev/default.nix7
-rw-r--r--modules/profiles/dev/sql.nix11
3 files changed, 11 insertions, 14 deletions
diff --git a/modules/profiles/dev/containers.nix b/modules/profiles/dev/containers.nix
index 598289c..ce686b5 100644
--- a/modules/profiles/dev/containers.nix
+++ b/modules/profiles/dev/containers.nix
@@ -4,18 +4,17 @@
   pkgs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.profiles.dev.containers;
 in
 {
   options.nixfiles.modules.profiles.dev.containers.enable =
-    mkEnableOption "Tools for working with containers and container orchestration"
+    lib.mkEnableOption "Tools for working with containers and container orchestration"
     // {
       default = config.nixfiles.modules.profiles.dev.enable;
     };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     nixfiles.modules = {
       common.shell.aliases = {
         h = "helm";
@@ -63,7 +62,7 @@ in
         ];
       };
 
-      xdg.dataFile."minikube/config/config.json".text = generators.toJSON { } {
+      xdg.dataFile."minikube/config/config.json".text = lib.generators.toJSON { } {
         config.Rootless = true;
         driver = "podman";
         container-runtime = "cri-o";
diff --git a/modules/profiles/dev/default.nix b/modules/profiles/dev/default.nix
index a6cc61d..89ed7a3 100644
--- a/modules/profiles/dev/default.nix
+++ b/modules/profiles/dev/default.nix
@@ -4,17 +4,16 @@
   pkgs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.profiles.dev;
 in
 {
-  imports = attrValues (modulesIn ./.);
+  imports = lib.modulesIn ./. |> lib.attrValues;
 
   options.nixfiles.modules.profiles.dev.enable =
-    mkEnableOption "Catch-all profile for stuff related to software development and etc.";
+    lib.mkEnableOption "Catch-all profile for stuff related to software development and etc.";
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     nixfiles.modules = {
       common.nix.allowedUnfreePackages = [
         "terraform" # source-available
diff --git a/modules/profiles/dev/sql.nix b/modules/profiles/dev/sql.nix
index c2d4894..cbab14a 100644
--- a/modules/profiles/dev/sql.nix
+++ b/modules/profiles/dev/sql.nix
@@ -4,18 +4,17 @@
   pkgs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.profiles.dev.sql;
 in
 {
   options.nixfiles.modules.profiles.dev.sql.enable =
-    mkEnableOption "SQL stuff and database management tools"
+    lib.mkEnableOption "SQL stuff and database management tools"
     // {
       default = config.nixfiles.modules.profiles.dev.enable;
     };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     hm = {
       home.packages = with pkgs; [
         pgcli
@@ -63,15 +62,15 @@ in
             { name, custom }:
             {
               "${name}/config" = {
-                text = generators.toINI { } {
+                text = lib.generators.toINI { } {
                   main = mainSection // custom;
-                  colors = mapAttrs (_: v: "'${v}'") colorsSection;
+                  colors = lib.mapAttrs (_: v: "'${v}'") colorsSection;
                 };
               };
             };
         in
         {
-          configFile = mkMerge (
+          configFile = lib.mkMerge (
             map mkCliConfig [
               {
                 name = "pgcli";

Consider giving Nix/NixOS a try! <3