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,14 +1,16 @@
{
username ? throw "username argument is required",
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{
config,
lib,
utils,
pkgs,
...
}:
let
hmConfig = config.home-manager.users.${username};
hmConfig = config.home-manager.users.${user};
themeSwww = lib.meta.getExe (
pkgs.writeShellApplication {
name = "theme-swww";
@@ -21,18 +23,19 @@ let
);
in
{
environment.persistence."/cache".users.${username}.directories = [
"${hmConfig.xdg.relativeCacheHome}/swww"
];
environment.persistence."/cache"."${home}/.cache/swww" = { };
home-manager.users.${username} = {
home-manager.users.${user} = {
home.packages = with pkgs; [ swww ];
systemd.user.services.swww = {
Unit = {
Description = "Wallpaper daemon";
BindsTo = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
After = [
"graphical-session.target"
config.environment.persistence."/cache"."${home}/.cache/swww".mount
];
};
Service = {