Files
bankrupt/home-manager/home.nix
T

48 lines
1.1 KiB
Nix
Raw Normal View History

2025-11-15 22:29:55 +08:00
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
lib,
config,
pkgs,
...
}: {
2025-11-15 23:17:12 +08:00
# Import modular configurations
2025-11-15 22:29:55 +08:00
imports = [
2025-11-15 23:17:12 +08:00
# Base configuration shared across all platforms
./common.nix
# Feature modules
./development.nix
./shell.nix
./terminal.nix
# Platform-specific configurations
./linux.nix
./darwin.nix
2025-11-15 22:29:55 +08:00
# If you want to use modules your own flake exports (from modules/home-manager):
# inputs.self.homeManagerModules.example
];
# TODO: Set your username
home = {
2025-11-15 23:23:45 +08:00
username = lib.mkDefault "df";
2025-11-15 23:17:12 +08:00
homeDirectory = lib.mkDefault (
if pkgs.stdenv.isDarwin
then "/Users/${config.home.username}"
else "/home/${config.home.username}"
);
2025-11-15 22:29:55 +08:00
};
2025-11-15 23:17:12 +08:00
# Platform-aware session variables
home.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
} // lib.optionalAttrs pkgs.stdenv.isDarwin {
# macOS-specific environment variables
} // lib.optionalAttrs pkgs.stdenv.isLinux {
# Linux-specific environment variables
};
2025-11-15 22:29:55 +08:00
}