Browse Source

gaming: move to components, fixe steam xdg home, misc fixes

master
parent
commit
b5be0aab1b
Signed by: govanify GPG Key ID: DE62E1E2A6145556
6 changed files with 53 additions and 39 deletions
  1. +4
    -5
      common/desktop.nix
  2. +0
    -32
      common/gaming.nix
  3. +1
    -0
      components/headfull/graphical/default.nix
  4. +46
    -0
      components/headfull/graphical/gaming.nix
  5. +1
    -1
      components/macspoofer.nix
  6. +1
    -1
      components/xdg.nix

+ 4
- 5
common/desktop.nix View File

@ -1,10 +1,9 @@
{ config, lib, pkgs, ... }:
{
imports = [
./headfull.nix
./graphical.nix
./gaming.nix
];
./headfull.nix
./graphical.nix
];
navi.components.headfull.graphical.gaming.enable = true;
}

+ 0
- 32
common/gaming.nix View File

@ -1,32 +0,0 @@
{ config, pkgs, lib, ... }: {
navi.components.hardening = {
legacy = true;
};
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
hardware.pulseaudio.support32Bit = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
steam
(
pkgs.writeTextFile {
name = "startsteam";
destination = "/bin/startsteam";
executable = true;
text = ''
#! ${pkgs.bash}/bin/bash
# XDG compliance
mkdir -p $XDG_DATA_HOME/steam-home
HOME=$XDG_DATA_HOME/steam
# then start the launcher
exec steam
'';
}
)
retroarch
];
}

+ 1
- 0
components/headfull/graphical/default.nix View File

@ -4,5 +4,6 @@
./browser.nix
./splash.nix
./wm.nix
./gaming.nix
];
}

+ 46
- 0
components/headfull/graphical/gaming.nix View File

@ -0,0 +1,46 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.navi.components.headfull.graphical.gaming;
in
{
options.navi.components.headfull.graphical.gaming = {
enable = mkEnableOption "Enable navi's gaming setup";
retro = mkOption {
type = types.bool;
default = true;
description = ''
This adds various emulators to navi's gaming setup
'';
};
};
config = mkIf cfg.enable {
# we need to enable x86 if we want to start most games
navi.components.hardening = {
legacy = true;
};
hardware.opengl.driSupport32Bit = true;
hardware.pulseaudio.support32Bit = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
steam
(
pkgs.writeTextFile {
name = "startsteam";
destination = "/bin/startsteam";
executable = true;
text = ''
#!${pkgs.bash}/bin/bash
# XDG compliance
mkdir -p $XDG_DATA_HOME/steam-home
HOME=$XDG_DATA_HOME/steam-home
# then start the launcher
exec steam
'';
}
)] ++ optionals cfg.retro [ retroarch pcsx2 ];
};
}

+ 1
- 1
components/macspoofer.nix View File

@ -5,7 +5,7 @@ let
in
{
options.navi.components.macspoofer = {
enable = mkEnableOption "Force programs to adhere to the XDG base specification";
enable = mkEnableOption "Enables navi's MAC address spoofer";
full_random = mkOption {
type = types.bool;
default = false;


+ 1
- 1
components/xdg.nix View File

@ -27,7 +27,7 @@ in
type = types.str;
default = ".local/share";
description = ''
Value assigned to XDG_CONFIG_HOME minus the HOME
Value assigned to XDG_DATA_HOME minus the HOME
'';
};
cache = mkOption {


Loading…
Cancel
Save