This commit is contained in:
2025-11-15 23:45:33 +08:00
parent e7da80bb0c
commit b50e4e489c
15 changed files with 358 additions and 225 deletions
+54
View File
@@ -0,0 +1,54 @@
# macOS-specific home-manager configuration
{
inputs,
lib,
config,
pkgs,
...
}: lib.mkIf pkgs.stdenv.isDarwin {
# macOS-specific packages
home.packages = with pkgs; [
# macOS CLI tools
# m-cli # Swiss Army Knife for macOS
# GUI applications (if you want to manage them with nix)
# Note: Many prefer to use homebrew for GUI apps on macOS
];
# macOS-specific configurations
home.sessionVariables = {
# Fix for Nix on macOS
NIX_PATH = "nixpkgs=${inputs.nixpkgs}:darwin=${inputs.darwin}";
};
# Fish shell configuration for macOS
programs.fish = lib.mkIf config.programs.fish.enable {
shellInit = ''
# Add Homebrew to PATH if it exists
if test -d /opt/homebrew/bin
fish_add_path /opt/homebrew/bin
end
'';
};
# Zsh configuration for macOS
programs.zsh = lib.mkIf config.programs.zsh.enable {
initExtra = ''
# Add Homebrew to PATH if it exists
if [[ -d /opt/homebrew/bin ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
'';
};
# Bash configuration for macOS
programs.bash = lib.mkIf config.programs.bash.enable {
initExtra = ''
# Add Homebrew to PATH if it exists
if [[ -d /opt/homebrew/bin ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
'';
};
}
+51
View File
@@ -0,0 +1,51 @@
# Linux-specific home-manager configuration
{
inputs,
lib,
config,
pkgs,
...
}: lib.mkIf pkgs.stdenv.isLinux {
# Linux-specific packages
home.packages = with pkgs; [
# GUI applications (if you use a desktop environment)
# firefox
# chromium
# Linux-specific CLI tools
# xclip
# xsel
];
# Systemd user services (Linux only)
systemd.user.startServices = "sd-switch";
# X11/Wayland specific configurations
# xsession.enable = true;
# wayland.windowManager.sway.enable = true;
# GTK theme configuration
gtk = {
enable = true;
# theme = {
# name = "Adwaita-dark";
# package = pkgs.gnome.gnome-themes-extra;
# };
};
# Qt theme configuration
qt = {
enable = true;
platformTheme.name = "gtk";
};
# Services
services = {
# Clipboard manager
# clipmenu.enable = true;
# Notification daemon
# dunst.enable = true;
};
}