diff --git a/flake.lock b/flake.lock index 915d82e..909216e 100644 --- a/flake.lock +++ b/flake.lock @@ -302,11 +302,11 @@ }, "nixpkgs-unstable_2": { "locked": { - "lastModified": 1751984180, - "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", + "lastModified": 1753429684, + "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", + "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1f750bb..b78ccfa 100644 --- a/flake.nix +++ b/flake.nix @@ -125,7 +125,14 @@ # Build darwin flake using: # $ darwin-rebuild build --flake .#macbook - darwinConfigurations = { + darwinConfigurations = let + pkgs-unstable_aarch64-darwin = import nixpkgs-unstable { + system = "aarch64-darwin"; + config = { + allowUnfree = true; + }; + }; + in { "macbook" = nix-darwin.lib.darwinSystem { system = "aarch64-darwin"; specialArgs = { @@ -135,6 +142,9 @@ ./hosts/macbook/configuration.nix home-manager.darwinModules.home-manager { + home-manager.extraSpecialArgs = { + pkgs-unstable = pkgs-unstable_aarch64-darwin; + }; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.uagm.imports = [ ./hosts/macbook/home.nix ]; diff --git a/home-modules/nvim.nix b/home-modules/nvim.nix index edafeec..19200af 100644 --- a/home-modules/nvim.nix +++ b/home-modules/nvim.nix @@ -1,17 +1,32 @@ -{ pkgs, ... } : { - - home.packages = with pkgs; [ - neovim - ]; +{ config, lib, pkgs, ... }: - programs.zsh = { - shellAliases = { - n = "nvim"; +with lib; + +{ + options.nvim = { + enable = mkEnableOption "Enable custom neovim configuration"; + + package = mkOption { + type = types.package; + default = pkgs.neovim; + description = "The neovim package to use"; }; }; - home.file.".config/nvim" = { - recursive = true; - source = ./explicit-configs/nvim; + config = mkIf config.nvim.enable { + home.packages = [ + config.nvim.package + ]; + + programs.zsh = { + shellAliases = { + n = "nvim"; + }; + }; + + home.file.".config/nvim" = { + recursive = true; + source = ./explicit-configs/nvim; + }; }; } diff --git a/hosts/macbook/home.nix b/hosts/macbook/home.nix index accb4a5..7aa4f99 100644 --- a/hosts/macbook/home.nix +++ b/hosts/macbook/home.nix @@ -1,4 +1,9 @@ -{ config, pkgs, ... } : { +{ + config, + pkgs, + pkgs-unstable, + ... +} : { imports = [ ../../home-modules/tmux-darwin.nix @@ -11,6 +16,11 @@ ../../home-modules/ghostty-mac-config.nix ]; + nvim = { + enable = true; + package = pkgs-unstable.neovim; + }; + home = { username = "uagm"; homeDirectory = "/Users/uagm"; @@ -23,6 +33,17 @@ lua-language-server starship audacity + pkgs-unstable.claude-code + (pkgs-unstable.litellm.overrideAttrs (oldAttrs: rec { + version = "1.74.9"; + src = pkgs.fetchFromGitHub { + owner = "BerriAI"; + repo = "litellm"; + tag = "v${version}-stable"; + hash = "sha256-SGZwt2jzAQbOMlvudqPWat281su6OwT7JG2CNSMjL3A="; + }; + })) + pkgs-unstable.opencode ]; stateVersion = "24.11";