nix-on-droid testing branch + lock

This commit is contained in:
2026-08-06 16:19:48 +03:00
parent 2a8b15ce01
commit 8434688515
4 changed files with 190 additions and 37 deletions
+3
View File
@@ -2,5 +2,8 @@
{ {
nixOnDroidConfigurations = { nixOnDroidConfigurations = {
epral = import ./epral.nix flakeContext; # epral (Android via nix-on-droid) epral = import ./epral.nix flakeContext; # epral (Android via nix-on-droid)
# Alias so a plain `nix-on-droid switch` from a local clone
# (~/.config/nix-on-droid) picks up the device config without `#epral`.
default = import ./epral.nix flakeContext;
}; };
} }
+41 -35
View File
@@ -1,10 +1,11 @@
{ inputs, ... }@flakeContext: { inputs, ... }@flakeContext:
let let
# Host: epral (Android device via nix-on-droid, aarch64-linux) # Host: epral (Android device via nix-on-droid, aarch64-linux)
# Adapted from test/nix-on-droid.nix — the config that works on the device.
# NOTE: nix-on-droid uses its own module system (class = "nixOnDroid"). # NOTE: nix-on-droid uses its own module system (class = "nixOnDroid").
# Only options defined by nix-on-droid are available here: # Only nix-on-droid options exist here: environment.*, nix.*, time.*,
# environment.*, nix.*, time.*, networking.hosts, user.*, home-manager.*, system.stateVersion # networking.hosts, user.*, home-manager.*, system.stateVersion, android-integration.*
# NixOS-only options (boot.*, services.*, hardware.*, fileSystems.*, ...) do NOT exist here. # NixOS-only options (boot.*, services.*, hardware.*, fileSystems.*, ...) do NOT exist.
nixOnDroidModule = nixOnDroidModule =
{ {
config, config,
@@ -13,44 +14,52 @@ let
... ...
}: }:
{ {
# user.home is read-only and always /data/data/com.termux.nix/files/home # user.userName defaults to "nix-on-droid"; set it to override.
user.userName = "oqyude"; # matches xlib.device.username used by the NixOS hosts # user.home is read-only: /data/data/com.termux.nix/files/home
environment = { # Simply install just the packages
# Base CLI packages environment.packages = with pkgs; [
packages = with pkgs; [ # User-facing stuff that you really really want to have
vim vim # or some other editor, e.g. nano or neovim
git nano
ripgrep
htop # Some common stuff that people expect to have
file openssh
tmux treefmt
]; git
# Backup existing files in /etc instead of failing activation procps
etcBackupExtension = ".bak"; psmisc # provides killall (attr `killall` was removed from nixpkgs)
}; diffutils
findutils
util-linux # renamed from utillinux
tzdata
hostname
man
gnugrep
gnupg
gnused
gnutar
bzip2
gzip
zip
unzip
];
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = "24.05";
# Set up nix for flakes # Set up nix for flakes
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
# Set your time zone
time.timeZone = "Europe/Moscow"; time.timeZone = "Europe/Moscow";
# Read the changelog before changing this value. android-integration.termux-setup-storage.enable = true;
# nix-on-droid currently supports state versions only up to "24.05".
system.stateVersion = "24.05";
# home-manager is built in; point it at this repo's home-manager input
# and keep the config self-contained (repo home.nix depends on NixOS-only xlib.dirs).
# home-manager = {
# backupFileExtension = "hm-bak";
# useGlobalPkgs = true;
# config = { config, lib, pkgs, ... }: {
# home.stateVersion = "24.05";
# home.packages = with pkgs; [ ];
# };
# };
}; };
in in
inputs.nix-on-droid.lib.nixOnDroidConfiguration { inputs.nix-on-droid.lib.nixOnDroidConfiguration {
@@ -60,7 +69,4 @@ inputs.nix-on-droid.lib.nixOnDroidConfiguration {
modules = [ modules = [
nixOnDroidModule nixOnDroidModule
]; ];
extraSpecialArgs = {
inherit inputs;
};
} }
Generated
+141
View File
@@ -101,6 +101,60 @@
"type": "github" "type": "github"
} }
}, },
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
],
"nmd": [
"nix-on-droid",
"nmd"
],
"nmt": "nmt"
},
"locked": {
"lastModified": 1705252799,
"narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "2de39dedd79aab14c01b9e2934842051a160ffa5",
"type": "github"
},
"original": {
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
"nix-on-droid": {
"inputs": {
"home-manager": [
"home-manager"
],
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-docs": "nixpkgs-docs",
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
"nmd": "nmd"
},
"locked": {
"lastModified": 1772387862,
"narHash": "sha256-o7q9flWMCsFW2mkz8TQhvPUcwFczO7VX9I6U2u2vN4o=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "67b105336cb06b764366bfe241afa2352de6a926",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "testing",
"repo": "nix-on-droid",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
@@ -189,6 +243,38 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-docs": {
"locked": {
"lastModified": 1705957679,
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a333eaa80901efe01df07eade2c16d183761fa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-for-bootstrap": {
"locked": {
"lastModified": 1772047000,
"narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
"type": "github"
}
},
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1785744216, "lastModified": 1785744216,
@@ -269,6 +355,44 @@
"type": "github" "type": "github"
} }
}, },
"nmd": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs-docs"
],
"scss-reset": "scss-reset"
},
"locked": {
"lastModified": 1705050560,
"narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=",
"owner": "~rycee",
"repo": "nmd",
"rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3",
"type": "sourcehut"
},
"original": {
"owner": "~rycee",
"repo": "nmd",
"type": "sourcehut"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"plasma-manager": { "plasma-manager": {
"inputs": { "inputs": {
"home-manager": [ "home-manager": [
@@ -319,6 +443,7 @@
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"grub2-themes": "grub2-themes", "grub2-themes": "grub2-themes",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-on-droid": "nix-on-droid",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
@@ -336,6 +461,22 @@
"zeroq-credentials": "zeroq-credentials" "zeroq-credentials": "zeroq-credentials"
} }
}, },
"scss-reset": {
"flake": false,
"locked": {
"lastModified": 1631450058,
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
"owner": "andreymatin",
"repo": "scss-reset",
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
"type": "github"
},
"original": {
"owner": "andreymatin",
"repo": "scss-reset",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
+5 -2
View File
@@ -25,8 +25,11 @@
}; };
}; };
nix-on-droid = { nix-on-droid = {
url = "github:nix-community/nix-on-droid/master"; url = "github:nix-community/nix-on-droid/testing"; # same branch as test/ on the device
inputs.nixpkgs.follows = "nixpkgs"; inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
}; };
deploy-rs = { deploy-rs = {
url = "github:serokell/deploy-rs"; url = "github:serokell/deploy-rs";