mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-12-22 12:22:17 +00:00
apply nix-fmt
This commit is contained in:
parent
1c79db0b42
commit
24472642b0
60 changed files with 335 additions and 451 deletions
|
@ -47,8 +47,7 @@
|
|||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forEachSystem = f: lib.genAttrs systems (sys: f pkgsFor.${sys});
|
||||
pkgsFor = nixpkgs.legacyPackages;
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit lib;
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
../modules/tui
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||
{ outputs, lib, config, pkgs, ... }: {
|
||||
imports = [ ../modules/tui ]
|
||||
++ (builtins.attrValues outputs.homeManagerModules);
|
||||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays;
|
||||
|
@ -14,7 +13,7 @@
|
|||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
warn-dirty = false;
|
||||
};
|
||||
};
|
||||
|
@ -24,9 +23,7 @@
|
|||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
stateVersion = lib.mkDefault "24.11";
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
sessionVariables = { EDITOR = "nvim"; };
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
../global
|
||||
];
|
||||
{ ... }: {
|
||||
imports = [ ../global ];
|
||||
|
||||
# packages
|
||||
home.packages = with pkgs; [
|
||||
|
||||
];
|
||||
# home.packages = with pkgs; [ ];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
{ ... }: {
|
||||
imports = [
|
||||
../global
|
||||
../modules/tui/extras
|
||||
|
@ -7,6 +7,5 @@
|
|||
];
|
||||
|
||||
# packages
|
||||
home.packages = with pkgs; [
|
||||
];
|
||||
# home.packages = with pkgs; [ ];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
../global
|
||||
../modules/tui/extras
|
||||
../modules/gui
|
||||
../lib/chromeos.nix
|
||||
];
|
||||
{ pkgs, ... }: {
|
||||
imports =
|
||||
[ ../global ../modules/tui/extras ../modules/gui ../lib/chromeos.nix ];
|
||||
|
||||
# extra packages
|
||||
home.packages = with pkgs; [
|
||||
dive # Explore docker images
|
||||
];
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
dive # Explore docker images
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
../global
|
||||
../modules/tui/extras
|
||||
|
@ -7,7 +7,5 @@
|
|||
];
|
||||
|
||||
# packages
|
||||
home.packages = with pkgs; [
|
||||
vagrant
|
||||
];
|
||||
home.packages = with pkgs; [ vagrant ];
|
||||
}
|
||||
|
|
|
@ -12,4 +12,4 @@ in {
|
|||
'';
|
||||
};
|
||||
home.packages = with pkgs; [ nixgl.nixGLMesa ];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
{ pkgs, inputs, outputs, lib, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
];
|
||||
}
|
||||
{ pkgs, ... }: { home.packages = with pkgs; [ google-chrome ]; }
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
# Common GUI apps
|
||||
imports = [
|
||||
./firefox.nix
|
||||
./vscode.nix
|
||||
];
|
||||
imports = [ ./firefox.nix ./vscode.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gimp-with-plugins
|
||||
lagrange
|
||||
qFlipper
|
||||
remmina
|
||||
];
|
||||
home.packages = with pkgs; [ gimp-with-plugins lagrange qFlipper remmina ];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, inputs, ... }:
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
addons = inputs.firefox-addons.packages.${pkgs.system};
|
||||
|
@ -45,4 +45,4 @@ in
|
|||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,89 +1,91 @@
|
|||
{ config, outputs, pkgs, lib, ... }: {
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hadolint
|
||||
];
|
||||
home.packages = with pkgs; [ hadolint ];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
enableExtensionUpdateCheck = false;
|
||||
enableUpdateCheck = false;
|
||||
package = pkgs.vscode;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# extensions available as nix packages
|
||||
bbenoist.nix
|
||||
github.vscode-github-actions
|
||||
golang.go
|
||||
hashicorp.terraform
|
||||
ms-azuretools.vscode-docker
|
||||
ms-kubernetes-tools.vscode-kubernetes-tools
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.powershell
|
||||
redhat.vscode-yaml
|
||||
tailscale.vscode-tailscale
|
||||
tamasfe.even-better-toml
|
||||
timonwong.shellcheck
|
||||
vscodevim.vim
|
||||
yzhang.markdown-all-in-one
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
# extensions from the vscode marketplace
|
||||
{
|
||||
name = "auto-align";
|
||||
publisher = "bladnman";
|
||||
version = "0.0.13";
|
||||
sha256 = "sha256-N5XMHW6UadKjE29p2vevtjgqLA4QysYu2xT3njmyHLk=";
|
||||
}
|
||||
{
|
||||
name = "gemini-improved";
|
||||
publisher = "printfn";
|
||||
version = "1.0.6";
|
||||
sha256 = "sha256-PqDBxCT+7wApSwESJRgEes4+sItIF7T3KsIlVaNj2Fg=";
|
||||
}
|
||||
{
|
||||
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=";
|
||||
}
|
||||
{
|
||||
name = "snippet";
|
||||
publisher = "vscode-snippet";
|
||||
version = "1.2.0";
|
||||
sha256 = "sha256-eka7JRzSN7VWkLu2kITb5mSYZHpw7Hx8mZboQsFhpms=";
|
||||
}
|
||||
];
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
[
|
||||
# extensions available as nix packages
|
||||
bbenoist.nix
|
||||
github.vscode-github-actions
|
||||
golang.go
|
||||
hashicorp.terraform
|
||||
ms-azuretools.vscode-docker
|
||||
ms-kubernetes-tools.vscode-kubernetes-tools
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.powershell
|
||||
redhat.vscode-yaml
|
||||
tailscale.vscode-tailscale
|
||||
tamasfe.even-better-toml
|
||||
timonwong.shellcheck
|
||||
vscodevim.vim
|
||||
yzhang.markdown-all-in-one
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
# extensions from the vscode marketplace
|
||||
{
|
||||
name = "auto-align";
|
||||
publisher = "bladnman";
|
||||
version = "0.0.13";
|
||||
sha256 = "sha256-N5XMHW6UadKjE29p2vevtjgqLA4QysYu2xT3njmyHLk=";
|
||||
}
|
||||
{
|
||||
name = "gemini-improved";
|
||||
publisher = "printfn";
|
||||
version = "1.0.6";
|
||||
sha256 = "sha256-PqDBxCT+7wApSwESJRgEes4+sItIF7T3KsIlVaNj2Fg=";
|
||||
}
|
||||
{
|
||||
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=";
|
||||
}
|
||||
{
|
||||
name = "snippet";
|
||||
publisher = "vscode-snippet";
|
||||
version = "1.2.0";
|
||||
sha256 = "sha256-eka7JRzSN7VWkLu2kITb5mSYZHpw7Hx8mZboQsFhpms=";
|
||||
}
|
||||
];
|
||||
globalSnippets = {
|
||||
"Insert datestamp" = {
|
||||
prefix = ["date"];
|
||||
body = ["\"\${CURRENT_YEAR}-\${CURRENT_MONTH}-\${CURRENT_DATE}\""];
|
||||
prefix = [ "date" ];
|
||||
body = [ ''"''${CURRENT_YEAR}-''${CURRENT_MONTH}-''${CURRENT_DATE}"'' ];
|
||||
description = "Insert date";
|
||||
};
|
||||
"Insert timestamp" = {
|
||||
prefix = ["datetime"];
|
||||
body = ["\"\${CURRENT_YEAR}-\${CURRENT_MONTH}-\${CURRENT_DATE}T\${CURRENT_HOUR}:\${CURRENT_MINUTE}:\${CURRENT_SECOND}Z\""];
|
||||
prefix = [ "datetime" ];
|
||||
body = [
|
||||
''
|
||||
"''${CURRENT_YEAR}-''${CURRENT_MONTH}-''${CURRENT_DATE}T''${CURRENT_HOUR}:''${CURRENT_MINUTE}:''${CURRENT_SECOND}Z"''
|
||||
];
|
||||
description = "Insert date and time";
|
||||
};
|
||||
"Torchlight line number markup" = {
|
||||
prefix = ["torchlight"];
|
||||
body = ["torchlight! {\"lineNumbers\":true}"];
|
||||
prefix = [ "torchlight" ];
|
||||
body = [ ''torchlight! {"lineNumbers":true}'' ];
|
||||
description = "Enable Torchlight line numbers";
|
||||
};
|
||||
};
|
||||
|
@ -91,100 +93,95 @@
|
|||
{
|
||||
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$/";
|
||||
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$/";
|
||||
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$/";
|
||||
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$/";
|
||||
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$/";
|
||||
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$/";
|
||||
when =
|
||||
"editorTextFocus && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||
}
|
||||
{
|
||||
key = "alt+down";
|
||||
command = "-markdown.extension.onMoveLineDown";
|
||||
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||
when =
|
||||
"editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||
}
|
||||
{
|
||||
key = "alt+up";
|
||||
command = "-markdown.extension.onMoveLineUp";
|
||||
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||
when =
|
||||
"editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||
}
|
||||
{
|
||||
key = "ctrl+[";
|
||||
command = "-markdown.extension.onOutdentLines";
|
||||
when = "editorTextFocus && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||
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$/";
|
||||
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$/";
|
||||
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$/";
|
||||
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$/";
|
||||
}
|
||||
];
|
||||
languageSnippets = {
|
||||
jinja-yaml = {
|
||||
"Insert SLS header" = {
|
||||
isFileTemplate = true;
|
||||
prefix = ["sls"];
|
||||
body = [
|
||||
"# -*- coding: utf-8 -*-"
|
||||
"# vim: ft=yaml"
|
||||
"---"
|
||||
"\$0"
|
||||
];
|
||||
prefix = [ "sls" ];
|
||||
body = [ "# -*- coding: utf-8 -*-" "# vim: ft=yaml" "---" "$0" ];
|
||||
};
|
||||
};
|
||||
jinja-html = {
|
||||
"Insert jinja header" = {
|
||||
isFileTemplate = true;
|
||||
prefix = ["jinja"];
|
||||
body = [
|
||||
"# -*- coding: utf-8 -*-"
|
||||
"# vim: ft=jinja"
|
||||
"\$0"
|
||||
];
|
||||
prefix = [ "jinja" ];
|
||||
body = [ "# -*- coding: utf-8 -*-" "# vim: ft=jinja" "$0" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
userSettings = {
|
||||
"autoalign.moveableItems" = [
|
||||
"="
|
||||
":"
|
||||
"+="
|
||||
"-="
|
||||
];
|
||||
"autoalign.nonMoveableItemsAdditional" = [
|
||||
"ks="
|
||||
"ds="
|
||||
];
|
||||
"autoalign.moveableItems" = [ "=" ":" "+=" "-=" ];
|
||||
"autoalign.nonMoveableItemsAdditional" = [ "ks=" "ds=" ];
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"editor.acceptSuggestionOnCommitCharacter" = false;
|
||||
"editor.acceptSuggestionOnEnter" = "off";
|
||||
|
@ -219,19 +216,15 @@
|
|||
"powershell.promptToUpdatePowerShell" = false;
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
"update.mode" = "none";
|
||||
"vim.normalModeKeyBindings" = [
|
||||
{
|
||||
"after" = ["@q"];
|
||||
"before" = ["Q"];
|
||||
}
|
||||
];
|
||||
"vim.normalModeKeyBindings" = [{
|
||||
"after" = [ "@q" ];
|
||||
"before" = [ "Q" ];
|
||||
}];
|
||||
"vim.statusBarColorControl" = false;
|
||||
"vim.useCtrlKeys" = false;
|
||||
"window.restoreWindows" = "none";
|
||||
"workbench.startupEditor" = "none";
|
||||
"yaml.customTags" = [
|
||||
"!reference sequence"
|
||||
];
|
||||
"yaml.customTags" = [ "!reference sequence" ];
|
||||
"[markdown]" = {
|
||||
"editor.defaultFormatter" = "yzhang.markdown-all-in-one";
|
||||
"editor.quickSuggestions" = {
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
# Core CLI apps
|
||||
|
||||
imports = [
|
||||
./git.nix
|
||||
./shell
|
||||
./nix-index.nix
|
||||
./neovim
|
||||
./tmux.nix
|
||||
./vim.nix
|
||||
];
|
||||
imports = [ ./git.nix ./shell ./nix-index.nix ./neovim ./tmux.nix ./vim.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
apg # Automatic password generator
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
# Extra CLI apps
|
||||
|
||||
imports = [
|
||||
../default.nix
|
||||
./go.nix
|
||||
];
|
||||
imports = [ ../default.nix ./go.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
android-tools # Android SDK
|
||||
|
@ -20,12 +17,8 @@
|
|||
];
|
||||
|
||||
programs.fish = {
|
||||
shellAbbrs = rec {
|
||||
k = "kubectl";
|
||||
};
|
||||
shellAbbrs = rec { k = "kubectl"; };
|
||||
|
||||
functions = {
|
||||
nugo = "hugo new content/posts/$argv/index.md";
|
||||
};
|
||||
functions = { nugo = "hugo new content/posts/$argv/index.md"; };
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
programs.go = {
|
||||
enable = true;
|
||||
package = pkgs.go;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
email = lib.concatStringsSep "" [ "john@bo" "wdre.net" ];
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = lib.mkDefault true;
|
||||
delta.enable = true;
|
||||
aliases = {
|
||||
graph = "log --decorate --oneline --graph";
|
||||
fast-forward = "merge --ff-only";
|
||||
};
|
||||
userEmail = lib.mkDefault email;
|
||||
userName = lib.mkDefault "John Bowdre";
|
||||
extraConfig = {
|
||||
gpg.format = "ssh";
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = false;
|
||||
user.signingKey = "~/.ssh/id_ed25519.pub";
|
||||
};
|
||||
let email = lib.concatStringsSep "" [ "john@bo" "wdre.net" ];
|
||||
in {
|
||||
programs.git = {
|
||||
enable = lib.mkDefault true;
|
||||
delta.enable = true;
|
||||
aliases = {
|
||||
graph = "log --decorate --oneline --graph";
|
||||
fast-forward = "merge --ff-only";
|
||||
};
|
||||
}
|
||||
userEmail = lib.mkDefault email;
|
||||
userName = lib.mkDefault "John Bowdre";
|
||||
extraConfig = {
|
||||
gpg.format = "ssh";
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = false;
|
||||
user.signingKey = "~/.ssh/id_ed25519.pub";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,18 +16,14 @@
|
|||
# Enable spellcheck for some filetypes
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = [
|
||||
"markdown"
|
||||
];
|
||||
pattern = [ "markdown" ];
|
||||
command = "setlocal spell spelllang=en";
|
||||
}
|
||||
|
||||
# Enable wrap for some filetypes
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = [
|
||||
"markdown"
|
||||
];
|
||||
pattern = [ "markdown" ];
|
||||
command = "setlocal wrap linebreak";
|
||||
}
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
opts.completeopt = ["menu" "menuone" "noselect"];
|
||||
opts.completeopt = [ "menu" "menuone" "noselect" ];
|
||||
|
||||
plugins = {
|
||||
luasnip.enable = true;
|
||||
|
@ -25,7 +25,8 @@
|
|||
enable = true;
|
||||
|
||||
settings = {
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
snippet.expand =
|
||||
"function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
|
||||
mapping = {
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
|
@ -33,15 +34,16 @@
|
|||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<S-Tab>" =
|
||||
"cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
};
|
||||
|
||||
sources = [
|
||||
{name = "path";}
|
||||
{name = "nvim_lsp";}
|
||||
{name = "luasnip";}
|
||||
{name = "nixpkgs_maintainers";}
|
||||
{ name = "path"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "nixpkgs_maintainers"; }
|
||||
{
|
||||
name = "buffer";
|
||||
# words from other open buffers can also be suggested
|
||||
|
@ -52,4 +54,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
performance = {
|
||||
combinePlugins = {
|
||||
enable = true;
|
||||
standalonePlugins = [
|
||||
"hmts.nvim"
|
||||
"nvim-treesitter"
|
||||
];
|
||||
standalonePlugins = [ "hmts.nvim" "nvim-treesitter" ];
|
||||
};
|
||||
byteCompileLua.enable = true;
|
||||
};
|
||||
|
|
|
@ -6,80 +6,69 @@
|
|||
};
|
||||
|
||||
keymaps = let
|
||||
normal =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "n";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
"<Space>" = "<NOP>";
|
||||
normal = lib.mapAttrsToList (key: action: {
|
||||
mode = "n";
|
||||
inherit action key;
|
||||
}) {
|
||||
"<Space>" = "<NOP>";
|
||||
|
||||
# Esc to clear search results
|
||||
"<esc>" = ":noh<CR>";
|
||||
# Esc to clear search results
|
||||
"<esc>" = ":noh<CR>";
|
||||
|
||||
# fix Y behavior
|
||||
Y = "y$";
|
||||
# fix Y behavior
|
||||
Y = "y$";
|
||||
|
||||
# toggle between two most recent files
|
||||
"<C-c>" = ":b#<CR>";
|
||||
# toggle between two most recent files
|
||||
"<C-c>" = ":b#<CR>";
|
||||
|
||||
# close by Ctrl+x
|
||||
"<C-x>" = ":close<CR>";
|
||||
# close by Ctrl+x
|
||||
"<C-x>" = ":close<CR>";
|
||||
|
||||
# save by Space+s or Ctrl+s
|
||||
"<leader>s" = ":w<CR>";
|
||||
"<C-s>" = ":w<CR>";
|
||||
# save by Space+s or Ctrl+s
|
||||
"<leader>s" = ":w<CR>";
|
||||
"<C-s>" = ":w<CR>";
|
||||
|
||||
# H, L to jump to start/end of line
|
||||
L = "$";
|
||||
H = "^";
|
||||
# H, L to jump to start/end of line
|
||||
L = "$";
|
||||
H = "^";
|
||||
|
||||
# resize with arrows
|
||||
"<C-Up>" = ":resize -2<CR>";
|
||||
"<C-Down>" = ":resize +2<CR>";
|
||||
"<C-Left>" = ":vertical resize +2<CR>";
|
||||
"<C-Right>" = ":vertical resize -2<CR>";
|
||||
# resize with arrows
|
||||
"<C-Up>" = ":resize -2<CR>";
|
||||
"<C-Down>" = ":resize +2<CR>";
|
||||
"<C-Left>" = ":vertical resize +2<CR>";
|
||||
"<C-Right>" = ":vertical resize -2<CR>";
|
||||
|
||||
# move current line up/down
|
||||
# M = Alt
|
||||
"<M-k>" = ":move-2<CR>";
|
||||
"<M-j>" = ":move+<CR>";
|
||||
};
|
||||
visual =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "v";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
# better indenting
|
||||
">" = ">gv";
|
||||
"<" = "<gv";
|
||||
"<TAB>" = ">gv";
|
||||
"<S-TAB>" = "<gv";
|
||||
# move current line up/down
|
||||
# M = Alt
|
||||
"<M-k>" = ":move-2<CR>";
|
||||
"<M-j>" = ":move+<CR>";
|
||||
};
|
||||
visual = lib.mapAttrsToList (key: action: {
|
||||
mode = "v";
|
||||
inherit action key;
|
||||
}) {
|
||||
# better indenting
|
||||
">" = ">gv";
|
||||
"<" = "<gv";
|
||||
"<TAB>" = ">gv";
|
||||
"<S-TAB>" = "<gv";
|
||||
|
||||
# move selected line/block in visual mode
|
||||
"K" = ":m '<-2<CR>gv=gv";
|
||||
"J" = ":m '>+1<CR>gv=gv";
|
||||
# move selected line/block in visual mode
|
||||
"K" = ":m '<-2<CR>gv=gv";
|
||||
"J" = ":m '>+1<CR>gv=gv";
|
||||
|
||||
# sort
|
||||
"<leader>s" = ":sort<CR>";
|
||||
};
|
||||
insert =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "i";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
# Save by Ctrl+s
|
||||
"<C-s>" = "<Esc>:w<CR>";
|
||||
};
|
||||
in
|
||||
config.lib.nixvim.keymaps.mkKeymaps
|
||||
{options.silent = true;}
|
||||
(normal ++ visual ++ insert);
|
||||
# sort
|
||||
"<leader>s" = ":sort<CR>";
|
||||
};
|
||||
insert = lib.mapAttrsToList (key: action: {
|
||||
mode = "i";
|
||||
inherit action key;
|
||||
}) {
|
||||
# Save by Ctrl+s
|
||||
"<C-s>" = "<Esc>:w<CR>";
|
||||
};
|
||||
in config.lib.nixvim.keymaps.mkKeymaps { options.silent = true; }
|
||||
(normal ++ visual ++ insert);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
clipboard = {
|
||||
providers = {
|
||||
xsel.enable = true;
|
||||
};
|
||||
providers = { xsel.enable = true; };
|
||||
register = "unnamed";
|
||||
};
|
||||
|
||||
|
@ -14,11 +12,15 @@
|
|||
cursorline = true; # highlight the screen line of the cursor
|
||||
expandtab = true; # expand <Tab> to spaces in Insert mode
|
||||
fileencoding = "utf-8"; # file-content encoding for the current buffer
|
||||
foldlevel = 99; # folds with a level higher than this number will be closed
|
||||
foldlevel =
|
||||
99; # folds with a level higher than this number will be closed
|
||||
hidden = true; # Keep closed buffer open in the background
|
||||
ignorecase = true; # when search query is lowercase match both lower and upper patterns
|
||||
inccommand = "split"; # search and replace: preview changes in quickfix list
|
||||
incsearch = true; # incremental search: show match for partly typed search command
|
||||
ignorecase =
|
||||
true; # when search query is lowercase match both lower and upper patterns
|
||||
inccommand =
|
||||
"split"; # search and replace: preview changes in quickfix list
|
||||
incsearch =
|
||||
true; # incremental search: show match for partly typed search command
|
||||
laststatus = 3; # when to use a status line for the last window
|
||||
modeline = true; # tags such as 'vim:ft=sh'
|
||||
modelines = 5; # check first and last five lines for modelines
|
||||
|
@ -29,14 +31,16 @@
|
|||
scrolloff = 8; # number of lines to show around the cursor
|
||||
shiftwidth = 2; # number of spaces used for each step of (auto)indent
|
||||
signcolumn = "yes"; # whether to show the signcolumn
|
||||
smartcase = true; # override ignorecase if search pattern containers upper case
|
||||
smartcase =
|
||||
true; # override ignorecase if search pattern containers upper case
|
||||
spell = false; # highlight spelling mistakes
|
||||
splitbelow = true; # A new window is put below the current one
|
||||
splitright = true; # A new window is put right of the corrent one
|
||||
swapfile = false; # Disable the swap file
|
||||
tabstop = 2; # number of spaces a <Tab> in the text stands for
|
||||
termguicolors = true; # enables 24-bit colors
|
||||
textwidth = 0; # maximum width of text that is being inserted, a longer line will be broken after whitespace to this width
|
||||
textwidth =
|
||||
0; # maximum width of text that is being inserted, a longer line will be broken after whitespace to this width
|
||||
undofile = true; # save and restore undo history
|
||||
updatetime = 100; # Faster completion
|
||||
wrap = false; # prevent wrapping text
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
programs.nixvim.plugins.comment = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
opleader.line = "<C-_>";
|
||||
toggler.line = "<C-_>";
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
{
|
||||
programs.nixvim.plugins.floaterm = {
|
||||
enable = true;
|
||||
|
||||
width = 0.8;
|
||||
height = 0.8;
|
||||
|
||||
title = "";
|
||||
|
||||
keymaps.toggle = "<leader>,";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,4 +17,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
files."after/ftplugin/markdown.lua".keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>m";
|
||||
action = ":MarkdownPreview<cr>";
|
||||
}
|
||||
];
|
||||
files."after/ftplugin/markdown.lua".keymaps = [{
|
||||
mode = "n";
|
||||
key = "<leader>m";
|
||||
action = ":MarkdownPreview<cr>";
|
||||
}];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,4 +30,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,4 +23,4 @@
|
|||
|
||||
hmts.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,13 +4,8 @@
|
|||
settings = {
|
||||
highlight = false;
|
||||
trim_last_line = false;
|
||||
ft_blocklist = [
|
||||
"checkhealth"
|
||||
"floaterm"
|
||||
"lsipinfo"
|
||||
"neo-tree"
|
||||
"TelescopePrompt"
|
||||
];
|
||||
ft_blocklist =
|
||||
[ "checkhealth" "floaterm" "lsipinfo" "neo-tree" "TelescopePrompt" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
hasPackage = pname: lib.any (p: p ? pname && p.name == pname) config.home.packages;
|
||||
hasPackage = pname:
|
||||
lib.any (p: p ? pname && p.name == pname) config.home.packages;
|
||||
hasFish = hasPackage "fish";
|
||||
in
|
||||
{
|
||||
in {
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = mkIf hasFish true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
cat = "bat";
|
||||
ccat = "egrep -v '^\s*(#|\\$)'";
|
||||
ccat = "egrep -v '^s*(#|\\$)'";
|
||||
g = "git";
|
||||
gg = "git graph";
|
||||
gs = "git status";
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
{
|
||||
imports = [
|
||||
./eza.nix
|
||||
./fish
|
||||
];
|
||||
imports = [ ./eza.nix ./fish ];
|
||||
|
||||
home = {
|
||||
shellAliases = import ./aliases.nix;
|
||||
};
|
||||
home = { shellAliases = import ./aliases.nix; };
|
||||
|
||||
programs = {
|
||||
zoxide = {
|
||||
enable = true;
|
||||
options = ["--cmd" "j"];
|
||||
options = [ "--cmd" "j" ];
|
||||
};
|
||||
|
||||
direnv = {
|
||||
|
@ -23,9 +18,7 @@
|
|||
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "gruvbox-dark";
|
||||
};
|
||||
config = { theme = "gruvbox-dark"; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
programs.eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = false;
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
];
|
||||
extraOptions = [ "--group-directories-first" ];
|
||||
git = true;
|
||||
};
|
||||
|
||||
|
@ -14,4 +12,4 @@
|
|||
ll = "eza -alhg";
|
||||
lt = "eza --tree";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
gc = "git commit -S";
|
||||
gcm = "git commit -S -m";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./abbrs.nix
|
||||
./functions.nix
|
||||
./shell-init.nix
|
||||
];
|
||||
imports = [ ./abbrs.nix ./functions.nix ./shell-init.nix ];
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
|
@ -27,9 +23,7 @@
|
|||
enableTransience = true;
|
||||
settings = {
|
||||
container.disabled = true;
|
||||
nix_shell = {
|
||||
format = "via [$symbol]($style) ";
|
||||
};
|
||||
nix_shell = { format = "via [$symbol]($style) "; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,15 +5,20 @@
|
|||
# Disable greeting
|
||||
fish_greeting = "";
|
||||
|
||||
get-local-ip = "ip addr show $(ip route | grep default | awk '{print $5}') | grep 'inet ' | awk '{print $2}' | cut -d/ -f1";
|
||||
get-local-ip =
|
||||
"ip addr show $(ip route | grep default | awk '{print $5}') | grep 'inet ' | awk '{print $2}' | cut -d/ -f1";
|
||||
|
||||
ssh = "TERM=xterm command ssh $argv";
|
||||
# Rebuild home-manager
|
||||
switch-home = "home-manager switch -b backup --flake ${config.home.homeDirectory}/.dotfiles#$USER@$(hostname -s)";
|
||||
switch-nix = "sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.dotfiles";
|
||||
upgrade-nix = "nix-channel --update; nix-env --install --attr nixpkgs.nix nixpkgs.cacert";
|
||||
switch-home =
|
||||
"home-manager switch -b backup --flake ${config.home.homeDirectory}/.dotfiles#$USER@$(hostname -s)";
|
||||
switch-nix =
|
||||
"sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.dotfiles";
|
||||
upgrade-nix =
|
||||
"nix-channel --update; nix-env --install --attr nixpkgs.nix nixpkgs.cacert";
|
||||
|
||||
# Trees
|
||||
tt = "cbonsai -S -t 0.25 -c \"&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,🌸,🌺,💮\"";
|
||||
tt = ''
|
||||
cbonsai -S -t 0.25 -c "&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,🌸,🌺,💮"'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -62,4 +62,4 @@
|
|||
''
|
||||
cbonsai -p -m "$(fortune -s -n 300)" -c "&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,🌸,🌺,💮"
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
historyLimit = 100000;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
tokyo-night-tmux
|
||||
];
|
||||
plugins = with pkgs.tmuxPlugins; [ tokyo-night-tmux ];
|
||||
extraConfig = ''
|
||||
# new panes inherit current working directory
|
||||
bind '%' split-window -h -c '#{pane_current_path}'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
# defaultEditor = true;
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
{
|
||||
# List your module files here
|
||||
# my-module = import ./my-module.nix;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, outputs,... }: {
|
||||
{ inputs, outputs, ... }: {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./fish.nix
|
||||
|
@ -12,9 +12,7 @@
|
|||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
|
||||
environment.enableAllTerminfo = true;
|
||||
|
@ -22,4 +20,4 @@
|
|||
hardware.enableRedistributableFirmware = true;
|
||||
networking.domain = "vim.wtf";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
functions.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
};
|
||||
};
|
||||
time.timeZone = lib.mkDefault "America/Chicago";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{ lib, ... }: {
|
||||
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
{ inputs, lib, ... }: {
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
|
@ -19,4 +18,4 @@
|
|||
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
{ lib, ... }: {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = lib.mkDefault "client";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
{ virtualisation.docker = { enable = true; }; }
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
wayland = true;
|
||||
};
|
||||
};
|
||||
desktopManager = {
|
||||
gnome.enable = true;
|
||||
};
|
||||
desktopManager = { gnome.enable = true; };
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
{
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
{ virtualisation.libvirtd = { enable = true; }; }
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
{ services.printing = { enable = true; }; }
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
services.sshd.enable = true;
|
||||
}
|
||||
{ services.sshd.enable = true; }
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{
|
||||
imports = [ ../global/tailscale.nix ];
|
||||
services.tailscale = {
|
||||
useRoutingFeatures = "both";
|
||||
};
|
||||
}
|
||||
services.tailscale = { useRoutingFeatures = "both"; };
|
||||
}
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
{
|
||||
programs.wireshark = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
{ programs.wireshark = { enable = true; }; }
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
{ pkgs, config, ... }:
|
||||
let ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in
|
||||
{
|
||||
let
|
||||
ifTheyExist = groups:
|
||||
builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
users.users.john = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"video"
|
||||
"wheel"
|
||||
] ++ ifTheyExist [
|
||||
extraGroups = [ "audio" "video" "wheel" ] ++ ifTheyExist [
|
||||
"docker"
|
||||
"libvirtd"
|
||||
"mysql"
|
||||
|
@ -22,6 +19,7 @@ in
|
|||
packages = [ pkgs.home-manager ];
|
||||
};
|
||||
|
||||
home-manager.users.john = import ../../../../home/${config.networking.hostName}.nix;
|
||||
home-manager.users.john =
|
||||
import ../../../../home/${config.networking.hostName}.nix;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.hardware.nixosModules.common-cpu-intel
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
availableKernelModules =
|
||||
[ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
|
@ -21,7 +20,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/b2c7656b-2292-4dc9-94f2-a66690a14969";
|
||||
|
@ -33,13 +31,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/dev/disk/by-uuid/9cd48b44-07e5-4d0f-aaf0-7ca07e7b7945";
|
||||
}];
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/9cd48b44-07e5-4d0f-aaf0-7ca07e7b7945"; }];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
|
||||
# This is useful to avoid using channels when using legacy nix commands
|
||||
let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
|
||||
in
|
||||
import (fetchTarball {
|
||||
let
|
||||
lock =
|
||||
(builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
|
||||
in import (fetchTarball {
|
||||
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
|
||||
sha256 = lock.narHash;
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# This file defines overlays
|
||||
{ inputs, ... }:
|
||||
{
|
||||
{ inputs, ... }: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
# https://nixos.wiki/wiki/Overlays
|
||||
modifications = final: prev: {
|
||||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||
# ...
|
||||
# });
|
||||
};
|
||||
modifications = final: prev:
|
||||
{
|
||||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||
# ...
|
||||
# });
|
||||
};
|
||||
|
||||
# When applied, the stable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.stable'
|
||||
|
@ -22,4 +22,4 @@
|
|||
};
|
||||
};
|
||||
nixgl = inputs.nixgl.overlay;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
|
||||
|
||||
{ pkgs ? (import ../nixpkgs.nix) { } }: {
|
||||
{ pkgs ? (import ../nixpkgs.nix) { } }:
|
||||
{
|
||||
# example = pkgs.callPackage ./example { };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
let
|
||||
pname = "trekscii";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
let pname = "trekscii";
|
||||
in stdenv.mkDerivation {
|
||||
inherit pname;
|
||||
version = "unstable-2022-06-27";
|
||||
|
||||
|
@ -17,7 +15,5 @@ stdenv.mkDerivation {
|
|||
install -Dm 0755 bin/trekscii $out/bin/trekscii
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
meta = with lib; { platforms = platforms.all; };
|
||||
}
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||
nativeBuildInputs = with pkgs; [ nix home-manager git ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue