restructuring4
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
./gtk
|
./gtk
|
||||||
./shell
|
./shell
|
||||||
./firefox
|
./firefox
|
||||||
./steam
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
pkgs,
|
programs.steam = {
|
||||||
lib,
|
enable = true;
|
||||||
config,
|
package = pkgs.steam.override {
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
steam-with-pkgs = pkgs.steam.override {
|
|
||||||
extraPkgs =
|
extraPkgs =
|
||||||
pkgs: with pkgs; [
|
pkgs: with pkgs; [
|
||||||
xorg.libXcursor
|
xorg.libXcursor
|
||||||
@@ -22,40 +19,5 @@ let
|
|||||||
mangohud
|
mangohud
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
monitor = lib.head (lib.filter (m: m.primary) config.monitors);
|
|
||||||
steam-session =
|
|
||||||
let
|
|
||||||
gamescope = lib.concatStringsSep " " [
|
|
||||||
(lib.getExe pkgs.gamescope)
|
|
||||||
"--output-width ${toString monitor.width}"
|
|
||||||
"--output-height ${toString monitor.height}"
|
|
||||||
"--framerate-limit ${toString monitor.refreshRate}"
|
|
||||||
"--prefer-output ${monitor.name}"
|
|
||||||
"--adaptive-sync"
|
|
||||||
"--expose-wayland"
|
|
||||||
"--steam"
|
|
||||||
];
|
|
||||||
steam = lib.concatStringsSep " " [
|
|
||||||
"steam"
|
|
||||||
"steam://open/bigpicture"
|
|
||||||
];
|
|
||||||
in
|
|
||||||
pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" # ini
|
|
||||||
|
|
||||||
''
|
|
||||||
[Desktop Entry]
|
|
||||||
Name=Steam Session
|
|
||||||
Exec=${gamescope} -- ${steam}
|
|
||||||
Type=Application
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
steam-with-pkgs
|
|
||||||
steam-session
|
|
||||||
pkgs.gamescope
|
|
||||||
pkgs.mangohud
|
|
||||||
pkgs.protontricks
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
# If you want to use modules from other flakes (such as nixos-hardware):
|
# If you want to use modules from other flakes (such as nixos-hardware):
|
||||||
# inputs.hardware.nixosModules.common-cpu-amd
|
# inputs.hardware.nixosModules.common-cpu-amd
|
||||||
# inputs.hardware.nixosModules.common-ssd
|
# inputs.hardware.nixosModules.common-ssd
|
||||||
|
./steam
|
||||||
# You can also split up your configuration and import pieces of it here:
|
# You can also split up your configuration and import pieces of it here:
|
||||||
# ./users.nix
|
# ./users.nix
|
||||||
# Import your generated (nixos-generate-config) hardware configuration
|
# Import your generated (nixos-generate-config) hardware configuration
|
||||||
|
|||||||
23
nixos/steam/default.nix
Normal file
23
nixos/steam/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.steam.override {
|
||||||
|
extraPkgs =
|
||||||
|
pkgs: with pkgs; [
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXinerama
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
libpng
|
||||||
|
libpulseaudio
|
||||||
|
libvorbis
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
libkrb5
|
||||||
|
keyutils
|
||||||
|
gamescope
|
||||||
|
mangohud
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user