cleaning up old files, only a bit more to go

This commit is contained in:
Chris Kruining 2024-07-23 23:56:05 +02:00
parent 2b71c1bb8e
commit 975f97edee
13 changed files with 90 additions and 339 deletions

View file

@ -0,0 +1,28 @@
{ options, config, lib, pkgs, ... }:
let
inherit (lib.modules) mkIf mkForce mkMerge;
cfg = config.modules.desktop.applications.steam;
desktop = config.modules.desktop;
in
{
options.modules.desktop.applications.steam = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption "Enable office suite (only-office)";
};
config = mkIf cfg.enable
{
user.packages = attrValues {
inherit (pkgs) onlyoffice-bin;
};
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ "corefonts" ];
fonts.packages = with pkgs; [
corefonts
];
};
}

View file

@ -0,0 +1,57 @@
{ options, config, lib, pkgs, ... }:
let
inherit (lib.modules) mkIf mkForce mkMerge;
cfg = config.modules.desktop.applications.steam;
desktop = config.modules.desktop;
in
{
options.modules.desktop.applications.steam = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption "Enable steam, the game/software store";
hardware.enable = mkEnableOption "Support for steam hardware";
};
config = mkIf cfg.enable (mkMerge [
{
programs.steam = {
enable = true;
package = pkgs.steam-small.override {
extraEnv = {
DXVK_HUD = "compiler";
MANGOHUD = true;
};
};
};
hardware.steam-hardware.enable = mkForce cfg.hardware.enable;
# https://github.com/FeralInteractive/gamemode
programs.gamemode = {
enable = true;
enableRenice = true;
settings = {};
};
}
(mkIf (desktop.type == "wayland") {
# https://github.com/ValveSoftware/gamescope
programs.gamescope = {
enable = true;
capSysNice = true;
env = {
DXVK_HDR = "1";
ENABLE_GAMESCOPE_WSI = "1";
WINE_FULLSCREEN_FSR = "1";
WLR_RENDERER = "vulkan";
};
args = ["--hdr-enabled"];
};
programs.steam.gamescopeSession = {
enable = true;
args = ["--immediate-flips"];
};
})
]);
}