Geometer1729 / persist-retro

Retroactively persist directories with impermanence

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Retroactively persist directories with impermanence

License:GNU General Public License v3.0


Languages

Language:Nix 100.0%