mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-29 08:20:43 +00:00
Add home impermanence
This commit is contained in:
parent
6a16de8d16
commit
9dd5d40494
4 changed files with 93 additions and 1 deletions
28
home/impermanence/default.nix
Normal file
28
home/impermanence/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.myOptions.system.impermanence.home;
|
||||
in {
|
||||
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.persistence."${cfg.persistentMountPoint}" = {
|
||||
directories = [
|
||||
".cache/nix"
|
||||
] ++ cfg.extraDirectories;
|
||||
|
||||
files = [
|
||||
|
||||
] ++ cfg.extraFiles;
|
||||
|
||||
# Allow other users (such as root), to access files through the bind
|
||||
# mounted directories listed in `directories`. Useful for `sudo` operations,
|
||||
# Docker, etc. Requires NixOS configuration programs.fuse.userAllowOther = true;
|
||||
allowOther = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue