Skip to content

Commit

Permalink
feat(modules): add ides
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuciael committed May 8, 2024
1 parent f217180 commit 40664f6
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 1 deletion.
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,7 @@
mappedHosts = builtins.mapAttrs (n: v: mkHost {name = n;}) hosts;
in
mappedHosts;

inherit pkgs unstable;
};
}
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=";
};
};
});
}

0 comments on commit 40664f6

Please sign in to comment.