add bun and node

This commit is contained in:
Chris Kruining 2024-09-02 20:49:14 +02:00
parent b347093a53
commit 1d98c35cb5
7 changed files with 100 additions and 55 deletions

View file

@ -14,7 +14,7 @@ in {
inherit (lib.types) nullOr enum;
in {
default = mkOption {
type = nullOr (enum [ "nano" "nvim" ]);
type = nullOr (enum [ "nano" "nvim" "zed" "kate" ]);
default = "nano";
description = "Default editor for text manipulation";
example = "nvim";

View file

@ -0,0 +1,36 @@
{ config, options, lib, pkgs, ... }:
let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
cfg = config.modules.desktop.editors.kate;
in
{
options.modules.desktop.editors.kate = let
inherit (lib.options) mkEnableOption;
in { enable = mkEnableOption "kate"; };
config = mkIf cfg.enable {
# programs.kate = {
# enable = true;
#
# editor = {
# brackets.highlightMatching = true;
#
# indent = {
# keepExtraSpaces = false;
# replaceWithSpaces = true;
# showLines = true;
# undoByShiftTab = true;
#
# width = 4;
# tabWidth = 4;
# };
# };
#
# lsp = {
# typescript = {};
# };
# };
};
}

View file

@ -12,15 +12,16 @@ in
config = mkMerge [
(mkIf config.modules.develop.js.enable {
user.packages = attrValues {
};
user.packages = with pkgs; [
bun
nodejs
nodePackages_latest.typescript-language-server
];
})
(mkIf config.modules.develop.xdg.enable {
home = {
# sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo";
# sessionPath = ["$CARGO_HOME/bin"];
};
})
];

View file

@ -12,25 +12,25 @@ in
};
config = mkMerge [
(mkIf config.modules.develop.rust.enable {
nixpkgs.overlays = [inputs.rust.overlays.default];
user.packages = attrValues {
rust-package = pkgs.rust-bin.stable.latest.default;
inherit (pkgs) rust-analyzer rust-script;
};
environment.shellAliases = {
rs = "rustc";
ca = "cargo";
};
})
(mkIf config.modules.develop.xdg.enable {
home = {
sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo";
sessionPath = ["$CARGO_HOME/bin"];
};
})
# (mkIf config.modules.develop.rust.enable {
# # nixpkgs.overlays = [inputs.rust.overlays.default];
#
# user.packages = attrValues {
# # rust-package = pkgs.rust-bin.stable.latest.default;
# # inherit (pkgs) rust-analyzer rust-script;
# };
#
# environment.shellAliases = {
# rs = "rustc";
# ca = "cargo";
# };
# })
#
# (mkIf config.modules.develop.xdg.enable {
# home = {
# sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo";
# sessionPath = ["$CARGO_HOME/bin"];
# };
# })
];
}