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": {
|
||||
"locked": {
|
||||
"lastModified": 1776114880,
|
||||
"narHash": "sha256-Az1+aJxg7MsH+u19hmW7KEIAeZh7PUgtpX7EM3QQkDM=",
|
||||
"lastModified": 1775232991,
|
||||
"narHash": "sha256-QkmL6kwmQXBN24FVOZSfFkNpUgu8jHfdYPoA2H8sA7k=",
|
||||
"owner": "Stunkymonkey",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "10da53a55f4fb47139ec002f3c7081d85c259e18",
|
||||
"rev": "d6ee262f8d4db0815b08c76714becc09af11f962",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ _: {
|
|||
my.profiles = {
|
||||
clean.enable = true;
|
||||
development.enable = true;
|
||||
gaming = {
|
||||
enable = true;
|
||||
gamescope.enable = true;
|
||||
};
|
||||
gaming.enable = true;
|
||||
nix.enable = true;
|
||||
sync.enable = true;
|
||||
update.enable = true;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ in
|
|||
};
|
||||
|
||||
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";
|
||||
serviceConfig.Type = "oneshot";
|
||||
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,27 +10,14 @@ in
|
|||
{
|
||||
options.my.profiles.gaming = with lib; {
|
||||
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 (
|
||||
|
||||
lib.mkMerge [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
blobby
|
||||
discord
|
||||
gamemode
|
||||
luanti
|
||||
mangohud
|
||||
moonlight-qt # steam-link stream
|
||||
openttd
|
||||
prismlauncher # replace minecraft
|
||||
|
|
@ -44,7 +31,6 @@ in
|
|||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# remotePlay.openFirewall = cfg.gamescope.enable;
|
||||
# fix gamemode: https://github.com/NixOS/nixpkgs/issues/389142
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs =
|
||||
|
|
@ -58,35 +44,6 @@ in
|
|||
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