diff --git a/home/termux.nix b/home/termux.nix index 8fce3b3..cfa3d92 100644 --- a/home/termux.nix +++ b/home/termux.nix @@ -62,10 +62,6 @@ ".ssh/authorized_keys".text = '' ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P ''; - # nix-on-droid's session-init adds ~/.nix-defexpr/channels to NIX_PATH - # unconditionally; nix warns about the missing dir on every invocation. - # Making it exist silences the warning. - ".nix-defexpr/channels/nixpkgs/.keep".text = ""; }; }; programs = { diff --git a/modules/termux/default.nix b/modules/termux/default.nix index b182cb8..6cbd77b 100644 --- a/modules/termux/default.nix +++ b/modules/termux/default.nix @@ -49,6 +49,17 @@ in fi ''; + # nix-on-droid's session-init adds ~/.nix-defexpr/channels to NIX_PATH + # unconditionally; nix warns about the missing dir on every invocation. + # Making it exist silences the warning. Must be done in activation (not + # home-manager): ~/.nix-defexpr/channels is a symlink into + # ~/.local/state/nix/profiles/channels, which home-manager cannot link + # into. + build.activation.nixdefexpr = '' + $DRY_RUN_CMD mkdir -p "${config.user.home}/.nix-defexpr/channels/nixpkgs" + $DRY_RUN_CMD touch "${config.user.home}/.nix-defexpr/channels/nixpkgs/.keep" + ''; + # runit service tree: ~/service//{run,log/run}. run/ and log/run are # symlinks into the nix store (read-only is fine; runsvdir writes only to # the /supervise dirs). /etc/service is symlinked for `sv status`.