2021-05-27 21:49:24 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.home.comma;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.my.home.comma = with lib; {
|
|
|
|
enable = my.mkDisableOption "comma configuration";
|
2021-05-27 21:50:14 +02:00
|
|
|
|
|
|
|
pkgsFlake = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "pkgs";
|
|
|
|
example = "nixpkgs";
|
|
|
|
description = ''
|
|
|
|
Which flake from the registry should be used with
|
|
|
|
<command>nix shell</command>.
|
|
|
|
'';
|
|
|
|
};
|
2021-05-27 21:49:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
ambroisie.comma
|
|
|
|
];
|
2021-05-27 21:50:14 +02:00
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
COMMA_PKGS_FLAKE = cfg.pkgsFlake;
|
|
|
|
};
|
2021-05-27 21:49:24 +02:00
|
|
|
};
|
|
|
|
}
|