diff --git a/darwin/darwin.nix b/darwin/darwin.nix index a4ff491..14e9e06 100644 --- a/darwin/darwin.nix +++ b/darwin/darwin.nix @@ -54,10 +54,6 @@ nixpkgs = { # TODO(spotlightishere): Make this configurable beyond a singular device. hostPlatform = "aarch64-darwin"; - - # Custom packages. - # TODO(spotlightishere): Why does this need to be specified in both home-manager and globally? - overlays = [ (import ../pkgs/default.nix) ]; }; # Our singular user! diff --git a/flake.lock b/flake.lock index d505289..f61f7d1 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ ] }, "locked": { - "lastModified": 1715930644, - "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", + "lastModified": 1716847642, + "narHash": "sha256-rjEswRV0o23eBBils8lJXyIGha+l/VjV73IPg+ztxgk=", "owner": "nix-community", "repo": "home-manager", - "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", + "rev": "10c7c219b7dae5795fb67f465a0d86cbe29f25fa", "type": "github" }, "original": { @@ -72,11 +72,11 @@ ] }, "locked": { - "lastModified": 1716329735, - "narHash": "sha256-ap51w+VqG21vuzyQ04WrhI2YbWHd3UGz0e7dc/QQmoA=", + "lastModified": 1716511055, + "narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "eac4f25028c1975a939c8f8fba95c12f8a25e01c", + "rev": "0bea8222f6e83247dd13b055d83e64bce02ee532", "type": "github" }, "original": { @@ -87,11 +87,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716293225, - "narHash": "sha256-pU9ViBVE3XYb70xZx+jK6SEVphvt7xMTbm6yDIF4xPs=", + "lastModified": 1716509168, + "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3eaeaeb6b1e08a016380c279f8846e0bd8808916", + "rev": "bfb7a882678e518398ce9a31a881538679f6f092", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6557fbf..efff3bd 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ }; }; - outputs = inputs@{ nixpkgs, home-manager, nix-darwin, ... }: + outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, ... }: let # TODO(spotlightishere): Is there a better way to approach this that doesn't # involve importing so many separate flakes? @@ -30,6 +30,7 @@ homeManager = { system, specialArgs ? { } }: home-manager.lib.homeManagerConfiguration { + nixpkgs.overlays = [ (import ../pkgs/default.nix) ]; modules = [ ./home/home.nix ]; @@ -39,33 +40,36 @@ in { # There's a few things going on here that are all merged in the end. - # We start with system-specific packages, providing home-manager. + # We start with a generalized package overlay, providing several packages + # for e.g. nix-darwin, NixOS, and home-manager usage. + overlays.default = (import ./pkgs/default.nix); + + # Secondly, we create system-specific home-manager configurations. packages = ########################## # Linux-specific options # ########################## - linuxSystems - (system: { - homeConfigurations = { - # First, we currently assume that Linux devices - # only require dotfiles and utilize the username `spotlight`. - # - # For now, this is effectively true, sans a few specific configurations :) - spotlight = homeManager { - system = system; - }; + linuxSystems (system: { + homeConfigurations = { + # First, we currently assume that Linux devices + # only require dotfiles and utilize the username `spotlight`. + # + # For now, this is effectively true, sans a few specific configurations :) + spotlight = homeManager { + system = system; + }; - # For a special case: with the Steam Deck, we have to assume the user - # is named `deck` due to its immutable system image. - deck = homeManager { - system = system; - specialArgs = { - gpg = true; - username = "deck"; - }; + # For a special case: with the Steam Deck, we have to assume the user + # is named `deck` due to its immutable system image. + deck = homeManager { + system = system; + specialArgs = { + gpg = true; + username = "deck"; }; }; - }) + }; + }) // @@ -90,6 +94,7 @@ imports = [ home-manager.nixosModules.home-manager { + nixpkgs.overlays = [ self.overlays.default ]; home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -107,6 +112,7 @@ # Our provided home-manager configuration home-manager.darwinModules.home-manager { + nixpkgs.overlays = [ self.overlays.default ]; home-manager = { useGlobalPkgs = true; useUserPackages = true; diff --git a/home/desktop.nix b/home/desktop.nix index 1a53972..0f96799 100644 --- a/home/desktop.nix +++ b/home/desktop.nix @@ -1,9 +1,6 @@ { config, lib, pkgs, ... }: { - # Custom packages. - nixpkgs.overlays = [ (import ../pkgs/default.nix) ]; - # Commonly used packages. home.packages = with pkgs; [ binwalk