GDM Background Image and Theme

Hi, NixOS noob here.

Can you clarify what your patches do exactly? Does your first “very simple overlay” solution change the login background, or just the desktop background?

I want to change the login background. In hopes that that’s what you’re doing, I tried following what you did, but it didn’t work.

I copy-pasted the following into /etc/nixos/configuration.nix:

nixpkgs = {
  overlays = [
    (self: super: {
      gnome3 = super.gnome3.overrideScope' (selfg: superg: {
        gnome-shell = superg.gnome-shell.overrideAttrs (old: {
          buildInputs = (old.buildInputs or []) ++ [
            # CHEEKY WALLPAPER DERIVATION HERE
          ];
          patches = (old.patches or []) ++ [
            (pkgs.substituteAll {
              backgroundColour = "#d94360";
              backgroundPath = wallpaper.gnomeFilePath;
              src = ./greeter-background.patch;
            })
          ];
        });
      });
    })
  ];
};

and ran nixos-rebuild switch, and got the error error: undefined variable 'wallpaper' at /etc/nixos/configuration.nix:103:34.

Also, the next line says src = ./greeter-background.patch. What is greeter-background.patch? Is it the diff you placed just above? And where should I place this file for this to all come together?

Any help? Can you condense your instructions down to minimal steps that someone who has never patched NixOS can follow?