bug: attribute 'dag' missing when trying to use activations
Is there an existing issue for this?
- [X] I have searched the existing issues
Issue description
I am trying to use a home manager activation and following the docs here: https://rycee.gitlab.io/home-manager/options.html#opt-home.activation
{ config, lib, pkgs, fetchFromGitHub, ... }:
with lib;
let
home-manager = builtins.fetchTarball
"https://github.com/nix-community/home-manager/archive/master.tar.gz";
in {
imports = [ (import "${home-manager}/nixos") ];
home.activation.test = lib.hm.dag.entryAfter ["writeBoundary"] ''
echo hello world
'';
}
I get the following error:
error: attribute 'hm' missing, at /home/vagrant/nixos/home.nix:113:28
Where can I find dag and how can I import it?
Maintainer CC
No response
System information
- system: `"x86_64-linux"`
- host os: `Linux 5.10.106, NixOS, 21.11 (Porcupine)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3.16`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
{ config, lib, pkgs, fetchFromGitHub, ... }:
let
home-manager = builtins.fetchTarball
"https://github.com/nix-community/home-manager/archive/master.tar.gz";
in {
imports = [ "${home-manager}/nixos" ];
home-manager.users.you = { lib, ... }: {
home.activation.test = lib.hm.dag.entryAfter ["writeBoundary"] ''
echo hello world
'';
};
}
This should probably be documented better in the documentation for home.activation option.
This has nothing to do with home.activation. The relevant section of the manual is https://nix-community.github.io/home-manager/index.html#sec-install-nixos-module. Maybe we could mention lib in that section.
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.
If you are the original author of the issue
- If this is resolved, please consider closing it so that the maintainers know not to focus on this.
- If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
- If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
If you are not the original author of the issue
- If you are also experiencing this issue, please add details of your situation to help with the debugging process.
- If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Memorandum on closing issues
Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.