home(jetbrains): add jetbrains products and directories

This commit is contained in:
514fpv 2024-04-28 10:58:54 +08:00
parent afd51d1d3d
commit d5c57ea282
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
2 changed files with 37 additions and 0 deletions

26
home/jetbrains/nixos.nix Normal file
View file

@ -0,0 +1,26 @@
{ 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 [
".java/.userPrefs"
".config/JetBrains"
".local/share/JetBrains"
];
};
}