Change:
<ins> { stdenvNoCC , lib , wrapGAppsHook , gdk-pixbuf , librsvg , xorg , shared-mime-info }: timeshift-unwrapped: runtimeDeps: stdenvNoCC.mkDerivation { inherit (timeshift-unwrapped) pname version; dontUnpack = true; nativeBuildInputs = [ xorg.lndir wrapGAppsHook ]; installPhase = '' runHook preInstall mkdir -p "$out" lndir "${timeshift-unwrapped}" "$out" runHook postInstall ''; dontWrapGApps = true; preFixup = '' makeWrapperArgs=( --prefix PATH : "${lib.makeBinPath runtimeDeps}" ) gappsWrapperArgs+=( # Thumbnailers --prefix XDG_DATA_DIRS : "${lib.makeSearchPath "share" [ gdk-pixbuf librsvg shared-mime-info ]}" "''${makeWrapperArgs[@]}" ) wrapProgram "$out/bin/timeshift" "''${makeWrapperArgs[@]}" wrapProgram "$out/bin/timeshift-gtk" "''${gappsWrapperArgs[@]}" ''; inherit (timeshift-unwrapped) meta; } </ins>

Discussion:
Project description System restore tool for Linux This program takes snapshots for the root directory periodically or when told to using either or , and allow the user restore them if need be. It is capable to do cross-distribution restore, or to work from a live CD/USB. ! Not sure if snapshots are important for NixOS, but it saves the day when you need to restore another distribution_ to the previous state inside NixOS, or if you are using nix package manager on other distributions. Metadata homepage URL: source URL: license: gpl3 platforms: linux
Not sure if snapshots are important for NixOS from their readme: It is designed to protect only system files and settings. User files such as documents, pictures and music are excluded. that is not really usefull since nixos already allows rollbacks
It could be useful with Nix on non-NixOS Linux but you might as well use the native package manager to install Timeshift in that case. Being able to offline timeshift non-NixOS distros from your NixOS installation seems like the most sensible use-case.
Being able to offline timeshift non-NixOS distros from your NixOS installation seems like the most sensible use-case. Actually, my original motivation is to rescue my Debian Testing in the laptop. It crashed after the system partition was filled up suddenly (probably by the inflating system logs). I have a working NixOS installation in a USB stick (it is one of the very distros that can be installed onto a removable storage device, making it boot able elsewhere and not affecting the local boot loader at the same time.), and it seems to be a good idea to rescue it from the USB stick. It's probably a bit user-specific. :sweat_smile: BTW, what is the Nixy way to deal with the trouble if something similar (something fills up the disk space suddenly) happen to a NixOS installation? Thanks you very much for answering, and for this wonderful distro!
Delete older generations, run garbage collection and optimise the store. Preferably in that order.
Oh and getting rid of stray gcroots can also help a ton. I had one that kept an old 19.09 system closure around for months.
I marked this as stale due to inactivity.

&rarr;
It might not be needed by most of the NixOS users. But the project itself seems to be easy to build (with well-written make files and simple dependencies), and there ale situations that for it to save the day. (NixOS is the only Linux distro that can be successfully installed into a usb stick wihout messing up the /boot partition on the machine or special tweaks for the persistance like persist file/aufs). I can write one when I have time.
I marked this as stale due to inactivity. &rarr;
It's still relevant.
I think this is going to help those who want to upgrade from a previous system's version.
AFAIK, this snapshot tool is commonly seen in Debian-based distros, and the Ubuntu and Linux Mint encourage users to use it. Remaining issues: The "periodic snapshot" functionality requires crontab access from superuser. This is not enabled by deafult, and can be disabled at run time. If we want to have it on NixOS, it may require special patches and a NixOS module. expects to exist before it starts. I'm not sure how other packages manage that.