new wallpaperthingie
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
|
# file: wallpaper-copy.nix
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
flakeRoot,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
flakeRoot,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -11,18 +12,16 @@ let
|
|||||||
targetDir = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
targetDir = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options.wallpaper.enable = lib.mkEnableOption "Copy wallpaperstuff dir";
|
||||||
wallpaper.enable = lib.mkEnableOption "Copy wallpaper stuff";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.wallpaper.enable {
|
config = lib.mkIf config.wallpaper.enable {
|
||||||
home-manager.users.${config.home.username}.home.activation.copyWallpapers = {
|
home.activation.copyWallpapers = {
|
||||||
description = "Copy wallpaperstuff to ~/Droidnix/wallpaperstuff";
|
description = "Copy wallpaperstuff to ~/Droidnix/wallpaperstuff";
|
||||||
script = ''
|
script = ''
|
||||||
echo "Copying wallpapers..."
|
echo "=== Copying wallpaperstuff ==="
|
||||||
mkdir -p "${targetDir}"
|
mkdir -p "${targetDir}"
|
||||||
|
cp -rT "${sourceDir}" "${targetDir}"
|
||||||
rsync -av --no-group --no-owner "$sourceDir/" "${targetDir}"
|
echo "Done."
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user