diff --git a/tldr/linux/hyprsunset b/tldr/linux/hyprsunset new file mode 100644 index 00000000..13eef4e1 --- /dev/null +++ b/tldr/linux/hyprsunset @@ -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: . + +- 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` diff --git a/tldr/linux/systemctl-disable b/tldr/linux/systemctl-disable index 7904b841..630fd8f4 100644 --- a/tldr/linux/systemctl-disable +++ b/tldr/linux/systemctl-disable @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # systemctl disable > Disable systemd services. +> See also: `systemctl revert`. > More information: . - Stop a service from running on boot: diff --git a/tldr/linux/systemctl-edit b/tldr/linux/systemctl-edit index d618c926..317d2b5a 100644 --- a/tldr/linux/systemctl-edit +++ b/tldr/linux/systemctl-edit @@ -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]}}` diff --git a/tldr/linux/systemctl-enable b/tldr/linux/systemctl-enable index d1e078a5..577b5dd4 100644 --- a/tldr/linux/systemctl-enable +++ b/tldr/linux/systemctl-enable @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # systemctl enable > Enable systemd services. +> See also: `systemctl revert`. > More information: . - Enable a service to run on boot: diff --git a/tldr/linux/systemctl-mask b/tldr/linux/systemctl-mask index ca182ebf..b42fae81 100644 --- a/tldr/linux/systemctl-mask +++ b/tldr/linux/systemctl-mask @@ -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: . - Mask a service: diff --git a/tldr/linux/systemctl-set-property b/tldr/linux/systemctl-set-property index 89f7e6af..5e5a477b 100644 --- a/tldr/linux/systemctl-set-property +++ b/tldr/linux/systemctl-set-property @@ -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: . - Set a property for a running service: diff --git a/tldr/nh b/tldr/nh index 40ee37be..c23064a5 100644 --- a/tldr/nh +++ b/tldr/nh @@ -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: . -- 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}}` diff --git a/tldr/nh-clean b/tldr/nh-clean new file mode 100644 index 00000000..b48b8ebe --- /dev/null +++ b/tldr/nh-clean @@ -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: . + +- 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}}` diff --git a/tldr/nh-home b/tldr/nh-home new file mode 100644 index 00000000..bd739dfb --- /dev/null +++ b/tldr/nh-home @@ -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: . + +- 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}}` diff --git a/tldr/nh-os b/tldr/nh-os new file mode 100644 index 00000000..5089c00a --- /dev/null +++ b/tldr/nh-os @@ -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: . + +- 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}}` diff --git a/tldr/nh-search b/tldr/nh-search new file mode 100644 index 00000000..3fde3bc2 --- /dev/null +++ b/tldr/nh-search @@ -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: . + +- 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}}` diff --git a/tldr/nix-profile b/tldr/nix-profile index 7b6f2e0e..abe24c09 100644 --- a/tldr/nix-profile +++ b/tldr/nix-profile @@ -6,15 +6,15 @@ source: https://github.com/tldr-pages/tldr.git # nix profile > Install, update, and remove packages from Nix profiles. -> More information: . +> More information: . -- 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: