diff --git a/flake.nix b/flake.nix index 7514ee2..8f9a28f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,25 +1,31 @@ { description = "Starter configuration for macOS with nix-darwin"; + inputs = { nixpkgs = { url = "github:nixos/nixpkgs//nixpkgs-26.05-darwin"; # url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; + home-manager = { url = "github:nix-community/home-manager"; }; + nixd = { url = "github:nix-community/nixd"; }; + darwin = { # url = "github:nix-darwin/nix-darwin"; url = "github:nix-darwin/nix-darwin/nix-darwin-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + brew-src = { - url = "github:Homebrew/brew/master"; + url = "github:Homebrew/brew/main"; flake = false; }; + nix-homebrew = { url = "github:zhaofengli-wip/nix-homebrew"; inputs.brew-src.follows = "brew-src"; @@ -29,20 +35,25 @@ url = "github:homebrew/homebrew-core"; flake = false; }; + homebrew-cask = { url = "github:homebrew/homebrew-cask"; flake = false; }; + sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; }; + catppuccin = { url = "github:catppuccin/nix"; }; + llm-agents = { url = "github:numtide/llm-agents.nix"; }; @@ -52,6 +63,7 @@ # url = "github:hraban/mac-app-util"; # }; }; + outputs = { self, @@ -74,7 +86,9 @@ "aarch64-darwin" "x86_64-darwin" ]; + forAllSystems = f: nixpkgs.lib.genAttrs darwinSystems f; + devShell = system: let @@ -88,14 +102,17 @@ bashInteractive git ]; - shellHook = with pkgs; '' + + shellHook = '' export EDITOR=vim ''; + buildInputs = with pkgs; [ rnix-lsp ]; }; }; + mkApp = scriptName: system: { type = "app"; program = "${ @@ -108,6 +125,7 @@ '') }/bin/${scriptName}"; }; + mkDarwinApps = system: { "apply" = mkApp "apply" system; "build" = mkApp "build" system; @@ -127,7 +145,6 @@ modules = [ home-manager.darwinModules.home-manager nix-homebrew.darwinModules.nix-homebrew - # mac-app-util.darwinModules.default { nix-homebrew = { inherit user; @@ -139,12 +156,12 @@ mutableTaps = false; autoMigrate = true; }; - home-manager.sharedModules = [ - # mac-app-util.homeManagerModules.default - catppuccin.homeModules.catppuccin + home-manager.sharedModules = [ + catppuccin.homeModules.catppuccin ]; } + ./hosts/darwin ]; } diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index f8a27ad..841fa28 100644 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let - emacsOverlaySha256 = "1ypxan48239skivldlk5fnl99r7gwm5rzblgkpy4x7n0hixamkig"; + emacsOverlaySha256 = "1nf0qdkbabakbxkg358cps0c941irn3rff69cabl7b4vjfd3cra3"; in { home-manager.backupFileExtension = "nix-backup";