misc: Add ReplaySorcery
This commit is contained in:
parent
dfef2f4aa5
commit
c3a3d9ae85
@ -3,7 +3,6 @@
|
|||||||
let
|
let
|
||||||
unstable = (import ../modules/unstable.nix config);
|
unstable = (import ../modules/unstable.nix config);
|
||||||
customPkgs = import ../packages/overlay.nix;
|
customPkgs = import ../packages/overlay.nix;
|
||||||
gamemode = pkgs.callPackage ../packages/gamemode {};
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./generic.nix
|
./generic.nix
|
||||||
@ -37,6 +36,7 @@ in {
|
|||||||
libvirt virt-manager qemu
|
libvirt virt-manager qemu
|
||||||
gamemode # Custom package
|
gamemode # Custom package
|
||||||
key-mapper # Custom package
|
key-mapper # Custom package
|
||||||
|
replaysorcery # Custom package
|
||||||
scream
|
scream
|
||||||
linuxPackages_zen.vendor-reset
|
linuxPackages_zen.vendor-reset
|
||||||
];
|
];
|
||||||
@ -87,6 +87,7 @@ in {
|
|||||||
kernelModules = [];
|
kernelModules = [];
|
||||||
extraModulePackages = [ pkgs.linuxPackages_zen.vendor-reset ];
|
extraModulePackages = [ pkgs.linuxPackages_zen.vendor-reset ];
|
||||||
kernelPackages = pkgs.linuxPackages_zen;
|
kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
#kernelPackages = pkgs.linuxPackages_lqx;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@ -111,7 +112,7 @@ in {
|
|||||||
cgroup_device_acl = [
|
cgroup_device_acl = [
|
||||||
"/dev/null", "/dev/zero", "/dev/full",
|
"/dev/null", "/dev/zero", "/dev/full",
|
||||||
"/dev/random", "/dev/kvm", "/dev/kqemu",
|
"/dev/random", "/dev/kvm", "/dev/kqemu",
|
||||||
"/dev/rtc", "/dev/hpet", "dev/ptmx",
|
"/dev/rtc", "/dev/hpet", "/dev/ptmx",
|
||||||
"/dev/input/by-id/usb-Logitech_G700s_Rechargeable_Gaming_Mouse_93DF48160007-event-mouse",
|
"/dev/input/by-id/usb-Logitech_G700s_Rechargeable_Gaming_Mouse_93DF48160007-event-mouse",
|
||||||
"/dev/input/by-id/usb-Razer_Razer_BlackWidow_Ultimate-event-kbd",
|
"/dev/input/by-id/usb-Razer_Razer_BlackWidow_Ultimate-event-kbd",
|
||||||
"/dev/input/by-id/usb-Razer_Razer_BlackWidow_Ultimate-if01-event-kbd",
|
"/dev/input/by-id/usb-Razer_Razer_BlackWidow_Ultimate-if01-event-kbd",
|
||||||
@ -125,22 +126,39 @@ in {
|
|||||||
services.NetworkManager-wait-online.enable = false;
|
services.NetworkManager-wait-online.enable = false;
|
||||||
user.services = {
|
user.services = {
|
||||||
scream = {
|
scream = {
|
||||||
enable = false; # Started by the passthrough script
|
|
||||||
description = "Audio receiver for the Scream virtual network sound card";
|
description = "Audio receiver for the Scream virtual network sound card";
|
||||||
wantedBy = [ "multi-user.target" ];
|
#wantedBy = [ "default.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.scream}/bin/scream -i virbr0 -o pulse";
|
ExecStart = "${pkgs.scream}/bin/scream -i virbr0 -o pulse";
|
||||||
RestartAlways = "always";
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
replaysorcery-kms = {
|
||||||
|
description = "An open-source, instant-replay solution for Linux; KMS service";
|
||||||
|
#wantedBy = [ "default.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery kms-service";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
replaysorcery = {
|
||||||
|
description = "An open-source, instant-replay solution for Linux";
|
||||||
|
#wantedBy = [ "default.target" ];
|
||||||
|
requires = [ "replaysorcery-kms.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery";
|
||||||
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
gamemode = {
|
gamemode = {
|
||||||
enable = true;
|
|
||||||
description = "A daemon/lib combo for Linux that allows games to request a set of optimisations be temporarily applied to the host OS.";
|
description = "A daemon/lib combo for Linux that allows games to request a set of optimisations be temporarily applied to the host OS.";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${gamemode}/bin/gamemoded";
|
ExecStart = "${pkgs.gamemode}/bin/gamemoded";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -27,3 +27,10 @@ inhibit_screensaver=1
|
|||||||
[supervisor]
|
[supervisor]
|
||||||
|
|
||||||
[custom]
|
[custom]
|
||||||
|
start=systemctl --user start replaysorcery-kms
|
||||||
|
systemctl --user start replaysorcery
|
||||||
|
|
||||||
|
end=systemctl --user stop replaysorcery-kms
|
||||||
|
systemctl --user stop replaysorcery
|
||||||
|
|
||||||
|
script_timeout=10
|
@ -11,4 +11,7 @@
|
|||||||
gnome = {
|
gnome = {
|
||||||
gnome-terminal = pkgs.callPackage ./gnome-terminal {};
|
gnome-terminal = pkgs.callPackage ./gnome-terminal {};
|
||||||
};
|
};
|
||||||
|
hydrapaper = pkgs.callPackage ./hydrapaper {};
|
||||||
|
replaysorcery = pkgs.callPackage ./replaysorcery {};
|
||||||
|
helvum = pkgs.callPackage ./helvum {};
|
||||||
}
|
}
|
||||||
|
@ -8,4 +8,5 @@ self: super:
|
|||||||
gnomeExtensionsCustom = {
|
gnomeExtensionsCustom = {
|
||||||
notification-timeout = super.callPackage ./gnomeExtensions-notification-timeout {};
|
notification-timeout = super.callPackage ./gnomeExtensions-notification-timeout {};
|
||||||
};
|
};
|
||||||
|
replaysorcery = super.callPackage ./replaysorcery {};
|
||||||
}
|
}
|
||||||
|
39
packages/replaysorcery/default.nix
Normal file
39
packages/replaysorcery/default.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ stdenv, lib,
|
||||||
|
pkgconfig, cmake, ffmpeg, libdrm, libpulseaudio, xorg, libnotify,
|
||||||
|
fetchgit }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "ReplaySorcery";
|
||||||
|
version = "0.6.0";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/matanui159/${pname}.git";
|
||||||
|
rev = "d8d5921988b5161004aed6209bd88251d721611d";
|
||||||
|
sha256 = "14m67mlfp0zh9s0bhz1qxppivw2aignxqb51xb5cy3v8farxmcv4";
|
||||||
|
deepClone = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkgconfig cmake
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
ffmpeg libdrm libpulseaudio xorg.libxcb xorg.libX11
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./ignore-systemd.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "An open-source, instant-replay solution for Linux";
|
||||||
|
homepage = "https://github.com/matanui159/ReplaySorcery";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
maintainers = [ ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
18
packages/replaysorcery/ignore-systemd.patch
Normal file
18
packages/replaysorcery/ignore-systemd.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 4633f85..e3fdd7c 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -213,8 +213,8 @@ install(TARGETS ${binary} DESTINATION bin PERMISSIONS ${permissions})
|
||||||
|
install(FILES sys/replay-sorcery.conf DESTINATION etc)
|
||||||
|
|
||||||
|
# Install services
|
||||||
|
-set(RS_SYSTEMD_DIR /usr/lib/systemd CACHE STRING "Where to install the systemd services")
|
||||||
|
-configure_file(sys/replay-sorcery.service.in replay-sorcery.service)
|
||||||
|
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/replay-sorcery.service" DESTINATION "${RS_SYSTEMD_DIR}/user")
|
||||||
|
-configure_file(sys/replay-sorcery-kms.service.in replay-sorcery-kms.service)
|
||||||
|
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/replay-sorcery-kms.service" DESTINATION "${RS_SYSTEMD_DIR}/system")
|
||||||
|
+#set(RS_SYSTEMD_DIR /usr/lib/systemd CACHE STRING "Where to install the systemd services")
|
||||||
|
+#configure_file(sys/replay-sorcery.service.in replay-sorcery.service)
|
||||||
|
+#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/replay-sorcery.service" DESTINATION "${RS_SYSTEMD_DIR}/user")
|
||||||
|
+#configure_file(sys/replay-sorcery-kms.service.in replay-sorcery-kms.service)
|
||||||
|
+#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/replay-sorcery-kms.service" DESTINATION "${RS_SYSTEMD_DIR}/system")
|
Loading…
Reference in New Issue
Block a user