add image caption
This commit is contained in:
parent
b63282d1c8
commit
bc29a93859
4 changed files with 43 additions and 2 deletions
|
|
@ -18,10 +18,14 @@ With `cd` aliased to `zoxide`, I only need to type `cd n` (supposing that `~/.co
|
|||
|
||||

|
||||
|
||||
> Fuzzy directory jump with `zoxide`.
|
||||
|
||||
Internally `zoxide` records my visits to directories in a SQLite database and sorts them based on frequency. If the first hit is not what I want, I can also interactively select from the matched list.
|
||||
|
||||

|
||||
|
||||
> Candidate selection screen of `zoxide`.
|
||||
|
||||
## `du` -> `ncdu`
|
||||
|
||||
`du` is quite basic, and I usually need to add several arguments to make it somewhat usable. For example, `-d 1` to control the depth, `-h` to make the size human-readable.
|
||||
|
|
@ -31,16 +35,22 @@ It can totally be an alternative to those fancy disk space analyzers as well.
|
|||
|
||||

|
||||
|
||||
> Interface of `ncdu`.
|
||||
|
||||
## `top` -> `btop`
|
||||
|
||||
`top` is quite basic and looks "unexciting". `htop` also ships with most Unix/Linux systems and looks better.
|
||||
|
||||

|
||||
|
||||
> The default look of `top`.
|
||||
|
||||
[`btop`](https://github.com/aristocratos/btop) might be the most "nerdy-looking" `top` alternative out of the box. It can be a handy tool if you are trying to make people believe you are a hacker.
|
||||
|
||||

|
||||
|
||||
> Interface of `btop`, with the gruvbox theme.
|
||||
|
||||
At the same time, it is very feature-rich and configurable. To some extent, it is also an alternative to bandwidth monitoring tools like `iftop` and disk utilization tools like `df`.
|
||||
|
||||
## `ls` -> `eza`
|
||||
|
|
@ -49,10 +59,14 @@ I think there is nothing wrong with the classic `ls`. So, as an alternative, [`e
|
|||
|
||||

|
||||
|
||||
> `eza` adds icons and color to `ls` command.
|
||||
|
||||
It can replace the `tree` command as well.
|
||||
|
||||

|
||||
|
||||
> File tree display of `eza`.
|
||||
|
||||
## `vim` -> `nvim`
|
||||
|
||||
Many people still haven't overcome the biggest `vim` challenge to this day: exit `vim` without turning off your computer.
|
||||
|
|
@ -65,4 +79,8 @@ Syntax highlighting, file browser, fuzzy search, intelligent autocompletion, deb
|
|||
|
||||

|
||||
|
||||
> Interface of `neovim`, with neotree file browser.
|
||||
|
||||

|
||||
|
||||
> Interface of `neovim`, with telescope search.
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ This is a very concise walkthrough of my main home server running NixOS. I assum
|
|||
|
||||

|
||||
|
||||
> `neofetch` screen of my home server.
|
||||
|
||||
My home server (or many would rather call it a NAS) serves common home server purposes: bulk storage, basic file sharing, media streaming service, and photo backup.
|
||||
|
||||
## Physical Setup
|
||||
|
|
@ -16,6 +18,8 @@ Below is a recent photo of my home server, living in the utility closet together
|
|||
|
||||

|
||||
|
||||
> Real-world photo of the home server.
|
||||
|
||||
It is essentially an Intel N305 custom motherboard with SATA back panel and a 3D-printed enclosure. I bought it on Taobao last time I went back to China to visit my family.
|
||||
Not very important here, as long as you stick to common hardware, it should be relatively straightforward to install NixOS and replicate my setup.
|
||||
|
||||
|
|
@ -187,6 +191,8 @@ For photo backup I use [Immich](https://immich.app/). It is a self-hosted altern
|
|||
|
||||

|
||||
|
||||
> Web interface of Immich.
|
||||
|
||||
Right now Immich is the only service I am running with containers rather than native Nix modules (as you can see in [this configuration file](https://github.com/Logan-Lin/nix-config/blob/master/hosts/nixos/hs/containers.nix)). Technically it is possible to set up Immich with pure Nix modules, but for this type of services that rely on specific versions of databases (in this case, PostgreSQL with vector support), I feel containers are the easier route.
|
||||
And to be honest, I don't think there is much benefit going with pure Nix module here (especially for Immich which you can still [declare its config](https://github.com/Logan-Lin/nix-config/blob/master/config/immich.nix) even with containers), other than fulfilling the purism many Nix users seem to have.
|
||||
Also, I am not using Docker but Podman instead, which is said to have better integration with NixOS. From my experience it is fairly declarative and efficient, should be practically nearly identical to running directly on the host.
|
||||
|
|
@ -214,6 +220,8 @@ I do have a [login display module](https://github.com/Logan-Lin/nix-config/blob/
|
|||
|
||||

|
||||
|
||||
> Information displayed when `ssh` login into the server.
|
||||
|
||||
## Why NixOS?
|
||||
|
||||
This is sort of a conclusion section.
|
||||
|
|
@ -224,4 +232,5 @@ Compared to other Linux distributions, NixOS is quite suitable for setting up a
|
|||
|
||||

|
||||
|
||||
> Local (left) and `ssh`-connected server (right) terminal interface.
|
||||
> It looks completely identical (why not), to the point I have to set up visual hints (like the highlighted tmux hostname display) to remind myself which host I am currently on.
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ Also, from my experience, all cloud storage services I've used frequently run in
|
|||
|
||||

|
||||
|
||||
> Web UI of Syncthing.
|
||||
|
||||
## Examples
|
||||
|
||||
### Note Taking: Notion vs. Obsidian
|
||||
|
|
@ -38,16 +40,22 @@ Once you use a local file sync service to sync the vault folder of Obsidian, it
|
|||
|
||||

|
||||
|
||||
> Obsidian desktop UI.
|
||||
|
||||
### Reference Management: Zotero
|
||||
|
||||
[Zotero](https://www.zotero.org/) is a reference management software that can be used in a variety of scenarios. For me, I largely use it to manage academic papers I need to read.
|
||||
|
||||

|
||||
|
||||
> Zotero desktop UI, showing list of papers.
|
||||
|
||||
Zotero has a built-in cloud sync functionality but their price for storage upgrades is quite high. One thing you might not know is, Zotero stores metadata and attachments in the same folder. You can use Syncthing to sync that folder, and completely ignore the official cloud sync functionality.
|
||||
|
||||

|
||||
|
||||
> The folder containing both metadata and raw PDF of papers in Zotero.
|
||||
|
||||
### Paper Writing: Overleaf vs. Local Text Editor
|
||||
|
||||
If you work in academia, chances are you have used or at least heard of [Overleaf](https://www.overleaf.com). It is an online platform for working with LaTeX documents. Most of my colleagues use it heavily for writing academic papers.
|
||||
|
|
@ -71,7 +79,9 @@ clean:
|
|||
rm -rf out
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
> LaTeX editing with `neovim` on the left, compiled PDF view on the right.
|
||||
|
||||
Overleaf also provides two types of Git integration for you to sync your local changes with Overleaf projects: sync with a GitHub repo, or directly as a remote git repo. It's totally viable to have a mixed setup, where you primarily use local editors and most of your collaborators use Overleaf.
|
||||
|
||||
|
|
@ -81,6 +91,8 @@ Overleaf also provides two types of Git integration for you to sync your local c
|
|||
|
||||

|
||||
|
||||
> Calibre desktop UI, showing list of books.
|
||||
|
||||
Similar to Zotero, Calibre stores all the books and metadata of a library in a local folder, so there is nothing stopping you from syncing the folder across multiple computers. Although this is something explicitly suggested against by the software (a line when you select the location for a library: "Note that putting the calibre library on a Networked drive is not safe"), from my experience, as long as you don't try to open and modify the same library on two synced computers simultaneously, you won't be running into any issues.
|
||||
|
||||
### Music Player: Plexamp vs. foobar2000
|
||||
|
|
@ -94,6 +106,8 @@ Of course, to save some space, I will always transcode each file to AAC 256k bef
|
|||
|
||||

|
||||
|
||||
> foobar2000 running on a iPad mini.
|
||||
|
||||
## Limitations
|
||||
|
||||
There are limitations of a local file sync setup, and I admit in some cases the cloud solution is indeed better.
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ ul, ol {
|
|||
|
||||
code {
|
||||
font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;
|
||||
font-size: 0.85em;
|
||||
font-size: 0.88em;
|
||||
background: var(--code-bg);
|
||||
padding: 0.1em 0.3em;
|
||||
border-radius: 3px;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue