This commit is contained in:
Angst 2024-04-30 09:00:42 +01:00 committed by GitHub
commit e3052cd781
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 23 additions and 1 deletions

View File

@ -74,6 +74,13 @@ in {
'';
};
extraPackages = mkOption {
type = with types; listOf package;
default = [ ];
example = literalExpression "[ pkgs.nil ]";
description = "Extra packages available to hx.";
};
enableUpdateCheck = mkOption {
type = types.bool;
default = true;
@ -223,7 +230,22 @@ in {
};
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
home.packages = if cfg.extraPackages != [ ] then
[
(pkgs.symlinkJoin {
name =
"${lib.getName cfg.package}-wrapped-${lib.getVersion cfg.package}";
paths = [ cfg.package ];
preferLocalBuild = true;
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/code \
--prefix PATH : ${lib.makeBinPath cfg.extraPackages}
'';
})
]
else
[ cfg.package ];
home.file = mkMerge [
(mkIf (mergedUserSettings != { }) {