From 4dd22484748ceaf3aad786ac8a5996018975ebc4 Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 22 Sep 2024 13:58:16 -0400 Subject: [PATCH] General: remove submodule-specific Git settings --- .gitmodules | 4 ---- README.md | 2 +- flake.lock | 18 +++++++++--------- modules/services/autoupgrade.nix | 4 ++-- modules/users/aires/default.nix | 9 +-------- 5 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index d03cc67..0000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "secrets"] - path = secrets - url = ssh://code.8bitbuddhism.com/aires/nix-secrets.git - branch = main diff --git a/README.md b/README.md index 08586a8..40cb6c1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flake.lock b/flake.lock index f4d58c2..7319088 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/modules/services/autoupgrade.nix b/modules/services/autoupgrade.nix index ec8fc47..a0cf952 100644 --- a/modules/services/autoupgrade.nix +++ b/modules/services/autoupgrade.nix @@ -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 ''; }; diff --git a/modules/users/aires/default.nix b/modules/users/aires/default.nix index 7a3c9a9..9ab5e93 100644 --- a/modules/users/aires/default.nix +++ b/modules/users/aires/default.nix @@ -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