mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-09 22:57:59 +00:00
Update cheatsheets
This commit is contained in:
34
tldr/linux/hyprsunset
Normal file
34
tldr/linux/hyprsunset
Normal 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`
|
||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# systemctl disable
|
# systemctl disable
|
||||||
|
|
||||||
> Disable systemd services.
|
> Disable systemd services.
|
||||||
|
> See also: `systemctl revert`.
|
||||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#disable%20UNIT%E2%80%A6>.
|
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#disable%20UNIT%E2%80%A6>.
|
||||||
|
|
||||||
- Stop a service from running on boot:
|
- Stop a service from running on boot:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`sudo systemctl edit {{unit_file}}`
|
`sudo systemctl edit {{unit_file}}`
|
||||||
|
|
||||||
- Edit an unit file:
|
- Edit a unit file:
|
||||||
|
|
||||||
`sudo systemctl edit {{unit_file}} {{[-l|--full]}}`
|
`sudo systemctl edit {{unit_file}} {{[-l|--full]}}`
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# systemctl enable
|
# systemctl enable
|
||||||
|
|
||||||
> Enable systemd services.
|
> Enable systemd services.
|
||||||
|
> See also: `systemctl revert`.
|
||||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#enable%20UNIT%E2%80%A6>.
|
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#enable%20UNIT%E2%80%A6>.
|
||||||
|
|
||||||
- Enable a service to run on boot:
|
- Enable a service to run on boot:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# systemctl mask
|
# systemctl mask
|
||||||
|
|
||||||
> Link units to `/dev/null` so that they cannot be started.
|
> 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>.
|
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#mask%20UNIT%E2%80%A6>.
|
||||||
|
|
||||||
- Mask a service:
|
- Mask a service:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# systemctl set-property
|
# systemctl set-property
|
||||||
|
|
||||||
> Set the specified unit properties at runtime.
|
> 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>.
|
> 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:
|
- Set a property for a running service:
|
||||||
|
|||||||
31
tldr/nh
31
tldr/nh
@@ -5,33 +5,30 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
---
|
---
|
||||||
# nh
|
# 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>.
|
> 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]}}`
|
`nh home switch {{path/to/flake}}`
|
||||||
|
|
||||||
- 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}}`
|
|
||||||
|
|
||||||
- Build and switch to a nix-darwin flake configuration:
|
- Build and switch to a nix-darwin flake configuration:
|
||||||
|
|
||||||
`nh darwin switch {{path/to/flake}} {{[-H|--hostname]}} {{host}}`
|
`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:
|
- Generate shell completions for a specified shell:
|
||||||
|
|
||||||
`nh completions {{shell}}`
|
`nh completions {{shell}}`
|
||||||
|
|||||||
22
tldr/nh-clean
Normal file
22
tldr/nh-clean
Normal 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
22
tldr/nh-home
Normal 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
37
tldr/nh-os
Normal 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
21
tldr/nh-search
Normal 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}}`
|
||||||
@@ -6,15 +6,15 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# nix profile
|
# nix profile
|
||||||
|
|
||||||
> Install, update, and remove packages from Nix profiles.
|
> 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:
|
- 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:
|
- 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}}`
|
`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:
|
- Rollback (cancel) the latest action on the default profile:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user