nixos/home/jetbrains/nixos.nix
2025-01-13 11:52:09 +08:00

35 lines
647 B
Nix

{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.home.jetbrains;
in
{
options.home.jetbrains = {
enable = mkEnableOption "jetbrains text editor";
idea = mkEnableOption "intellij idea";
clion = mkEnableOption "clion ide";
goland = mkEnableOption "goland ide" // {
default = true;
};
};
config = {
users.homeModules = [
# this module passes jetbrains configuration to home-manager
{ passthrough.jetbrains = cfg; }
];
users.home.persist.directories = mkIf cfg.enable [
"go"
".java/.userPrefs"
".config/JetBrains"
".local/share/JetBrains"
];
};
}