Extract the per-host home-manager block (useGlobalPkgs, useUserPackages, backupFileExtension, users.<name> with username/homeDirectory/optional stateVersion/optional imports) into nixos/lib/home-manager-user.nix. Each flake-module now imports it with its per-host parameters, removing ~40 lines of boilerplate across the four hosts.
22 lines
679 B
Nix
22 lines
679 B
Nix
{ inputs, ... }: {
|
|
flake.darwinConfigurations."Daniel-Macbook-Air" = inputs.nix-darwin.lib.darwinSystem {
|
|
modules = [
|
|
# Overlay: make zen-browser available as pkgs.zen-browser
|
|
{ nixpkgs.overlays = [ (final: prev: {
|
|
zen-browser = inputs.zen-browser.packages.${final.stdenv.hostPlatform.system}.default;
|
|
}) ];
|
|
}
|
|
|
|
../hosts/daniel-macbook-air.nix
|
|
../fish.nix
|
|
|
|
inputs.home-manager.darwinModules.home-manager
|
|
(import ../lib/home-manager-user.nix {
|
|
lib = inputs.nixpkgs.lib;
|
|
user = "danny";
|
|
homeDirectory = "/Users/danny";
|
|
userImports = [ ../home/danny/home.nix ];
|
|
})
|
|
];
|
|
};
|
|
}
|