Centralize overlay path specification
This commit is contained in:
parent
cca0dd227f
commit
a3848d5d18
4 changed files with 36 additions and 37 deletions
|
@ -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!
|
||||
|
|
18
flake.lock
generated
18
flake.lock
generated
|
@ -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": {
|
||||
|
|
14
flake.nix
14
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,13 +40,16 @@
|
|||
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: {
|
||||
linuxSystems (system: {
|
||||
homeConfigurations = {
|
||||
# First, we currently assume that Linux devices
|
||||
# only require dotfiles and utilize the username `spotlight`.
|
||||
|
@ -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;
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Custom packages.
|
||||
nixpkgs.overlays = [ (import ../pkgs/default.nix) ];
|
||||
|
||||
# Commonly used packages.
|
||||
home.packages = with pkgs; [
|
||||
binwalk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue