Dotfiles managed with Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: run flake update as regular user to preserve lock file ownership

+24 -16
+9 -1
darwin/auto-upgrade.nix
··· 1 - { config, lib, pkgs, flakeDirectory, hostName, ... }: 1 + { config, lib, pkgs, flakeDirectory, hostName, username, ... }: 2 2 3 3 let 4 4 flakeDir = flakeDirectory; ··· 9 9 10 10 flake_dir=${lib.escapeShellArg flakeDir} 11 11 flake_ref=${lib.escapeShellArg flakeRef} 12 + 13 + # Update flake inputs as the regular user to preserve flake.lock ownership. 14 + # GIT_CONFIG_COUNT/KEY/VALUE mark the flake dir as a safe git directory so 15 + # that nix can read it; GIT_CONFIG_NOSYSTEM + the custom safe.directory 16 + # entry prevent git from refusing to write the lock file due to ownership. 17 + sudo -u ${lib.escapeShellArg username} \ 18 + HOME=${lib.escapeShellArg "/Users/${username}"} \ 19 + ${pkgs.nix}/bin/nix flake update --flake "$flake_dir" 12 20 13 21 export HOME="/var/root" 14 22 export GIT_CONFIG_COUNT=1
+15 -15
flake.lock
··· 28 28 ] 29 29 }, 30 30 "locked": { 31 - "lastModified": 1774539458, 32 - "narHash": "sha256-H9GIOqdMfQZ6lFetsQhO9TCq53hYzpTHDWOt3PRh9V0=", 31 + "lastModified": 1774738535, 32 + "narHash": "sha256-2jfBEZUC67IlnxO5KItFCAd7Oc+1TvyV/jQlR+2ykGQ=", 33 33 "owner": "nix-community", 34 34 "repo": "home-manager", 35 - "rev": "e2e5f512b33ed19a7a3271d0b73ed5eefcc0be5f", 35 + "rev": "769e07ef8f4cf7b1ec3b96ef015abec9bc6b1e2a", 36 36 "type": "github" 37 37 }, 38 38 "original": { ··· 48 48 "nixpkgs": "nixpkgs" 49 49 }, 50 50 "locked": { 51 - "lastModified": 1774137890, 52 - "narHash": "sha256-o1bwfbAeJ4jouE0dG176+n0Oy30AIKoczX/Wjbx2Iwo=", 51 + "lastModified": 1774742707, 52 + "narHash": "sha256-a3FjZJxDOn0t18VwtIAgpNuUNaIEl6T+Awu5tXifQQw=", 53 53 "owner": "nix-community", 54 54 "repo": "neovim-nightly-overlay", 55 - "rev": "004286778676bb67da256a0c1b93add3e1275be7", 55 + "rev": "7966a9c203276bea3b7e8dd2e125fd2b4c8b6753", 56 56 "type": "github" 57 57 }, 58 58 "original": { ··· 64 64 "neovim-src": { 65 65 "flake": false, 66 66 "locked": { 67 - "lastModified": 1774136084, 68 - "narHash": "sha256-84L6rm4ilbd+mg3mhTufTVTpY6lrlfNtFOlcIh5ekgo=", 67 + "lastModified": 1774725909, 68 + "narHash": "sha256-aOiiQCmjCrvo+jAUDO2oMa377FvOtU97aqvTm74ZRGU=", 69 69 "owner": "neovim", 70 70 "repo": "neovim", 71 - "rev": "0db8efcbe4fc9642597ac93556793948c01f8f6f", 71 + "rev": "d5516daf121aa718e79bcd423ee24c24492893c0", 72 72 "type": "github" 73 73 }, 74 74 "original": { ··· 100 100 }, 101 101 "nixpkgs": { 102 102 "locked": { 103 - "lastModified": 1773840656, 104 - "narHash": "sha256-9tpvMGFteZnd3gRQZFlRCohVpqooygFuy9yjuyRL2C0=", 103 + "lastModified": 1774610258, 104 + "narHash": "sha256-HaThtroVD9wRdx7KQk0B75JmFcXlMUoEdDFNOMOlsOs=", 105 105 "owner": "NixOS", 106 106 "repo": "nixpkgs", 107 - "rev": "9cf7092bdd603554bd8b63c216e8943cf9b12512", 107 + "rev": "832efc09b4caf6b4569fbf9dc01bec3082a00611", 108 108 "type": "github" 109 109 }, 110 110 "original": { ··· 116 116 }, 117 117 "nixpkgs_2": { 118 118 "locked": { 119 - "lastModified": 1773628058, 120 - "narHash": "sha256-hpXH0z3K9xv0fHaje136KY872VT2T5uwxtezlAskQgY=", 119 + "lastModified": 1774610258, 120 + "narHash": "sha256-HaThtroVD9wRdx7KQk0B75JmFcXlMUoEdDFNOMOlsOs=", 121 121 "owner": "NixOS", 122 122 "repo": "nixpkgs", 123 - "rev": "f8573b9c935cfaa162dd62cc9e75ae2db86f85df", 123 + "rev": "832efc09b4caf6b4569fbf9dc01bec3082a00611", 124 124 "type": "github" 125 125 }, 126 126 "original": {