From b1de513c34dde6711e09ec993f25ce63a5509469 Mon Sep 17 00:00:00 2001 From: Jakub Stachurski Date: Tue, 25 Nov 2025 15:59:26 +0100 Subject: Add nh --- modules/nh.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 modules/nh.nix (limited to 'modules/nh.nix') diff --git a/modules/nh.nix b/modules/nh.nix new file mode 100644 index 0000000..832fbeb --- /dev/null +++ b/modules/nh.nix @@ -0,0 +1,24 @@ +{pkgs, lib, config, ... }: let + conf = config.addons.nh; +in { + options.addons.nh = { + enable = lib.mkOption { + default = true; + description = "Enable nix cli helper"; + }; + + flake_path = lib.mkOption { + default = "/home/wilkuu/nix-config/"; + description = "Flake location for nh to use"; + }; + }; + + config = { + programs.nh = { + enable = conf.enable; + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = conf.flake_path; # sets NH_OS_FLAKE variable for you + }; + }; +} -- cgit v1.3.1