Add gamin module in both nixos and home-manager
This commit is contained in:
parent
2b7d1ec452
commit
f9062e9d15
7 changed files with 71 additions and 11 deletions
|
@ -2,5 +2,6 @@
|
||||||
config.modules = {
|
config.modules = {
|
||||||
video.kdenlive.enable = true;
|
video.kdenlive.enable = true;
|
||||||
web.qutebrowser.enable = true;
|
web.qutebrowser.enable = true;
|
||||||
|
gaming.lutris.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
3
hosts/morty/nixos-config.nix
Normal file
3
hosts/morty/nixos-config.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{ ... }: {
|
||||||
|
config.modules.gaming.steam.enable = true;
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./gaming/lutris
|
||||||
./video/kdenlive
|
./video/kdenlive
|
||||||
./web/qutebrowser/default.nix
|
./web/qutebrowser/default.nix
|
||||||
];
|
];
|
||||||
|
|
29
modules/home-manager/gaming/lutris/default.nix
Normal file
29
modules/home-manager/gaming/lutris/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.gaming.lutris;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.gaming.lutris = {
|
||||||
|
enable = mkEnableOption "enable Lutris Gaming preservation platform";
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
( lutris.override {
|
||||||
|
extraLibraries = pkgs: [
|
||||||
|
wine
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXinerama
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
libpng
|
||||||
|
libpulseaudio
|
||||||
|
libvorbis
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
libkrb5
|
||||||
|
keyutils
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
6
modules/nixos/default.nix
Normal file
6
modules/nixos/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
_:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gaming/steam
|
||||||
|
];
|
||||||
|
}
|
28
modules/nixos/gaming/steam/default.nix
Normal file
28
modules/nixos/gaming/steam/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.gaming.steam;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.gaming.steam = {
|
||||||
|
enable = mkEnableOption "Enable Steam Platform";
|
||||||
|
|
||||||
|
gamescope = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "enable gamescope session (default false)";
|
||||||
|
};
|
||||||
|
gamemode = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "enable Feral Gamemode (default false)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.gamemode.enable = cfg.gamemode;
|
||||||
|
programs.gamescope.enable = cfg.gamescope;
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,8 @@
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
../hosts/${hostname}/hardware-configuration.nix
|
../hosts/${hostname}/hardware-configuration.nix
|
||||||
|
../hosts/${hostname}/nixos-config.nix
|
||||||
|
../modules/nixos
|
||||||
./includes/hardware/bootloader.nix
|
./includes/hardware/bootloader.nix
|
||||||
./includes/system/locales.nix
|
./includes/system/locales.nix
|
||||||
./includes/system/flakes.nix
|
./includes/system/flakes.nix
|
||||||
|
@ -20,12 +22,6 @@
|
||||||
./includes/desktop/xdg-portal.nix
|
./includes/desktop/xdg-portal.nix
|
||||||
]
|
]
|
||||||
else []
|
else []
|
||||||
) ++ (
|
|
||||||
if hostConfig.gaming then
|
|
||||||
[
|
|
||||||
./includes/gaming/steam.nix
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
) ++ (
|
) ++ (
|
||||||
if hostConfig.laptop then
|
if hostConfig.laptop then
|
||||||
[
|
[
|
||||||
|
@ -72,7 +68,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../hosts/${hostname}/home.nix
|
../hosts/${hostname}/home-config.nix
|
||||||
../modules/home-manager/default.nix
|
../modules/home-manager/default.nix
|
||||||
../home-manager/cli
|
../home-manager/cli
|
||||||
] ++ (if hostConfig.desktop then
|
] ++ (if hostConfig.desktop then
|
||||||
|
@ -86,10 +82,6 @@
|
||||||
../home-manager/mpv
|
../home-manager/mpv
|
||||||
]
|
]
|
||||||
else []
|
else []
|
||||||
) ++ (
|
|
||||||
if hostConfig.gaming then
|
|
||||||
[ ../home-manager/lutris.nix ]
|
|
||||||
else []
|
|
||||||
) ++ lib.optional (
|
) ++ lib.optional (
|
||||||
builtins.pathExists ../home-manager/hosts/${hostname}.nix
|
builtins.pathExists ../home-manager/hosts/${hostname}.nix
|
||||||
) ../home-manager/hosts/${hostname}.nix;
|
) ../home-manager/hosts/${hostname}.nix;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue