From 74d81a4e6345576f488c4d86a8151de142241af9 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sat, 30 Oct 2021 12:10:54 -0400 Subject: [PATCH] Re-format common --- home/common.nix | 224 +++++++++++++++++++++++++----------------------- 1 file changed, 115 insertions(+), 109 deletions(-) diff --git a/home/common.nix b/home/common.nix index 8217ada..8b051e3 100644 --- a/home/common.nix +++ b/home/common.nix @@ -1,126 +1,132 @@ { config, pkgs, lib, ... }: { - imports = [ - ./kakoune/kak.nix - ./fish/fish.nix - ]; + imports = [ + ./kakoune/kak.nix + ./fish/fish.nix + ]; - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; - # Enable the manual so we don't have to load it - manual.html.enable = true; + # Enable the manual so we don't have to load it + manual.html.enable = true; - # Packages that are not in programs section - home.packages = with pkgs; [ - # Build Tools - ## C++ - autoconf - automake - ## SQL - flyway - ## Go - go # to be configured later - ## Rust - rust-analyzer - ## JavaScript - yarn - ## Nix - cachix - rnix-lsp + # Packages that are not in programs section + home.packages = with pkgs; [ + # Build Tools + ## C++ + autoconf + automake + ## SQL + flyway + ## Go + go # to be configured later + ## Rust + rust-analyzer + ## JavaScript + yarn + ## Nix + cachix + rnix-lsp - # Fonts - fantasque-sans-mono - ## Enable the FSM font with NF variant - (nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + # Fonts + fantasque-sans-mono + ## Enable the FSM font with NF variant + (nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) - # CLI tools - fd - fossil - ## Blog generator - hugo - ## File Manager - nnn - ## PDF Processors - poppler_utils - ## htop replacement - bottom + # CLI tools + fd + fossil + ## Blog generator + hugo + ## File Manager + nnn + ## PDF Processors + poppler_utils + ## htop replacement + bottom - ## To do tunneling with cloudflare - cloudflared + ## To do tunneling with cloudflare + cloudflared - # Databases - postgresql - ]; + # Databases + postgresql + ]; - home.sessionVariables = { - # Bat theme - BAT_THEME = "GitHub"; - # Editor - EDITOR = "kak"; + home.sessionVariables = { + # Bat theme + BAT_THEME = "GitHub"; + # Editor + EDITOR = "kak"; + }; + + home.sessionPath = [ + # Sometimes we want to install custom scripts here + "~/.local/bin" + ]; + + # Programs + programs = { + bat = { + enable = true; + config = { + theme = "GitHub"; + }; }; - home.sessionPath = [ - # Sometimes we want to install custom scripts here - "~/.local/bin" - ]; + broot.enable = true; - # Programs - programs = { - bat = { - enable = true; - config = { - theme = "GitHub"; - }; - }; + direnv.enable = true; + direnv.nix-direnv.enable = true; + direnv.nix-direnv.enableFlakes = true; - broot.enable = true; - - direnv.enable = true; - direnv.nix-direnv.enable = true; - direnv.nix-direnv.enableFlakes = true; - - exa = { - enable = true; - enableAliases = true; - }; - - # later - firefox = {}; - - fzf = { - enable = true; - enableFishIntegration = true; - }; - - gh = { - enable = true; - gitProtocol = lib.mkIf (config.home.stateVersion == "21.05") "ssh"; - settings.git_protocol = lib.mkIf (config.home.stateVersion == "21.11") "ssh"; - }; - - git = { - enable = true; - delta = { - enable = true; - options = { - line-numbers = true; - }; - }; - signing.key = null; - signing.signByDefault = true; - userEmail = "nki@nkagami.me"; - userName = "Natsu Kagami"; - extraConfig = { - init.defaultBranch = "master"; - }; - }; - - gpg.enable = true; - - jq.enable = true; - - nushell.enable = true; + exa = { + enable = true; + enableAliases = true; }; + + # later + firefox = { }; + + fzf = { + enable = true; + enableFishIntegration = true; + }; + + gh = { + enable = true; + } // ( + let + protocol = "ssh"; + in + if (config.home.stateVersion == "21.05") then + { gitProtocol = "ssh"; } + else + { settings.git_protocol = protocol; } + ); + + git = { + enable = true; + delta = { + enable = true; + options = { + line-numbers = true; + }; + }; + signing.key = null; + signing.signByDefault = true; + userEmail = "nki@nkagami.me"; + userName = "Natsu Kagami"; + extraConfig = { + init.defaultBranch = "master"; + }; + }; + + gpg.enable = true; + + jq.enable = true; + + nushell.enable = true; + }; }