Added Star Citizen and options to make it run (swap and Zram and other things)

This commit is contained in:
Alexandre 2026-01-22 16:09:17 +01:00
parent 5627c9f99b
commit 7d2cd792f4
6 changed files with 52 additions and 29 deletions

View File

@ -17,6 +17,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Star citizen
nix-gaming = {
url = "github:fufexan/nix-gaming";
};
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";

View File

@ -2,6 +2,7 @@
# Common nixos systems modules (not nix-darwin)
imports = [
../../modules/common/nix.nix
../../modules/common/swap.nix
../../modules/nixos/locale.nix # For localisation options
../../modules/common/ssh.nix
../../modules/nixos/bootloader.nix

View File

@ -91,18 +91,17 @@
# $ nix search wget
environment = {
systemPackages = with pkgs; [
playerctl
# Nvidia packages
nvtopPackages.nvidia
# Video accel
libva
libva-utils
# Cuda
cudatoolkit
# Theme SDDM
sddm-astronaut
inputs.nix-gaming.packages.${pkgs.stdenv.hostPlatform.system}.star-citizen
playerctl
# Nvidia packages
nvtopPackages.nvidia
# Video accel
libva
libva-utils
# Cuda
cudatoolkit
# Theme SDDM
sddm-astronaut
];
# Hint Electron Apps to use Wayland
sessionVariables.NIXOS_OZONE_WL = "1";

View File

@ -18,16 +18,18 @@
# Package caches
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
"https://nix-gaming.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
];
};
};

View File

@ -1,13 +1,19 @@
{
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 2;
};
efi = {
canTouchEfiVariables = true;
};
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 2;
};
efi = {
canTouchEfiVariables = true;
};
};
kernel = {
sysctl = {
"vm.max_map_count" = 16777216;
"fs.file-max" = 524288;
};
};
};
}

10
modules/nixos/swap.nix Normal file
View File

@ -0,0 +1,10 @@
{
swapDevices = [{
device = "/var/lib/swapfile";
size = 8 * 1024; # 8 GB Swap
}];
zramSwap = {
enable = true;
memoryMax = 16 * 1024 * 1024 * 1024; # 16 GB ZRAM
};
}