Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(modules): add ides #63

Merged
merged 1 commit into from
May 8, 2024
Merged
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
1 change: 1 addition & 0 deletions hosts/pc/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@ with lib.my; {
gnome-keyring.enable = true;
wallpaper.enable = true;
};
dev.ides = ["rust-rover" "webstorm" "idea-ultimate"];
};
}
1 change: 0 additions & 1 deletion modules/desktop/apps/gtk.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
lib,
pkgs,
username,
...
Expand Down
48 changes: 48 additions & 0 deletions modules/dev/ide.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
config,
lib,
pkgs,
unstable,
username,
...
}:
with lib;
with lib.my; let
cfg = config.modules.dev.ides;
avaiableIdes = builtins.listToAttrs (
builtins.map (value: {
name = value.pname;
inherit value;
})
(with pkgs.jetbrains; [
clion
datagrip
dataspell
gateway
goland
idea-community
idea-ultimate
mps
phpstorm
pycharm-community
pycharm-professional
rider
ruby-mine
unstable.jetbrains.rust-rover
webstorm
])
);
in {
options.modules.dev.ides = mkOption {
description = "A list of JetBrains IDEs names to install";
example = ["rust-rover" "webstorm"];
default = [];
type = with types; listOf (enum (builtins.attrNames avaiableIdes));
};

config = mkIf (cfg != []) {
home-manager.users.${username} = {
home.packages = builtins.map (name: avaiableIdes.${name}) cfg;
};
};
}
14 changes: 14 additions & 0 deletions overlays/whitesur-icons.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{lib, ...}:
with lib; {
# TODO: Remove when https://github.com/vinceliuice/WhiteSur-icon-theme/pull/293 will be upstreamed to nixpkgs
pkgs = singleton (final: prev: {
whitesur-icon-theme = prev.whitesur-icon-theme.overrideAttrs {
src = final.fetchFromGitHub {
owner = "zakuciael";
repo = "WhiteSur-icon-theme";
rev = "90a6787061bfb5a630f4295eda59d1058cf30da5";
hash = "sha256-S10HagxiZxbyhsmzS12X7SJOF9YqWKuhZqfjcc0mog8=";
};
};
});
}