refactor(nix): migrate to flake-parts, drop specialArgs ♻️

- Convert flake.nix to flake-parts.lib.mkFlake; split each host into
  its own module under nixos/flake-modules/.
- Replace zen-browser specialArgs plumbing with a nixpkgs overlay so
  home.nix can just reference pkgs.zen-browser.
This commit is contained in:
DannyDannyDanny 2026-04-18 17:00:19 +02:00
parent b667f7c247
commit c434a479a5
9 changed files with 158 additions and 128 deletions

View file

@ -0,0 +1,31 @@
{ 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
# Home Manager on macOS
inputs.home-manager.darwinModules.home-manager
({ lib, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Automatically backup files before home-manager overwrites them
home-manager.backupFileExtension = "backup";
home-manager.users.danny = { ... }: {
# Force an absolute path even if another module sets a bad value.
home.username = "danny";
home.homeDirectory = lib.mkForce "/Users/danny";
imports = [
../home/danny/home.nix
];
};
})
];
};
}