From d3970e07d3ac88ae3e52d969f8abde0ed8929bec Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Thu, 8 Aug 2024 20:59:49 +0400 Subject: [PATCH] modules/shell: nix add nh cli --- modules/shell/nix/default.nix | 1 + modules/shell/nix/nh.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 modules/shell/nix/nh.nix diff --git a/modules/shell/nix/default.nix b/modules/shell/nix/default.nix index d10ab61c..35a1c998 100644 --- a/modules/shell/nix/default.nix +++ b/modules/shell/nix/default.nix @@ -3,5 +3,6 @@ ./search.nix ./optimization.nix ./switch-to-configuration-ng.nix + ./nh.nix ]; } diff --git a/modules/shell/nix/nh.nix b/modules/shell/nix/nh.nix new file mode 100644 index 00000000..586b1fa9 --- /dev/null +++ b/modules/shell/nix/nh.nix @@ -0,0 +1,18 @@ +{ inputs, options, config, lib, pkgs, ...}: +# funny nix cli +let cfg = config.modules.shell.nix.nh; +in +{ + options.modules.shell.nix.nh = { + enable = lib.mkEnableOption false; + }; + + config = lib.mkIf cfg.enable { + programs.nh = { + enable = true; + # TODO try this later + # clean.enable = true; + # clean.extraArgs = "--keep-since 4d --keep 3"; + }; + }; +}