Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Edit `dotfiles/nix/environment.nix` and add your aliases to the `shellAliases` s

- **Nix Packages**: Add to the `systemPackages` list in `dotfiles/nix/environment.nix`
- **Homebrew Packages**: Add to the appropriate section in `dotfiles/nix/homebrew.nix`
- **JetBrains IDEs with Plugins**: Configure in `dotfiles/nix/jetbrains.nix`

Note: Always prefer nix packages over Homebrew packages when possible.

Expand Down Expand Up @@ -101,9 +102,38 @@ This repository uses pre-commit hooks to ensure code quality and prevent secrets
- **flake.nix**: Main Nix configuration entry point
- **environment.nix**: Environment variables and packages
- **homebrew.nix**: Homebrew packages and configuration
- **jetbrains.nix**: JetBrains IDEs with declarative plugin management
- **core.nix, system.nix, etc.**: Other system configuration files
- **manual-linking.sh**: Script to create symbolic links for dotfiles

## JetBrains IDE Configuration

This setup includes declarative configuration for JetBrains IDEs with plugin management through [nix-jetbrains-plugins](https://github.com/theCapypara/nix-jetbrains-plugins).

### Included IDEs and Plugins

The configuration in `dotfiles/nix/jetbrains.nix` includes:

- **IntelliJ IDEA Ultimate** with common development plugins
- **WebStorm** with common web development plugins

Additional IDEs (GoLand, Rider) are available but commented out to reduce initial download size.

### Common Plugins Included

- File Watcher - Monitor file changes and run tasks automatically
- .ignore - Enhanced support for .gitignore and other ignore files
- GitHub integration - Enhanced Git/GitHub support (if not built-in)

### Customizing JetBrains Setup

To add or remove IDEs or plugins, edit `dotfiles/nix/jetbrains.nix`.

**Finding Plugin IDs**: Plugin IDs can be found at the bottom of JetBrains Marketplace pages.
Example: Visit https://plugins.jetbrains.com/plugin/7374-gitignore and scroll to bottom to find ID: `mobi.hsz.idea.gitignore`

**Adding More IDEs**: Uncomment the additional IDE configurations in `jetbrains.nix` as needed.

## TODOs

- [x] Create a backup/restore mechanism (implemented in update-system.sh)
Expand Down
1 change: 1 addition & 0 deletions dotfiles/nix/environment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ in
dotnetCorePackages.sdk_8_0 # .NET Core SDK

# Temporary disabled because of storage issues
# Now managed through jetbrains.nix module
#jetbrains.idea-ultimate
#jetbrains.webstorm
#jetbrains.goland
Expand Down
12 changes: 10 additions & 2 deletions dotfiles/nix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@
flake = false;
};
colmena.url = "github:zhaofengli/colmena";

nix-jetbrains-plugins = {
url = "github:theCapypara/nix-jetbrains-plugins";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nix-darwin, nixpkgs, nix-homebrew, nixpkgs-nh-dev, home-manager, ... }@inputs:
outputs = { self, nix-darwin, nixpkgs, nix-homebrew, nixpkgs-nh-dev, home-manager, nix-jetbrains-plugins, ... }@inputs:
let
base = {
system.configurationRevision = self.rev or self.dirtyRev or null;
Expand All @@ -46,7 +51,7 @@
# Build darwin flake using:
# $ darwin-rebuild build --flake .#Lars-MacBook-Air
darwinConfigurations."Lars-MacBook-Air" = nix-darwin.lib.darwinSystem {
specialArgs = { inherit nixpkgs-nh-dev; };
specialArgs = { inherit nixpkgs-nh-dev nix-jetbrains-plugins; };
modules = [
# Core system configuration
base
Expand All @@ -61,6 +66,9 @@

# Programs
./programs.nix

# JetBrains configuration
./jetbrains.nix

# Homebrew integration
./homebrew.nix
Expand Down
44 changes: 44 additions & 0 deletions dotfiles/nix/jetbrains.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ pkgs, lib, nix-jetbrains-plugins, ... }:

let
system = pkgs.stdenv.hostPlatform.system;

# Convenience function from nix-jetbrains-plugins
buildIdeWithPlugins = nix-jetbrains-plugins.lib."${system}".buildIdeWithPlugins;

# Common plugins that are useful across most JetBrains IDEs
# Plugin IDs from JetBrains Marketplace (shown at bottom of plugin pages)
commonPluginIds = [
"com.intellij.plugins.watcher" # File Watcher - monitor file changes
"mobi.hsz.idea.gitignore" # .ignore - gitignore and other ignore files support
"org.jetbrains.plugins.github" # GitHub integration (if not built-in)
];

# Popular additional plugins (using proper plugin IDs)
enhancementPluginIds = [
"IdeaVIM" # Vim emulation (plugin ID: IdeaVIM)
"String Manipulation" # String manipulation utilities
];

in
{
environment.systemPackages = with pkgs; [
# Start with the most commonly used IDEs

# IntelliJ IDEA Ultimate - primary IDE for Java/Kotlin development
(buildIdeWithPlugins jetbrains "idea-ultimate" commonPluginIds)

# WebStorm - for web development (JavaScript, TypeScript, etc.)
(buildIdeWithPlugins jetbrains "webstorm" commonPluginIds)

# Uncomment additional IDEs as needed:
# GoLand for Go development
# (buildIdeWithPlugins jetbrains "goland" commonPluginIds)

# Rider for .NET development
# (buildIdeWithPlugins jetbrains "rider" commonPluginIds)
];

# Note: Plugin IDs can be found at the bottom of JetBrains Marketplace pages
# Example: https://plugins.jetbrains.com/plugin/7374-gitignore -> ID: mobi.hsz.idea.gitignore
}