flake/home/default.nix

56 lines
1.1 KiB
Nix
Raw Normal View History

{
lib,
2024-08-24 09:12:08 +00:00
pkgs,
...
}:
{
home = {
2024-07-31 04:20:10 +00:00
username = "guanranwang";
2024-08-24 09:12:08 +00:00
homeDirectory = "/home/guanranwang";
stateVersion = "23.05";
};
imports = [
2024-03-26 08:49:35 +00:00
./applications/atuin
2024-04-22 18:35:50 +00:00
./applications/bash
2024-03-26 08:49:35 +00:00
./applications/bat
./applications/eza
2024-04-22 18:35:50 +00:00
./applications/fish
./applications/git
2024-01-01 13:31:28 +00:00
./applications/gpg
2024-07-03 13:01:39 +00:00
./applications/neovim
2024-07-24 16:52:39 +00:00
./applications/ssh
2024-03-26 08:49:35 +00:00
./applications/starship
./applications/tealdeer
2024-07-03 13:01:39 +00:00
./applications/tmux
];
2024-07-03 11:15:17 +00:00
programs.jq.enable = true;
2024-03-26 08:49:35 +00:00
programs.ripgrep.enable = true;
2024-07-17 03:35:59 +00:00
programs.skim.enable = true;
2024-03-26 08:49:35 +00:00
programs.zoxide.enable = true;
2024-08-24 09:12:08 +00:00
home.packages = with pkgs; [
fastfetch
fd
];
2024-03-26 08:49:35 +00:00
programs.fish.functions =
let
jq = lib.getExe pkgs.jq;
nix = lib.getExe pkgs.nix;
curl = lib.getExe pkgs.curl;
in
{
"pb" = ''
${jq} -Rns '{text: inputs}' | \
${curl} -s -H 'Content-Type: application/json' --data-binary @- https://pb.ny4.dev | \
${jq} -r '. | "https://pb.ny4.dev\(.path)"'
'';
2024-06-12 13:27:05 +00:00
"getmnter" = ''
${nix} eval nixpkgs#{$argv}.meta.maintainers --json | \
${jq} '.[].github | "@" + .' -r
'';
};
}