dotfiles/macos.local/flake/flake.nix.org
2025-03-05 22:17:31 -06:00

1.1 KiB

macOS Nix Configuration

The root for my macOS nix configuration using flake and home-manager.

  {
    description = "My Darwin Configuration";

    inputs = {
      nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
      nix-darwin.url = "github:LnL7/nix-darwin";
      nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
      home-manager.url = "github:nix-community/home-manager";
      home-manager.inputs.nixpkgs.follows = "nixpkgs";
    };

    outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager }: {
      darwinConfigurations."macos" = nix-darwin.lib.darwinSystem {
       specialArgs = { inherit inputs; };
        modules = [
          ./system/core.nix
          home-manager.darwinModules.home-manager
          {
            home-manager.backupFileExtension = "bak";
            home-manager.useGlobalPkgs = false;
            home-manager.useUserPackages = true;
            home-manager.users.jjanzen = import ./home/core.nix;
          }
        ];
      };

      darwinPackages = self.darwinConfigurations."macos".pkgs;
    };
  }