new wallpaperthingie
This commit is contained in:
@@ -6,26 +6,59 @@ let
|
|||||||
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
||||||
script_path = "${flakeRoot}/assets/hyprland/scripts/copy_wallpaperstuff.sh";
|
script_path = "${flakeRoot}/assets/hyprland/scripts/copy_wallpaperstuff.sh";
|
||||||
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
|
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
|
||||||
|
|
||||||
|
# Debug: Print paths to verify they're correct
|
||||||
|
_ = builtins.trace (lib.concatStringsSep "\n" [
|
||||||
|
"=== Wallpaper Module Debug ==="
|
||||||
|
"Source path: ${source_path}"
|
||||||
|
"Destination path: ${destination_path}"
|
||||||
|
"Script path: ${script_path}"
|
||||||
|
"Wallpaper config: ${wallpaper_conf}"
|
||||||
|
"=== End of Debug ==="
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
|
wallpaper.enable = lib.mkEnableOption "Wallpaper setup" default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.wallpaper.enable {
|
config = lib.mkIf config.wallpaper.enable {
|
||||||
# Ensure the script is executable
|
# Debug: Print activation message
|
||||||
|
_ = builtins.trace "=== Wallpaper module is enabled ===";
|
||||||
|
|
||||||
|
# Copy the script to the correct location and make it executable
|
||||||
|
home-manager.users.${config.home.username}.home.file."${script_path}".source = script_path;
|
||||||
home-manager.users.${config.home.username}.home.file."${script_path}".executable = true;
|
home-manager.users.${config.home.username}.home.file."${script_path}".executable = true;
|
||||||
|
|
||||||
|
# Debug: Print script path
|
||||||
|
_ = builtins.trace "Script path: ${script_path}";
|
||||||
|
|
||||||
# Run the script on activation
|
# Run the script on activation
|
||||||
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = ''
|
home-manager.users.${config.home.username}.home.activation.copy-wallpapers = lib.mkMerge [
|
||||||
echo "=== Activation Script Running ==="
|
{
|
||||||
cat "${script_path}"
|
script = ''
|
||||||
"${script_path}"
|
echo "=== Activation Script Running ==="
|
||||||
'';
|
echo "Script path: ${script_path}"
|
||||||
|
if [ -f "${script_path}" ]; then
|
||||||
|
echo "Script exists, executing..."
|
||||||
|
"${script_path}"
|
||||||
|
else
|
||||||
|
echo "ERROR: Script does not exist at ${script_path}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Install wpaperd
|
# Install wpaperd
|
||||||
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
||||||
|
|
||||||
|
# Debug: Print wpaperd installation
|
||||||
|
_ = builtins.trace "Installing wpaperd...";
|
||||||
|
|
||||||
# Configure wpaperd
|
# Configure wpaperd
|
||||||
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
|
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
|
||||||
|
|
||||||
|
# Debug: Print config file path
|
||||||
|
_ = builtins.trace "Config file path: ${config.home.homeDirectory}/.config/wpaperd/config.toml";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user