snowhawk: star-citizen setup

This commit is contained in:
Zynh Ludwig 2024-12-10 00:39:48 -08:00
parent 45e5a8adc8
commit fbae92812f
2 changed files with 33 additions and 5 deletions

View file

@ -53,6 +53,7 @@
syncthing.enable = true; syncthing.enable = true;
user.enable = true; user.enable = true;
wake-on-lan.enable = true; wake-on-lan.enable = true;
star-citizen.enable = true;
}; };
# Enable automatic login for the user. # Enable automatic login for the user.
@ -80,11 +81,6 @@
killall killall
linux-manual linux-manual
(inputs.nix-gaming.packages.${pkgs.system}.star-citizen.override {
useUmu = true;
location = "/data/star-citizen";
})
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
@ -96,6 +92,14 @@
hardware.keyboard.uhk.enable = true; hardware.keyboard.uhk.enable = true;
swapDevices = [{
device = "/swap";
size = 16 * 1024;
}];
# Also recommended, either as an alternative or in addition
zramSwap.enable = true;
virtualisation = { virtualisation = {
libvirtd.enable = true; libvirtd.enable = true;
}; };

24
modules/star-citizen.nix Normal file
View file

@ -0,0 +1,24 @@
{ lib, config, inputs, pkgs, ... }:
let
cfg = config.snowhawk.star-citizen;
in
{
options.snowhawk.star-citizen = {
enable = lib.mkEnableOption "star-citizen";
};
config = lib.mkIf cfg.enable {
boot.kernel.sysctl = {
"vm.max_map_count" = 16777216;
"ds.file-max" = 524288;
};
environment.systemPackages = [
(inputs.nix-gaming.packages.${pkgs.system}.star-citizen.override {
useUmu = true;
location = "/data/star-citizen";
})
];
};
}