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