summaryrefslogtreecommitdiff
path: root/hosts/local
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/local')
-rw-r--r--hosts/local/gui.nix9
-rw-r--r--hosts/local/i3.nix13
-rw-r--r--hosts/local/master/configuration.nix39
-rw-r--r--hosts/local/master/keyboard.nix6
-rw-r--r--hosts/local/nvidia.nix9
5 files changed, 55 insertions, 21 deletions
diff --git a/hosts/local/gui.nix b/hosts/local/gui.nix
index 81f97b1..26adeb1 100644
--- a/hosts/local/gui.nix
+++ b/hosts/local/gui.nix
@@ -41,7 +41,7 @@
#
easyeffects # audio, cool stuff
# games!
- # ryujinx
+ ryubing #ryujinx
wineWowPackages.staging
dosbox
siyuan
@@ -51,8 +51,9 @@
# chat
signal-desktop
telegram-desktop
- # llms
- lmstudio
- cherry-studio
+ electrum
+ # xdg whatever bs
+ glib # gio
+ desktop-file-utils
];
}
diff --git a/hosts/local/i3.nix b/hosts/local/i3.nix
index b9e67a7..d49a9d6 100644
--- a/hosts/local/i3.nix
+++ b/hosts/local/i3.nix
@@ -1,4 +1,13 @@
-{pkgs, ...}: {
+{
+ inputs,
+ pkgs,
+ ...
+}: let
+ old-pkgs = import inputs.nixpkgs-old {
+ system = pkgs.system;
+ config.allowUnfree = true;
+ };
+in {
environment.pathsToLink = ["/libexec"];
services.xserver = {
xkb.options = "compose:ralt";
@@ -23,6 +32,7 @@
];
};
};
+
# Boot to terminal
services.displayManager = {
defaultSession = "none+i3";
@@ -42,6 +52,7 @@
vSync = true;
};
environment.systemPackages = with pkgs; [
+ old-pkgs.vivaldi
#notifications
dunst
polybar
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;
}
diff --git a/hosts/local/master/keyboard.nix b/hosts/local/master/keyboard.nix
index f148d74..6cdcd98 100644
--- a/hosts/local/master/keyboard.nix
+++ b/hosts/local/master/keyboard.nix
@@ -1,8 +1,8 @@
{pkgs, ...}: {
- services.logind.extraConfig = ''
+ services.logind.settings.Login = {
# don’t shutdown when power button is short-pressed
- HandlePowerKey=ignore
- '';
+ HandlePowerKey = "ignore";
+ };
# config file keeps getting rewritten but I don't know by who
i18n.inputMethod = {
diff --git a/hosts/local/nvidia.nix b/hosts/local/nvidia.nix
index ed505c6..b8b335a 100644
--- a/hosts/local/nvidia.nix
+++ b/hosts/local/nvidia.nix
@@ -27,9 +27,18 @@ in {
nix.settings.substituters = [
"https://cuda-maintainers.cachix.org"
+ "https://nix-community.cachix.org"
+ "https://huggingface.cachix.org"
+
+ "https://nix-ai-stuff.cachix.org"
+ "https://ai.cachix.org"
];
nix.settings.trusted-public-keys = [
+ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
+ "huggingface.cachix.org-1:ynTPbLS0W8ofXd9fDjk1KvoFky9K2jhxe6r4nXAkc/o="
+ "nix-ai-stuff.cachix.org-1:WlUGeVCs26w9xF0/rjyg32PujDqbVMlSHufpj1fqix8="
+ "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
];
services.xserver = {