Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-darwin reinstalls masApps upon every darwin-rebuild switch command #1323

Open
ceeeeej opened this issue Feb 5, 2025 · 5 comments
Open

Comments

@ceeeeej
Copy link

ceeeeej commented Feb 5, 2025

I am running nix-darwin with home-manager. I updated my flake via nix flake update and now I am observing that home-manager appears to be re-installing all of the masApps listed in my brew.nix file now when I run the darwin-rebuild switch command.

The previous behavior was that already installed MAS applications would not be re-installed upon each darwin-rebuild switch command.

Running darwin-version returns 25.05.ae406c0

@emilazy
Copy link
Collaborator

emilazy commented Feb 5, 2025

Hmm, that’s strange. Do you have the previous commit hash from your flake.lock to narrow down the potential changes that caused this? My first thought was #1282, but that shouldn’t affect the activation path.

@ceeeeej
Copy link
Author

ceeeeej commented Feb 5, 2025

Does this help?

Here is an excerpt of the flake.lock.

"nix-darwin": {
      "inputs": {
        "nixpkgs": [
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1738743987,
        "narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=",
        "owner": "LnL7",
        "repo": "nix-darwin",
        "rev": "ae406c04577ff9a64087018c79b4fdc02468c87c",
        "type": "github"
      },
      "original": {
        "owner": "LnL7",
        "ref": "master",
        "repo": "nix-darwin",
        "type": "github"
      }
    },
    "nix-darwin_2": {
      "inputs": {
        "nixpkgs": [
          "nixvim",
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1738743987,
        "narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=",
        "owner": "lnl7",
        "repo": "nix-darwin",
        "rev": "ae406c04577ff9a64087018c79b4fdc02468c87c",
        "type": "github"
      },
      "original": {
        "owner": "lnl7",
        "repo": "nix-darwin",
        "type": "github"
      }
    },

@emilazy
Copy link
Collaborator

emilazy commented Feb 5, 2025

What I’m hoping to see is the value of the rev fields here before the update that broke things. If you don’t have your configuration tracked in Git that might be hard to obtain, though; I suppose we could try to derive it from the store paths in your previous system generations.

@ceeeeej
Copy link
Author

ceeeeej commented Feb 5, 2025

I went all the way back to this nix-darwin commit and it is still happening: 492a720

I just rolled Nixpkgs back to a commit from ~2 weeks ago and still observed this happening.

I think this may be something with the mas utility and my system instead of a nix-darwin or a nix issue specifically.

@mirkolenz
Copy link

Ran into this as well and seems to be an ongoing issue with the mas utility: mas-cli/mas#722

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants