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"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Star citizen
nix-gaming = {
url = "github:fufexan/nix-gaming";
};
nix-darwin = { nix-darwin = {
url = "github:nix-darwin/nix-darwin/master"; url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

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

View File

@ -91,8 +91,8 @@
# $ nix search wget # $ nix search wget
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
inputs.nix-gaming.packages.${pkgs.stdenv.hostPlatform.system}.star-citizen
playerctl playerctl
# Nvidia packages # Nvidia packages
nvtopPackages.nvidia nvtopPackages.nvidia
# Video accel # Video accel
@ -100,7 +100,6 @@
libva-utils libva-utils
# Cuda # Cuda
cudatoolkit cudatoolkit
# Theme SDDM # Theme SDDM
sddm-astronaut sddm-astronaut
]; ];

View File

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

View File

@ -9,5 +9,11 @@
canTouchEfiVariables = true; 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
};
}