2023-12-10 05:55:07 +00:00
|
|
|
{
|
2024-02-06 10:08:36 +00:00
|
|
|
inputs,
|
2023-12-10 05:55:07 +00:00
|
|
|
pkgs,
|
|
|
|
config,
|
2024-03-20 15:01:42 +00:00
|
|
|
lib,
|
2023-12-10 05:55:07 +00:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
home = {
|
2024-03-20 15:01:42 +00:00
|
|
|
# for nix-on-droid
|
|
|
|
username = lib.mkDefault "guanranwang";
|
2023-12-10 05:55:07 +00:00
|
|
|
homeDirectory =
|
2024-03-20 15:01:42 +00:00
|
|
|
lib.mkDefault
|
|
|
|
(
|
|
|
|
if pkgs.stdenv.hostPlatform.isDarwin
|
|
|
|
then "/Users/${config.home.username}"
|
|
|
|
else "/home/${config.home.username}"
|
|
|
|
);
|
2023-12-10 05:55:07 +00:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
stateVersion = "23.05";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Let Home Manager install and manage itself.
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
|
|
|
|
# Default applications
|
|
|
|
imports = [
|
2024-02-27 07:38:36 +00:00
|
|
|
inputs.nur.hmModules.nur
|
2023-12-10 05:55:07 +00:00
|
|
|
|
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
|
2023-12-10 05:55:07 +00:00
|
|
|
./applications/git
|
2024-01-01 13:31:28 +00:00
|
|
|
./applications/gpg
|
2024-07-03 13:01:39 +00:00
|
|
|
./applications/neovim
|
2024-03-26 08:49:35 +00:00
|
|
|
./applications/starship
|
2023-12-10 05:55:07 +00:00
|
|
|
./applications/tealdeer
|
2024-07-03 13:01:39 +00:00
|
|
|
./applications/tmux
|
2023-12-10 05:55:07 +00:00
|
|
|
];
|
|
|
|
|
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-06-14 23:25:48 +00:00
|
|
|
home.packages =
|
|
|
|
(with pkgs; [
|
|
|
|
fd
|
|
|
|
fastfetch
|
|
|
|
])
|
|
|
|
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux (with pkgs; [
|
|
|
|
trashy
|
|
|
|
]);
|
2024-03-26 08:49:35 +00:00
|
|
|
|
2023-12-10 05:55:07 +00:00
|
|
|
home.shellAliases = {
|
|
|
|
".." = "cd ..";
|
|
|
|
"farsee" = "curl -F 'c=@-' 'https://fars.ee/'"; # pb
|
|
|
|
};
|
2024-06-05 09:51:01 +00:00
|
|
|
|
2024-06-12 13:27:05 +00:00
|
|
|
programs.fish.functions = let
|
|
|
|
jq = lib.getExe pkgs.jq;
|
|
|
|
nix = lib.getExe pkgs.nix;
|
|
|
|
curl = lib.getExe pkgs.curl;
|
|
|
|
in {
|
|
|
|
"pb" = ''
|
2024-06-05 09:51:01 +00:00
|
|
|
${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 | \
|
2024-06-14 17:59:56 +00:00
|
|
|
${jq} '.[].github | "@" + .' -r
|
2024-06-12 13:27:05 +00:00
|
|
|
'';
|
2024-06-05 09:51:01 +00:00
|
|
|
};
|
2023-12-10 05:55:07 +00:00
|
|
|
}
|