nix-config/modules/home/packages/default.nix

36 lines
713 B
Nix
Raw Normal View History

2021-03-13 01:02:12 +01:00
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.packages;
in
2021-02-20 14:41:44 +01:00
{
options.my.home.packages = with lib; {
enable = my.mkDisableOption "user packages";
allowAliases = mkEnableOption "allow package aliases";
allowUnfree = my.mkDisableOption "allow unfree packages";
additionalPackages = mkOption {
type = with types; listOf package;
default = [ ];
example = literalExample ''
with pkgs; [
quasselClient
]
'';
};
2021-03-13 01:02:12 +01:00
};
2023-12-08 12:49:52 +01:00
config = lib.mkIf cfg.enable {
home.packages = with pkgs; ([
fd
file
ripgrep
] ++ cfg.additionalPackages);
nixpkgs.config = {
inherit (cfg) allowAliases allowUnfree;
};
2023-12-08 12:49:52 +01:00
};
2021-02-20 14:41:44 +01:00
}