diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 0aae25662c64..88350a176506 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -184,6 +184,13 @@ in enableGnomeKeyring = true; }; + systemd.packages = with pkgs.gnome3; [ + gnome-flashback + ] ++ (map + (wm: gnome-flashback.mkSystemdTargetForWm { + inherit (wm) wmName; + }) cfg.flashback.customSessions); + services.dbus.packages = [ pkgs.gnome3.gnome-screensaver ]; diff --git a/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix index e381860ca2c9..dc7e0ed222f0 100644 --- a/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix +++ b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix @@ -22,6 +22,7 @@ , writeTextFile , writeShellScriptBin , xkeyboard_config +, runCommand }: let @@ -141,6 +142,13 @@ let DesktopNames=GNOME-Flashback;GNOME; ''; }; + + mkSystemdTargetForWm = { wmName }: + runCommand "gnome-flashback-${wmName}.target" {} '' + mkdir -p $out/lib/systemd/user + cp "${gnome-flashback}/lib/systemd/user/gnome-session-x11@gnome-flashback-metacity.target" \ + "$out/lib/systemd/user/gnome-session-x11@gnome-flashback-${wmName}.target" + ''; }; meta = with stdenv.lib; {