Add custom impermanence module

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-08-08 22:03:15 +03:00
parent 5e57d63a54
commit 22e0150a65
69 changed files with 777 additions and 494 deletions

View File

@@ -1,5 +1,6 @@
{
username ? throw "username argument is required",
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{
config,
@@ -8,14 +9,12 @@
...
}:
let
hmConfig = config.home-manager.users.${username};
hmConfig = config.home-manager.users.${user};
in
{
environment.persistence."/cache".users.${username}.directories = [
"${hmConfig.xdg.relativeCacheHome}/rofi"
];
environment.persistence."/cache"."${home}/.cache/rofi" = { };
home-manager.users.${username} = {
home-manager.users.${user} = {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
@@ -23,7 +22,7 @@ in
};
wayland.windowManager.hyprland.settings.bind = [
"$mod, r, exec, ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -show drun"
"$mod, r, exec, ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${home}/.cache/rofi -show drun"
];
};
}