From 24472642b0a68aa41925756a75e13059301f937e Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 19 Dec 2024 19:30:06 -0600 Subject: [PATCH] apply nix-fmt --- flake.nix | 3 +- home/global/default.nix | 13 +- home/hosts/generic.nix | 10 +- home/hosts/penguin-duet.nix | 5 +- home/hosts/penguin-fw.nix | 17 +- home/hosts/pixnix.nix | 6 +- home/lib/chromeos.nix | 2 +- home/modules/gui/chrome.nix | 6 +- home/modules/gui/default.nix | 12 +- home/modules/gui/firefox.nix | 4 +- home/modules/gui/vscode.nix | 223 +++++++++--------- home/modules/tui/default.nix | 9 +- home/modules/tui/extras/default.nix | 15 +- home/modules/tui/extras/go.nix | 4 +- home/modules/tui/git.nix | 38 ++- home/modules/tui/neovim/autocmds.nix | 8 +- home/modules/tui/neovim/completion.nix | 18 +- home/modules/tui/neovim/default.nix | 5 +- home/modules/tui/neovim/keymaps.nix | 117 +++++---- home/modules/tui/neovim/options.nix | 22 +- home/modules/tui/neovim/plugins/comment.nix | 1 - home/modules/tui/neovim/plugins/floaterm.nix | 5 +- home/modules/tui/neovim/plugins/harpoon.nix | 2 +- .../modules/tui/neovim/plugins/md-preview.nix | 14 +- home/modules/tui/neovim/plugins/telescope.nix | 2 +- .../modules/tui/neovim/plugins/treesitter.nix | 2 +- home/modules/tui/neovim/plugins/trim.nix | 9 +- home/modules/tui/nix-index.nix | 8 +- home/modules/tui/shell/aliases.nix | 2 +- home/modules/tui/shell/default.nix | 15 +- home/modules/tui/shell/eza.nix | 6 +- home/modules/tui/shell/fish/abbrs.nix | 2 +- home/modules/tui/shell/fish/default.nix | 10 +- home/modules/tui/shell/fish/functions.nix | 15 +- home/modules/tui/shell/fish/shell-init.nix | 2 +- home/modules/tui/tmux.nix | 4 +- home/modules/tui/vim.nix | 2 +- modules/nixos/default.nix | 2 +- nixos/common/global/default.nix | 8 +- nixos/common/global/fish.nix | 2 +- nixos/common/global/locale.nix | 2 +- nixos/common/global/network-manager.nix | 2 +- nixos/common/global/nix.nix | 5 +- nixos/common/global/tailscale.nix | 5 +- nixos/common/optional/docker.nix | 6 +- nixos/common/optional/gnome.nix | 4 +- nixos/common/optional/libvirtd.nix | 6 +- nixos/common/optional/pipewire.nix | 2 +- nixos/common/optional/printing.nix | 6 +- nixos/common/optional/sshd.nix | 4 +- nixos/common/optional/tailscale-exit-node.nix | 6 +- nixos/common/optional/wireshark.nix | 6 +- nixos/common/users/john/default.nix | 18 +- nixos/pixnix/default.nix | 2 +- nixos/pixnix/hardware-configuration.nix | 18 +- nixpkgs.nix | 9 +- overlays/default.nix | 16 +- pkgs/default.nix | 5 +- pkgs/trekscii/default.nix | 12 +- shell.nix | 2 +- 60 files changed, 335 insertions(+), 451 deletions(-) diff --git a/flake.nix b/flake.nix index fb40d54..b756e61 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/home/global/default.nix b/home/global/default.nix index a5c5e7c..cd772ba 100644 --- a/home/global/default.nix +++ b/home/global/default.nix @@ -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 = { diff --git a/home/hosts/generic.nix b/home/hosts/generic.nix index 5e113d3..a53abbd 100644 --- a/home/hosts/generic.nix +++ b/home/hosts/generic.nix @@ -1,10 +1,6 @@ -{ inputs, outputs, lib, config, pkgs, ... }: { - imports = [ - ../global - ]; +{ ... }: { + imports = [ ../global ]; # packages - home.packages = with pkgs; [ - - ]; + # home.packages = with pkgs; [ ]; } diff --git a/home/hosts/penguin-duet.nix b/home/hosts/penguin-duet.nix index 31d1d6b..acc68bb 100644 --- a/home/hosts/penguin-duet.nix +++ b/home/hosts/penguin-duet.nix @@ -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; [ ]; } diff --git a/home/hosts/penguin-fw.nix b/home/hosts/penguin-fw.nix index 50fc7cb..312e58e 100644 --- a/home/hosts/penguin-fw.nix +++ b/home/hosts/penguin-fw.nix @@ -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 + ]; } diff --git a/home/hosts/pixnix.nix b/home/hosts/pixnix.nix index 49ade19..3675010 100644 --- a/home/hosts/pixnix.nix +++ b/home/hosts/pixnix.nix @@ -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 ]; } diff --git a/home/lib/chromeos.nix b/home/lib/chromeos.nix index 608beeb..29de9a1 100644 --- a/home/lib/chromeos.nix +++ b/home/lib/chromeos.nix @@ -12,4 +12,4 @@ in { ''; }; home.packages = with pkgs; [ nixgl.nixGLMesa ]; -} \ No newline at end of file +} diff --git a/home/modules/gui/chrome.nix b/home/modules/gui/chrome.nix index 20acf8a..104ba61 100644 --- a/home/modules/gui/chrome.nix +++ b/home/modules/gui/chrome.nix @@ -1,5 +1 @@ -{ pkgs, inputs, outputs, lib, ... }: { - home.packages = with pkgs; [ - google-chrome - ]; -} +{ pkgs, ... }: { home.packages = with pkgs; [ google-chrome ]; } diff --git a/home/modules/gui/default.nix b/home/modules/gui/default.nix index fb78dcf..f83836d 100644 --- a/home/modules/gui/default.nix +++ b/home/modules/gui/default.nix @@ -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 ]; } diff --git a/home/modules/gui/firefox.nix b/home/modules/gui/firefox.nix index 603fe99..f276b99 100644 --- a/home/modules/gui/firefox.nix +++ b/home/modules/gui/firefox.nix @@ -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" ]; }; -} \ No newline at end of file +} diff --git a/home/modules/gui/vscode.nix b/home/modules/gui/vscode.nix index b371af8..5dbadd2 100644 --- a/home/modules/gui/vscode.nix +++ b/home/modules/gui/vscode.nix @@ -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" = { diff --git a/home/modules/tui/default.nix b/home/modules/tui/default.nix index b8517c6..06cc41c 100644 --- a/home/modules/tui/default.nix +++ b/home/modules/tui/default.nix @@ -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 diff --git a/home/modules/tui/extras/default.nix b/home/modules/tui/extras/default.nix index 4dc3739..90c49d1 100644 --- a/home/modules/tui/extras/default.nix +++ b/home/modules/tui/extras/default.nix @@ -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"; }; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/extras/go.nix b/home/modules/tui/extras/go.nix index 4e80309..96ab50f 100644 --- a/home/modules/tui/extras/go.nix +++ b/home/modules/tui/extras/go.nix @@ -1,6 +1,6 @@ -{ pkgs, lib, ... }: { +{ pkgs, ... }: { programs.go = { enable = true; package = pkgs.go; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/git.nix b/home/modules/tui/git.nix index be38f00..ad40b95 100644 --- a/home/modules/tui/git.nix +++ b/home/modules/tui/git.nix @@ -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"; }; - } \ No newline at end of file + 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"; + }; + }; +} diff --git a/home/modules/tui/neovim/autocmds.nix b/home/modules/tui/neovim/autocmds.nix index d6e1398..9a284d5 100644 --- a/home/modules/tui/neovim/autocmds.nix +++ b/home/modules/tui/neovim/autocmds.nix @@ -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"; } ]; diff --git a/home/modules/tui/neovim/completion.nix b/home/modules/tui/neovim/completion.nix index d7d9c81..afa3475 100644 --- a/home/modules/tui/neovim/completion.nix +++ b/home/modules/tui/neovim/completion.nix @@ -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 = { "" = "cmp.mapping.scroll_docs(-4)"; @@ -33,15 +34,16 @@ "" = "cmp.mapping.complete()"; "" = "cmp.mapping.close()"; "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = + "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; "" = "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 @@ }; }; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/neovim/default.nix b/home/modules/tui/neovim/default.nix index b4b7ba0..25ee369 100644 --- a/home/modules/tui/neovim/default.nix +++ b/home/modules/tui/neovim/default.nix @@ -17,10 +17,7 @@ performance = { combinePlugins = { enable = true; - standalonePlugins = [ - "hmts.nvim" - "nvim-treesitter" - ]; + standalonePlugins = [ "hmts.nvim" "nvim-treesitter" ]; }; byteCompileLua.enable = true; }; diff --git a/home/modules/tui/neovim/keymaps.nix b/home/modules/tui/neovim/keymaps.nix index b153d1e..eeb66c4 100644 --- a/home/modules/tui/neovim/keymaps.nix +++ b/home/modules/tui/neovim/keymaps.nix @@ -6,80 +6,69 @@ }; keymaps = let - normal = - lib.mapAttrsToList - (key: action: { - mode = "n"; - inherit action key; - }) - { - "" = ""; + normal = lib.mapAttrsToList (key: action: { + mode = "n"; + inherit action key; + }) { + "" = ""; - # Esc to clear search results - "" = ":noh"; + # Esc to clear search results + "" = ":noh"; - # fix Y behavior - Y = "y$"; + # fix Y behavior + Y = "y$"; - # toggle between two most recent files - "" = ":b#"; + # toggle between two most recent files + "" = ":b#"; - # close by Ctrl+x - "" = ":close"; + # close by Ctrl+x + "" = ":close"; - # save by Space+s or Ctrl+s - "s" = ":w"; - "" = ":w"; + # save by Space+s or Ctrl+s + "s" = ":w"; + "" = ":w"; - # 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 - "" = ":resize -2"; - "" = ":resize +2"; - "" = ":vertical resize +2"; - "" = ":vertical resize -2"; + # resize with arrows + "" = ":resize -2"; + "" = ":resize +2"; + "" = ":vertical resize +2"; + "" = ":vertical resize -2"; - # move current line up/down - # M = Alt - "" = ":move-2"; - "" = ":move+"; - }; - visual = - lib.mapAttrsToList - (key: action: { - mode = "v"; - inherit action key; - }) - { - # better indenting - ">" = ">gv"; - "<" = "" = ">gv"; - "" = "" = ":move-2"; + "" = ":move+"; + }; + visual = lib.mapAttrsToList (key: action: { + mode = "v"; + inherit action key; + }) { + # better indenting + ">" = ">gv"; + "<" = "" = ">gv"; + "" = "s" = ":sort"; - }; - insert = - lib.mapAttrsToList - (key: action: { - mode = "i"; - inherit action key; - }) - { - # Save by Ctrl+s - "" = ":w"; - }; - in - config.lib.nixvim.keymaps.mkKeymaps - {options.silent = true;} - (normal ++ visual ++ insert); + # sort + "s" = ":sort"; + }; + insert = lib.mapAttrsToList (key: action: { + mode = "i"; + inherit action key; + }) { + # Save by Ctrl+s + "" = ":w"; + }; + in config.lib.nixvim.keymaps.mkKeymaps { options.silent = true; } + (normal ++ visual ++ insert); }; } diff --git a/home/modules/tui/neovim/options.nix b/home/modules/tui/neovim/options.nix index af661db..e497623 100644 --- a/home/modules/tui/neovim/options.nix +++ b/home/modules/tui/neovim/options.nix @@ -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 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 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 diff --git a/home/modules/tui/neovim/plugins/comment.nix b/home/modules/tui/neovim/plugins/comment.nix index 428aa11..f5f2557 100644 --- a/home/modules/tui/neovim/plugins/comment.nix +++ b/home/modules/tui/neovim/plugins/comment.nix @@ -1,7 +1,6 @@ { programs.nixvim.plugins.comment = { enable = true; - settings = { opleader.line = ""; toggler.line = ""; diff --git a/home/modules/tui/neovim/plugins/floaterm.nix b/home/modules/tui/neovim/plugins/floaterm.nix index 71df0cf..a54e25f 100644 --- a/home/modules/tui/neovim/plugins/floaterm.nix +++ b/home/modules/tui/neovim/plugins/floaterm.nix @@ -1,12 +1,9 @@ { programs.nixvim.plugins.floaterm = { enable = true; - width = 0.8; height = 0.8; - title = ""; - keymaps.toggle = ","; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/neovim/plugins/harpoon.nix b/home/modules/tui/neovim/plugins/harpoon.nix index 8f3560e..c7ad0f3 100644 --- a/home/modules/tui/neovim/plugins/harpoon.nix +++ b/home/modules/tui/neovim/plugins/harpoon.nix @@ -17,4 +17,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/neovim/plugins/md-preview.nix b/home/modules/tui/neovim/plugins/md-preview.nix index f8f4cc8..c2a3f0b 100644 --- a/home/modules/tui/neovim/plugins/md-preview.nix +++ b/home/modules/tui/neovim/plugins/md-preview.nix @@ -9,12 +9,10 @@ }; }; - files."after/ftplugin/markdown.lua".keymaps = [ - { - mode = "n"; - key = "m"; - action = ":MarkdownPreview"; - } - ]; + files."after/ftplugin/markdown.lua".keymaps = [{ + mode = "n"; + key = "m"; + action = ":MarkdownPreview"; + }]; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/neovim/plugins/telescope.nix b/home/modules/tui/neovim/plugins/telescope.nix index 0eb680c..a282998 100644 --- a/home/modules/tui/neovim/plugins/telescope.nix +++ b/home/modules/tui/neovim/plugins/telescope.nix @@ -30,4 +30,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/neovim/plugins/treesitter.nix b/home/modules/tui/neovim/plugins/treesitter.nix index 64cc1c1..3559050 100644 --- a/home/modules/tui/neovim/plugins/treesitter.nix +++ b/home/modules/tui/neovim/plugins/treesitter.nix @@ -23,4 +23,4 @@ hmts.enable = true; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/neovim/plugins/trim.nix b/home/modules/tui/neovim/plugins/trim.nix index 3e99dd9..5fb33cf 100644 --- a/home/modules/tui/neovim/plugins/trim.nix +++ b/home/modules/tui/neovim/plugins/trim.nix @@ -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" ]; }; }; } diff --git a/home/modules/tui/nix-index.nix b/home/modules/tui/nix-index.nix index c538038..ad343a4 100644 --- a/home/modules/tui/nix-index.nix +++ b/home/modules/tui/nix-index.nix @@ -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; diff --git a/home/modules/tui/shell/aliases.nix b/home/modules/tui/shell/aliases.nix index 62667d1..3313d4b 100644 --- a/home/modules/tui/shell/aliases.nix +++ b/home/modules/tui/shell/aliases.nix @@ -1,6 +1,6 @@ { cat = "bat"; - ccat = "egrep -v '^\s*(#|\\$)'"; + ccat = "egrep -v '^s*(#|\\$)'"; g = "git"; gg = "git graph"; gs = "git status"; diff --git a/home/modules/tui/shell/default.nix b/home/modules/tui/shell/default.nix index 1134b6f..74e7c4f 100644 --- a/home/modules/tui/shell/default.nix +++ b/home/modules/tui/shell/default.nix @@ -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"; }; }; }; } diff --git a/home/modules/tui/shell/eza.nix b/home/modules/tui/shell/eza.nix index 5cdcc05..ff146c7 100644 --- a/home/modules/tui/shell/eza.nix +++ b/home/modules/tui/shell/eza.nix @@ -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"; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/shell/fish/abbrs.nix b/home/modules/tui/shell/fish/abbrs.nix index fb9ca79..7ae4d73 100644 --- a/home/modules/tui/shell/fish/abbrs.nix +++ b/home/modules/tui/shell/fish/abbrs.nix @@ -8,4 +8,4 @@ gc = "git commit -S"; gcm = "git commit -S -m"; }; -} \ No newline at end of file +} diff --git a/home/modules/tui/shell/fish/default.nix b/home/modules/tui/shell/fish/default.nix index 01be065..3afac8a 100644 --- a/home/modules/tui/shell/fish/default.nix +++ b/home/modules/tui/shell/fish/default.nix @@ -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) "; }; }; }; }; diff --git a/home/modules/tui/shell/fish/functions.nix b/home/modules/tui/shell/fish/functions.nix index 29fd767..5cf6574 100644 --- a/home/modules/tui/shell/fish/functions.nix +++ b/home/modules/tui/shell/fish/functions.nix @@ -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 "&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,🌸,🌺,💮"''; }; } diff --git a/home/modules/tui/shell/fish/shell-init.nix b/home/modules/tui/shell/fish/shell-init.nix index 7cf4112..b22c47f 100644 --- a/home/modules/tui/shell/fish/shell-init.nix +++ b/home/modules/tui/shell/fish/shell-init.nix @@ -62,4 +62,4 @@ '' cbonsai -p -m "$(fortune -s -n 300)" -c "&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,🌸,🌺,💮" ''; -} \ No newline at end of file +} diff --git a/home/modules/tui/tmux.nix b/home/modules/tui/tmux.nix index 20d5fdd..e01f21b 100644 --- a/home/modules/tui/tmux.nix +++ b/home/modules/tui/tmux.nix @@ -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}' diff --git a/home/modules/tui/vim.nix b/home/modules/tui/vim.nix index 4268d66..6cb1af5 100644 --- a/home/modules/tui/vim.nix +++ b/home/modules/tui/vim.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: { +{ pkgs, ... }: { programs.vim = { enable = true; # defaultEditor = true; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index a638cfd..bec6184 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -4,4 +4,4 @@ { # List your module files here # my-module = import ./my-module.nix; -} \ No newline at end of file +} diff --git a/nixos/common/global/default.nix b/nixos/common/global/default.nix index 7f4aea3..907ee79 100644 --- a/nixos/common/global/default.nix +++ b/nixos/common/global/default.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"; -} \ No newline at end of file +} diff --git a/nixos/common/global/fish.nix b/nixos/common/global/fish.nix index 7ad7362..e53f255 100644 --- a/nixos/common/global/fish.nix +++ b/nixos/common/global/fish.nix @@ -7,4 +7,4 @@ functions.enable = true; }; }; -} \ No newline at end of file +} diff --git a/nixos/common/global/locale.nix b/nixos/common/global/locale.nix index 77c4c4e..36c6094 100644 --- a/nixos/common/global/locale.nix +++ b/nixos/common/global/locale.nix @@ -14,4 +14,4 @@ }; }; time.timeZone = lib.mkDefault "America/Chicago"; -} \ No newline at end of file +} diff --git a/nixos/common/global/network-manager.nix b/nixos/common/global/network-manager.nix index 4cdbedd..d0e3d46 100644 --- a/nixos/common/global/network-manager.nix +++ b/nixos/common/global/network-manager.nix @@ -1,3 +1,3 @@ { lib, ... }: { systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; -} \ No newline at end of file +} diff --git a/nixos/common/global/nix.nix b/nixos/common/global/nix.nix index 1766ed3..a48c02f 100644 --- a/nixos/common/global/nix.nix +++ b/nixos/common/global/nix.nix @@ -1,5 +1,4 @@ -{ inputs, lib, ... }: -{ +{ inputs, lib, ... }: { nix = { settings = { trusted-users = [ "root" "@wheel" ]; @@ -19,4 +18,4 @@ nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ]; }; -} \ No newline at end of file +} diff --git a/nixos/common/global/tailscale.nix b/nixos/common/global/tailscale.nix index 6703dfa..0e21337 100644 --- a/nixos/common/global/tailscale.nix +++ b/nixos/common/global/tailscale.nix @@ -1,7 +1,6 @@ -{ lib, ... }: -{ +{ lib, ... }: { services.tailscale = { enable = true; useRoutingFeatures = lib.mkDefault "client"; }; -} \ No newline at end of file +} diff --git a/nixos/common/optional/docker.nix b/nixos/common/optional/docker.nix index 06d1c37..af1a7a3 100644 --- a/nixos/common/optional/docker.nix +++ b/nixos/common/optional/docker.nix @@ -1,5 +1 @@ -{ - virtualisation.docker = { - enable = true; - }; -} \ No newline at end of file +{ virtualisation.docker = { enable = true; }; } diff --git a/nixos/common/optional/gnome.nix b/nixos/common/optional/gnome.nix index eb7f589..b73cad6 100644 --- a/nixos/common/optional/gnome.nix +++ b/nixos/common/optional/gnome.nix @@ -9,9 +9,7 @@ wayland = true; }; }; - desktopManager = { - gnome.enable = true; - }; + desktopManager = { gnome.enable = true; }; xkb.layout = "us"; xkb.variant = ""; }; diff --git a/nixos/common/optional/libvirtd.nix b/nixos/common/optional/libvirtd.nix index b0c991e..797f2e5 100644 --- a/nixos/common/optional/libvirtd.nix +++ b/nixos/common/optional/libvirtd.nix @@ -1,5 +1 @@ -{ - virtualisation.libvirtd = { - enable = true; - }; -} \ No newline at end of file +{ virtualisation.libvirtd = { enable = true; }; } diff --git a/nixos/common/optional/pipewire.nix b/nixos/common/optional/pipewire.nix index 1a2be1c..3f87513 100644 --- a/nixos/common/optional/pipewire.nix +++ b/nixos/common/optional/pipewire.nix @@ -8,4 +8,4 @@ pulse.enable = true; jack.enable = true; }; -} \ No newline at end of file +} diff --git a/nixos/common/optional/printing.nix b/nixos/common/optional/printing.nix index e644f6e..c065d55 100644 --- a/nixos/common/optional/printing.nix +++ b/nixos/common/optional/printing.nix @@ -1,5 +1 @@ -{ - services.printing = { - enable = true; - }; -} \ No newline at end of file +{ services.printing = { enable = true; }; } diff --git a/nixos/common/optional/sshd.nix b/nixos/common/optional/sshd.nix index a0d6cf5..bc274ca 100644 --- a/nixos/common/optional/sshd.nix +++ b/nixos/common/optional/sshd.nix @@ -1,3 +1 @@ -{ - services.sshd.enable = true; -} \ No newline at end of file +{ services.sshd.enable = true; } diff --git a/nixos/common/optional/tailscale-exit-node.nix b/nixos/common/optional/tailscale-exit-node.nix index 6332e05..48873c9 100644 --- a/nixos/common/optional/tailscale-exit-node.nix +++ b/nixos/common/optional/tailscale-exit-node.nix @@ -1,6 +1,4 @@ { imports = [ ../global/tailscale.nix ]; - services.tailscale = { - useRoutingFeatures = "both"; - }; -} \ No newline at end of file + services.tailscale = { useRoutingFeatures = "both"; }; +} diff --git a/nixos/common/optional/wireshark.nix b/nixos/common/optional/wireshark.nix index ed52684..a3cf4e5 100644 --- a/nixos/common/optional/wireshark.nix +++ b/nixos/common/optional/wireshark.nix @@ -1,5 +1 @@ -{ - programs.wireshark = { - enable = true; - }; -} \ No newline at end of file +{ programs.wireshark = { enable = true; }; } diff --git a/nixos/common/users/john/default.nix b/nixos/common/users/john/default.nix index 433fee9..cfde6d2 100644 --- a/nixos/common/users/john/default.nix +++ b/nixos/common/users/john/default.nix @@ -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; -} \ No newline at end of file +} diff --git a/nixos/pixnix/default.nix b/nixos/pixnix/default.nix index b9b6cb6..918e78a 100644 --- a/nixos/pixnix/default.nix +++ b/nixos/pixnix/default.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, ... }: { +{ inputs, ... }: { imports = [ inputs.hardware.nixosModules.common-cpu-intel inputs.hardware.nixosModules.common-pc-ssd diff --git a/nixos/pixnix/hardware-configuration.nix b/nixos/pixnix/hardware-configuration.nix index f1c9fba..be1765c 100644 --- a/nixos/pixnix/hardware-configuration.nix +++ b/nixos/pixnix/hardware-configuration.nix @@ -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; } diff --git a/nixpkgs.nix b/nixpkgs.nix index cca12b3..38036ab 100644 --- a/nixpkgs.nix +++ b/nixpkgs.nix @@ -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; -}) \ No newline at end of file +}) diff --git a/overlays/default.nix b/overlays/default.nix index 14f1823..a297485 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -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; -} \ No newline at end of file +} diff --git a/pkgs/default.nix b/pkgs/default.nix index d0f8674..5f57abd 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -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 { }; -} \ No newline at end of file +} diff --git a/pkgs/trekscii/default.nix b/pkgs/trekscii/default.nix index e8c2a88..d894266 100644 --- a/pkgs/trekscii/default.nix +++ b/pkgs/trekscii/default.nix @@ -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; - }; -} \ No newline at end of file + meta = with lib; { platforms = platforms.all; }; +} diff --git a/shell.nix b/shell.nix index da61444..9525915 100644 --- a/shell.nix +++ b/shell.nix @@ -7,4 +7,4 @@ NIX_CONFIG = "experimental-features = nix-command flakes"; nativeBuildInputs = with pkgs; [ nix home-manager git ]; }; -} \ No newline at end of file +}