{
config,
pkgs,
lib,
inputs,
secrets,
...
}:
{
# imports = [
# ./laravel.nix
# ./vue.nix
# ]; # TODO need to figure out profiles and resolve the following error
# > error: collision between `/nix/store/flx928cbjq5jzmzrkdrbp8cvgaf6shr0-vscode-extension-oracle-suitecloud-vscode-extension-2.0.1/share/vscode/extensions/oracle.suitecloud-vscode-extension/node_modules/tslib/tslib.es6.js' and `/nix/store/2jqds7f6ib39kzh4liy3h2r8x7i3lv4v-vscode-extension-oracle-suitecloud-vscode-extension-3.0.0/share/vscode/extensions/oracle.suitecloud-vscode-extension/node_modules/tslib/tslib.es6.js'
# pkgs.config.allowUnfree = true; # TODO is this required since it's going to be deprecated? Otherwise how is it supposed to be set now in home manager
programs.bash.initExtra = ''
export ALIBABA_API_KEY="$(cat ${secrets.alibaba-api-key.path})"
'';
programs.zsh.initContent = ''
export ALIBABA_API_KEY="$(cat ${secrets.alibaba-api-key.path})"
'';
programs.vscode = {
enable = true;
package = (
pkgs.vscode.overrideAttrs (oldAttrs: rec {
version = "1.97.2";
src = builtins.fetchTarball {
url = "https://update.code.visualstudio.com/${version}/linux-x64/stable";
sha256 = "1py55zixqac7cckzwfq4clz483vjr7krm1lycfnpnmk10nhhjcv8"; # From nix-prefetch-url
};
})
); # Use the latest version of Visual Studio Code
profiles.default = {
enableExtensionUpdateCheck = true;
enableUpdateCheck = true;
extensions =
with pkgs.vscode-extensions;
[
arrterian.nix-env-selector
dbaeumer.vscode-eslint
donjayamanne.githistory
editorconfig.editorconfig
esbenp.prettier-vscode
gitlab.gitlab-workflow
gruntfuggly.todo-tree
jnoortheen.nix-ide
mikestead.dotenv
mkhl.direnv
vscode-icons-team.vscode-icons
yzhang.markdown-all-in-one
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "vscode-conventional-commits";
publisher = "vivaxy";
version = "1.26.0";
sha256 = "1n414wwd6my4xjmh55b6l0s8bqadnq35ya1isxvdi6yabapbwg9f";
}
{
name = "jest-snippets";
publisher = "andys8";
version = "1.9.1";
sha256 = "00rjij5khj7l9k2f15p8b6lhfvp9v7v07phn7cf3953kyadf3j09";
}
{
name = "roo-cline";
publisher = "rooveterinaryinc";
version = "3.11.2";
sha256 = "sha256-7F94p5ebaLrcbqGhvEgaSmnffi1KbG1LNmBMSp2H69Q=";
}
{
name = "ai-commit";
publisher = "sitoi";
version = "0.1.1";
sha256 = "sha256-r1q+55b5v2Awr1sQ3+6qUI3bL3sLUCpZdJU27iVFzjY=";
}
{
name = "suitecloud-vscode-extension";
publisher = "oracle";
version = "3.0.0";
sha256 = "sha256-yMo92IHmvYLoSc9nTIszyO66GkDl5lhb7TUvboMW36I=";
}
];
keybindings = [
{
"key" = "ctrl+k ctrl+space";
"command" = "editor.foldAll";
"when" = "editorTextFocus && foldingEnabled";
}
{
"key" = "ctrl+k ctrl+0";
"command" = "-editor.foldAll";
"when" = "editorTextFocus && foldingEnabled";
}
{
"key" = "ctrl+k space";
"command" = "editor.unfoldAll";
"when" = "editorTextFocus && foldingEnabled";
}
{
"key" = "ctrl+k ctrl+j";
"command" = "-editor.unfoldAll";
"when" = "editorTextFocus && foldingEnabled";
}
];
userSettings = {
"[handlebars]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[javascript]" = {
"editor.defaultFormatter" = "dbaeumer.vscode-eslint";
};
"[json]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[jsonc]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[nix]" = {
"editor.defaultFormatter" = "jnoortheen.nix-ide";
};
"[scss]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[typescript]" = {
"editor.defaultFormatter" = "vscode.typescript-language-features";
};
"[vue]" = {
"editor.defaultFormatter" = "dbaeumer.vscode-eslint";
};
"ai-commit.AI_COMMIT_SYSTEM_PROMPT" =
"You are an expert software engineer specializing in conventional commit standards. Generate a polished Git commit message following these comprehensive guidelines: ### Commit Message Format **Structure**: \\`<type>(<scope>): <gitmoji> <subject>\\` - **Type** (Required): Choose precisely from: - \\`feat\\`: New feature - \\`fix\\`: Bug resolution - \\`docs\\`: Documentation changes - \\`style\\`: Visual/formatting tweaks - \\`refactor\\`: Code restructuring - \\`test\\`: Testing-related - \\`chore\\`: Maintenance tasks - **Scope** (Contextual): Specify affected component/module (e.g., \\`auth\\`, \\`database\\`, \\`UI\\`). Omit if unclear. - **Gitmoji** (Optional): Add relevant emoji prefix (e.g., :sparkles: for features, :bug: for fixes) - **Subject** (Imperative mood): Clear summary under 100 chars. Start with action verb (Add, Fix, Improve) **Body** (When needed): - Bullet points (─) for key technical details - Explain WHY before WHAT when non-obvious - Keep lines under 100 characters - Separate from subject with blank line **Footer** (Special cases only): - Breaking changes: \\`BREAKING CHANGE: <description>\\` - Reference issues: \\`Addresses #123\\` ### Constraints ❗ **Strict Requirements**: - Character limits: - Subject line ≤ 100 chars - Body lines ≤ 100 chars - No JIRA/Bug references (e.g., \"Closes #123\") - No markdown formatting - Professional technical tone - Empty line between subject/body ### Quality Assurance Checklist ✅ Subject clearly communicates change purpose ✅ Scope properly contextualizes impact area ✅ Body provides essential implementation context ✅ Breaking changes explicitly declared ✅ Emojis enhance (but don't replace) meaning ### Exemplar feat(auth): :sparkles: implement OAuth2 integration - Add Google/Facebook authentication providers - Configure token expiration policies - Update user schema for social logins BREAKING CHANGE: Removes legacy API key support Generate ONLY the commit message for the provided code diff. No commentary.";
"ai-commit.AI_PROVIDER" = "openai";
"ai-commit.OPENAI_BASE_URL" = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1";
"ai-commit.OPENAI_MODEL" = "qwen-plus";
"conventionalCommits.lineBreak" = "\\n";
"conventionalCommits.promptScopes" = false;
"conventionalCommits.showEditor" = true;
"css.validate" = false;
"debug.javascript.terminalOptions" = { };
"diffEditor.hideUnchangedRegions.enabled" = true;
"diffEditor.ignoreTrimWhitespace" = true;
"editor.formatOnSave" = true;
"editor.minimap.enabled" = false;
"eslint.format.enable" = true;
"explorer.confirmDelete" = false;
"files.associations" = {
"*.md" = "markdown";
"*.ss" = "javascript";
"*.tpl" = "handlebars";
"*.vue" = "vue";
"*.nix" = "nix";
};
"files.eol" = "\n";
"git.autofetch" = true;
"git.branchProtection" = [
"production"
"main"
];
"git.confirmSync" = false;
"git.defaultBranchName" = "production";
"git.enableCommitSigning" = true;
# "github.copilot.chat.localeOverride" = "en";
# "github.copilot.chat.generateTests.codeLens" = true;
"github.gitProtocol" = "ssh";
"gitlab.duoChat.enabled" = true;
"gitlab.duo.enabledWithoutGitlabProject" = true;
"gitlab.duoCodeSuggestions.enabled" = true;
"gitlab.duoCodeSuggestions.openTabsContext" = true;
"gitlab.keybindingHints.enabled" = true;
"gitlab.showPipelineUpdateNotifications" = true;
"html.format.indentHandlebars" = true;
"jest.shell" = "zsh";
"less.validate" = false;
"roo-cline.allowedCommands" = [
"npm test"
"npm install"
"tsc"
"git log"
"git diff"
"git show"
];
"scss.validate" = false;
"stylelint.snippet" = [
"css"
"postcss"
"scss"
];
"stylelint.validate" = [
"css"
"postcss"
"scss"
];
"telemetry.telemetryLevel" = "off";
"terminal.explorerKind" = "external";
"terminal.external.linuxExec" = "alacritty";
"terminal.integrated.defaultProfile.linux" = "zsh";
"terminal.integrated.fontFamily" = "\"MesloLGS NF\", monospace";
"terminal.integrated.profiles.linux" = {
"bash" = {
"args" = [
"-l"
];
"icon" = "terminal-bash";
"path" = "/home/marvin/.nix-profile/bin/bash";
};
"zsh" = {
"args" = [
"-l"
];
"path" = "/home/marvin/.nix-profile/bin/zsh";
};
};
"terminal.integrated.sendKeybindingsToShell" = true;
"todo-tree.general.tags" = [
"BUG"
"HACK"
"FIXME"
"TODO"
"TEST"
"XXX"
"[ ]"
"[x]"
"REVIEW"
];
"update.mode" = "none";
"window.customTitleBarVisibility" = "auto";
"window.newWindowProfile" = "Default";
"workbench.colorTheme" = "Visual Studio Dark";
"workbench.editor.enablePreview" = false;
"workbench.iconTheme" = "vscode-icons";
};
};
};
}