8000 [FEAT]: setting desktop wallpaper · Issue #1762 · nix-darwin/nix-darwin · GitHub
[go: up one dir, main page]

Skip to content

[FEAT]: setting desktop wallpaper #1762

Open

Description

@asuyou

Setting a desktop wallpaper / background image / screensaver would be useful to have as an option for reproducibility.

We can set a wallpaper using the command line or as a separate application, however this might require having the images already in a folder, or downloading them at runtime.

Is this something nix is intended to manage? If so, I'm happy to write a PR.

Activity

  1. birkhofflee commented on Jun 16, 2026

    @birkhofflee

    I have this for my machine:

    { pkgs }:
    
    let
      wallpaper = pkgs.fetchurl {
        url = "https://misc-assets.raycast.com/wallpapers/loupe-mono-dark.heic";
        sha256 = "sha256-MwvRU7U4tO6F1duxBrHLOd7F5Gnzv/zyiZkm5EFqkY4=";
      };
    in
    pkgs.writeShellScriptBin "set-wallpaper-script" ''
      set -e
      /usr/bin/osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"${wallpaper}\""
    ''
    home.activation = {
      "setWallpaper" = lib.hm.dag.entryAfter [ "revealHomeLibraryDirectory" ] ''
        echo "[+] Setting wallpaper"
        ${setWallpaperScript}/bin/set-wallpaper-script
      '';
      
      "activateUserSettings" = lib.hm.dag.entryAfter [ "setWallpaper" ] ''
      ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0