nix-secrets 不更新 #53

Closed
opened 2025-12-28 23:19:03 +01:00 by adam · 1 comment
Owner

Originally created by @wicsp on GitHub (Mar 8, 2025).

执行 darwin-rebuild switch 不更新 nix-secrets , 更改 mysecrets 后能正常拉取仓库

# flack.nix
agenix.url = "github:yaxitech/ragenix";

mysecrets = {
      url = "git+ssh://git@github.com/wicsp/nix-secrets.git";
      flake = false;
};
# flack.lock
"mysecrets": {
  "flake": false,
  "locked": {
    "lastModified": 1741412188,
    "narHash": "sha256-vh5gMqcuyhfbu4pK6f1uq5u5bcXr9ZZZVoMK5RV48NE=",
    "ref": "refs/heads/main",
    "rev": "eb3968d971231495858e1d313bc897cd6af75c89",
    "shallow": true,
    "type": "git",
    "url": "ssh://git@github.com/wicsp/nix-secrets.git"
  },
  "original": {
    "shallow": true,
    "type": "git",
    "url": "ssh://git@github.com/wicsp/nix-secrets.git"
  }
},
building the system configuration...
warning: Git tree '/Users/wicsp/.nixos' is dirty
warning: updating lock file '/Users/wicsp/.nixos/flake.lock':
• Updated input 'mysecrets':
    'git+ssh://git@github.com/wicsp/nix-secrets.git?ref=refs/heads/main&rev=40f391637aaa04e07fafc0cbc0e81c2c2c2ccd44' (2025-03-07)
  → 'git+ssh://git@github.com/wicsp/nix-secrets.git?ref=refs/heads/main&rev=eb3968d971231495858e1d313bc897cd6af75c89&shallow=1' (2025-03-08)
warning: Git tree '/Users/wicsp/.nixos' is dirty

update
目前的解决方法是在 rebuild 前执行nix flake update

Originally created by @wicsp on GitHub (Mar 8, 2025). 执行 `darwin-rebuild switch` 不更新 nix-secrets , 更改 mysecrets 后能正常拉取仓库 ``` # flack.nix agenix.url = "github:yaxitech/ragenix"; mysecrets = { url = "git+ssh://git@github.com/wicsp/nix-secrets.git"; flake = false; }; ``` ``` # flack.lock "mysecrets": { "flake": false, "locked": { "lastModified": 1741412188, "narHash": "sha256-vh5gMqcuyhfbu4pK6f1uq5u5bcXr9ZZZVoMK5RV48NE=", "ref": "refs/heads/main", "rev": "eb3968d971231495858e1d313bc897cd6af75c89", "shallow": true, "type": "git", "url": "ssh://git@github.com/wicsp/nix-secrets.git" }, "original": { "shallow": true, "type": "git", "url": "ssh://git@github.com/wicsp/nix-secrets.git" } }, ``` ``` building the system configuration... warning: Git tree '/Users/wicsp/.nixos' is dirty warning: updating lock file '/Users/wicsp/.nixos/flake.lock': • Updated input 'mysecrets': 'git+ssh://git@github.com/wicsp/nix-secrets.git?ref=refs/heads/main&rev=40f391637aaa04e07fafc0cbc0e81c2c2c2ccd44' (2025-03-07) → 'git+ssh://git@github.com/wicsp/nix-secrets.git?ref=refs/heads/main&rev=eb3968d971231495858e1d313bc897cd6af75c89&shallow=1' (2025-03-08) warning: Git tree '/Users/wicsp/.nixos' is dirty ``` -------------------------------- update 目前的解决方法是在 rebuild 前执行`nix flake update`
adam closed this issue 2025-12-28 23:19:03 +01:00
Author
Owner

@ryan4yin commented on GitHub (Apr 1, 2025):

这是预期行为,switch 只部署当前配置,不会更新任何 inputs.

@ryan4yin commented on GitHub (Apr 1, 2025): 这是预期行为,switch 只部署当前配置,不会更新任何 inputs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/nix-config#53