home: comma: configure custom 'nixpkgs' flake

This makes use of my pinned `pkgs` flake from the registry by default.
This commit is contained in:
Bruno BELANYI 2021-05-27 21:50:14 +02:00
parent b95b357251
commit 90a89c56c8

View file

@ -5,11 +5,25 @@ in
{
options.my.home.comma = with lib; {
enable = my.mkDisableOption "comma configuration";
pkgsFlake = mkOption {
type = types.str;
default = "pkgs";
example = "nixpkgs";
description = ''
Which flake from the registry should be used with
<command>nix shell</command>.
'';
};
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
ambroisie.comma
];
home.sessionVariables = {
COMMA_PKGS_FLAKE = cfg.pkgsFlake;
};
};
}