From d171c086e11530e13c607995cc0efbfd27894c6d Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Wed, 29 Sep 2021 12:31:49 -0400 Subject: [PATCH] First commit with MacBook home.nix --- .gitignore | 1 + macbook-home.nix | 146 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 .gitignore create mode 100644 macbook-home.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3de0997 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +home.nix diff --git a/macbook-home.nix b/macbook-home.nix new file mode 100644 index 0000000..4cf1feb --- /dev/null +++ b/macbook-home.nix @@ -0,0 +1,146 @@ +{ config, pkgs, ... }: + +let + x86pkgs = import { config.allowUnsupportedSystem = true; }; +in +{ + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "nki"; + home.homeDirectory = "/Users/nki"; + + # 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; [ + autoconf + automake + fantasque-sans-mono + fd + flyway + fossil + go # to be configured later + hugo + nnn + postgresql + rust-analyzer + yarn + poppler_utils + + x86pkgs.anki-bin + ]; + + # Programs + programs = { + bat = { + enable = true; + config = { + theme = "GitHub"; + }; + }; + + bottom.enable = true; + + command-not-found.enable = true; + + exa = { + enable = true; + }; + + # later + firefox = {}; + + fish = { + enable = true; + functions = { + }; + + shellAliases = { + cat = "bat --theme=GitHub "; + l = "exa -l --color=always "; + htop = "btm --color nord-light -b --tree"; + Htop = "btm --color nord-light --tree"; + brew64 = "arch -x86_64 /usr/local/bin/brew"; + + # My own commands for easy access + thisterm = "cd ~/Projects/uw/$CURRENT_TERM"; + today = "date +%F"; + }; + + interactiveShellInit = '' + set fish_greeting + + # Set up an editor alias + if test -n "$EDITOR" + alias e="$EDITOR" + else + alias e="kak" + end + + # sudo => pls + source ~/.config/fish/pls.fish + + # set up change_cmd + source ~/.config/fish/change_cmd.fish + + + # Load completion for github + gh completion --shell fish | source + + # Bitwarden + source ~/.config/fish/bw.fish + + # Source iTerm2 integration + source ~/.iterm2_shell_integration.fish + ''; + plugins = [ + { + name = "tide"; + src = pkgs.fetchFromGitHub { + owner = "IlanCosman"; + repo = "tide"; + rev = "3787c725f7f6a0253f59a2c0e9fde03202689c6c"; + sha256 = "00zsib1q21bgxffjlyxf5rgcyq3h1ixwznwvid9k6mkkmwixv9lj"; + }; + } + { + name = "fzf"; + src = pkgs.fetchFromGitHub { + owner = "jethrokuan"; + repo = "fzf"; + rev = "479fa67d7439b23095e01b64987ae79a91a4e283"; + sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v"; + }; + } + ]; + }; + + fzf = { + enable = true; + enableFishIntegration = true; + }; + + gh = { + enable = true; + gitProtocol = "ssh"; + }; + + jq.enable = true; + + nushell.enable = true; + }; + + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "21.11"; +}