summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/base.nix8
-rw-r--r--hosts/cloud/span/configuration.nix2
-rw-r--r--hosts/cloud/span/nginx.nix13
-rw-r--r--hosts/local/gui.nix3
-rw-r--r--hosts/local/i3.nix13
-rw-r--r--hosts/local/master/configuration.nix28
-rw-r--r--hosts/local/master/keyboard.nix6
-rw-r--r--hosts/local/nvidia.nix2
-rw-r--r--hosts/pkgs.nix11
-rw-r--r--hosts/unfree.nix3
10 files changed, 65 insertions, 24 deletions
diff --git a/hosts/base.nix b/hosts/base.nix
index 91f90a5..d1d8d59 100644
--- a/hosts/base.nix
+++ b/hosts/base.nix
@@ -23,6 +23,14 @@
experimental-features = nix-command flakes
'';
settings = {
+ substituters = [
+ "https://cache-nixos.org"
+ "https://polwex.cachix.org"
+ ];
+ trusted-public-keys = [
+ "polwex.cachix.org-1:6Qk8lW0wZ9omwmURpPQUEDUHAb6Nsb+f+pdH2hppBZY="
+ ];
+
keep-outputs = true;
keep-derivations = true;
trusted-users = ["root" "y"];
diff --git a/hosts/cloud/span/configuration.nix b/hosts/cloud/span/configuration.nix
index d887d37..01ffddc 100644
--- a/hosts/cloud/span/configuration.nix
+++ b/hosts/cloud/span/configuration.nix
@@ -11,9 +11,9 @@
../../base.nix
./hardware-configuration.nix
./users.nix
- ./mail.nix
../packages.nix
./nginx.nix
+ # ./mail.nix
];
# Bootloader.
diff --git a/hosts/cloud/span/nginx.nix b/hosts/cloud/span/nginx.nix
index 9bfa8ea..1079c7d 100644
--- a/hosts/cloud/span/nginx.nix
+++ b/hosts/cloud/span/nginx.nix
@@ -36,6 +36,19 @@
'';
};
};
+ virtualHosts."uuu.spandrell.ch" = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:8080";
+ proxyWebsockets = true; # needed if you need to use WebSocket
+ extraConfig = ''
+ limit_req zone=blog burst=20 nodelay;
+ proxy_set_header Host $Host;
+ proxy_set_header Forwarded for=$remote_addr;
+ '';
+ };
+ };
virtualHosts."s3.spandrell.ch" = {
extraConfig = ''
client_max_body_size 128M;
diff --git a/hosts/local/gui.nix b/hosts/local/gui.nix
index 1bfea32..b22f5bc 100644
--- a/hosts/local/gui.nix
+++ b/hosts/local/gui.nix
@@ -40,7 +40,7 @@
#
easyeffects # audio, cool stuff
# games!
- ryujinx
+ ryubing #ryujinx
wineWowPackages.staging
dosbox
siyuan
@@ -50,5 +50,6 @@
# chat
signal-desktop
telegram-desktop
+ electrum
];
}
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..7b883d3 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.
@@ -17,8 +13,8 @@ in {
../../linux.nix
../../unfree.nix
#../../android.nix
- ../gui.nix
- ../i3.nix
+ # ../gui.nix
+ # ../i3.nix
# ../gnome.nix
# ../wayland.nix
../nvidia.nix
@@ -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,15 @@ in {
services.tailscale = {
enable = true;
};
+ #services.meilisearch = {
+ # enable = true;
+ #};
+
+ zramSwap = {
+ enable = true;
+ # 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 +68,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
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..3d6f603 100644
--- a/hosts/local/nvidia.nix
+++ b/hosts/local/nvidia.nix
@@ -27,8 +27,10 @@ in {
nix.settings.substituters = [
"https://cuda-maintainers.cachix.org"
+ "https://nix-community.cachix.org"
];
nix.settings.trusted-public-keys = [
+ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix
index bf940f6..66a6ec0 100644
--- a/hosts/pkgs.nix
+++ b/hosts/pkgs.nix
@@ -17,6 +17,8 @@
# terminal basics
htop
+ btop
+ nvitop
rlwrap
bat
gitAndTools.gitFull
@@ -52,9 +54,10 @@
#nixfmt
direnv
nix-direnv
- devenv
+ # devenv
devbox
- # inputs.devenv.packages.${pkgs.system}.default
+ inputs.devenv.packages.${pkgs.system}.default
+ bun
# scraping
python312Packages.yt-dlp
# markdown lsp
@@ -68,10 +71,14 @@
# aider-chat
# inputs.yek.packages.x86_64-linux.default
# python312Packages.google-generativeai
+ yek
claude-code
codex
nushell
# inputs.gemini-cli.packages.x86_64-linux.default
+ #
+ # ai
+ lmstudio
]
++ lib.optionals pkgs.stdenv.isLinux [
# linuxKernel.packages.linux_latest_libre.cpupower
diff --git a/hosts/unfree.nix b/hosts/unfree.nix
index 832e99a..30c4a62 100644
--- a/hosts/unfree.nix
+++ b/hosts/unfree.nix
@@ -42,5 +42,6 @@
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
- systemd.extraConfig = "DefaultlimitNOFILE=524288";
+ # systemd.extraConfig = "DefaultlimitNOFILE=524288";
+ systemd.settings.Manager = {DefaultlimitNOFILE = 524288;};
}