From 67578b23d00723fd54150ea2e80fb91ad24f9f3c Mon Sep 17 00:00:00 2001 From: Mikhail Maliugin Date: Sun, 22 Feb 2026 03:50:15 +0200 Subject: [PATCH 1/4] init docs --- README.md | 3 ++- docs/packages.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ docs/podman.md | 16 ++++++++++++++++ docs/ports.md | 17 +++++++++++++++++ 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 docs/packages.md create mode 100644 docs/podman.md create mode 100644 docs/ports.md diff --git a/README.md b/README.md index 2cf3f54..4e525d2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # space-infra -Infrastructure repo for this server \ No newline at end of file +## Docs +docs folder includes some documentation about how to use server. Please read docs and ask questions if you don't understand how to use smth directly or in issues diff --git a/docs/packages.md b/docs/packages.md new file mode 100644 index 0000000..441b6fe --- /dev/null +++ b/docs/packages.md @@ -0,0 +1,44 @@ +# Packages + +## Why? What have you done to suffer so much? +Idk any other ways to let all users access individual package managers, so you'll have to use Nix. Sorry + +## How? +I installed nix-env which is available for every user, but it has disgusting commands, so I suggest bash and fish users paste this +functions into their respective `~/.bashrc` and `~/.config/fish/config.fish`: + +```bash +function nix-install { + nix-env -iA "$@" 2>&1 | grep -v 'evaluation warning' +} +function nix-remove { + nix-env -e "$@" 2>&1 | grep -v 'evaluation warning' +} +function nix-upgrade { + nix-env --upgrade 2>&1 | grep -v 'evaluation warning' +} +function nix-rollback { + nix-env --rollback 2>&1 | grep -v 'evaluation warning' +} +function nix-list { + nix-env -q 2>&1 | grep -v 'evaluation warning' +} +``` + +```fish +function nix-install + nix-env -iA $argv 2>&1 | grep -v 'evaluation warning' +end +function nix-remove + nix-env -e $argv 2>&1 | grep -v 'evaluation warning' +end +function nix-upgrade + nix-env --upgrade 2>&1 | grep -v 'evaluation warning' +end +function nix-rollback + nix-env --rollback 2>&1 | grep -v 'evaluation warning' +end +function nix-list + nix-env -q 2>&1 | grep -v 'evaluation warning' +end +``` diff --git a/docs/podman.md b/docs/podman.md new file mode 100644 index 0000000..015ea99 --- /dev/null +++ b/docs/podman.md @@ -0,0 +1,16 @@ +# Podman + +## Why? +On that server we use podman instead of docker because it's: +- rootless by default +- individual for each user (you won't be able to access container of other person) +- have preinstalled k8s (which is called pod and idk why it's needed for us but it's hella cool) + +## How to use? +Exactly the same as docker, but, obviously, instead of `docker` write `podman`. More documentation find [there](https://podman.io/docs) + +Maybe (just maybe) you'll need to run this thing (but I still not ceratin if it's necessary): +```sh +systemctl --user enable --now podman.socket +``` + diff --git a/docs/ports.md b/docs/ports.md new file mode 100644 index 0000000..bb0c0ca --- /dev/null +++ b/docs/ports.md @@ -0,0 +1,17 @@ +# Used ports + +This file explains which ports are used and for what reason (please categorize them somehow and sort if possible) + +## Shared usage +22 - ssh +80 - caddy +443 - caddy +1024 - gitea exposed on that port inside the server (not allowed to use from outside) +1025 - gitea exposed it's ssh on that port (therefore allowed from outside) + +## Rules +If you want to add some extra port, then please: +1. Check prs of other people +2. Use 1024+ (because user for caddy isn't root and I don't want to change smth so please) + +There will be more, but that's all for now -- 2.49.1 From 2d26b45791ef1cff4c11877d12d7940d8e8293f5 Mon Sep 17 00:00:00 2001 From: Mikhail Maliugin Date: Sun, 22 Feb 2026 03:54:39 +0200 Subject: [PATCH 2/4] linger --- docs/add-user.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/add-user.md diff --git a/docs/add-user.md b/docs/add-user.md new file mode 100644 index 0000000..b02bed8 --- /dev/null +++ b/docs/add-user.md @@ -0,0 +1,5 @@ + +don't forget to +```bash +sudo loginctl enable-linger $USER +``` -- 2.49.1 From f3ea2e14d18739ce0be655633dbad080db13adb1 Mon Sep 17 00:00:00 2001 From: miko089 Date: Sun, 22 Feb 2026 02:07:37 +0000 Subject: [PATCH 3/4] Add line breaks --- docs/ports.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/ports.md b/docs/ports.md index bb0c0ca..d750c84 100644 --- a/docs/ports.md +++ b/docs/ports.md @@ -3,11 +3,11 @@ This file explains which ports are used and for what reason (please categorize them somehow and sort if possible) ## Shared usage -22 - ssh -80 - caddy -443 - caddy -1024 - gitea exposed on that port inside the server (not allowed to use from outside) -1025 - gitea exposed it's ssh on that port (therefore allowed from outside) +22 - ssh\ +80 - caddy\ +443 - caddy\ +1024 - gitea exposed on that port inside the server (not allowed to use from outside)\ +1025 - gitea exposed it's ssh on that port (therefore allowed from outside)\ ## Rules If you want to add some extra port, then please: -- 2.49.1 From 2f09a841bc456c2f00dc6dd8618a6464adf6a4ab Mon Sep 17 00:00:00 2001 From: Mikhail Maliugin Date: Sun, 22 Feb 2026 14:00:42 +0200 Subject: [PATCH 4/4] pr answered --- docs/add-user.md | 5 ----- docs/podman.md | 5 ----- docs/ports.md | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 docs/add-user.md diff --git a/docs/add-user.md b/docs/add-user.md deleted file mode 100644 index b02bed8..0000000 --- a/docs/add-user.md +++ /dev/null @@ -1,5 +0,0 @@ - -don't forget to -```bash -sudo loginctl enable-linger $USER -``` diff --git a/docs/podman.md b/docs/podman.md index 015ea99..7e4098d 100644 --- a/docs/podman.md +++ b/docs/podman.md @@ -9,8 +9,3 @@ On that server we use podman instead of docker because it's: ## How to use? Exactly the same as docker, but, obviously, instead of `docker` write `podman`. More documentation find [there](https://podman.io/docs) -Maybe (just maybe) you'll need to run this thing (but I still not ceratin if it's necessary): -```sh -systemctl --user enable --now podman.socket -``` - diff --git a/docs/ports.md b/docs/ports.md index d750c84..bd78128 100644 --- a/docs/ports.md +++ b/docs/ports.md @@ -11,7 +11,7 @@ This file explains which ports are used and for what reason (please categorize t ## Rules If you want to add some extra port, then please: -1. Check prs of other people +1. Check opened prs of other people 2. Use 1024+ (because user for caddy isn't root and I don't want to change smth so please) There will be more, but that's all for now -- 2.49.1