1
0
Fork 0

General: remove submodule-specific Git settings

This commit is contained in:
Aires 2024-09-22 13:58:16 -04:00
parent d2d7fed25d
commit 4dd2248474
5 changed files with 13 additions and 24 deletions

4
.gitmodules vendored
View file

@ -1,4 +0,0 @@
[submodule "secrets"]
path = secrets
url = ssh://code.8bitbuddhism.com/aires/nix-secrets.git
branch = main

View file

@ -38,7 +38,7 @@ nixos-install --verbose --root /mnt --flake .#host --no-root-password
All hosts are configured to run automatic daily updates (see `modules/system/system.nix`). You can disable this by adding `aux.system.services.autoUpgrade = false;` to a host's config.
Automatic updates work by `git pull`ing the latest version of the repo from Forgejo. This repo gets updated nightly by [`Haven`](./hosts/Haven), which updates the `flake.lock` file and pushes it back up to Forgejo. Only one host needs to do this, and you can enable this feature on a host using `aux.system.services.autoUpgrade.pushUpdates = true;`.
Automatic updates work by `git pull`ing the latest version of the repo from Forgejo. This repo gets updated nightly by [`Hevana`](./hosts/Hevana), which updates the `flake.lock` file and pushes it back up to Forgejo. Only one host needs to do this, and you can enable this feature on a host using `aux.system.services.autoUpgrade.pushUpdates = true;`.
#### Manually updating

View file

@ -157,11 +157,11 @@
]
},
"locked": {
"lastModified": 1726818100,
"narHash": "sha256-z2V74f5vXqkN5Q+goFlhbFXY/dNaBAyeLpr2bxu4Eic=",
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1bbc1a5a1f4de7401c92db85b2119ed21bb4139d",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
@ -252,11 +252,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1726724509,
"narHash": "sha256-sVeAM1tgVi52S1e29fFBTPUAFSzgQwgLon3CrztXGm8=",
"lastModified": 1726905744,
"narHash": "sha256-xyNtG5C+xvfsnOVEamFe9zCCnuNwk93K/TlFC/4DmCI=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "10d5e0ecc32984c1bf1a9a46586be3451c42fd94",
"rev": "b493dfd4a8cf9552932179e56ff3b5819a9b8381",
"type": "github"
},
"original": {
@ -316,11 +316,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1726688310,
"narHash": "sha256-Xc9lEtentPCEtxc/F1e6jIZsd4MPDYv4Kugl9WtXlz0=",
"lastModified": 1726838390,
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dbebdd67a6006bb145d98c8debf9140ac7e651d0",
"rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101",
"type": "github"
},
"original": {

View file

@ -68,7 +68,6 @@ in
if [ $? -eq 1 ]; then
echo "Updates found, running nixos-rebuild..."
/run/wrappers/bin/sudo -u ${cfg.user} git pull
/run/wrappers/bin/sudo -u ${cfg.user} git submodule update --remote
nixos-rebuild switch --flake .
else
echo "No updates found. Exiting."
@ -101,8 +100,9 @@ in
# Make sure we're up-to-date
echo "Pulling the latest version..."
/run/wrappers/bin/sudo -u ${cfg.user} git pull
/run/wrappers/bin/sudo -u ${cfg.user} git submodule update --remote
echo "Checking for updates..."
/run/wrappers/bin/sudo -u ${cfg.user} nix flake update --commit-lock-file
echo "Pushing any changes..."
/run/wrappers/bin/sudo -u ${cfg.user} git push
'';
};

View file

@ -75,14 +75,7 @@ in
enable = true;
userName = config.secrets.users.aires.firstName;
userEmail = config.secrets.users.aires.email;
extraConfig = {
push.autoSetupRemote = "true";
alias = {
add = "add *";
pull = "!git pull && git submodule foreach --recursive 'git pull origin main'";
unstage = "reset HEAD --";
};
};
extraConfig.push.autoSetupRemote = "true";
};
# Set up SSH