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

44
nixos/flake.lock generated
View file

@ -3,11 +3,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733328505, "lastModified": 1747046372,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757385184, "lastModified": 1757443987,
"narHash": "sha256-LCxtQn9ajvOgGRbQIRUJgfP7clMGGvV1SDW1HcSb0zk=", "narHash": "sha256-T7E4CIsZBUzrUcPRyTG9FA2xd48MtbQ/HpIaaCfwZwc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "26993d87fd0d3b14f7667b74ad82235f120d986e", "rev": "d587e11cef9caa9484ed090eddc55f4c56908342",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -81,11 +81,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1736095716, "lastModified": 1757427959,
"narHash": "sha256-csysw/Szu98QDiA2lhWk9seYOyCebeVEWL89zh1cduM=", "narHash": "sha256-p0i07rLfAMzJWYfsjFOXEtIWeS1EGVxJaCi9gfyCwRE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "63c3b4ed1712a3a0621002cd59bfdc80875ecbb0", "rev": "785f1b67b6c53de088f640f2a7da50ca4b2d7161",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -97,32 +97,32 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733384649, "lastModified": 1757068644,
"narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=", "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13", "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1737062831, "lastModified": 1757034884,
"narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "narHash": "sha256-PgLSZDBEWUHpfTRfFyklmiiLBE1i1aGCtz4eRA3POao=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "rev": "ca77296380960cd497a765102eeb1356eb80fed0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -171,11 +171,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1729422940, "lastModified": 1753541826,
"narHash": "sha256-DlvJv33ml5UTKgu4b0HauOfFIoDx6QXtbqUF3vWeRCY=", "narHash": "sha256-foGgZu8+bCNIGeuDqQ84jNbmKZpd+JvnrL2WlyU4tuU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-vscode-server", "repo": "nixos-vscode-server",
"rev": "8b6db451de46ecf9b4ab3d01ef76e59957ff549f", "rev": "6d5f074e4811d143d44169ba4af09b20ddb6937d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

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

View file

@ -1,7 +1,8 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.username = "danny"; # TODO: remove next two lines from here or from flake.nix
home.homeDirectory = "/Users/danny"; # home.username = "danny";
# home.homeDirectory = "/Users/danny";
programs.home-manager.enable = true; programs.home-manager.enable = true;
@ -121,11 +122,9 @@
]; ];
}; };
# Put user-installed binaries here if you want HM to own them (optional) # TODO: Put user-installed binaries here if you want HM to own them (optional)
home.packages = with pkgs; [ # home.packages = with pkgs; [
neovim # ];
tmux
];
# First HM version for this user config; bump only if you understand the migration notes. # First HM version for this user config; bump only if you understand the migration notes.
home.stateVersion = "24.11"; home.stateVersion = "24.11";