2024-09-02 18:57:59 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
inputs,
|
2024-09-10 10:46:16 +02:00
|
|
|
namespace,
|
2024-09-02 18:57:59 +02:00
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: with lib; with lib.${namespace};
|
|
|
|
let
|
2024-09-10 10:46:16 +02:00
|
|
|
cfg = config.${namespace}.apps.zed-editor;
|
2024-09-02 18:57:59 +02:00
|
|
|
|
2024-09-10 10:46:16 +02:00
|
|
|
zed-fhs = pkgs.buildFHSUserEnv {
|
|
|
|
name = "zed";
|
|
|
|
targetPkgs = pkgs:
|
|
|
|
with pkgs; [
|
|
|
|
zed-editor
|
|
|
|
];
|
|
|
|
runScript = "zed";
|
|
|
|
};
|
2024-09-02 18:57:59 +02:00
|
|
|
in {
|
2024-09-10 10:46:16 +02:00
|
|
|
options.${namespace}.apps.zed-editor = { enable = mkEnableOption "zed-editor"; };
|
2024-09-02 18:57:59 +02:00
|
|
|
|
2024-09-10 10:46:16 +02:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = [zed-fhs];
|
|
|
|
};
|
2024-09-02 18:57:59 +02:00
|
|
|
}
|