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. 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 #### Manually updating

View file

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

View file

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

View file

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