miku: Fix gajim and gamemode
This commit is contained in:
parent
25b4dcac69
commit
6cd0324cbf
@ -27,27 +27,43 @@ in {
|
|||||||
#}))
|
#}))
|
||||||
|
|
||||||
# Steam overlay
|
# Steam overlay
|
||||||
(final: prev:
|
# TODO: Replace with the commented out version below
|
||||||
let
|
(final: prev: let
|
||||||
# NOTE: This is a really messy solution
|
buildFHSUserEnvBubblewrap = prev.callPackage ../packages/build-support/build-fhs-userenv-bubblewrap {};
|
||||||
buildFHSUserEnvBubblewrap = prev.callPackage ../packages/build-support/build-fhs-userenv-bubblewrap {};
|
steamPackages = lib.dontRecurseIntoAttrs (prev.callPackage ../packages/games/steam {
|
||||||
in {
|
buildFHSUserEnv = buildFHSUserEnvBubblewrap;
|
||||||
steamPackages = prev.steamPackages.override {
|
});
|
||||||
buildFHSUserEnv = buildFHSUserEnvBubblewrap;
|
in {
|
||||||
# Include gamemode in the FHS
|
buildFHSUserEnvBubblewrap = buildFHSUserEnvBubblewrap;
|
||||||
#extraPkgs = (pkgs: with pkgs; [ gamemode ]);
|
steamPackages = steamPackages;
|
||||||
};
|
steam = steamPackages.steam-fhsenv.override {
|
||||||
|
extraPkgs = pkgs: with pkgs; [ gamemode ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
#(final: prev:
|
||||||
|
# let
|
||||||
|
# # NOTE: This is a really messy solution
|
||||||
|
# buildFHSUserEnvBubblewrap = prev.callPackage ../packages/build-support/build-fhs-userenv-bubblewrap {};
|
||||||
|
# in {
|
||||||
|
# steamPackages = prev.steamPackages.override {
|
||||||
|
# buildFHSUserEnv = buildFHSUserEnvBubblewrap;
|
||||||
|
# # Include gamemode in the FHS
|
||||||
|
# #extraPkgs = (pkgs: with pkgs; [ gamemode ]);
|
||||||
|
# };
|
||||||
|
|
||||||
steam = final.steamPackages.steam-fhsenv.overrideAttrs (old: {
|
# steam = prev.steamPackages.steam-fhsenv.overrideAttrs (old: {
|
||||||
specifyHomeDirs = true;
|
# specifyHomeDirs = true;
|
||||||
chdirTo = "/home/$USER";
|
# chdirTo = "/home/$USER";
|
||||||
});
|
# });
|
||||||
steam-run = final.steam.run;
|
# #steam = final.steamPackages.steam-fhsenv.override {
|
||||||
steam-run-native = (final.steam.override {
|
# # extraPkgs = pkgs: with pkgs; [ gamemode ];
|
||||||
nativeOnly = true;
|
# #};
|
||||||
});
|
# steam-run = final.steam.run;
|
||||||
steamcmd = final.steamPackages.steamcmd;
|
# steam-run-native = (final.steam.override {
|
||||||
})
|
# nativeOnly = true;
|
||||||
|
# });
|
||||||
|
# steamcmd = final.steamPackages.steamcmd;
|
||||||
|
# })
|
||||||
|
|
||||||
# Simple overrides
|
# Simple overrides
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
@ -57,6 +73,11 @@ in {
|
|||||||
"--set" "DRI_PRIME" "1"
|
"--set" "DRI_PRIME" "1"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gajim = prev.gajim.overrideAttrs (old: {
|
||||||
|
# Enable notification sounds
|
||||||
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ prev.gsound ];
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
customPkgs
|
customPkgs
|
||||||
@ -66,6 +87,23 @@ in {
|
|||||||
unstable = unstable;
|
unstable = unstable;
|
||||||
nur = (import ../modules/nur.nix pkgs);
|
nur = (import ../modules/nur.nix pkgs);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security = {
|
||||||
|
pam.loginLimits = [
|
||||||
|
{
|
||||||
|
domain = "@gamemode";
|
||||||
|
item = "-";
|
||||||
|
type = "nice";
|
||||||
|
value = "-10";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
wrappers = {
|
||||||
|
gamemoded = {
|
||||||
|
source = "${pkgs.gamemode}/bin/gamemoded";
|
||||||
|
capabilities = "cap_sys_nice+ep";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
@ -298,12 +336,20 @@ in {
|
|||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# TODO: Remove once in stable or I decide to use unstable
|
||||||
gamemode = {
|
gamemode = {
|
||||||
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 = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
|
environment.PATH = lib.mkForce (pkgs.linkFarm "pkexec" [
|
||||||
|
{
|
||||||
|
name = "pkexec";
|
||||||
|
path = "${config.security.wrapperDir}/pkexec";
|
||||||
|
}
|
||||||
|
]);
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.gamemode}/bin/gamemoded";
|
#ExecStart = "${pkgs.gamemode}/bin/gamemoded";
|
||||||
|
ExecStart = "${config.security.wrapperDir}/gamemoded";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user