feat: phpstorm

This commit is contained in:
punkfairie 2025-05-31 17:25:13 -07:00
parent 9a18c250df
commit 9c6bc0630d
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
10 changed files with 60 additions and 27 deletions

View file

@ -15,7 +15,6 @@
# TODO: Move these to custom modules
overlays = [
(import ./overlays/jetbrains.nix {inherit inputs;})
(import ./overlays/wezterm.nix {inherit inputs;})
];
};

View file

@ -6,6 +6,7 @@ in {
fish = enabled;
floorp = enabled;
nh = enabled;
phpstorm = enabled;
wezterm = enabled;
wireguard = enabled;
};

View file

@ -3,6 +3,7 @@
./fish.nix
./floorp.nix
./nh.nix
./phpstorm.nix
./wezterm.nix
./wireguard.nix
];

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.programs.phpstorm;
in {
options.marleyos.programs.phpstorm.enable = lib.mkEnableOption "phpstorm";
config = lib.mkIf cfg.enable {
homebrew.casks = ["phpstorm"];
};
}

View file

@ -60,6 +60,7 @@ in {
nemo = enabled;
neo = enabled;
neovim = enabled;
phpstorm = enabled;
superfile = enabled;
tea = enabled;
};

View file

@ -35,6 +35,7 @@
./neo.nix
./neovim.nix
./nh.nix
./phpstorm
./ripgrep.nix
./ssh.nix
./starship

View file

@ -357,7 +357,7 @@ nmap <leader>so <Action>(ShowSettings)
" Quickfix List
nmap <leader>sq <Action>(ActivateProblemsViewToolWindow)
" Resume
nmap <leader>sR :echo 'Not yet implmented.'<cr>
nmap <leader>sR :echo 'Not yet implemented.'<cr>
" Goto Symbol
nmap <leader>ss <Action>(GotoSymbol)
" Goto Symbol (Workspace)
@ -405,7 +405,7 @@ nmap <leader>dp <Action>(Pause)
" Toggle REPL
nmap <leader>dr <Action>(JShell.Console)
" Session
nmap <leader>ds :echo 'Not yet implmented.'<cr>
nmap <leader>ds :echo 'Not yet implemented.'<cr>
" Terminate
nmap <leader>dt <Action>(Stop)
" Widgets

View file

@ -0,0 +1,34 @@
{
marleylib,
config,
osConfig,
lib,
pkgs,
inputs,
...
}: let
inherit (marleylib.module) mkEnableOption';
cfg = config.marleyos.programs.phpstorm;
osCfg = osConfig.marleyos.programs.phpstorm.enable or false;
in {
options.marleyos.programs.phpstorm.enable = mkEnableOption' "phpstorm" osCfg;
config = lib.mkIf cfg.enable {
# JetBrains products are unfree.
nixpkgs = {
config.allowUnfree = lib.mkIf pkgs.stdenv.isLinux (lib.mkForce true);
overlays = [
(import ../../../../overlays/jetbrains.nix {inherit inputs;})
];
};
home.packages = lib.mkIf pkgs.stdenv.isLinux (with pkgs; [
# jetbrains.phpstorm
marleyos.phpstorm-with-node
]);
home.file.".ideavimrc".source = ./.ideavimrc;
};
}

View file

@ -1,3 +1,8 @@
{inputs}: _: _: {
inherit (inputs.nixpkgs-unstable) jetbrains jetbrains-toolbox;
{inputs}: final: _: let
unstable = import inputs.nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = true;
};
in {
inherit (unstable) jetbrains jetbrains-toolbox;
}

View file

@ -1,22 +0,0 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.phpstorm;
in {
options.marleyos.programs.phpstorm.enable = lib.mkEnableOption "phpstorm";
config = lib.mkIf cfg.enable {
# JetBrains products are unfree.
nixpkgs.config.allowUnfree = lib.mkForce true;
home.packages = with pkgs; [
# jetbrains.phpstorm
marleyos.phpstorm-with-node
];
home.file.".ideavimrc".source = ./.ideavimrc;
};
}