diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-21 03:59:06 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-29 03:50:28 +0530 |
| commit | 9096fc6607a196f48df1da1dbe9b3f2b0908d76d (patch) | |
| tree | 5f8194416d0fc7b70f42e8dc237c22c630493b34 /modules/scripts/nix-update/default.nix | |
| parent | 5725301fd66c243dd21de23a49602209bcf8fa80 (diff) | |
| download | home-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.nix | 25 |
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; +} |
