Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #home.nix
- { config, pkgs, ... }:
- {
- home.username = "ben";
- home.homeDirectory = "/Users/ben";
- home.stateVersion = "24.05";
- home.packages = with pkgs; [
- ripgrep #
- zsh-autosuggestions
- zsh-autocomplete
- zsh-fast-syntax-highlighting
- lsof
- zoxide
- thefuck
- wget
- tealdeer
- trash-cli
- nixpkgs-fmt
- nixd
- ani-cli
- aria2
- fzf
- yt-dlp
- wget
- helix
- ];
- home.file = {
- # ".config/path/to/file".text = ''{ text }'';
- };
- home.sessionVariables = {
- ZSH = "$HOME/.oh-my-zsh";
- PATH = let
- homebrewPaths = "/opt/homebrew/bin:/opt/homebrew/sbin";
- nixPaths = "/run/current-system/sw/bin:${pkgs.nix}/bin:/nix/var/nix/profiles/default/bin";
- customPaths = "${pkgs.bat}/bin;${pkgs.ripgrep}/bin;${pkgs.helix}/bin;${pkgs.trash-cli}/bin;${pkgs.qemu}/bin;${pkgs.coreutils}/bin:${pkgs.tealdeer}/bin:${pkgs.wget}/bin:${pkgs.ani-cli}/bin:${pkgs.zoxide}/bin:${pkgs.lsof}/bin:${pkgs.eza}/bin:${pkgs.fzf}/bin:${pkgs.thefuck}/bin";
- systemPaths = "/usr/local/bin:/usr/bin:/bin:/sbin";
- whalebrewPath = "/opt/whalebrew/bin";
- in
- "${homebrewPaths}:${customPaths}:${nixPaths}:${systemPaths}:${whalebrewPath}";
- HOMEBREW_CASK_OPTS = "--no-quarantine";
- WHALEBREW_INSTALL_PATH = "/opt/homebrew/bin";
- };
- programs.home-manager.enable = true;
- programs.alacritty = {
- enable = true;
- settings = {
- font = {
- normal = {
- family = "JetBrainsMono Nerd Font";
- style = "Regular";
- };
- bold = {
- family = "JetBrainsMono Nerd Font";
- style = "Bold";
- };
- size = 12.0;
- };
- window = {
- padding = {
- x = 10;
- y = 10;
- };
- decorations = "full"; # Can be set to "full", "none", etc.
- opacity = 0.95;
- };
- };
- };
- programs.eza = {
- enable = true;
- enableZshIntegration = true;
- icons = "auto";
- extraOptions = [
- "--header"
- "-1"
- "--no-filesize"
- "--no-user"
- "--long"
- "--classify=always"
- "--group-directories-first"
- ];
- };
- programs.zsh = {
- enable = true;
- oh-my-zsh = {
- enable = true;
- theme = "robbyrussell";
- plugins = [
- "eza"
- "macos"
- "history"
- "history-substring-search"
- ];
- };
- shellAliases = {
- darwin-switch = "darwin-rebuild switch --flake ~/.config/nix-darwin#mini";
- darwin-upgrade = "nix upgrade-nix && darwin-rebuild switch --flake ~/.config/nix-darwin#mini";
- ls = "eza";
- };
- initExtra = ''
- eval "$(fzf --zsh)"
- eval "$(conda shell.zsh hook)"
- eval "$(thefuck --alias)"
- eval "$(/opt/homebrew/bin/brew shellenv)"
- if command -v ngrok &>/dev/null; then
- eval "$(ngrok completion)"
- fi
- '';
- };
- programs.zoxide = {
- enable = true;
- enableZshIntegration = true;
- options = [
- "--cmd cd"
- ];
- };
- programs.helix = {
- enable = true;
- languages.language = [
- {
- name = "nix";
- scope = "source.nix";
- injection-regex = "nix";
- file-types = [ "nix" ];
- comment-token = "#";
- auto-format = true;
- formatter = {
- command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
- };
- language-servers = [
- "nil"
- "nixd"
- ];
- indent = {
- tab-width = 2;
- unit = " ";
- };
- grammar = "nix";
- }
- ];
- settings = {
- theme = "onedarker";
- editor = {
- line-number = "relative";
- mouse = false;
- cursor-shape = {
- insert = "bar";
- normal = "block";
- select = "underline";
- };
- file-picker = {
- hidden = false;
- };
- };
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement