nix-config/home/comma.nix
Bruno BELANYI 90a89c56c8 home: comma: configure custom 'nixpkgs' flake
This makes use of my pinned `pkgs` flake from the registry by default.
2021-05-27 21:50:27 +02:00

30 lines
585 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.my.home.comma;
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;
};
};
}