zaphyra's git: nixfiles

zaphyra's nixfiles

commit 742a9e4ac8ce14cc15bbccc9524047d9132062e3
parent 45222817819133729c4c70160f4f1953a23dfb59
Author: Hannah Izzie Gesser <hannah@totient.eu>
Date: Wed, 12 Nov 2025 16:26:50 +0100

Add nix related utils
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/config/nixos/modules/presets/graphical/enable.nix b/config/nixos/modules/presets/graphical/enable.nix
@@ -32,6 +32,7 @@ in
       };
       font.enable = true;
       homeManager.enable = lib.mkDefault true;
+      programs.nixUtilities.enable = lib.mkDefault true;
     };
   };
 
diff --git a/config/nixos/modules/programs/nixUtilities.nix b/config/nixos/modules/programs/nixUtilities.nix
@@ -0,0 +1,31 @@
+{
+  config,
+  lib,
+  pkgs,
+  povSelf,
+  ...
+}:
+
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options.enable = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf cfg.enable {
+    environment.systemPackages = with pkgs; [
+      deadnix
+      nixfmt-rfc-style
+      nixfmt-tree
+      nixd
+      statix
+    ];
+  };
+
+}