diff options
Diffstat (limited to 'hosts/local/master/configuration.nix')
| -rw-r--r-- | hosts/local/master/configuration.nix | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/hosts/local/master/configuration.nix b/hosts/local/master/configuration.nix index 2a3cc8a..cad65c8 100644 --- a/hosts/local/master/configuration.nix +++ b/hosts/local/master/configuration.nix @@ -6,10 +6,6 @@ inputs, ... }: let - old-pkgs = import inputs.nixpkgs-old { - system = pkgs.system; - config.allowUnfree = true; - }; in { imports = [ # Include the results of the hardware scan. @@ -39,6 +35,8 @@ in { networking = { hostName = "master"; # Define your hostname. }; + environment.etc."X11/xorg.conf.d/20-nvidia.conf".source = ./xorg.conf; + services.xserver.displayManager.xserverArgs = ["-config ${./xorg.conf}"]; # Set your time zone. time.timeZone = "Asia/Bangkok"; @@ -52,6 +50,16 @@ in { services.tailscale = { enable = true; }; + #services.meilisearch = { + # enable = true; + #}; + + zramSwap = { + enable = true; + memoryPercent = 100; + algorithm = "zstd"; + # memoryPercent = 30; + }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions @@ -61,15 +69,6 @@ in { # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # # - environment.systemPackages = [ - old-pkgs.vivaldi - # for AI IDE shit - # pkgs.nodejs - # pkgs.python312 - # pkgs.openrgb-with-all-plugins - ]; - environment.etc."X11/xorg.conf.d/20-nvidia.conf".source = ./xorg.conf; - services.xserver.displayManager.xserverArgs = ["-config ${./xorg.conf}"]; system.stateVersion = "23.11"; # Did you read the comment? #debugging segfaults @@ -116,4 +115,18 @@ in { # }; # }; # }; + # stop fucking crashing + + systemd.services.nix-daemon.serviceConfig = { + MemoryHigh = "22G"; # throttle above this + MemoryMax = "28G"; # hard kill above this + # optional niceties: + CPUWeight = 50; + IOWeight = 50; + TasksMax = 4096; + # Let systemd-oomd preferentially kill these if needed: + ManagedOOMMemoryPressure = "kill"; + ManagedOOMMemoryPressureLimit = "50%"; + }; + systemd.oomd.enable = true; } |
