Compare commits

..

5 Commits

Author SHA1 Message Date
Noah Masur
8d8dd8ad62 use css highlighting for rasi files 2023-06-01 22:55:05 -04:00
Noah Masur
bad49cb2c3 fix bash interactive from fish 2023-06-01 22:54:25 -04:00
Noah Masur
c052813f6d only toggle sleep mobo fix if needed 2023-06-01 22:54:08 -04:00
Noah Masur
ed19eaafd1 auto wake and sleep for garbage collection
only sleep again for non-servers
2023-06-01 22:42:06 -04:00
Noah Masur
09de243bd3 enable ryujinx 2023-06-01 22:39:05 -04:00
7 changed files with 30 additions and 5 deletions

View File

@ -91,6 +91,7 @@ nixpkgs.lib.nixosSystem {
legendary.enable = true;
lutris.enable = true;
leagueoflegends.enable = true;
ryujinx.enable = true;
};
}

View File

@ -6,6 +6,7 @@ vim.filetype.add({
pattern = {
[".*%.tfvars"] = "hcl",
-- [".*%.tf"] = "hcl",
[".*%.rasi"] = "css",
},
})

View File

@ -12,6 +12,7 @@
programs.fish = {
enable = true;
shellAliases = {
bash = "${pkgs.bashInteractive}/bin/bash";
ls = "exa";
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
};

View File

@ -7,6 +7,7 @@
./legendary.nix
./lutris.nix
./minecraft-server.nix
./ryujinx.nix
./steam.nix
];

View File

@ -0,0 +1,17 @@
{ config, pkgs, lib, ... }: {
options.gaming.ryujinx.enable =
lib.mkEnableOption "Ryujinx Nintendo Switch application.";
config = lib.mkIf config.gaming.ryujinx.enable {
environment.systemPackages = with pkgs; [ ryujinx ];
home-manager.users.${config.user}.xdg.desktopEntries.ryujinx =
lib.mkIf pkgs.stdenv.isLinux {
name = "Ryujinx";
exec =
"env DOTNET_EnableAlternateStackCheck=1 Ryujinx -r /home/${config.user}/media/games/ryujinx/ %f";
};
};
}

View File

@ -1,4 +1,4 @@
{ config, lib, ... }: {
{ config, pkgs, lib, ... }: {
config = lib.mkIf config.physical {
@ -6,12 +6,12 @@
powerManagement.powerDownCommands = ''
set +e
for power in /sys/bus/i2c/devices/i2c-*/device/power; do echo disabled > ''${power}/wakeup || true; done
for power in /sys/bus/usb/devices/1-*/power; do echo disabled > ''${power}/wakeup || true; done
# Fix for Gigabyte motherboard
# /r/archlinux/comments/y7b97e/my_computer_wakes_up_immediately_after_i_suspend/isu99sr/
echo GPP0 > /proc/acpi/wakeup
# Disable if enabled
if (grep "GPP0.*enabled" /proc/acpi/wakeup >/dev/null); then
echo GPP0 | ${pkgs.doas}/bin/doas tee /proc/acpi/wakeup
fi
sleep 2

View File

@ -11,6 +11,10 @@
# This setting only applies to NixOS, different on Darwin
nix.gc.dates = "weekly";
systemd.timers.nix-gc.timerConfig = { WakeSystem = true; };
systemd.services.nix-gc.postStop =
lib.mkIf (!config.server) "systemctl suspend";
};
}