Update cheatsheets

This commit is contained in:
ivuorinen
2026-01-17 00:21:25 +00:00
parent c2565bdd4e
commit ce240b2f02
12 changed files with 161 additions and 24 deletions

34
tldr/linux/hyprsunset Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# hyprsunset
> A blue light filter for Hyprland.
> Optionally configured via `~/.config/hypr/hyprsunset.conf`.
> More information: <https://wiki.hypr.land/Hypr-Ecosystem/hyprsunset/>.
- Start the hyprsunset service:
`hyprsunset`
- Start the hyprsunset service with a specified color temperature and gamma percentage:
`hyprsunset {{[-t|--temperature]}} {{temperature}} {{[-g|--gamma]}} {{gamma}}`
- Adjust the color temperature while the hyprsunset service is running:
`hyprctl hyprsunset temperature {{temperature}}`
- Adjust the gamma while the hyprsunset service is running:
`hyprctl hyprsunset gamma {{gamma}}`
- Reset the color temperature to 6000K:
`hyprctl hyprsunset reset temperature`
- Reset the gamma to 100%:
`hyprctl hyprsunset reset gamma`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# systemctl disable
> Disable systemd services.
> See also: `systemctl revert`.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#disable%20UNIT%E2%80%A6>.
- Stop a service from running on boot:

View File

@@ -13,7 +13,7 @@ source: https://github.com/tldr-pages/tldr.git
`sudo systemctl edit {{unit_file}}`
- Edit an unit file:
- Edit a unit file:
`sudo systemctl edit {{unit_file}} {{[-l|--full]}}`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# systemctl enable
> Enable systemd services.
> See also: `systemctl revert`.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#enable%20UNIT%E2%80%A6>.
- Enable a service to run on boot:

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# systemctl mask
> Link units to `/dev/null` so that they cannot be started.
> See also: `systemctl revert`.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#mask%20UNIT%E2%80%A6>.
- Mask a service:

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# systemctl set-property
> Set the specified unit properties at runtime.
> See also: `systemctl revert`.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#set-property%20UNIT%20PROPERTY=VALUE%E2%80%A6>.
- Set a property for a running service:

31
tldr/nh
View File

@@ -5,33 +5,30 @@ source: https://github.com/tldr-pages/tldr.git
---
# nh
> Modern helper utility tool for the Nix/Nixos ecosystem.
> Modern helper utility tool for the Nix/NixOS ecosystem.
> Some subcommands such as `os`, `home`, `clean`, `search` have their own usage documentation.
> More information: <https://github.com/nix-community/nh#usage>.
- Search for a package in Nixpkgs, limiting results:
- Build and switch to a specified NixOS flake configuration:
`nh search {{[-l|--limit]}} {{number}} {{name}}`
`nh os switch {{path/to/flake}}`
- Collect all garbage and gcroots from the Nix store:
- Build and switch to a specified Home Manager flake configuration:
`nh clean all {{[-a|--ask]}}`
- Build a specified Nixos flake configuration and create a symlink of the result from the Nix store:
`nh os build-vm {{path/to/flake}} {{[-H|--hostname]}} {{host}}`
- Build and test a specified Nixos flake configuration:
`nh os test {{path/to/flake}} {{[-H|--hostname]}} {{nixos}}`
- Build and switch to a specified Home manager flake configuration:
`nh home switch {{path/to/flake}} {{[-c|--configuration]}} {{home}}`
`nh home switch {{path/to/flake}}`
- Build and switch to a nix-darwin flake configuration:
`nh darwin switch {{path/to/flake}} {{[-H|--hostname]}} {{host}}`
- Collect all garbage and gcroots from the Nix store:
`nh clean all {{[-a|--ask]}}`
- Search for a package in Nixpkgs:
`nh search {{name}}`
- Generate shell completions for a specified shell:
`nh completions {{shell}}`

22
tldr/nh-clean Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# nh clean
> Clean Nix profiles and delete unused and unreachable Nix store paths.
> Generations can be listed using `nix-env --list-generations` or `nh os info`.
> More information: <https://github.com/nix-community/nh#usage>.
- Ask for clean up plan confirmation, clean all profiles and collect garbage:
`nh clean all {{[-a|--ask]}}`
- Keep a specified number of the most recent profiles for the current user and clean the remaining profiles:
`nh clean user {{[-k|--keep]}} {{number}}`
- Clean a specific profile and collect garbage:
`nh clean profile {{path/to/profile}}`

22
tldr/nh-home Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# nh home
> Manage and configure per-user environment using Nix.
> Reimplementation of `home-manager`.
> More information: <https://github.com/nix-community/nh#usage>.
- Build and switch to a specified Home Manager flake configuration:
`nh home switch {{path/to/flake}}`
- Update all the flake inputs of the specified Home Manager flake configuration and build it:
`nh home build {{path/to/flake}} {{[-u|--update]}}`
- Load a specified Home Manager flake configuration in Nix REPL (Nix evaluation environment):
`nh home repl {{path/to/flake}}`

37
tldr/nh-os Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# nh os
> Reconfigure or debug a NixOS machine.
> More information: <https://github.com/nix-community/nh#usage>.
- Build and switch to a specified NixOS flake configuration:
`nh os switch {{path/to/flake}}`
- Update all the flake inputs of the specified NixOS flake configuration, build it and make it the boot default:
`nh os boot {{path/to/flake}} {{[-u|--update]}}`
- Build and activate a specified NixOS flake configuration specialisation:
`nh os test {{path/to/flake}} {{[-s|--specialisation]}} {{specialisation}}`
- Build a specified NixOS flake configuration host and create a symlink of the result from the Nix store in the current directory:
`nh os build-vm {{path/to/flake}} {{[-H|--hostname]}} {{host}}`
- Load a specified NixOS flake configuration in Nix REPL (Nix evaluation environment):
`nh os repl {{path/to/flake}}`
- List all available generations from profile path:
`nh os info`
- Rollback to a specified generation:
`nh os rollback {{[-t|-to]}} {{generation}}`

21
tldr/nh-search Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# nh search
> Search for packages in Nixpkgs.
> More information: <https://github.com/nix-community/nh#usage>.
- Search for a package in Nixpkgs, limiting results:
`nh search {{[-l|--limit]}} {{number}} {{name}}`
- Search for a package in a specified Nixpkgs channel:
`nh search {{[-c|--channel]}} {{nixos-unstable}} {{name}}`
- Search for a package in Nixpkgs, showing supported platforms for each package:
`nh search {{[-P|--platforms]}} {{name}}`

View File

@@ -6,15 +6,15 @@ source: https://github.com/tldr-pages/tldr.git
# nix profile
> Install, update, and remove packages from Nix profiles.
> More information: <https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-profile.html>.
> More information: <https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-profile.html>.
- Install some packages from nixpkgs into the default profile:
- Install packages from nixpkgs into the default profile:
`nix profile install {{nixpkgs#pkg1 nixpkgs#pkg2 ...}}`
`nix profile add {{nixpkgs#pkg1 nixpkgs#pkg2 ...}}`
- Install a package from a flake on GitHub into a custom profile:
`nix profile install {{github:owner/repo/pkg}} --profile {{path/to/directory}}`
`nix profile add {{github:owner/repo/pkg}} --profile {{path/to/directory}}`
- List packages currently installed in the default profile:
@@ -24,9 +24,9 @@ source: https://github.com/tldr-pages/tldr.git
`nix profile remove {{legacyPackages.x86_64-linux.pkg}}`
- Upgrade packages in the default to the latest available versions:
- Upgrade packages in the default profile to the latest available versions:
`nix profile upgrade`
`nix profile upgrade --all`
- Rollback (cancel) the latest action on the default profile: