-
Notifications
You must be signed in to change notification settings - Fork 3
/
home.nix
32 lines (28 loc) · 896 Bytes
/
home.nix
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
27
28
29
30
31
32
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.programs.direnv-nix-lorelei;
in {
options = {
programs.direnv-nix-lorelei = {
enable = mkOption {
type = types.bool;
default = false;
defaultText = "false";
description = ''
Whether to enable direnv-nix-lorelei.
'';
};
package = mkOption {
type = types.package;
default = (import ./. {}).distribution.direnv-nix-lorelei;
description = ''
The <literal>direnv-nix-lorelei</literal> package to use.
'';
};
};
};
config = mkIf cfg.enable {
xdg.configFile."direnv/lib/nix-lorelei.sh".source =
"${cfg.package}/share/direnv-nix-lorelei/nix-lorelei.bash";
};
}