add x86_64 arch

This commit is contained in:
Alexander Sosedkin 2024-06-15 14:35:28 +02:00
parent 463e0f82a6
commit d72ab2a167
17 changed files with 89 additions and 40 deletions

View file

@ -10,6 +10,7 @@
outputs = { nix-on-droid, ... }: {
nixOnDroidConfigurations = {
default = nix-on-droid.lib.nixOnDroidConfiguration {
system = "<<SYSTEM>>";
modules = [ ./nix-on-droid.nix ];
};
};

View file

@ -10,7 +10,7 @@ load lib
# set up / build / activate the configuration
cat "$ON_DEVICE_TESTS_DIR/config-flake-h-m.cfg.nix" \
> ~/.config/nixpkgs/nix-on-droid.nix
_sed "s|<<FLAKE_URL>>|$FLAKE_URL|g" \
_sed -e "s|<<FLAKE_URL>>|$FLAKE_URL|g" -e "s|<<SYSTEM>>|$(detect_system)|g" \
"$ON_DEVICE_TESTS_DIR/config-flake-h-m.flake.nix" \
> ~/.config/nixpkgs/flake.nix

View file

@ -14,6 +14,7 @@
outputs = { nix-on-droid, ... }: {
nixOnDroidConfigurations = {
device = nix-on-droid.lib.nixOnDroidConfiguration {
system = "<<SYSTEM>>";
modules = [ ./nix-on-droid.nix ];
};
};

View file

@ -6,7 +6,7 @@ load lib
# set up / build / activate the configuration
cat "$ON_DEVICE_TESTS_DIR/config-flake-hosts.cfg.nix" \
> ~/.config/nixpkgs/nix-on-droid.nix
_sed "s|<<FLAKE_URL>>|$FLAKE_URL|g" \
_sed -e "s|<<FLAKE_URL>>|$FLAKE_URL|g" -e "s|<<SYSTEM>>|$(detect_system)|g" \
"$ON_DEVICE_TESTS_DIR/config-flake.nix" \
> ~/.config/nixpkgs/flake.nix
@ -27,7 +27,7 @@ load lib
# set up / build / activate the configuration
cat "$ON_DEVICE_TESTS_DIR/config-flake-hosts-localhost.cfg.nix" \
> ~/.config/nixpkgs/nix-on-droid.nix
_sed "s|<<FLAKE_URL>>|$FLAKE_URL|g" \
_sed -e "s|<<FLAKE_URL>>|$FLAKE_URL|g" -e "s|<<SYSTEM>>|$(detect_system)|g" \
"$ON_DEVICE_TESTS_DIR/config-flake.nix" \
> ~/.config/nixpkgs/flake.nix

View file

@ -17,7 +17,7 @@ function flake_example() {
"$CHANNEL_DIR/modules/environment/login/nix-on-droid.nix.default" \
> ~/.config/nixpkgs/nix-on-droid.nix
_sed "s|<<FLAKE_URL>>|$FLAKE_URL|g" \
_sed -e "s|<<FLAKE_URL>>|$FLAKE_URL|g" -e "s|<<SYSTEM>>|$(detect_system)|g" \
"$ON_DEVICE_TESTS_DIR/$flake_file_name" \
> ~/.config/nixpkgs/flake.nix

View file

@ -10,6 +10,7 @@
outputs = { nix-on-droid, ... }: {
nixOnDroidConfigurations = {
device = nix-on-droid.lib.nixOnDroidConfiguration {
system = "<<SYSTEM>>";
modules = [ ./nix-on-droid.nix ];
};
};

View file

@ -71,3 +71,8 @@ _diff() {
storePath="$(nix-build "<nixpkgs>" --no-out-link --attr diffutils)"
"${storePath}/bin/diff" "$@"
}
detect_system() {
nix --experimental-features nix-command \
eval --impure --raw --expr 'builtins.currentSystem'
}