fix(darwin+HM): align nixpkgs↔nix-darwin, force HM home path, dedupe nvim/tmux 🔧

- track nixpkgs at `github:NixOS/nixpkgs/nixpkgs-unstable` to pair with
  `nix-darwin/master`
- update lockfile inputs: flake-compat, home-manager, NixOS-WSL,
  nixpkgs, nixos-vscode-server
- darwin: wrap HM module in a function to access `lib` and
  `mkForce` `home.homeDirectory = "/Users/danny"` (and set username) to
  satisfy HM’s absolute-path requirement under root activation
- HM: comment out duplicated `home.username` / `home.homeDirectory` in
  `home/danny/home.nix`
- HM: remove `neovim` and `tmux` from `home.packages` (managed via
  `programs.*`), fixing conflicting `nvim` subpath error
This commit is contained in:
DannyDannyDanny 2025-09-09 21:57:04 +02:00
parent 42536537fa
commit ea8fb243c3
3 changed files with 41 additions and 36 deletions

View file

@ -1,11 +1,12 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
vscode-server.url = "github:nix-community/nixos-vscode-server";
# nix-darwin for macOS
# (follows nixpkgs so both use the same channel)
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
@ -60,12 +61,17 @@
# Home Manager on macOS
home-manager.darwinModules.home-manager
{
({ lib, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Point HM to your user config (mac-only for now)
home-manager.users.danny = import ./home/danny/home.nix;
}
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 ];
};
})
];
};
};