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
|
|
|
{
|
2021-05-07 17:32:26 +02:00
|
|
|
options.my.home.packages = with lib; {
|
|
|
|
enable = my.mkDisableOption "user packages";
|
|
|
|
|
2023-12-08 12:50:44 +01:00
|
|
|
allowAliases = mkEnableOption "allow package aliases";
|
|
|
|
|
|
|
|
allowUnfree = my.mkDisableOption "allow unfree packages";
|
|
|
|
|
2021-05-07 17:32:26 +02:00
|
|
|
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);
|
2023-12-08 12:50:44 +01:00
|
|
|
|
|
|
|
nixpkgs.config = {
|
|
|
|
inherit (cfg) allowAliases allowUnfree;
|
|
|
|
};
|
2023-12-08 12:49:52 +01:00
|
|
|
};
|
2021-02-20 14:41:44 +01:00
|
|
|
}
|