mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 15:03:37 +00:00
79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{
|
|
description = "Rathi's macOS nix-darwin + Home Manager config";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
nix-darwin = {
|
|
url = "github:LnL7/nix-darwin/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
googleworkspace-cli = {
|
|
url = "github:googleworkspace/cli";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
claudeCode = {
|
|
url = "github:sadjow/claude-code-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
codex = {
|
|
url = "github:openai/codex";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix-homebrew = {
|
|
url = "github:zhaofengli-wip/nix-homebrew";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
self,
|
|
nixpkgs,
|
|
nix-darwin,
|
|
home-manager,
|
|
claudeCode,
|
|
codex,
|
|
nix-homebrew,
|
|
...
|
|
}: let
|
|
system = "aarch64-darwin";
|
|
username = "rathi";
|
|
hostname = "hari-macbook-pro";
|
|
pkgs = import nixpkgs {inherit system;};
|
|
in {
|
|
formatter.${system} = pkgs.alejandra;
|
|
|
|
darwinConfigurations.${hostname} = nix-darwin.lib.darwinSystem {
|
|
inherit system;
|
|
specialArgs = {inherit inputs self username hostname;};
|
|
modules = [
|
|
./hosts/${hostname}
|
|
home-manager.darwinModules.home-manager
|
|
nix-homebrew.darwinModules.nix-homebrew
|
|
{
|
|
users.users.${username}.home = "/Users/${username}";
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "hm-bak";
|
|
home-manager.users.${username} = import ./home;
|
|
|
|
nix-homebrew = {
|
|
enable = true;
|
|
enableRosetta = true;
|
|
user = username;
|
|
autoMigrate = true;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|