Compare commits

..

2 commits

Author SHA1 Message Date
Anish Lakhwara 37da206f8b
Merge branch 'main' of git.sealight.xyz:aynish/helm 2025-11-14 15:09:44 -08:00
Anish Lakhwara 58513749d4
bunch of updates 2025-11-14 15:09:33 -08:00
12 changed files with 143 additions and 34 deletions

View file

@ -41,12 +41,12 @@ D('sealight.xyz', REG_NONE, DnsProvider(DNS_HEDNS),
A('ci', '69.61.2.203', TTL(300)),
A('write', '69.61.2.203', TTL(300)),
A('photos', '69.61.2.203', TTL(300)),
// vultr: lituus
A('@', '45.77.48.108', TTL(300)),
A('jitsi', '45.77.48.108', TTL(300)),
A('chat', '45.77.48.108', TTL(300)),
A('element', '45.77.48.108', TTL(300)),
A('turn', '45.77.48.108', TTL(300)),
// vultr melbourne: lituus
A('@', '67.219.99.225', TTL(300)),
A('jitsi', '67.219.99.225', TTL(300)),
A('chat', '67.219.99.225', TTL(300)),
A('element', '67.219.99.225', TTL(300)),
A('turn', '67.219.99.225', TTL(300)),
//nullhex free email real estate
CNAME('key1._domainkey', 'key1.nullhex.com.'),
CNAME('autoconfig', 'autoconfig.nullhex.com.'),

View file

@ -331,7 +331,7 @@
pkgs = deckPkgsFor.${system};
modules = [
./hosts/deck
jovian.nixosModules.default
# jovian.nixosModules.default
self.nixosModules.wireguard
agenix.nixosModules.age
self.nixosModules.backup
@ -392,8 +392,9 @@
};
};
lituus = {
hostname = "sealight.xyz";
hostname = "67.219.99.225";
autoRollback = false;
remoteBuild = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos

View file

@ -10,6 +10,7 @@
git-machete
bottom
gptfdisk
difftastic
starship
jq
manix
@ -55,6 +56,8 @@
gnupg
syncthing
dijo
nixfmt-rfc-style
nix-tree
#ssb-patchwork
fontconfig
pandoc
@ -159,6 +162,7 @@
initContent = ''
bindkey -v
autopair-init
export PATH="$PATH:/Users/anishlakhwara/go/bin"
'';
sessionVariables = {
EDITOR = "nvim";

View file

@ -1,3 +1,4 @@
{ pkgs, ... }:
{
#xdg.configFile = {
# "git/config".source = ./config;
@ -7,6 +8,10 @@
programs.lazygit.enable = true;
home.packages = with pkgs; [
unstable.git-spice
];
programs.git = {
enable = true;
userName = "Anish Lakhwara";

View file

@ -1023,7 +1023,7 @@ in
vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>')
-- Disable Ctrl+V in nvim so Kitty can handle paste
vim.keymap.set({'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true})
vim.keymap.set('i', '<C-v>', '<C-r>+', {noremap = true, silent = true})
-- Pane resizing with Alt+Shift+hjkl (to match tmux)
vim.keymap.set('n', '<M-S-h>', '<Cmd>vertical resize -2<CR>', {silent = true})

View file

@ -2,10 +2,37 @@ set -g base-index 1
setw -g pane-base-index 1
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
set -g default-terminal "xterm-256color"
# colors
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
set -sa terminal-features ",tmux-256color:RGB:Nobr"
set -g allow-passthrough on
set -g set-clipboard on
# shift enter for amp
set -s extended-keys on
set -as terminal-features 'tmux*:extkeys'
# pane colors for amp diff view
# set-option -g pane-colours[0] "#4D5566"
# set-option -g pane-colours[1] "#F27983"
# set-option -g pane-colours[2] "#A6CC70"
# set-option -g pane-colours[3] "#F29E74"
# set-option -g pane-colours[4] "#77A8D9"
# set-option -g pane-colours[5] "#A37ACC"
# set-option -g pane-colours[6] "#4CBF99"
# set-option -g pane-colours[7] "#F0F0F0"
# set-option -g pane-colours[8] "#000000"
# set-option -g pane-colours[9] "#FF3333"
# set-option -g pane-colours[10] "#BAE67E"
# set-option -g pane-colours[11] "#FFA759"
# set-option -g pane-colours[12] "#73D0FF"
# set-option -g pane-colours[13] "#D4BFFF"
# set-option -g pane-colours[14] "#95E6CB"
# set-option -g pane-colours[15] "#ffffff"
# Mouse works as expected
set-option -g mouse on
@ -16,6 +43,10 @@ set -g focus-events on
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# amp commands
set -g @amp/fork-thread-command 'new-window -n forked-thread $SHELL -c "amp threads fork; amp threads continue"'
bind -N 'Fork Amp thread' f "#{@amp/fork-thread-command}"
# don't rename windows automatically
set-option -g allow-rename off
@ -63,6 +94,7 @@ set -g message-style 'fg=yellow bg=green bold'
# Unbind Ctrl+V so it passes through to Kitty for paste
unbind C-v
set -g set-clipboard on
# Vim-aware pane navigation with Alt+hjkl
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"

View file

@ -73,8 +73,9 @@
# };
# Enable automatic login for the user.
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "anish";
# Disabled: jovian.steam.autoStart handles this
# services.xserver.displayManager.autoLogin.enable = true;
# services.xserver.displayManager.autoLogin.user = "anish";
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;

View file

@ -1,4 +1,4 @@
{ self, pkgs, config, ... }:
{ self, pkgs, config, lib, ... }:
{
imports = [
./configuration.nix
@ -31,13 +31,16 @@
# theme = "motion";
# };
jovian.steam.enable = true;
jovian.devices.steamdeck.enable = true;
jovian.steam.user = "anish";
jovian.steam.autoStart = true;
jovian.steam.desktopSession = "gnome";
# jovian.steam.enable = true;
# jovian.devices.steamdeck.enable = true;
# jovian.steam.user = "anish";
# jovian.steam.autoStart = true;
# jovian.steam.desktopSession = "gnome";
# jovian.steam.desktopSession = "none+bspwm";
# Disable lightdm from desktop profile
services.xserver.displayManager.lightdm.enable = lib.mkForce false;
# Install XR drivers
# environment.systemPackages = with pkgs; [
# xrlinuxdriver

View file

@ -0,0 +1,53 @@
{ config, lib, pkgs, ... }:
{
# Block storage mount
fileSystems."/srv/sealight" = {
device = "/dev/disk/by-id/virtio-mel-3b1f60a89cd649";
fsType = "ext4";
options = [ "noatime" ];
};
# Bind mounts for service data
# PostgreSQL moved to NVMe for performance - data lives directly on /var/lib/postgresql
# fileSystems."/var/lib/postgresql" = {
# device = "/srv/sealight/postgresql";
# fsType = "none";
# options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
# };
fileSystems."/var/lib/matrix-synapse" = {
device = "/srv/sealight/matrix-synapse";
fsType = "none";
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
};
fileSystems."/var/lib/matrix-as-discord" = {
device = "/srv/sealight/matrix-as-discord";
fsType = "none";
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
};
fileSystems."/var/lib/mautrix-telegram" = {
device = "/srv/sealight/mautrix-telegram";
fsType = "none";
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
};
fileSystems."/var/lib/wireguard" = {
device = "/srv/sealight/wireguard";
fsType = "none";
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
};
fileSystems."/var/www" = {
device = "/srv/sealight/www";
fsType = "none";
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
};
# Ensure services wait for mounts
# PostgreSQL no longer needs to wait for /srv/sealight mount
# systemd.services.postgresql.unitConfig.RequiresMountsFor = [ "/srv/sealight" ];
systemd.services.matrix-synapse.unitConfig.RequiresMountsFor = [ "/srv/sealight" ];
}

View file

@ -1,7 +1,9 @@
{ self, profiles, suites, ... }:
{
imports = [
./hardware-configuration.nix
./configuration.nix
./block-storage.nix
../profiles/core
../profiles/server
../profiles/metrics

View file

@ -1,27 +1,22 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/profiles/qemu-guest.nix")
];
imports = [ ];
boot.initrd.availableKernelModules = [ "ata_piix" "floppy" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/3b8b2c4b-835e-4822-8ac8-0effdc8270d6";
fsType = "btrfs";
fileSystems."/" = {
device = "/dev/disk/by-uuid/f9e9468f-ff3b-430d-9ecf-ba275cf2f716";
fsType = "ext4";
};
swapDevices = [ ];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = "x86_64-linux";
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.hypervGuest.enable = true;
}

View file

@ -17,11 +17,14 @@
age.secrets.synapse-config.file = "${self}/secrets/synapse-config.age";
age.secrets.synapse-config.owner = "matrix-synapse";
systemd.services.matrix-synapse.serviceConfig.TimeoutStartSec = "10min";
services.matrix-synapse = {
enable = true;
settings = {
max_upload_size = "100M";
server_name = "sealight.xyz";
federation_sender_instances = [];
listeners = [
{
port = 8448;
@ -210,7 +213,12 @@
root = "/var/www/sealight.xyz";
};
locations."/_matrix" = {
proxyPass = "http://localhost:8448";
proxyPass = "http://127.0.0.1:8448";
extraConfig = ''
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
'';
};
# locations."/slackbridge" = {
# proxyPass = "http://localhost:9899";
@ -222,6 +230,11 @@
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8448";
extraConfig = ''
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
'';
};
};
## virtual host for Riot/Web