From 4ad4d3c8c6d323edfa8a3154a203bc35284f712f Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 8 Nov 2023 11:17:52 +0100 Subject: [PATCH] jetbrains ide (intellij) python integration --- hosts/yodaHedgehog/configuration.nix | 1 + hosts/yodaNas/configuration.nix | 1 + hosts/yodaTab/configuration.nix | 3 ++- hosts/yodaTux/configuration.nix | 1 + hosts/yodaYoga/configuration.nix | 1 + modules/jetbrains-ide.nix | 25 +++++++++++++++++++++++++ modules/programs.nix | 5 ----- 7 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 modules/jetbrains-ide.nix diff --git a/hosts/yodaHedgehog/configuration.nix b/hosts/yodaHedgehog/configuration.nix index 80f8079..6bd5b96 100644 --- a/hosts/yodaHedgehog/configuration.nix +++ b/hosts/yodaHedgehog/configuration.nix @@ -18,6 +18,7 @@ #../../modules/games.nix #../../modules/boxes.nix #../../modules/freetube.nix + #../../modules/jetbrains-ide.nix #../../modules/vscodium.nix #../../modules/signal-desktop.nix #../../modules/element-desktop.nix diff --git a/hosts/yodaNas/configuration.nix b/hosts/yodaNas/configuration.nix index 1b862f3..df41166 100644 --- a/hosts/yodaNas/configuration.nix +++ b/hosts/yodaNas/configuration.nix @@ -18,6 +18,7 @@ #../../modules/games.nix #../../modules/boxes.nix #../../modules/freetube.nix + #../../modules/jetbrains-ide.nix #../../modules/vscodium.nix #../../modules/signal-desktop.nix #../../modules/element-desktop.nix diff --git a/hosts/yodaTab/configuration.nix b/hosts/yodaTab/configuration.nix index b234e80..41d59e3 100644 --- a/hosts/yodaTab/configuration.nix +++ b/hosts/yodaTab/configuration.nix @@ -17,7 +17,8 @@ #../../modules/games.nix #../../modules/boxes.nix ../../modules/freetube.nix - ../../modules/vscodium.nix + ../../modules/jetbrains-ide.nix + #../../modules/vscodium.nix ../../modules/signal-desktop.nix ../../modules/element-desktop.nix ../../modules/joplin-desktop.nix diff --git a/hosts/yodaTux/configuration.nix b/hosts/yodaTux/configuration.nix index 8c7dc3a..633f063 100644 --- a/hosts/yodaTux/configuration.nix +++ b/hosts/yodaTux/configuration.nix @@ -17,6 +17,7 @@ #../../modules/games.nix ../../modules/boxes.nix ../../modules/freetube.nix + ../../modules/jetbrains-ide.nix ../../modules/vscodium.nix ../../modules/signal-desktop.nix ../../modules/element-desktop.nix diff --git a/hosts/yodaYoga/configuration.nix b/hosts/yodaYoga/configuration.nix index 8a77128..a78df18 100644 --- a/hosts/yodaYoga/configuration.nix +++ b/hosts/yodaYoga/configuration.nix @@ -18,6 +18,7 @@ #../../modules/games.nix #../../modules/boxes.nix #../../modules/freetube.nix + #../../modules/jetbrains-ide.nix #../../modules/vscodium.nix #../../modules/signal-desktop.nix #../../modules/element-desktop.nix diff --git a/modules/jetbrains-ide.nix b/modules/jetbrains-ide.nix new file mode 100644 index 0000000..d303d74 --- /dev/null +++ b/modules/jetbrains-ide.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: +{ + # Integrated Development Environment (IDE). + + # Open issues about nix-shell support/integration: + # - .env run configuration: https://github.com/NixOS/nix-idea/issues/1#issuecomment-590851686 + # - nix-shell IDE-wide: https://github.com/NixOS/nix-idea/issues/1#issuecomment-734997521 + + environment.systemPackages = with pkgs; [ + # System-wide installation makes python available as: + # /run/current-system/sw/bin/python3 + # This makes it easier to configure it as interpreter in Jetbrain's IDE. + python3 + ]; + + users.users.yoda = { + packages = with pkgs; [ + ( + if (config.nixpkgs.config.allowUnfree) + then jetbrains.idea-ultimate + else jetbrains.idea-community + ) + ]; + }; +} diff --git a/modules/programs.nix b/modules/programs.nix index f45cee2..9c3b021 100644 --- a/modules/programs.nix +++ b/modules/programs.nix @@ -20,11 +20,6 @@ meld # Diff and merge tool handbrake # Rip DVD and Blu-ray; rotate and export videos mediainfo-gui # View video metadata. - ( # Integrated Development Environment (IDE) - if (config.nixpkgs.config.allowUnfree) - then jetbrains.idea-ultimate - else jetbrains.idea-community - ) # # 3D modeling and printing