Compare commits

...

6 commits

Author SHA1 Message Date
e4ef026a0c website: init 2025-04-26 00:04:55 +02:00
afafd02d9a nginx: simplify ssl settings 2025-04-18 12:35:51 +02:00
19d5664be5 helix.nix: format, add taplo
taplo is a toml language server
2025-04-16 14:55:56 +02:00
6fbbc2715b shell/packages.nix: add watchman 2025-04-16 14:53:51 +02:00
dd356b21d4 hermit/programs.nix: remove nextcloud-client 2025-04-16 14:53:22 +02:00
e43afac1c8 hyprland/settings.nix: enable compose:102, disable update news 2025-04-16 14:33:44 +02:00
12 changed files with 288 additions and 43 deletions

View file

@ -9,7 +9,6 @@
alsa-utils alsa-utils
anki anki
asciinema asciinema
brave
cachix cachix
calc calc
# calibre # calibre
@ -53,7 +52,6 @@
ncmpcpp ncmpcpp
neofetch neofetch
networkmanagerapplet networkmanagerapplet
nextcloud-client
nicotine-plus nicotine-plus
nil nil
nitch nitch

View file

@ -33,19 +33,9 @@ in {
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.${domain} = { virtualHosts.${domain} = {
forceSSL = true; addSSL = true;
# enableACME = true; enableACME = true;
useACMEHost = domain;
inherit acmeRoot;
extraConfig = ''
# nginx defaults to a 1MB size limit for uploads, which
# *definitely* isn't enough for Git LFS.
# 'client_max_body_size 300m;' would set a limit of 300MB
# setting it to 0 means "no limit"
client_max_body_size 512M;
'';
locations."/" = { locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://localhost:${toString port}"; proxyPass = "http://localhost:${toString port}";
}; };
}; };

View file

@ -27,6 +27,10 @@ in {
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedZstdSettings = true; recommendedZstdSettings = true;
# nginx defaults to a 1MB size limit for uploads, which
# *definitely* isn't enough for Git LFS.
# 'client_max_body_size 300m;' would set a limit of 300MB
# setting it to 0 means "no limit"
clientMaxBodySize = mkDefault "512m"; clientMaxBodySize = mkDefault "512m";
}; };
}; };

View file

@ -35,7 +35,7 @@ in {
input = { input = {
kb_layout = "us,ru"; kb_layout = "us,ru";
kb_variant = ",phonetic_winkeys"; kb_variant = ",phonetic_winkeys";
kb_options = "grp:rctrl_rshift_toggle,"; kb_options = "grp:rctrl_rshift_toggle, compose:102";
follow_mouse = true; follow_mouse = true;
@ -57,6 +57,8 @@ in {
no_border_on_floating = true; no_border_on_floating = true;
}; };
ecosystem.no_update_news = true;
plugin = { plugin = {
hyprsplit = { hyprsplit = {
num_workspaces = 10; num_workspaces = 10;

View file

@ -1,7 +1,6 @@
{ {
symlinkJoin, symlinkJoin,
makeWrapper, makeWrapper,
helix,
alejandra, alejandra,
basedpyright, basedpyright,
bash-language-server, bash-language-server,
@ -16,6 +15,7 @@
gdb, gdb,
golangci-lint-langserver, golangci-lint-langserver,
gopls, gopls,
helix,
lazygit, lazygit,
lib, lib,
lldb_19, lldb_19,
@ -30,6 +30,7 @@
solargraph, solargraph,
stdenv, stdenv,
superhtml, superhtml,
taplo,
tinymist, tinymist,
typescript-language-server, typescript-language-server,
vscode-langservers-extracted, vscode-langservers-extracted,
@ -276,38 +277,30 @@
wrapped-helix = symlinkJoin { wrapped-helix = symlinkJoin {
name = "helix-wrapped"; name = "helix-wrapped";
paths = [ paths = [
helix
rust-analyzer
rustfmt
clippy
# typst lsp
tinymist
# C/C++
clang-tools
# Markdown
marksman
# Nix
nil
lldb_19
# Bash # Bash
bash-language-server bash-language-server
# C/C++
clang-tools
clippy
golangci-lint-langserver
gopls
helix
lldb_19
# Markdown
marksman
# Nix
nil
rust-analyzer
rustfmt
# Shell # Shell
shellcheck shellcheck
# ruby
solargraph
gopls
golangci-lint-langserver
vscode-langservers-extracted
superhtml superhtml
# toml
taplo
# typst
tinymist
# typst lsp
vscode-langservers-extracted
]; ];
buildInputs = [makeWrapper]; buildInputs = [makeWrapper];
postBuild = '' postBuild = ''

View file

@ -51,6 +51,7 @@ builtins.attrValues {
onefetch onefetch
wget wget
cpufetch cpufetch
watchman
yt-dlp yt-dlp
tealdeer tealdeer
hyperfine hyperfine

66
website/blog/01-BGP.txt Normal file
View file

@ -0,0 +1,66 @@
TODO:
eBGP/iBGP session
Graphs
/**********************************************/
/* A no-bullshit guide to a bullshit protocol */
/**********************************************/
We can think of the Internet as a network of networks which are all connected in some way. We will refer to these networks as Autonomous Systems(AS) in this article.
Now, how do we connect these AS's in a sane way? This is where BGP comes in. BGP, which stands for `Border Gateway Protocol`, enables different AS's to exchange information with each other, e.g. communicating with each other.
There are three main challenges BGP has to solve:
- Scalability: The Internet is BIG. BGP needs to scale well to be feasible in a large scale.
- Privacy: Networks don't want to divulge internal topologies (topology = how a network is structured)
- Policy enforcement: The Networks themselves need to have control over where to send and recieve traffic.
Other protocols, like Link-Sate routing, do not solve these challenges.
BGP's key concept, which it revolves about, is called *path-vector routing*, where it adertises the entire AS-level path.
Now, what is an AS-level path? We'll get to that in a minute.
Before that, why do we need even BGP? The problem is that sending data over the internet costs money. If we want to minimize the costs of sending data, we need to find routes which cost as little as possible. This is also why BGP is a "follow the money" protocol. Different ASes only connect with each other if they can save money that way.
There are two policies we can use to define this routing:
- Selection: Which path to use (only relevant for outbound traffic)
- Export: Which path to advertise (only relevant for inbount traffic)
TODO: add graphs here
===============================================
eBGP and iBGP
===============================================
BGP comes in two flavors: eBGP and iBGP.
The e/i stands for external/internal
External BGP sessions connect border routers in different ASes. These are therefore use to learn routes to external destinatons
TODO: add graph
Internal BGP sessions connect the routers in the same AS. These are used to split up externally-learned routes internally. These are tehn announces exernally(to other ASes) again, using eBGP sessions.
BGP itself is a pretty simple protocol composed of four basic messages:
- open: establish a BGP session (using TCP)
- notification: report unusual conditions
- update: inform neighbor of a new best route
- can be a change or a removal of a best route
- keepalive: inform neighbor that connection is alive
update messages carry an IP prefix together with a set of attributes:
/*********************/
/* IP prefix */
/*********************/
/* Attributes */
/* */
/* */
/* */
/* */
/*********************/
There are four types of different attributes:
- NEXT-HOP
- AS-PATH
- LOCAL-PREF
- MED

View file

@ -0,0 +1,91 @@
<!DOCTYPE html>
<link rel="stylesheet" href="../../style.css" type="text/css">
<html>
<body>
<div class="around">
<div class="content">
<pre style="display: inline;">
TODO:
eBGP/iBGP session
Graphs
/**********************************************/
/* A no-bullshit guide to a bullshit protocol */
/**********************************************/
We can think of the Internet as a network of networks which are all connected in some way. We will refer to
these networks as Autonomous Systems(AS) in this article.
Now, how do we connect these AS's in a sane way? This is where BGP comes in. BGP, which stands for `Border
Gateway Protocol`, enables different AS's to exchange information with each other, e.g. communicating with each
other.
There are three main challenges BGP has to solve:
- Scalability: The Internet is BIG. BGP needs to scale well to be feasible in a large scale.
- Privacy: Networks don't want to divulge internal topologies (topology = how a network is structured)
- Policy enforcement: The Networks themselves need to have control over where to send and recieve traffic.
Other protocols, like Link-Sate routing, do not solve these challenges.
BGP's key concept, which it revolves about, is called *path-vector routing*, where it adertises the entire
AS-level path.
Now, what is an AS-level path? We'll get to that in a minute.
Before that, why do we need even BGP? The problem is that sending data over the internet costs money. If we want
to minimize the costs of sending data, we need to find routes which cost as little as possible. This is also why
BGP is a "follow the money" protocol. Different ASes only connect with each other if they can save money that
way.
There are two policies we can use to define this routing:
- Selection: Which path to use (only relevant for outbound traffic)
- Export: Which path to advertise (only relevant for inbount traffic)
TODO: add graphs here
===============================================
eBGP and iBGP
===============================================
BGP comes in two flavors: eBGP and iBGP.
The e/i stands for external/internal
External BGP sessions connect border routers in different ASes. These are therefore use to learn routes to
external destinatons
TODO: add graph
Internal BGP sessions connect the routers in the same AS. These are used to split up externally-learned routes
internally. These are tehn announces exernally(to other ASes) again, using eBGP sessions.
BGP itself is a pretty simple protocol composed of four basic messages:
- open: establish a BGP session (using TCP)
- notification: report unusual conditions
- update: inform neighbor of a new best route
- can be a change or a removal of a best route
- keepalive: inform neighbor that connection is alive
update messages carry an IP prefix together with a set of attributes:
/*********************/
/* IP prefix */
/*********************/
/* Attributes */
/* */
/* */
/* */
/* */
/*********************/
There are four types of different attributes:
- NEXT-HOP
- AS-PATH
- LOCAL-PREF
- MED
</pre>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1 @@
JJ is is a new version control system, made to be compatible with git and _much_ less painful than it.

22
website/index.html Normal file
View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<link rel="stylesheet" href="style.css">
<html>
<body id="top">
<div class="content">
<h2 class="header" align="center">My Website</h2>
<p>
Welcome to my website. Here I share some heartfelt ramblings about different things.<br>
</p>
<hr>
<div class="years">
<h2>Brain farts</h2>
<h3> 2025</h3>
<a href="blog/post/02.html">I love JJ</a>
</div>
</div>
</body>
</html>

58
website/style.css Normal file
View file

@ -0,0 +1,58 @@
* {
margin: 0px;
padding: 0px;
line-height: 1.4;
}
h1 {
text-align: center;
}
body {
color: #FFFFFF;
background-color: #000000;
font-family: sans-serif;
font-size: 12;
}
.content {
margin: auto;
padding: 5px;
max-width: 45em;
padding: 1em;
/* width: 100%; */
border: 3px solid darkred;
overflow: auto;
}
/* .around { */
/* border: 1px solid grey; */
/* margin: auto; */
/* max-width: 685px; */
/* padding: 1px; */
/* width: 100%; */
/* text-align: center; */
/* } */
.post {
width: 76ch;
word-break: break-all;
font: mo;
}
.years {
padding: 4px;
border-bottom: solid gray;
}
pre {
text-align: left;
color: black;
padding: 20px;
padding-top: 5px;
margin: 0px;
font-size: 12px;
text-decoration: none;
overflow: hidden;
background-color: white;
}

19
website/template.html Normal file
View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<link rel="stylesheet" href="../../style.css" type="text/css">
<html>
<body>
<div class="around">
<div class="Years">
<b>Year</b>
: [
<a href="blog/posts/01.html"> </a>
]
</div>
<div class="content">
</div>
</div>
</body>
</html>