nix-config/home/comma.nix
Bruno BELANYI 1ac9f0cc8c
All checks were successful
continuous-integration/drone/push Build is passing
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;
};
};
}