nh toogle

This commit is contained in:
smayzy 2025-07-06 18:41:39 +02:00
parent 29c40709fe
commit 5af5c5fcda
2 changed files with 18 additions and 5 deletions

View File

@ -13,6 +13,8 @@
smayzy.virt.enable = true;
smayzy.nh.enable = true;
users.users.smayzy = {
isNormalUser = true;
description = "smayzy";

View File

@ -1,9 +1,20 @@
{ config, lib, pkgs, ...}:
let
inherit (lib) mkIf mkOption types;
in
{
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep 10";
flake = "/home/smayzy/nix-config";
options.smayzy.nh.enable = mkOption {
type = types.bool;
default = false;
description = "use nh";
};
config = mkIf config.smayzy.nh.enable {
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep 10";
flake = "/home/smayzy/nix-config";
};
};
}