feat: some more home-manager programs

This commit is contained in:
Sangmin Kim 2026-03-04 22:30:52 +09:00 committed by Poby
parent 54297f94fd
commit 88baae6581
No known key found for this signature in database
8 changed files with 35 additions and 118 deletions

View file

@ -15,7 +15,7 @@
inputs.nixpkgs.follows = "nixpkgs-darwin"; inputs.nixpkgs.follows = "nixpkgs-darwin";
}; };
darwin = { darwin = {
url = "github:lnl7/nix-darwin/nix-darwin-${stableVersion}"; url = "github:nix-darwin/nix-darwin/nix-darwin-${stableVersion}";
inputs.nixpkgs.follows = "nixpkgs-darwin"; inputs.nixpkgs.follows = "nixpkgs-darwin";
}; };

View file

@ -1,58 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
# archives
zip
xz
unzip
p7zip
(pkgs.writeShellApplication {
name = "ns";
runtimeInputs = with pkgs; [
fzf
nix-search-tv
];
text = builtins.readFile "${pkgs.nix-search-tv.src}/nixpkgs.sh";
})
# utils
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
cowsay
file
which
tree
gnused
gnutar
gawk
zstd
caddy
gnupg
# productivity
glow # markdown previewer in terminal
];
programs = {
# terminal file manager
yazi = {
enable = true;
enableZshIntegration = true;
settings = {
manager = {
show_hidden = true;
sort_dir_first = true;
};
};
};
# skim provides a single executable: sk.
# Basically anywhere you would want to use grep, try sk instead.
skim = {
enable = true;
enableBashIntegration = true;
};
};
}

View file

@ -15,6 +15,8 @@
./zsh.nix ./zsh.nix
./eza.nix ./eza.nix
./jq.nix ./jq.nix
./lazygit.nix
./mise.nix
]; ];
home = { home = {
@ -22,9 +24,8 @@
homeDirectory = "/Users/${username}"; homeDirectory = "/Users/${username}";
stateVersion = "25.11"; stateVersion = "25.11";
# packages that are not available via programs
packages = with pkgs; [ packages = with pkgs; [
tree
yq-go
# nix-search-tv # nix-search-tv
(writeShellApplication { (writeShellApplication {
name = "ns"; name = "ns";

7
home/lazygit.nix Normal file
View file

@ -0,0 +1,7 @@
{
programs.lazygit = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
};
}

18
home/mise.nix Normal file
View file

@ -0,0 +1,18 @@
{
progrmas.mise = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
globalConfig = {
tools = {
node = "lts";
uv = "latest";
};
settings = {
experimental = true;
env_file = ".env";
};
};
};
}

View file

@ -13,9 +13,8 @@
shellAliases = { shellAliases = {
poby = "echo my name is poby"; poby = "echo my name is poby";
nrs = "sudo nixos-rebuild switch --flake ~/nixos#$(hostname)"; drs = "sudo darwin-rebuild switch --flake ~/nix-darwin#$(hostname)";
nrt = "sudo nixos-rebuild test --flake ~/nixos#$(hostname)"; drt = "sudo darwin-rebuild test --flake ~/nix-darwin#$(hostname)";
hms = "home-manager switch -b backup --flake ~/nixos#$(whoami)";
}; };
sessionVariables = { sessionVariables = {

View file

@ -5,6 +5,7 @@
git git
neovim neovim
just # use Justfile to simplify nix-darwin's commands just # use Justfile to simplify nix-darwin's commands
tree
]; ];
environment.variables.EDITOR = "nvim"; environment.variables.EDITOR = "nvim";
@ -26,15 +27,12 @@
taps = []; taps = [];
# WARNING only include those not in nixpkgs # WARNING only include those not in nixpkgs
brews = [ brews = [];
# "neovim"
# "ripgrep"
# "fd"
];
casks = [ casks = [
"batfi" "batfi"
"hammerspoon" "hammerspoon"
# TODO use nixpkgs when possible
# "google-chrome" # "google-chrome"
# "iina" # "iina"
# "jordanbaird-ice" # "jordanbaird-ice"
@ -42,17 +40,6 @@
# "shottr" # "shottr"
# "raycast" # "raycast"
# "stats" # "stats"
# Fonts
"font-fontawesome"
"font-jetbrains-mono-nerd-font"
"font-meslo-lg-nerd-font"
"font-d2coding"
"font-fira-code-nerd-font"
"font-symbols-only-nerd-font"
"font-material-design-icons-webfont"
"font-pretendard"
"font-maple-mono-nf"
]; ];
}; };
} }

View file

@ -11,6 +11,7 @@
primaryUser = username; primaryUser = username;
stateVersion = 6; stateVersion = 6;
# symlink /Applications/Nix Apps to /Applications for Spotlight
activationScripts.extraActivation.text = '' activationScripts.extraActivation.text = ''
# activateSettings -u will reload the settings from the database and apply them to the current session, # activateSettings -u will reload the settings from the database and apply them to the current session,
# so we do not need to logout and login again to make the changes take effect. # so we do not need to logout and login again to make the changes take effect.
@ -177,52 +178,14 @@
# Add ability to used TouchID for sudo authentication # Add ability to used TouchID for sudo authentication
security.pam.services.sudo_local.touchIdAuth = true; security.pam.services.sudo_local.touchIdAuth = true;
# Create /etc/zshrc that loads the nix-darwin environment.
# this is required if you want to use darwin's default shell - zsh
programs.zsh = { programs.zsh = {
enable = true; enable = true;
# enableCompletion = true;
# enableAutosuggestions = true;
# enableFastSyntaxHighlighting = true;
# enableFzfCompletion = true;
# enableFzfGit = true;
# enableFzfHistory = true;
# promptInit = ''
# source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
# source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
# '';
}; };
environment = { environment = {
shells = [ shells = [
pkgs.zsh pkgs.zsh
]; ];
# shellAliases = {
# ls = "lsd --color=auto";
# l = "lsd -lhG";
# lt = "l --tree";
# ll = "lsd -alhG";
# lh = "lsd -dl .*";
# lsd = "lsd --group-directories-first";
# filecount = "find . -type f | wc -l";
# cat = "bat --color=always";
# man = "tldr";
# nixrebuild = "sudo darwin-rebuild switch --flake ~/.config/nix-darwin";
# nixupgrade = "cd ~/.config/nix-darwin && nix flake update";
# nixconfig = "nvim ~/.config/nix-darwin";
# sshconfig = "nvim ~/.ssh/config";
#
# # git
# g = "git";
# gaa = "git add --all";
# gcm = "git commit -m";
# gca = "git commit --amend";
# gst = "git status";
# gco = "git checkout";
# gl = "git pull";
# gp = "git push";
# glg = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short";
# };
}; };
fonts = { fonts = {