All my system configs and packages in one repo
at main 140 lines 3.2 kB view raw
1{ 2 pkgs, 3 lib, 4 ... 5}: 6{ 7 hjem.users.leah.packages = with pkgs; [ 8 gh 9 jujutsu 10 difftastic 11 watchman 12 hwatch 13 ]; 14 15 hjem.users.leah.environment.sessionVariables = { 16 DFT_DISPLAY = "inline"; 17 HWATCH = "--no-title --color --mouse --keymap q=force_cancel"; 18 }; 19 20 hjem.users.leah.rum.programs.git = { 21 enable = true; 22 integrations.difftastic.enable = true; 23 24 settings = { 25 advice = { 26 detachedHead = true; 27 }; 28 29 init.defaultBranch = "main"; 30 push.autoSetupRemote = true; 31 url."https://github.com/".insteadOf = "gh:"; 32 gpg.format = "ssh"; 33 34 # GH integration 35 credential = 36 let 37 github.helper = "!${lib.getExe pkgs.gh} auth git-credential"; 38 in 39 { 40 "https://github.com" = github; 41 "https://gist.github.com" = github; 42 }; 43 44 user = { 45 name = "Leah Amelia Chen"; 46 email = "hi@pluie.me"; 47 signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7uJGE2/25M4a3DIVxtnTA5INqWsFGw+49qHXaN/kqy"; 48 }; 49 }; 50 }; 51 52 hjem.users.leah.ext.programs.jujutsu = { 53 enable = true; 54 settings = { 55 user = { 56 name = "Leah Amelia Chen"; 57 email = "hi@pluie.me"; 58 }; 59 60 ui = { 61 default-command = [ "log" ]; 62 diff-formatter = "difft"; 63 pager = "${lib.getExe pkgs.moor} -no-linenumbers"; 64 log-word-wrap = true; 65 }; 66 67 aliases = { 68 tug = [ 69 "bookmark" 70 "move" 71 "--from" 72 "closest_bookmark(@-)" 73 "--to" 74 "closest_pushable(@-)" 75 ]; 76 77 monitor = [ 78 "util" 79 "exec" 80 "--" 81 "hwatch" 82 "--exec" 83 "--limit=1" 84 "--" 85 "jj" 86 "--ignore-working-copy" 87 "log" 88 "--color=always" 89 "-r" 90 "current()" 91 ]; 92 }; 93 94 revsets = { 95 short-prefixes = "current()"; 96 }; 97 98 revset-aliases = { 99 "current()" = "(trunk()..@)::"; 100 "closest_bookmark(to)" = "heads(::to & bookmarks())"; 101 "closest_pushable(to)" = 102 "heads(::to & mutable() & ~description(exact:\"\") & (~empty() | merges()))"; 103 }; 104 105 template-aliases = { 106 "format_short_id(id)" = ''id.shortest(12).prefix() ++ "'" ++ id.shortest(12).rest()''; 107 "format_timestamp(timestamp)" = "timestamp.ago()"; 108 "commit_timestamp(commit)" = "commit.author().timestamp()"; 109 "format_short_signature(signature)" = "signature.name()"; 110 }; 111 112 templates = { 113 git_push_bookmark = ''"pluie/jj-" ++ change_id.short()''; 114 }; 115 116 fix.tools = { 117 nixfmt = { 118 command = [ "nixfmt" ]; 119 patterns = [ "glob:'**/*.nix'" ]; 120 }; 121 }; 122 123 signing = { 124 behavior = "drop"; 125 backend = "ssh"; 126 key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7uJGE2/25M4a3DIVxtnTA5INqWsFGw+49qHXaN/kqy"; 127 }; 128 129 git = { 130 sign-on-push = true; 131 private-commits = "description(glob:'wip:*')"; 132 }; 133 134 fsmonitor = { 135 backend = "watchman"; 136 watchman.register-snapshot-trigger = true; 137 }; 138 }; 139 }; 140}