mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2026-04-27 07:48:44 +02:00
Compare commits
No commits in common. "583ea7d3a72a8232220f6ac74531029f6160f853" and "aedea1d68a8b34a249828c6eac2c016bf0a2505f" have entirely different histories.
583ea7d3a7
...
aedea1d68a
4 changed files with 38 additions and 84 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -222,11 +222,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776114880,
|
"lastModified": 1775232991,
|
||||||
"narHash": "sha256-Az1+aJxg7MsH+u19hmW7KEIAeZh7PUgtpX7EM3QQkDM=",
|
"narHash": "sha256-QkmL6kwmQXBN24FVOZSfFkNpUgu8jHfdYPoA2H8sA7k=",
|
||||||
"owner": "Stunkymonkey",
|
"owner": "Stunkymonkey",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "10da53a55f4fb47139ec002f3c7081d85c259e18",
|
"rev": "d6ee262f8d4db0815b08c76714becc09af11f962",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,7 @@ _: {
|
||||||
my.profiles = {
|
my.profiles = {
|
||||||
clean.enable = true;
|
clean.enable = true;
|
||||||
development.enable = true;
|
development.enable = true;
|
||||||
gaming = {
|
gaming.enable = true;
|
||||||
enable = true;
|
|
||||||
gamescope.enable = true;
|
|
||||||
};
|
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
sync.enable = true;
|
sync.enable = true;
|
||||||
update.enable = true;
|
update.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
postCommands = lib.optionalString (cfg.mode == "grub2") ''
|
postCommands = lib.optionalString (cfg.mode == "grub2") ''
|
||||||
echo 'cryptsetup-askpass && { echo "Unlock was successful; exiting SSH session"; exit 0; }' >> /root/.profile
|
echo 'cryptsetup-askpass || echo "Unlock was successful; exiting SSH session" && exit 1' >> /root/.profile
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -49,7 +49,7 @@ in
|
||||||
unitConfig.DefaultDependencies = "no";
|
unitConfig.DefaultDependencies = "no";
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
script = ''
|
script = ''
|
||||||
echo 'systemctl default && { echo "Unlock was successful; exiting SSH session"; exit 0; }' >> /var/empty/.profile
|
echo 'systemctl default || echo "Unlock was successful; exiting SSH session" && exit 1' >> /var/empty/.profile
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,83 +10,40 @@ in
|
||||||
{
|
{
|
||||||
options.my.profiles.gaming = with lib; {
|
options.my.profiles.gaming = with lib; {
|
||||||
enable = mkEnableOption "gaming profile";
|
enable = mkEnableOption "gaming profile";
|
||||||
|
|
||||||
gamescope = {
|
|
||||||
enable = mkEnableOption "gamescope profile";
|
|
||||||
username = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "felix";
|
|
||||||
description = "Username for gamescope autologin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
blobby
|
||||||
|
discord
|
||||||
|
gamemode
|
||||||
|
luanti
|
||||||
|
moonlight-qt # steam-link stream
|
||||||
|
openttd
|
||||||
|
prismlauncher # replace minecraft
|
||||||
|
SDL
|
||||||
|
SDL2
|
||||||
|
steam
|
||||||
|
superTuxKart
|
||||||
|
wine
|
||||||
|
winetricks
|
||||||
|
];
|
||||||
|
|
||||||
lib.mkMerge [
|
programs.steam = {
|
||||||
{
|
enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
# fix gamemode: https://github.com/NixOS/nixpkgs/issues/389142
|
||||||
blobby
|
package = pkgs.steam.override {
|
||||||
discord
|
extraPkgs =
|
||||||
gamemode
|
pkgs: with pkgs; [
|
||||||
luanti
|
gamemode
|
||||||
mangohud
|
];
|
||||||
moonlight-qt # steam-link stream
|
};
|
||||||
openttd
|
};
|
||||||
prismlauncher # replace minecraft
|
|
||||||
SDL
|
|
||||||
SDL2
|
|
||||||
steam
|
|
||||||
superTuxKart
|
|
||||||
wine
|
|
||||||
winetricks
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam = {
|
hardware = {
|
||||||
enable = true;
|
graphics.enable32Bit = true;
|
||||||
# remotePlay.openFirewall = cfg.gamescope.enable;
|
graphics.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
||||||
# fix gamemode: https://github.com/NixOS/nixpkgs/issues/389142
|
};
|
||||||
package = pkgs.steam.override {
|
services.pulseaudio.support32Bit = true;
|
||||||
extraPkgs =
|
};
|
||||||
pkgs: with pkgs; [
|
|
||||||
gamemode
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
graphics.enable32Bit = true;
|
|
||||||
graphics.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.pulseaudio.support32Bit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
(lib.mkIf cfg.gamescope.enable {
|
|
||||||
programs = {
|
|
||||||
gamescope = {
|
|
||||||
enable = true;
|
|
||||||
capSysNice = true;
|
|
||||||
};
|
|
||||||
steam.gamescopeSession.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
xserver.enable = false;
|
|
||||||
|
|
||||||
getty.autologinUser = cfg.gamescope.username;
|
|
||||||
|
|
||||||
greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${lib.getExe pkgs.gamescope} -W 1920 -H 1080 -f -e --xwayland-count 2 --hdr-enabled --hdr-itm-enabled -- ${lib.getExe config.programs.steam.package} -pipewire-dmabuf -gamepadui -steamos3 > /dev/null 2>&1";
|
|
||||||
user = cfg.gamescope.username;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue