new wallpaperthingie
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{ lib, config, pkgs, flakeRoot, ... }:
|
{ lib, config, pkgs, flakeRoot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Define source and destination paths
|
# Define source and destination paths
|
||||||
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
||||||
@@ -13,13 +14,18 @@ in {
|
|||||||
# Ensure the destination directory exists
|
# Ensure the destination directory exists
|
||||||
home-manager.users.${config.home.username}.home.file."${destination_path}".createDir = true;
|
home-manager.users.${config.home.username}.home.file."${destination_path}".createDir = true;
|
||||||
|
|
||||||
# Copy all files from source to destination
|
# Use a script to copy all files from source to destination
|
||||||
home-manager.users.${config.home.username}.home.file."${destination_path}".source = lib.genAttrs (builtins.attrNames (builtins.readDir source_path)) (name: {
|
home-manager.users.${config.home.username}.home.file."${destination_path}/copy-wallpapers.sh".text = ''
|
||||||
source = "${source_path}/${name}";
|
#!${pkgs.bash}/bin/bash
|
||||||
target = "${destination_path}/${name}";
|
mkdir -p "${destination_path}"
|
||||||
recursive = true;
|
cp -r "${source_path}"/* "${destination_path}/"
|
||||||
onChange = "copy";
|
'';
|
||||||
});
|
home-manager.users.${config.home.username}.home.file."${destination_path}/copy-wallpapers.sh".executable = true;
|
||||||
|
|
||||||
|
# Run the script on activation
|
||||||
|
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = ''
|
||||||
|
"${destination_path}/copy-wallpapers.sh"
|
||||||
|
'';
|
||||||
|
|
||||||
# Install wpaperd
|
# Install wpaperd
|
||||||
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
||||||
|
|||||||
Reference in New Issue
Block a user