48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
# This is your home-manager configuration file
|
|
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
|
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
# Import modular configurations
|
|
imports = [
|
|
# Base configuration shared across all platforms
|
|
./common.nix
|
|
|
|
# Feature modules
|
|
./development.nix
|
|
./shell.nix
|
|
./terminal.nix
|
|
|
|
# Platform-specific configurations
|
|
./linux.nix
|
|
./darwin.nix
|
|
|
|
# If you want to use modules your own flake exports (from modules/home-manager):
|
|
# inputs.self.homeManagerModules.example
|
|
];
|
|
|
|
# TODO: Set your username
|
|
home = {
|
|
username = lib.mkDefault "your-username";
|
|
homeDirectory = lib.mkDefault (
|
|
if pkgs.stdenv.isDarwin
|
|
then "/Users/${config.home.username}"
|
|
else "/home/${config.home.username}"
|
|
);
|
|
};
|
|
|
|
# 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
|
|
};
|
|
}
|