new wallpaperthingie
This commit is contained in:
@@ -11,6 +11,7 @@ let
|
|||||||
cfg = config.wallpaper;
|
cfg = config.wallpaper;
|
||||||
|
|
||||||
sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
||||||
|
targetDir = "/home/${user.username}/Droidnix/wallpaperstuff";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
|
options.wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
|
||||||
@@ -18,22 +19,33 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
|
|
||||||
|
#
|
||||||
|
# ✅ Install wpaperd
|
||||||
|
#
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wpaperd
|
wpaperd
|
||||||
];
|
];
|
||||||
|
|
||||||
#
|
#
|
||||||
# 🔥 Copy entire wallpaper directory into HOME
|
# ✅ Ensure config exists
|
||||||
#
|
|
||||||
home.file."Droidnix/wallpaperstuff" = {
|
|
||||||
source = sourceDir;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
#
|
|
||||||
# 🔥 wpaperd config
|
|
||||||
#
|
#
|
||||||
xdg.configFile."wpaperd/config.toml".source = "${sourceDir}/wallpaper.conf";
|
xdg.configFile."wpaperd/config.toml".source = "${sourceDir}/wallpaper.conf";
|
||||||
|
|
||||||
|
#
|
||||||
|
# 🔥 One-time (non-destructive) copy
|
||||||
|
#
|
||||||
|
home.activation.setupWallpapers = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
echo "=== Wallpaper setup ==="
|
||||||
|
|
||||||
|
mkdir -p "${targetDir}"
|
||||||
|
|
||||||
|
if [ ! -d "${targetDir}/pictures" ]; then
|
||||||
|
echo "Initializing wallpaper directory..."
|
||||||
|
cp -r ${sourceDir}/* "${targetDir}/"
|
||||||
|
else
|
||||||
|
echo "Wallpaper directory already exists, skipping copy"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user