# Universe - The big bang to my universe # # Copyright (c) 2023-2024 Sameer Rahmani # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . { config, lib, pkgs, ... }@params: { home.username = "mary"; home.homeDirectory = "/home/mary"; home.file.".config/mpv/mpv.conf".source = ./mpv.conf; # set cursor size and dpi for 4k monitor xresources.properties = { "Xcursor.size" = lib.mkDefault 16; "Xft.dpi" = 96; # 72 "Xft.autohint" = 0; "Xft.lcdfilter" = "lcddefault"; "Xft.hintstyle" = "hintfull"; "Xft.hinting" = 1; "Xft.antialias" = 1; # Xft.rgba: rgb }; fonts.fontconfig.enable = true; home.extraOutputsToInstall = [ "man" ]; # Packages that should be installed to the user profile. home.packages = with pkgs; [ params.fg42 # archives zip xz unzip # browsers librewolf firefox # utils ripgrep eza # A modern replacement for ‘ls’ fzf # A command-line fuzzy finder fd # alternative to find sysstat lm_sensors # networking tools mtr # A network diagnostic tool iperf3 # A TCP, UDP, and SCTP network bandwidth measurement tool dnsutils # `dig` + `nslookup` ldns # replacement of `dig`, it provide the command `drill` aria2 # A lightweight multi-protocol & multi-source command-line download utility socat # replacement of openbsd-netcat nmap # A utility for network discovery and security auditing # misc file which tree gnused gnutar gawk zstd gnupg libnotify # nix related # # it provides the command `nom` works just like `nix` # with more details log output nix-output-monitor nix-tree nix-index nixfmt # productivity btop # replacement of htop/nmon iotop # io monitoring iftop # network monitoring # system call monitoring strace # system call monitoring ltrace # library call monitoring lsof # list open files # system tools sysstat lm_sensors # for `sensors` command ethtool pciutils usbutils vazir-fonts fira-code nerdfonts thefuck # Pdf stuff poppler_utils protonvpn-gui yubioath-flutter yubikey-manager shotwell flameshot ]; # basic configuration of git, please change to your own programs.git = { enable = true; package = pkgs.gitFull; userName = "Mary"; userEmail = "mary@codamic.tech"; aliases = { co = "checkout"; br = "branch"; ci = "commit"; st = "status"; unstage = "reset HEAD --"; last = "log -1 HEAD"; lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"; brs = "for-each-ref --sort='-authordate:iso8601' --count 20 --format=' %(color:green)%(authordate:relative)%09%(if)%(HEAD)%(then)%(color:brightwhite)*%(else)%(color:white) %(end)%(refname:short)%09%(color:yellow)%(authorname)%(authoremail)' refs/heads"; e = "emacsclient"; }; signing = { key = "0x9F6E28D6ABA86BCD"; signByDefault = true; }; difftastic.enable = true; # delta.enable = true; extraConfig = { core = { abbrev = 12; excludesFile = "${./git/gitignore}"; }; pretty = { fixes = "Fixes: %h (\"%s\")"; }; url."git@github.com:" = { insteadOf = "https://github.com/"; }; status.submoduleSummary = true; pull.rebase = false; http.sslVerify = true; }; }; # starship - an customizable prompt for any shell programs.starship = { enable = true; # custom settings settings = { add_newline = true; aws.disabled = true; gcloud.disabled = true; line_break.disabled = true; }; }; programs.alacritty = { enable = true; # custom settings settings = { env.TERM = "xterm-256color"; font = { size = lib.mkDefault 10; }; scrolling.multiplier = 5; selection.save_to_clipboard = true; }; }; programs.zsh = { enable = true; autocd = true; enableAutosuggestions = true; enableCompletion = true; shellAliases = { sl = "exa"; ls = "exa"; l = "exa -l"; la = "exa -la"; ip = "ip --color=auto"; g = "git"; pu = "git push origin $(git branch --show-current)"; pl = "git pull origin $(git branch --show-current)"; Ps = "ps -aux |grep "; d = "docker"; n = "nix"; ew = "emacs -nw"; F = "find . -iname"; f = "fd"; _ = "sudo"; rebuild = "sudo nixos-rebuild switch --flake '/home/mary/src/Universe#maryland'"; "..." = "../.."; "...." = "../../.."; "....." = "../../../.."; "......" = "../../../../.."; "yubi_switch" = ''gpg-connect-agent "scd serialno" "learn --force" /bye''; }; initExtra = '' bindkey '^ ' autosuggest-accept eval $(thefuck --alias) autopair-init ''; plugins = with pkgs; [ { name = "formarks"; src = fetchFromGitHub { owner = "wfxr"; repo = "formarks"; rev = "8abce138218a8e6acd3c8ad2dd52550198625944"; sha256 = "1wr4ypv2b6a2w9qsia29mb36xf98zjzhp3bq4ix6r3cmra3xij90"; }; file = "formarks.plugin.zsh"; } { name = "zsh-syntax-highlighting"; src = fetchFromGitHub { owner = "zsh-users"; repo = "zsh-syntax-highlighting"; rev = "0.6.0"; sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4"; }; file = "zsh-syntax-highlighting.zsh"; } { name = "zsh-abbrev-alias"; src = fetchFromGitHub { owner = "momo-lab"; repo = "zsh-abbrev-alias"; rev = "637f0b2dda6d392bf710190ee472a48a20766c07"; sha256 = "16saanmwpp634yc8jfdxig0ivm1gvcgpif937gbdxf0csc6vh47k"; }; file = "abbrev-alias.plugin.zsh"; } { name = "zsh-autopair"; src = fetchFromGitHub { owner = "hlissner"; repo = "zsh-autopair"; rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49"; sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"; }; file = "autopair.zsh"; } ]; }; programs.fzf = { enable = true; enableZshIntegration = true; }; systemd.user.sessionVariables.TMUX_FZF_LAUNCH_KEY = "Tab"; programs.tmux = { enable = true; terminal = "tmux-256color"; historyLimit = 100000; keyMode = "emacs"; prefix = "M-Space"; baseIndex = 1; plugins = (with pkgs.tmuxPlugins; [ jump tmux-fzf ]); extraConfig = '' unbind C-b set -g @jump-key ')' bind C-b copy-mode -u bind Space copy-mode bind enter new-window bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i" bind-key -T copy-mode m send-keys -X page-up bind-key -T copy-mode n send-keys -X page-down set-option -g visual-activity off set-option -g visual-bell off set-option -g visual-silence off set-window-option -g monitor-activity off set-option -g bell-action none set -g @net_speed_interfaces "wlp8s0" set -g status-right '%m-%d %H:%M ' ''; }; programs.mpv.enable = true; programs.obs-studio.enable = true; # Let home Manager install and manage itself. programs.home-manager.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 = "24.05"; services.network-manager-applet.enable = true; programs.gpg = { enable = true; scdaemonSettings = { disable-ccid = true; }; homedir = lib.mkForce "/home/mary/.gnupg"; }; services.gpg-agent = { enable = true; enableSshSupport = lib.mkForce false; }; gtk = { enable = true; iconTheme.package = pkgs.gnome.adwaita-icon-theme; iconTheme.name = "Adwaita"; }; qt = { platformTheme = "gtk"; }; programs.direnv = { enable = true; enableBashIntegration = true; # see note on other shells below nix-direnv.enable = true; }; services.ssh-agent.enable = true; }