root | 4418e29 | 2022-05-19 07:03:04 +0100 | [diff] [blame] | 1 | { config, pkgs, nixpkgs, ... }: |
| 2 | let |
| 3 | username = "minion"; |
| 4 | homedir = "/home/${username}"; |
| 5 | |
| 6 | comma = import ( pkgs.fetchFromGitHub { |
| 7 | owner = "nix-community"; |
| 8 | repo = "comma"; |
| 9 | rev = "02e3e5545b0c62595a77f3d5de1223c536af0614"; |
| 10 | sha256 = "sha256-WBIQmwlkb/GMoOq+Dnyrk8YmgiM/wJnc5HYZP8Uw72E="; |
| 11 | }) {}; |
| 12 | |
| 13 | in { |
| 14 | # Home Manager needs a bit of information about you and the |
| 15 | # paths it should manage. |
| 16 | home.username = username; |
| 17 | home.homeDirectory = homedir; |
| 18 | |
| 19 | |
| 20 | programs.go.enable = true; |
| 21 | |
| 22 | # programs.steam.enable = true; |
| 23 | |
| 24 | programs.gpg.enable = true; |
| 25 | services.gpg-agent = { |
| 26 | enable = true; |
| 27 | pinentryFlavor = "qt"; |
| 28 | }; |
| 29 | |
| 30 | nixpkgs.overlays = [ |
| 31 | (import ./overlays/anytype.nix) |
| 32 | (import ./overlays/mindustry.nix) |
| 33 | (import ./overlays/nur.nix) |
| 34 | ]; |
| 35 | |
| 36 | home.packages = with pkgs; [ |
| 37 | |
| 38 | ]; |
| 39 | |
| 40 | programs.zsh = { |
| 41 | enable = true; |
| 42 | oh-my-zsh = { |
| 43 | enable = true; |
| 44 | plugins = [ "git" ]; |
| 45 | theme = "crunch"; |
| 46 | }; |
| 47 | history = { |
| 48 | size = 10000; |
| 49 | path = "${config.xdg.dataHome}/zsh/history"; |
| 50 | expireDuplicatesFirst = true; |
| 51 | extended = true; |
| 52 | }; |
| 53 | initExtra = '' |
| 54 | bindkey "\'\'$\{key[Up]}" up-line-or-search |
| 55 | |
| 56 | command_not_found_handler () |
| 57 | { |
| 58 | # echo "Command '$1' not found, searching for it in the Nix store..." |
| 59 | # , $@ |
| 60 | local p='/nix/store/ycclzpk99snlrk8sg9n4j8pm1927gavw-command-not-found/bin/command-not-found'; |
| 61 | if [ -x "$p" ] && [ -f '/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite' ]; then |
| 62 | "$p" "$@" 2>&1 | sed -r 's/nix-shell -p (\S+)/nix shell nixpkgs#\1/g' 1>&2; |
| 63 | if [ $? = 126 ]; then |
| 64 | "$@"; |
| 65 | else |
| 66 | return 127; |
| 67 | fi; |
| 68 | else |
| 69 | echo "$1: command not found" 1>&2; |
| 70 | return 127; |
| 71 | fi |
| 72 | } |
| 73 | ''; |
| 74 | enableSyntaxHighlighting = true; |
| 75 | enableAutosuggestions = true; |
| 76 | autocd = true; |
| 77 | dotDir = ".local/share/zsh"; |
| 78 | }; |
| 79 | |
| 80 | programs.git = { |
| 81 | enable = true; |
| 82 | |
| 83 | userName = "Skyler Turner"; |
| 84 | userEmail = "skyler@clicksminuteper.net"; |
| 85 | |
| 86 | signing = { |
| 87 | key = "24D31D3B1B986F33"; |
| 88 | signByDefault = true; |
| 89 | gpgPath = "gpg2"; |
| 90 | }; |
| 91 | |
| 92 | lfs.enable = true; |
| 93 | delta.enable = true; |
| 94 | |
| 95 | extraConfig = { |
| 96 | init.defaultBranch = "development"; |
| 97 | color.ui = "auto"; |
| 98 | core.autocrlf = "input"; |
| 99 | pull.rebase = false; |
| 100 | }; |
| 101 | }; |
| 102 | |
| 103 | # This value determines the Home Manager release that your |
| 104 | # configuration is compatible with. This helps avoid breakage |
| 105 | # when a new Home Manager release introduces backwards |
| 106 | # incompatible changes. |
| 107 | # |
| 108 | # You can update Home Manager without changing this value. See |
| 109 | # the Home Manager release notes for a list of state version |
| 110 | # changes in each release. |
| 111 | home.stateVersion = "21.11"; |
| 112 | |
| 113 | # Let Home Manager install and manage itself. |
| 114 | programs.home-manager.enable = true; |
| 115 | } |