add vscode

also misc. formatting cleanup, groundwork for machine-specific
environments
This commit is contained in:
John Bowdre 2023-07-23 16:09:58 -05:00
parent 38cad0c658
commit f99d6f8412
6 changed files with 137 additions and 67 deletions

View file

@ -16,10 +16,13 @@
defaultPackage.${system} = home-manager.defaultPackage.${system};
homeConfigurations = {
"john" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { system = "${system}"; };
"john@penguin" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
system = "${system}";
config.allowUnfree = true;
};
modules = [ ./nix/common/home.nix ];
modules = [ ./nix/machines/penguin/home.nix ];
};
};
};

View file

@ -8,7 +8,6 @@
home.homeDirectory = "/home/john";
home.stateVersion = "23.05"; # Please read the comment before changing.
programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
targets.genericLinux.enable = true;
# home files
@ -17,7 +16,6 @@
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# ".vimrc".source = .dotfiles/vim/.vimrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
@ -39,6 +37,7 @@
hugo
libvirt
packer
powershell
terraform
tldr
vagrant
@ -74,8 +73,8 @@
userEmail = "john@bowdre.net";
userName = "John Bowdre";
extraConfig = {
pull.ff = "only";
init.defaultBranch = "main";
pull.ff = "only";
};
};

View file

@ -3,10 +3,10 @@
enable = true;
baseIndex = 1;
clock24 = true;
mouse = true;
escapeTime = 50;
historyLimit = 100000;
keyMode = "vi";
escapeTime = 50;
mouse = true;
plugins = with pkgs.tmuxPlugins; [ ];
extraConfig = ''
# navigating panes with Ctrl+{hjkl}

View file

@ -10,10 +10,10 @@
tabstop = 2;
};
plugins = with pkgs.vimPlugins; [
vim-trailing-whitespace
nerdcommenter
vim-go
vim-sensible
vim-trailing-whitespace
];
extraConfig = ''
" Tmux integration to switch panes with Ctrl+{hkjl}

55
nix/lib/vscode.nix Normal file
View file

@ -0,0 +1,55 @@
{ pkgs, lib, ...}: {
programs.vscode = {
enable = true;
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
eamodio.gitlens
github.copilot
golang.go
hashicorp.terraform
ms-kubernetes-tools.vscode-kubernetes-tools
ms-vscode-remote.remote-ssh
ms-vscode.powershell
redhat.vscode-yaml
timonwong.shellcheck
vscodevim.vim
yzhang.markdown-all-in-one
];
userSettings = {
"diffEditor.ignoreTrimWhitespace" = false;
"editor.acceptSuggestionOnCommitCharacter" = false;
"editor.acceptSuggestionOnEnter" = "off";
"editor.lineNumbers" = "relative";
"editor.renderControlCharacters" = true;
"editor.renderWhitespace" = "boundary";
"editor.tabCompletion" = "off";
"editor.tabSize" = 2;
"explorer.confirmDragAndDrop" = false;
"files.hotExit" = "onExitAndWindowClose";
"git.confirmSync" = false;
"git.ignoreLegacyWarning" = true;
"powershell.codeFormatting.useCorrectCasing" = true;
"security.workspace.trust.untrustedFiles" = "open";
"vim.statusBarColorControl" = true;
"vim.useCtrlKeys" = false;
"window.restoreWindows" = "all";
"workbench.startupEditor" = "none";
"workbench.colorCustomizations" = {
"statusBar.background" = "#005f5f";
"statusBar.debuggingBackground" = "#005f5f";
"statusBar.noFolderBackground" = "#005f5f";
};
"vim.normalModeKeyBindings" = [
{
"after" = ["@q"];
"before" = ["Q"];
}
];
};
};
services.gnome-keyring.enable = true;
}

View file

@ -0,0 +1,13 @@
{ pkgs, lib, config, ... }: {
imports = [
../../common/home.nix
../../lib/vscode.nix
];
# packages
home.packages = with pkgs; [
firefox-esr
obsidian
qFlipper
];
}