From ae0569fb92534e29cda4932c4508d6d58708b6a9 Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Wed, 26 Oct 2022 12:06:10 +0200 Subject: [PATCH] treewide: use consitent casing of Nix-on-Droid/nix-on-droid Whenever Nix-on-Droid references the project or application it should be upper-cased. When nix-on-droid is referencing the CLI-tool or is used as some ID, it should be lower-cased. --- README.md | 18 +++++++++--------- docs/man-pages.xml | 2 +- docs/manual.xml | 2 +- flake.nix | 6 +++--- modules/build/activation.nix | 8 ++++---- modules/build/initial-build.nix | 4 ++-- modules/environment/etc/default.nix | 2 +- modules/environment/login/login-inner.nix | 18 +++++++++--------- modules/environment/login/login.nix | 2 +- modules/environment/nix.nix | 4 ++-- modules/environment/path.nix | 2 +- modules/environment/session-init.nix | 2 +- modules/version.nix | 2 +- nix-on-droid/nix-on-droid.sh | 4 ++-- templates/advanced/flake.nix | 8 ++++---- templates/home-manager/flake.nix | 2 +- templates/minimal/flake.nix | 2 +- tests/fakedroid.sh | 2 +- tests/on-device/config-flake-default.nix | 2 +- tests/on-device/config-flake-h-m.flake.nix | 2 +- tests/on-device/config-flake.nix | 2 +- tests/on-device/lib.bash | 2 +- 22 files changed, 49 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 6dd2090..731794b 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ launch the app, press OK, expect many hundreds megabytes of downloads to happen. -## `nix-on-droid` and the module system +## Nix-on-Droid and the module system ### Config file @@ -88,10 +88,10 @@ To enable `home-manager` you simply need to follow the instructions already prov { pkgs, ... }: { - # Read nix-on-droid changelog before changing this value + # Read Nix-on-Droid changelog before changing this value system.stateVersion = "22.05"; - # insert nix-on-droid config + # insert Nix-on-Droid config home-manager.config = { pkgs, ... }: @@ -116,7 +116,7 @@ Use `nix-on-droid switch` to activate the current configuration and For more information, please run `nix-on-droid help`. -## Build `nix-on-droid` on your own +## Build Nix-on-Droid on your own The [terminal emulator part](https://github.com/t184256/nix-on-droid-app) is probably not interesting for you, just download and use a prebuilt one. @@ -144,7 +144,7 @@ and specify the parent directory URL during the installation. To re-trigger the installation, you can use 'clear data' on the Android app (after backing stuff up, obviously). -If you want to change the nix-on-droid channel to your custom one, +If you want to change the Nix-on-Droid channel to your custom one, you can do that either with `nix-channel` after the installation, or by setting the environment variable `NIX_ON_DROID_CHANNEL_URL`. Other environment variables are `NIXPKGS_CHANNEL_URL` an @@ -178,7 +178,7 @@ A minimal example could look like the following: ```nix { - description = "Minimal example of nix-on-droid system config."; + description = "Minimal example of Nix-on-Droid system config."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; @@ -211,11 +211,11 @@ Use `nix-on-droid switch --flake path/to/flake#device` to build and activate you will expand to `.#nixOnDroidConfigurations.device`). If you run `nix-on-droid switch --flake path/to/flake`, the `default` configuration will be used. -**Note:** Currently, nix-on-droid can not be built with an pure flake build because of hardcoded store paths for proot. +**Note:** Currently, Nix-on-Droid can not be built with an pure flake build because of hardcoded store paths for proot. Therefore, every evaluation of a flake configuration will be executed with `--impure` flag. (This behaviour will be dropped as soon as the default setup does not require it anymore.) -## Emulate `nix-on-droid`-like environment with `fakedroid` +## Emulate Nix-on-Droid-like environment with `fakedroid` For easier debugging and testing, there is a so-called `fakedroid` environment which emulates the on-device environment including proot as good as possible. @@ -226,7 +226,7 @@ You can enter this emulated environment with nix run --impure ".#fakedroid" ``` -This will install nix-on-droid with initial channel setup and save the state of +This will install Nix-on-Droid with initial channel setup and save the state of this session in the `.fakedroid` directory in the project directory. To enter this environment with initial flake setup, set `USE_FLAKE=1` as environment variable. Channel and flake setups can co-exist in the `.fakedroid` state directory. To diff --git a/docs/man-pages.xml b/docs/man-pages.xml index 1bcb127..3da60f2 100644 --- a/docs/man-pages.xml +++ b/docs/man-pages.xml @@ -13,7 +13,7 @@ nix-on-droid-options 5 - Nix-on-Droid + nix-on-droid nix-on-droid-options diff --git a/docs/manual.xml b/docs/manual.xml index 767b530..ab30af6 100644 --- a/docs/manual.xml +++ b/docs/manual.xml @@ -19,7 +19,7 @@ - Nix-on-Droid configuration options + nix-on-droid configuration options
Usage diff --git a/flake.nix b/flake.nix index 506af16..ae85c31 100644 --- a/flake.nix +++ b/flake.nix @@ -140,17 +140,17 @@ minimal = { path = ./templates/minimal; - description = "Minimal example of nix-on-droid system config."; + description = "Minimal example of Nix-on-Droid system config."; }; home-manager = { path = ./templates/home-manager; - description = "Minimal example of nix-on-droid system config with home-manager."; + description = "Minimal example of Nix-on-Droid system config with home-manager."; }; advanced = { path = ./templates/advanced; - description = "Advanced example of nix-on-droid system config with home-manager."; + description = "Advanced example of Nix-on-Droid system config with home-manager."; }; }; }; diff --git a/modules/build/activation.nix b/modules/build/activation.nix index 7ea6940..5d66874 100644 --- a/modules/build/activation.nix +++ b/modules/build/activation.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. { config, lib, pkgs, ... }: @@ -84,7 +84,7 @@ in default = { }; type = types.attrs; description = '' - Activation scripts for the nix-on-droid environment. + Activation scripts for the Nix-on-Droid environment. '' + activationOptionDescriptionSuffix; }; @@ -92,7 +92,7 @@ in default = { }; type = types.attrs; description = '' - Activation scripts for the nix-on-droid environment that + Activation scripts for the Nix-on-Droid environment that need to be run first. '' + activationOptionDescriptionSuffix; }; @@ -101,7 +101,7 @@ in default = { }; type = types.attrs; description = '' - Activation scripts for the nix-on-droid environment that + Activation scripts for the Nix-on-Droid environment that need to be run last. '' + activationOptionDescriptionSuffix; }; diff --git a/modules/build/initial-build.nix b/modules/build/initial-build.nix index 3c5c49b..094b1cc 100644 --- a/modules/build/initial-build.nix +++ b/modules/build/initial-build.nix @@ -32,7 +32,7 @@ in nix-on-droid = mkOption { type = types.str; default = defaultNixOnDroidChannel; - description = "Channel URL for nix-on-droid."; + description = "Channel URL for Nix-on-Droid."; }; }; @@ -46,7 +46,7 @@ in nix-on-droid = mkOption { type = types.str; default = defaultNixOnDroidFlake; - description = "Flake URL for nix-on-droid."; + description = "Flake URL for Nix-on-Droid."; }; inputOverrides = mkEnableOption "" // { diff --git a/modules/environment/etc/default.nix b/modules/environment/etc/default.nix index 226ea7d..3ff193a 100644 --- a/modules/environment/etc/default.nix +++ b/modules/environment/etc/default.nix @@ -97,7 +97,7 @@ in Backup file extension. If a file in /etc already exists and is not managed - by nix-on-droid, the activation fails because we do not overwrite unknown + by Nix-on-Droid, the activation fails because we do not overwrite unknown files. When an extension is provided through this option, the original file will be moved in respect of the backup extension and the activation executes successfully. diff --git a/modules/environment/login/login-inner.nix b/modules/environment/login/login-inner.nix index d663adc..f4b0d0b 100644 --- a/modules/environment/login/login-inner.nix +++ b/modules/environment/login/login-inner.nix @@ -9,12 +9,12 @@ let in writeText "login-inner" '' - # This file is generated by nix-on-droid. DO NOT EDIT. + # This file is generated by Nix-on-Droid. DO NOT EDIT. set -eo pipefail ${lib.optionalString (config.environment.motd != null) '' - if [ "$#" -eq 0 ]; then # if script is called from within nix-on-droid app + if [ "$#" -eq 0 ]; then # if script is called from within Nix-on-Droid app echo "${lib.removeSuffix "\n" config.environment.motd}" fi ''} @@ -61,13 +61,13 @@ writeText "login-inner" '' DEFAULT_CONFIG=$(${nix}/bin/nix-instantiate --eval --expr "") - echo "Installing first nix-on-droid generation..." + echo "Installing first Nix-on-Droid generation..." ${nixCmd} build --no-link --file "" nix-on-droid $(${nixCmd} path-info --file "" nix-on-droid)/bin/nix-on-droid switch --file $DEFAULT_CONFIG . "${config.user.home}/.nix-profile/etc/profile.d/nix-on-droid-session-init.sh" - echo "Copying default nix-on-droid config..." + echo "Copying default Nix-on-Droid config..." mkdir --parents $HOME/.config/nixpkgs cp $DEFAULT_CONFIG $HOME/.config/nixpkgs/nix-on-droid.nix chmod u+w $HOME/.config/nixpkgs/nix-on-droid.nix @@ -88,7 +88,7 @@ writeText "login-inner" '' "${config.user.home}/.config/nix-on-droid/flake.nix" ''} - echo "Installing first nix-on-droid generation..." + echo "Installing first Nix-on-Droid generation..." ${nixCmd} run ${config.build.flake.nix-on-droid} -- switch --flake ${config.user.home}/.config/nix-on-droid . "${config.user.home}/.nix-profile/etc/profile.d/nix-on-droid-session-init.sh" @@ -97,21 +97,21 @@ writeText "login-inner" '' echo echo "Congratulations! Now you have Nix installed with some default packages like bashInteractive, \ - coreutils, cacert and, most importantly, nix-on-droid itself to manage local configuration, see" + coreutils, cacert and, most importantly, Nix-on-Droid itself to manage local configuration, see" echo " nix-on-droid help" if [[ "$USE_FLAKE" == 0 ]]; then echo "or the config file" echo " ~/.config/nixpkgs/nix-on-droid.nix" echo - echo "You can go for the bare nix-on-droid setup or you can configure your phone via home-manager. See \ + echo "You can go for the bare Nix-on-Droid setup or you can configure your phone via home-manager. See \ config file for further information." echo else echo "or the flake" echo " ~/.config/nix-on-droid/" echo - echo "You can go for the bare nix-on-droid setup or you can configure your phone via home-manager. See \ + echo "You can go for the bare Nix-on-Droid setup or you can configure your phone via home-manager. See \ other templates in ${config.build.flake.nix-on-droid}." echo fi @@ -125,7 +125,7 @@ writeText "login-inner" '' ''} usershell="${config.user.shell}" - if [ "$#" -gt 0 ]; then # if script is not called from within nix-on-droid app + if [ "$#" -gt 0 ]; then # if script is not called from within Nix-on-Droid app exec /usr/bin/env "$@" elif [ -x "$usershell" ]; then exec -a "-''${usershell##*/}" "$usershell" diff --git a/modules/environment/login/login.nix b/modules/environment/login/login.nix index f654cd0..a7cfe8c 100644 --- a/modules/environment/login/login.nix +++ b/modules/environment/login/login.nix @@ -14,7 +14,7 @@ in writeScript "login" '' #!/system/bin/sh - # This file is generated by nix-on-droid. DO NOT EDIT. + # This file is generated by Nix-on-Droid. DO NOT EDIT. set -eu -o pipefail export USER="${config.user.userName}" diff --git a/modules/environment/nix.nix b/modules/environment/nix.nix index aee9e6e..c5295a9 100644 --- a/modules/environment/nix.nix +++ b/modules/environment/nix.nix @@ -108,7 +108,7 @@ in type = types.listOf types.str; default = [ ]; description = '' - A list of URLs of substituters. The official NixOS and nix-on-droid + A list of URLs of substituters. The official NixOS and Nix-on-Droid substituters are added by default. ''; }; @@ -119,7 +119,7 @@ in description = '' A list of public keys. When paths are copied from another Nix store (such as a binary cache), they must be signed with one of these keys. The official NixOS - and nix-on-droid public keys are added by default. + and Nix-on-Droid public keys are added by default. ''; }; diff --git a/modules/environment/path.nix b/modules/environment/path.nix index 2c9d3a5..6a8d80b 100644 --- a/modules/environment/path.nix +++ b/modules/environment/path.nix @@ -60,7 +60,7 @@ in paths = cfg.packages; meta = { - description = "Environment of packages installed through nix-on-droid."; + description = "Environment of packages installed through Nix-on-Droid."; }; }; }; diff --git a/modules/environment/session-init.nix b/modules/environment/session-init.nix index ea86795..165079a 100644 --- a/modules/environment/session-init.nix +++ b/modules/environment/session-init.nix @@ -57,7 +57,7 @@ in ''; type = types.nullOr types.lines; description = '' - Text to show on every new shell created by nix-on-droid. + Text to show on every new shell created by Nix-on-Droid. ''; }; diff --git a/modules/version.nix b/modules/version.nix index 9aac3d2..15430fa 100644 --- a/modules/version.nix +++ b/modules/version.nix @@ -14,7 +14,7 @@ with lib; type = types.enum [ "19.09" "20.03" "20.09" "21.05" "21.11" "22.05" ]; default = "19.09"; description = '' - It is occasionally necessary for nix-on-droid to change + It is occasionally necessary for Nix-on-Droid to change configuration defaults in a way that is incompatible with stateful data. This could, for example, include switching the default data format or location of a file. diff --git a/nix-on-droid/nix-on-droid.sh b/nix-on-droid/nix-on-droid.sh index b3a575e..cbcafdc 100644 --- a/nix-on-droid/nix-on-droid.sh +++ b/nix-on-droid/nix-on-droid.sh @@ -120,7 +120,7 @@ function doSwitchGeneration() { "${PROFILE_DIRECTORY}-${generationNum}-link/activate" else errorEcho "Activation was not successful, generation is either broken or already garbage collected." - errorEcho "See nix-on-droid generations for available generations." + errorEcho "See 'nix-on-droid generations' for available generations." exit 1 fi } @@ -219,7 +219,7 @@ case $COMMAND in if [[ $(readlink $PROFILE_DIRECTORY) =~ ^nix-on-droid-([0-9]+)-link$ ]]; then doSwitchGeneration $((BASH_REMATCH[1] - 1)) else - errorEcho "nix-on-droid profile link is broken, please run nix-on-droid switch to fix it." + errorEcho "Nix-on-Droid profile link is broken, please run 'nix-on-droid switch' to fix it." exit 1 fi ;; diff --git a/templates/advanced/flake.nix b/templates/advanced/flake.nix index fd81cac..955d372 100644 --- a/templates/advanced/flake.nix +++ b/templates/advanced/flake.nix @@ -1,5 +1,5 @@ { - description = "Advanced example of nix-on-droid system config with home-manager."; + description = "Advanced example of Nix-on-Droid system config with home-manager."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; @@ -22,7 +22,7 @@ modules = [ ./nix-on-droid.nix - # list of extra modules for nix-on-droid system + # list of extra modules for Nix-on-Droid system # { nix.registry.nixpkgs.flake = nixpkgs; } # ./path/to/module.nix @@ -30,12 +30,12 @@ # flake.nixOnDroidModules.module ]; - # list of extra special args for nix-on-droid modules + # list of extra special args for Nix-on-Droid modules extraSpecialArgs = { # rootPath = ./.; }; - # set nixpkgs instance, it is recommended to apply nix-on-droid.overlays.default + # set nixpkgs instance, it is recommended to apply `nix-on-droid.overlays.default` pkgs = import nixpkgs { system = "aarch64-linux"; diff --git a/templates/home-manager/flake.nix b/templates/home-manager/flake.nix index e5e3c55..37f1a5e 100644 --- a/templates/home-manager/flake.nix +++ b/templates/home-manager/flake.nix @@ -1,5 +1,5 @@ { - description = "Minimal example of nix-on-droid system config with home-manager."; + description = "Minimal example of Nix-on-Droid system config with home-manager."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; diff --git a/templates/minimal/flake.nix b/templates/minimal/flake.nix index 3476152..3c54723 100644 --- a/templates/minimal/flake.nix +++ b/templates/minimal/flake.nix @@ -1,5 +1,5 @@ { - description = "Basic example of nix-on-droid system config."; + description = "Basic example of Nix-on-Droid system config."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; diff --git a/tests/fakedroid.sh b/tests/fakedroid.sh index 4d412f4..11af1e8 100644 --- a/tests/fakedroid.sh +++ b/tests/fakedroid.sh @@ -94,7 +94,7 @@ if [[ ! -e "$ENV_DIR/$INSTALLATION_DIR/etc" || fi -# Inject nix-on-droid version under test into the environment. +# Inject Nix-on-Droid version under test into the environment. # Uncommitted chages won't be picked up, just HEAD. # /n-o-d/archive.tar.gz is used as a channel, /n-o-d/unpacked --- as a flake. diff --git a/tests/on-device/config-flake-default.nix b/tests/on-device/config-flake-default.nix index baa3302..4786b7f 100644 --- a/tests/on-device/config-flake-default.nix +++ b/tests/on-device/config-flake-default.nix @@ -1,5 +1,5 @@ { - description = "nix-on-droid configuration"; + description = "Nix-on-Droid configuration"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-22.05"; diff --git a/tests/on-device/config-flake-h-m.flake.nix b/tests/on-device/config-flake-h-m.flake.nix index 7bc2ae0..ef72f19 100644 --- a/tests/on-device/config-flake-h-m.flake.nix +++ b/tests/on-device/config-flake-h-m.flake.nix @@ -1,5 +1,5 @@ { - description = "nix-on-droid configuration"; + description = "Nix-on-Droid configuration"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-22.05"; diff --git a/tests/on-device/config-flake.nix b/tests/on-device/config-flake.nix index 5408232..93c0503 100644 --- a/tests/on-device/config-flake.nix +++ b/tests/on-device/config-flake.nix @@ -1,5 +1,5 @@ { - description = "nix-on-droid configuration"; + description = "Nix-on-Droid configuration"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-22.05"; diff --git a/tests/on-device/lib.bash b/tests/on-device/lib.bash index 88f086b..b7ecdb4 100644 --- a/tests/on-device/lib.bash +++ b/tests/on-device/lib.bash @@ -32,7 +32,7 @@ _setup() { $DEFAULT_ACTIVATE_SCRIPT rm -rf ~/.config/nixpkgs/* - # build and activate the version of nix-on-droid that is subject to test + # build and activate the version of Nix-on-Droid that is subject to test switch_to_default_config }