mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
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.
This commit is contained in:
parent
b76fb0954e
commit
ae0569fb92
22 changed files with 49 additions and 49 deletions
18
README.md
18
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
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<refmeta>
|
||||
<refentrytitle><filename>nix-on-droid-options</filename></refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
<refmiscinfo class="source">Nix-on-Droid</refmiscinfo>
|
||||
<refmiscinfo class="source">nix-on-droid</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname><filename>nix-on-droid-options</filename>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</preface>
|
||||
|
||||
<appendix xml:id="ch-options">
|
||||
<title>Nix-on-Droid configuration options</title>
|
||||
<title>nix-on-droid configuration options</title>
|
||||
<section xml:id="sec-usage">
|
||||
<title>Usage</title>
|
||||
|
||||
|
|
|
|||
|
|
@ -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.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 "" // {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ in
|
|||
Backup file extension.
|
||||
</para><para>
|
||||
If a file in <filename>/etc</filename> 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.
|
||||
|
|
|
|||
|
|
@ -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 "<nix-on-droid/modules/environment/login/nix-on-droid.nix.default>")
|
||||
|
||||
echo "Installing first nix-on-droid generation..."
|
||||
echo "Installing first Nix-on-Droid generation..."
|
||||
${nixCmd} build --no-link --file "<nix-on-droid>" nix-on-droid
|
||||
$(${nixCmd} path-info --file "<nix-on-droid>" 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"
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "nix-on-droid configuration";
|
||||
description = "Nix-on-Droid configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "nix-on-droid configuration";
|
||||
description = "Nix-on-Droid configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "nix-on-droid configuration";
|
||||
description = "Nix-on-Droid configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue