-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodule.nix
More file actions
26 lines (24 loc) · 716 Bytes
/
module.nix
File metadata and controls
26 lines (24 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ programs-sqlite }: ({ config, lib, ... }:
with lib;
let cfg = config.programs-sqlite;
in {
options.programs-sqlite = {
enable = mkEnableOption "fetching a `programs.sqlite` for `command-not-found`" //
{
default = true;
description = ''
fetch a `programs.sqlite` file matching the current nixpkgs revision and use it for the
`command-not-found` hook.
'';
};
};
config = mkIf cfg.enable {
assertions = [
{
assertion = config.programs.command-not-found.enable;
message = "Using programs.sqlite was requested but command-not-found itself is not enabled.";
}
];
programs.command-not-found.dbPath = programs-sqlite;
};
})