I am trying to add doom emacs by following this guide, but I run into an error when trying to replicate it. How can I fix my error?
Error:
error: undefined variable 'nix-doom-emacs'
at /nix/store/kffdji84k8ad8b4dhhm3x1ksqgsmpr4z-source/home-manager/default.nix:15:5:
14| imports = [
15| nix-doom-emacs.hmModule
| ^
16| ./alacritty.nix
(use '--show-trace' to show detailed location information)
Flake.nix:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-doom-emacs = {
url = "github:nix-community/nix-doom-emacs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, ... }:
let
name = "heremoh";
in {
nixosConfigurations = {
host1 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/host1/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${name} = import ./home-manager;
}
];
};
host2 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/host2/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${name} = import ./home-manager;
}
];
};
nonNixOS = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${name} = import ./home-manager;
}
];
};
};
};
}
home-manager/default.nix
args@{ pkgs, ... }:
let
nixos-system = args ? "nixosConfig";
xinitrc_source = "exec dwm";
in {
imports = [
nix-doom-emacs.hmModule
];
home.stateVersion = "22.11";
programs.home-manager.enable = true;
home.packages = with pkgs; [
fd
] ++ (if nixos-system then [
firefox
] else []);
programs.doom-emacs = {
enable = true;
doomPrivateDir = ./doom.d;
};
home.file = {
".config/nix/nix.conf".text = "experimental-features = nix-command flakes";
} // (if nixos-system then {
".xinitrc".text = xinitrc_source;
} else {});
}