mirror of
https://github.com/smg1024/nix-darwin.git
synced 2026-05-22 20:32:59 +09:00
feat: some more home-manager programs
This commit is contained in:
parent
54297f94fd
commit
88baae6581
8 changed files with 35 additions and 118 deletions
|
|
@ -15,7 +15,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
};
|
||||
darwin = {
|
||||
url = "github:lnl7/nix-darwin/nix-darwin-${stableVersion}";
|
||||
url = "github:nix-darwin/nix-darwin/nix-darwin-${stableVersion}";
|
||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -15,6 +15,8 @@
|
|||
./zsh.nix
|
||||
./eza.nix
|
||||
./jq.nix
|
||||
./lazygit.nix
|
||||
./mise.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
|
|
@ -22,9 +24,8 @@
|
|||
homeDirectory = "/Users/${username}";
|
||||
stateVersion = "25.11";
|
||||
|
||||
# packages that are not available via programs
|
||||
packages = with pkgs; [
|
||||
tree
|
||||
yq-go
|
||||
# nix-search-tv
|
||||
(writeShellApplication {
|
||||
name = "ns";
|
||||
|
|
|
|||
7
home/lazygit.nix
Normal file
7
home/lazygit.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
}
|
||||
18
home/mise.nix
Normal file
18
home/mise.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -13,9 +13,8 @@
|
|||
|
||||
shellAliases = {
|
||||
poby = "echo my name is poby";
|
||||
nrs = "sudo nixos-rebuild switch --flake ~/nixos#$(hostname)";
|
||||
nrt = "sudo nixos-rebuild test --flake ~/nixos#$(hostname)";
|
||||
hms = "home-manager switch -b backup --flake ~/nixos#$(whoami)";
|
||||
drs = "sudo darwin-rebuild switch --flake ~/nix-darwin#$(hostname)";
|
||||
drt = "sudo darwin-rebuild test --flake ~/nix-darwin#$(hostname)";
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
git
|
||||
neovim
|
||||
just # use Justfile to simplify nix-darwin's commands
|
||||
tree
|
||||
];
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
|
|
@ -26,15 +27,12 @@
|
|||
taps = [];
|
||||
|
||||
# WARNING only include those not in nixpkgs
|
||||
brews = [
|
||||
# "neovim"
|
||||
# "ripgrep"
|
||||
# "fd"
|
||||
];
|
||||
brews = [];
|
||||
|
||||
casks = [
|
||||
"batfi"
|
||||
"hammerspoon"
|
||||
# TODO use nixpkgs when possible
|
||||
# "google-chrome"
|
||||
# "iina"
|
||||
# "jordanbaird-ice"
|
||||
|
|
@ -42,17 +40,6 @@
|
|||
# "shottr"
|
||||
# "raycast"
|
||||
# "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"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
primaryUser = username;
|
||||
stateVersion = 6;
|
||||
|
||||
# symlink /Applications/Nix Apps to /Applications for Spotlight
|
||||
activationScripts.extraActivation.text = ''
|
||||
# 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.
|
||||
|
|
@ -177,52 +178,14 @@
|
|||
# Add ability to used TouchID for sudo authentication
|
||||
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 = {
|
||||
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 = {
|
||||
shells = [
|
||||
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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue