mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2026-04-27 07:48:44 +02:00
Compare commits
3 commits
aedea1d68a
...
583ea7d3a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
583ea7d3a7 | ||
|
|
16cc7e4dfa | ||
|
|
bf90c14bc5 |
4 changed files with 84 additions and 38 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -222,11 +222,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775232991,
|
"lastModified": 1776114880,
|
||||||
"narHash": "sha256-QkmL6kwmQXBN24FVOZSfFkNpUgu8jHfdYPoA2H8sA7k=",
|
"narHash": "sha256-Az1+aJxg7MsH+u19hmW7KEIAeZh7PUgtpX7EM3QQkDM=",
|
||||||
"owner": "Stunkymonkey",
|
"owner": "Stunkymonkey",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "d6ee262f8d4db0815b08c76714becc09af11f962",
|
"rev": "10da53a55f4fb47139ec002f3c7081d85c259e18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ _: {
|
||||||
my.profiles = {
|
my.profiles = {
|
||||||
clean.enable = true;
|
clean.enable = true;
|
||||||
development.enable = true;
|
development.enable = true;
|
||||||
gaming.enable = true;
|
gaming = {
|
||||||
|
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 1' >> /root/.profile
|
echo 'cryptsetup-askpass && { echo "Unlock was successful; exiting SSH session"; exit 0; }' >> /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 1' >> /var/empty/.profile
|
echo 'systemctl default && { echo "Unlock was successful; exiting SSH session"; exit 0; }' >> /var/empty/.profile
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,40 +10,83 @@ in
|
||||||
{
|
{
|
||||||
options.my.profiles.gaming = with lib; {
|
options.my.profiles.gaming = with lib; {
|
||||||
enable = mkEnableOption "gaming profile";
|
enable = mkEnableOption "gaming profile";
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
gamescope = {
|
||||||
environment.systemPackages = with pkgs; [
|
enable = mkEnableOption "gamescope profile";
|
||||||
blobby
|
username = mkOption {
|
||||||
discord
|
type = types.str;
|
||||||
gamemode
|
default = "felix";
|
||||||
luanti
|
description = "Username for gamescope autologin";
|
||||||
moonlight-qt # steam-link stream
|
|
||||||
openttd
|
|
||||||
prismlauncher # replace minecraft
|
|
||||||
SDL
|
|
||||||
SDL2
|
|
||||||
steam
|
|
||||||
superTuxKart
|
|
||||||
wine
|
|
||||||
winetricks
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
# fix gamemode: https://github.com/NixOS/nixpkgs/issues/389142
|
|
||||||
package = pkgs.steam.override {
|
|
||||||
extraPkgs =
|
|
||||||
pkgs: with pkgs; [
|
|
||||||
gamemode
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
|
||||||
graphics.enable32Bit = true;
|
|
||||||
graphics.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
|
||||||
};
|
|
||||||
services.pulseaudio.support32Bit = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable (
|
||||||
|
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
blobby
|
||||||
|
discord
|
||||||
|
gamemode
|
||||||
|
luanti
|
||||||
|
mangohud
|
||||||
|
moonlight-qt # steam-link stream
|
||||||
|
openttd
|
||||||
|
prismlauncher # replace minecraft
|
||||||
|
SDL
|
||||||
|
SDL2
|
||||||
|
steam
|
||||||
|
superTuxKart
|
||||||
|
wine
|
||||||
|
winetricks
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
# remotePlay.openFirewall = cfg.gamescope.enable;
|
||||||
|
# fix gamemode: https://github.com/NixOS/nixpkgs/issues/389142
|
||||||
|
package = pkgs.steam.override {
|
||||||
|
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