Merge pull request #72959 from worldofpeace/gnome-flashback-systemd

nixos/gnome3: add gnome-flashback to systemd.packages
This commit is contained in:
worldofpeace 2019-11-12 01:53:09 +00:00 committed by GitHub
commit 470254a6da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -184,6 +184,13 @@ in
enableGnomeKeyring = true; enableGnomeKeyring = true;
}; };
systemd.packages = with pkgs.gnome3; [
gnome-flashback
] ++ (map
(wm: gnome-flashback.mkSystemdTargetForWm {
inherit (wm) wmName;
}) cfg.flashback.customSessions);
services.dbus.packages = [ services.dbus.packages = [
pkgs.gnome3.gnome-screensaver pkgs.gnome3.gnome-screensaver
]; ];

View file

@ -22,6 +22,7 @@
, writeTextFile , writeTextFile
, writeShellScriptBin , writeShellScriptBin
, xkeyboard_config , xkeyboard_config
, runCommand
}: }:
let let
@ -141,6 +142,13 @@ let
DesktopNames=GNOME-Flashback;GNOME; 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; { meta = with stdenv.lib; {