aboutsummaryrefslogtreecommitdiffstats
path: root/modules/scripts/nix-update/default.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-21 03:59:06 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-29 03:50:28 +0530
commit9096fc6607a196f48df1da1dbe9b3f2b0908d76d (patch)
tree5f8194416d0fc7b70f42e8dc237c22c630493b34 /modules/scripts/nix-update/default.nix
parent5725301fd66c243dd21de23a49602209bcf8fa80 (diff)
downloadhome-manager-config-9096fc6607a196f48df1da1dbe9b3f2b0908d76d.tar.gz
home-manager-config-9096fc6607a196f48df1da1dbe9b3f2b0908d76d.zip
scripts: added nix-update script
- nix-update script can be used to automatically update both home-manager and nixos, either just update the flake inputs or recompute/rebuild the entire configuration with the updated derivations - fixed fzf unknown option error that appeared in the newer versions
Diffstat (limited to 'modules/scripts/nix-update/default.nix')
-rw-r--r--modules/scripts/nix-update/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/scripts/nix-update/default.nix b/modules/scripts/nix-update/default.nix
new file mode 100644
index 0000000..787265d
--- /dev/null
+++ b/modules/scripts/nix-update/default.nix
@@ -0,0 +1,25 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+let
+ inherit ((import ../lib.nix { inherit lib pkgs; })) mkScriptModule;
+ base = mkScriptModule {
+ name = "nix-update";
+ path = ./script.sh;
+ description = "Update NixOS and/or Home Manager flake configuration\nRuns nix flake update and rebuilds the system";
+ deps = [
+ pkgs.git
+ pkgs.nix
+ config.programs.home-manager.package
+ pkgs.bash
+ ];
+ inherit config;
+ };
+in
+{
+ options = base.options;
+ config = base.moduleConfig;
+}