From 626fddace8895a528d5354fb6f35b7753603292e Mon Sep 17 00:00:00 2001 From: d-r-a-b <107967151+d-r-a-b@users.noreply.github.com> Date: Tue, 19 May 2026 10:39:42 -0400 Subject: [PATCH] nixos/command-not-found: set `dbPath` default with module system options --- .../programs/command-not-found/command-not-found.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/command-not-found/command-not-found.nix b/nixos/modules/programs/command-not-found/command-not-found.nix index 03117e573cf1..366879d4088f 100644 --- a/nixos/modules/programs/command-not-found/command-not-found.nix +++ b/nixos/modules/programs/command-not-found/command-not-found.nix @@ -45,6 +45,11 @@ in }; dbPath = lib.mkOption { + type = lib.types.path; + default = pkgs.path + "/programs.sqlite"; + defaultText = lib.literalExpression '' + pkgs.path + "/programs.sqlite" + ''; description = '' Absolute path to `programs.sqlite`, which contains mappings from binary names to package names. @@ -54,7 +59,6 @@ in `/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite`. If you do so, you can update it with `sudo nix-channels --update`. ''; - type = lib.types.path; }; }; @@ -62,7 +66,6 @@ in { programs.command-not-found = { enable = lib.mkDefault (builtins.pathExists cfg.dbPath); - dbPath = lib.mkDefault (pkgs.path + "/programs.sqlite"); }; }