2023-08-04 12:57:48 +00:00
|
|
|
{ config, outputs, pkgs, lib, ... }: {
|
2023-07-26 21:46:31 +00:00
|
|
|
|
2023-08-18 16:13:15 +00:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
hadolint
|
|
|
|
];
|
|
|
|
|
2023-07-23 21:09:58 +00:00
|
|
|
programs.vscode = {
|
|
|
|
enable = true;
|
|
|
|
enableExtensionUpdateCheck = false;
|
|
|
|
enableUpdateCheck = false;
|
2023-12-07 16:07:59 +00:00
|
|
|
package = pkgs.vscode;
|
2023-07-23 21:09:58 +00:00
|
|
|
extensions = with pkgs.vscode-extensions; [
|
2023-08-18 16:13:01 +00:00
|
|
|
# extensions available as nix packages
|
2023-07-23 21:09:58 +00:00
|
|
|
bbenoist.nix
|
|
|
|
github.copilot
|
2024-02-09 22:15:11 +00:00
|
|
|
github.copilot-chat
|
|
|
|
github.vscode-github-actions
|
2023-07-23 21:09:58 +00:00
|
|
|
golang.go
|
|
|
|
hashicorp.terraform
|
2024-02-10 20:44:01 +00:00
|
|
|
ms-azuretools.vscode-docker
|
2023-07-23 21:09:58 +00:00
|
|
|
ms-kubernetes-tools.vscode-kubernetes-tools
|
|
|
|
ms-vscode-remote.remote-ssh
|
|
|
|
ms-vscode.powershell
|
|
|
|
redhat.vscode-yaml
|
2024-02-09 22:15:11 +00:00
|
|
|
tailscale.vscode-tailscale
|
2023-08-20 13:29:54 +00:00
|
|
|
tamasfe.even-better-toml
|
2023-07-23 21:09:58 +00:00
|
|
|
timonwong.shellcheck
|
|
|
|
vscodevim.vim
|
|
|
|
yzhang.markdown-all-in-one
|
2023-08-18 16:13:01 +00:00
|
|
|
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
|
|
|
# extensions from the vscode marketplace
|
|
|
|
{
|
|
|
|
name = "auto-align";
|
|
|
|
publisher = "bladnman";
|
|
|
|
version = "0.0.13";
|
|
|
|
sha256 = "sha256-N5XMHW6UadKjE29p2vevtjgqLA4QysYu2xT3njmyHLk=";
|
|
|
|
}
|
2024-04-11 13:37:34 +00:00
|
|
|
{
|
|
|
|
name = "gemini-improved";
|
|
|
|
publisher = "printfn";
|
|
|
|
version = "1.0.6";
|
|
|
|
sha256 = "sha256-PqDBxCT+7wApSwESJRgEes4+sItIF7T3KsIlVaNj2Fg=";
|
|
|
|
}
|
2023-08-18 16:13:01 +00:00
|
|
|
{
|
|
|
|
name = "hadolint";
|
|
|
|
publisher = "exiasr";
|
|
|
|
version = "1.1.2";
|
|
|
|
sha256 = "sha256-6GO1f8SP4CE8yYl87/tm60FdGHqHsJA4c2B6UKVdpgM=";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "hcl";
|
|
|
|
publisher = "hashicorp";
|
|
|
|
version = "0.3.2";
|
|
|
|
sha256 = "sha256-cxF3knYY29PvT3rkRS8SGxMn9vzt56wwBXpk2PqO0mo=";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "jinjahtml";
|
|
|
|
publisher = "samuelcolvin";
|
|
|
|
version = "0.20.0";
|
|
|
|
sha256 = "sha256-wADL3AkLfT2N9io8h6XYgceKyltJCz5ZHZhB14ipqpM=";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "markdown-table-prettify";
|
|
|
|
publisher = "darkriszty";
|
|
|
|
version = "3.6.0";
|
|
|
|
sha256 = "sha256-FZTiNGSY+8xk3DJsTKQu4AHy1UFvg0gbrzPpjqRlECI=";
|
|
|
|
}
|
2024-03-22 15:02:52 +00:00
|
|
|
{
|
|
|
|
name = "snippet";
|
|
|
|
publisher = "vscode-snippet";
|
|
|
|
version = "1.2.0";
|
|
|
|
sha256 = "sha256-eka7JRzSN7VWkLu2kITb5mSYZHpw7Hx8mZboQsFhpms=";
|
|
|
|
}
|
2023-07-23 21:09:58 +00:00
|
|
|
];
|
2024-01-18 03:12:10 +00:00
|
|
|
globalSnippets = {
|
|
|
|
"Insert timestamp" = {
|
|
|
|
prefix = ["datetime"];
|
|
|
|
body = ["\"\${CURRENT_YEAR}-\${CURRENT_MONTH}-\${CURRENT_DATE}T\${CURRENT_HOUR}:\${CURRENT_MINUTE}:\${CURRENT_SECOND}Z\""];
|
|
|
|
description = "Insert date and time";
|
|
|
|
};
|
2024-03-22 23:42:03 +00:00
|
|
|
"Torchlight line number markup" = {
|
|
|
|
prefix = ["torchlight"];
|
|
|
|
body = ["torchlight! {\"lineNumbers\":true}"];
|
|
|
|
description = "Enable Torchlight line numbers";
|
|
|
|
};
|
2024-01-18 03:12:10 +00:00
|
|
|
};
|
2023-07-27 19:03:04 +00:00
|
|
|
keybindings = [
|
|
|
|
{
|
|
|
|
key = "backspace";
|
|
|
|
command = "-markdown.extension.onBackspaceKey";
|
|
|
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && vim.mode != 'CommandlineInProgress' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'EasyMotionMode' && vim.mode != 'Normal' && vim.mode != 'Replace' && vim.mode != 'SearchInProgressMode' && vim.mode != 'SurroundInputMode' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "ctrl+shift+alt+down";
|
|
|
|
command = "-markdown.extension.onCopyLineDown";
|
|
|
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "ctrl+shift+alt+up";
|
|
|
|
command = "-markdown.extension.onCopyLineUp";
|
|
|
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "ctrl+enter";
|
|
|
|
command = "-markdown.extension.onCtrlEnterKey";
|
|
|
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "enter";
|
|
|
|
command = "-markdown.extension.onEnterKey";
|
|
|
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && vim.mode != 'CommandlineInProgress' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'EasyMotionMode' && vim.mode != 'Normal' && vim.mode != 'Replace' && vim.mode != 'SearchInProgressMode' && vim.mode != 'SurroundInputMode' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "ctrl+]";
|
|
|
|
command = "-markdown.extension.onIndentLines";
|
|
|
|
when = "editorTextFocus && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "alt+down";
|
|
|
|
command = "-markdown.extension.onMoveLineDown";
|
|
|
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "alt+up";
|
|
|
|
command = "-markdown.extension.onMoveLineUp";
|
|
|
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "ctrl+[";
|
|
|
|
command = "-markdown.extension.onOutdentLines";
|
|
|
|
when = "editorTextFocus && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "shift+enter";
|
|
|
|
command = "-markdown.extension.onShiftEnterKey";
|
|
|
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "shift+tab";
|
|
|
|
command = "-markdown.extension.onShiftTabKey";
|
|
|
|
when = "editorTextFocus && markdown.extension.editor.cursor.inList && !editorHasMultipleSelections && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "tab";
|
|
|
|
command = "-markdown.extension.onTabKey";
|
|
|
|
when = "editorTextFocus && markdown.extension.editor.cursor.inList && !editorHasMultipleSelections && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !inlineSuggestionVisible && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
|
|
|
}
|
|
|
|
];
|
2024-02-08 19:13:47 +00:00
|
|
|
languageSnippets = {
|
|
|
|
jinja-yaml = {
|
|
|
|
"Insert SLS header" = {
|
2024-02-08 19:16:06 +00:00
|
|
|
isFileTemplate = true;
|
2024-02-08 19:13:47 +00:00
|
|
|
prefix = ["sls"];
|
|
|
|
body = [
|
|
|
|
"# -*- coding: utf-8 -*-"
|
|
|
|
"# vim: ft=yaml"
|
|
|
|
"---"
|
|
|
|
"\$0"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-02-09 22:03:18 +00:00
|
|
|
jinja-html = {
|
|
|
|
"Insert jinja header" = {
|
|
|
|
isFileTemplate = true;
|
|
|
|
prefix = ["jinja"];
|
|
|
|
body = [
|
|
|
|
"# -*- coding: utf-8 -*-"
|
|
|
|
"# vim: ft=jinja"
|
|
|
|
"\$0"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-02-08 19:13:47 +00:00
|
|
|
};
|
2023-07-23 21:09:58 +00:00
|
|
|
userSettings = {
|
2023-08-18 16:14:11 +00:00
|
|
|
"autoalign.moveableItems" = [
|
|
|
|
"="
|
|
|
|
":"
|
|
|
|
"+="
|
|
|
|
"-="
|
|
|
|
];
|
|
|
|
"autoalign.nonMoveableItemsAdditional" = [
|
|
|
|
"ks="
|
|
|
|
"ds="
|
|
|
|
];
|
2023-07-23 21:09:58 +00:00
|
|
|
"diffEditor.ignoreTrimWhitespace" = false;
|
|
|
|
"editor.acceptSuggestionOnCommitCharacter" = false;
|
|
|
|
"editor.acceptSuggestionOnEnter" = "off";
|
2023-07-27 19:03:04 +00:00
|
|
|
"editor.detectIndentation" = false;
|
|
|
|
"editor.inlineSuggest.enabled" = true;
|
2023-11-07 03:39:55 +00:00
|
|
|
"editor.lineNumbers" = "relative";
|
2023-07-23 21:09:58 +00:00
|
|
|
"editor.renderControlCharacters" = true;
|
2023-07-27 19:03:04 +00:00
|
|
|
"editor.renderWhitespace" = "all";
|
2023-07-23 21:09:58 +00:00
|
|
|
"editor.tabCompletion" = "off";
|
|
|
|
"editor.tabSize" = 2;
|
|
|
|
"explorer.confirmDragAndDrop" = false;
|
2023-08-18 16:14:11 +00:00
|
|
|
"extensions.autoCheckUpdates" = false;
|
2023-07-23 21:09:58 +00:00
|
|
|
"files.hotExit" = "onExitAndWindowClose";
|
2023-07-27 19:03:04 +00:00
|
|
|
"files.trimTrailingWhitespace" = true;
|
2023-07-23 21:09:58 +00:00
|
|
|
"git.confirmSync" = false;
|
|
|
|
"git.ignoreLegacyWarning" = true;
|
2023-07-27 19:03:04 +00:00
|
|
|
"github.copilot.enable" = {
|
|
|
|
"*" = true;
|
2023-08-28 14:03:43 +00:00
|
|
|
"markdown" = false;
|
2024-03-04 15:31:49 +00:00
|
|
|
"plaintext" = false;
|
2024-01-02 20:37:39 +00:00
|
|
|
"properties" = false;
|
2023-07-27 19:03:04 +00:00
|
|
|
"scminput" = false;
|
|
|
|
"yaml" = true;
|
|
|
|
};
|
2023-08-21 18:38:17 +00:00
|
|
|
"go.toolsManagement.checkForUpdates" = "local";
|
2023-08-29 17:56:29 +00:00
|
|
|
"html.autoClosingTags" = false;
|
2023-07-23 21:09:58 +00:00
|
|
|
"powershell.codeFormatting.useCorrectCasing" = true;
|
2023-08-04 12:57:48 +00:00
|
|
|
"powershell.powerShellAdditionalExePaths" = {
|
|
|
|
"pwsh" = "${config.home.homeDirectory}/.nix-profile/bin/pwsh";
|
|
|
|
};
|
|
|
|
"powershell.promptToUpdatePowerShell" = false;
|
2023-07-23 21:09:58 +00:00
|
|
|
"security.workspace.trust.untrustedFiles" = "open";
|
2023-08-18 16:14:11 +00:00
|
|
|
"update.mode" = "none";
|
|
|
|
"vim.normalModeKeyBindings" = [
|
|
|
|
{
|
|
|
|
"after" = ["@q"];
|
|
|
|
"before" = ["Q"];
|
|
|
|
}
|
|
|
|
];
|
2023-08-29 17:57:19 +00:00
|
|
|
"vim.statusBarColorControl" = false;
|
2023-07-23 21:09:58 +00:00
|
|
|
"vim.useCtrlKeys" = false;
|
2023-07-27 19:03:04 +00:00
|
|
|
"window.restoreWindows" = "none";
|
2023-08-18 16:14:11 +00:00
|
|
|
"workbench.startupEditor" = "none";
|
2023-07-23 21:09:58 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|