Skip to content

Latest commit

 

History

History
42 lines (38 loc) · 1.43 KB

README.md

File metadata and controls

42 lines (38 loc) · 1.43 KB

persist-retro

Retroactively persist directories with impermanence

Feel free to create issues if you encounter any bugs or want to request any features.

Persist-retro works by adding a step during activations of home-manager and nixos in which directories, which have been configured to be persisted by impermanence but do not yet exist in the persistant directory, are initialized by moving the coresponding directory from the root filesystem, if it exists, into the persistant filesystem. This is usefull to allow you to easily save files which already exist without manually moving.

Usage is similar to impermanence In your home-manager

{
  imports =
    [ inputs.impermanence.nixosModules.home-manager.impermanence
      inputs.persist-retro.nixosModules.home-manager.persist-retro
    ];
}

and in your nixos-configuration

{
  imports =
    [ inputs.impermanence.nixosModules.impermanence
      inputs.persist-retro.nixosModules.persist-retro
    ];
}

Missing features

  • Work with non-string etries in the directories list
  • Work with symlinks
  • Support files with home-manager
  • Work with the impermanence nixosModule
  • disable when persistentStoragePath or removePrefixDirectory are set
  • add option to disable persist-retro for individual persistennce entries
  • corectly support persistentStoragePath
  • corectly support removePrefixDirectory