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