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

@ -16,6 +16,11 @@
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
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";

View File

@ -2,9 +2,10 @@
# 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
../../modules/common/environment.nix ../../modules/common/environment.nix
]; ];
} }

View File

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

View File

@ -18,16 +18,18 @@
# Package caches # Package caches
substituters = [ substituters = [
"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

@ -1,13 +1,19 @@
{ {
boot = { boot = {
loader = { loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;
configurationLimit = 2; configurationLimit = 2;
}; };
efi = { efi = {
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
};
}