!SlMumQZnFjwLRjWFbW:nixos.org

Nix + Doom Emacs

204 Members
Running Doom Emacs with Nix | You probably want https://github.com/nix-community/nix-doom-emacs44 Servers

Load older messages


SenderMessageTime
27 Jun 2023
@ckie:ckie.devmei 🌒& and i'm rather puzzled by the two different dependency resolution codepaths you mentioned: straight.el collects almost everything (excluding mu4e) into the same straight-emacs-env derivation? 01:58:34
@ckie:ckie.devmei 🌒&i love the mole whacking metaphor01:58:53
@ckie:ckie.devmei 🌒& * i love the mole whacking analogy01:59:00
28 Jun 2023
@htsr:matrix.orghtsr joined the room.08:24:35
30 Jun 2023
@suskeyhose:matrix.org@suskeyhose:matrix.org

I've been using doom by just having emacs in my home-manager config and putting the deps it needs on the path into my config as well, and that's been working fine for me. I'm doing this because my doom config uses git submodules and nix chokes on that when I try nix-doom-emacs' home-manager module. I'm satisfied with this for now, except for one thing: the all-the-icons-fonts have not been properly detected by emacs. Is there something I can do to force it to have access to those fonts and use them?

16:35:00
1 Jul 2023
@lord-valen:matrix.orglord-valen What do you mean when you say that nix "chokes on it"? Had you tried using ?submodules=1 in the URL? 07:07:11
@lord-valen:matrix.orglord-valenAlso your presence reminds me that I should learn Lojban lol.07:07:45
@suskeyhose:matrix.org@suskeyhose:matrix.org

Hooray, more lojban evangelization. Anyway, I have tried ?submodules=1 in the url, however building my home-manager config with nix-doom-emacs and my config hangs, and when I inspect the process tree with htop I see that the process that's stuck is git cloning submodules.

15:12:27
@suskeyhose:matrix.org@suskeyhose:matrix.org

I'm mostly just concerned with getting the fonts working though, because I don't really want to use nix-doom-emacs because I like to edit my config frequently while I'm using emacs, having to rebuild my home config each time sounds like a big annoyance.

15:53:43
@ckie:ckie.devmei 🌒&i wonder what the overlap is between nix-doom-emacs and conlanging15:58:49
@ckie:ckie.devmei 🌒&(just learning toki pona here very casually)15:59:00
@suskeyhose:matrix.org@suskeyhose:matrix.org

I personally know at least 3 other people in the lojban community who use nix

15:59:32
@suskeyhose:matrix.org@suskeyhose:matrix.org

actually four now that I think about Xe

15:59:43
@ckie:ckie.devmei 🌒& i have NixOS fonts.fonts set 15:59:46
@ckie:ckie.devmei 🌒&(incl all-the-icons, seems to mostly work fine usually)15:59:59
@suskeyhose:matrix.org@suskeyhose:matrix.org

That's a good thought, I should try that after I see if enabling home-manager's fonts.fontconfig option

16:01:34
@ckie:ckie.devmei 🌒&i'm not convinced my fontconfig snip does anything, don't like thinking about it16:02:11
@suskeyhose:matrix.org@suskeyhose:matrix.org

Actually looks like enabling fontconfig did it

16:02:31
@ckie:ckie.devmei 🌒&and ligatures grew on me since i couldn't get rid of them :P16:02:35
@duponin:alternativebit.fr@duponin:alternativebit.fr left the room.16:55:00
3 Jul 2023
@shuliang:matrix.orgshuliang joined the room.01:19:18
4 Jul 2023
@ruination:matrix.orgPhobos joined the room.03:50:13
@ruination:matrix.orgPhobos

Hi, sorry for the kind of noob question, but I'm trying to install nix-doom-emacs with home-manager and flakes but I got this error:

building the system configuration...
error:
       … while calling the 'head' builtin

         at /nix/store/aw6kmwd8a02n2c1wysrfk2q31brlmqdz-source/lib/attrsets.nix:784:11:

          783|         || pred here (elemAt values 1) (head values) then
          784|           head values
             |           ^
          785|         else

       … while evaluating the attribute 'value'

         at /nix/store/aw6kmwd8a02n2c1wysrfk2q31brlmqdz-source/lib/modules.nix:753:9:

          752|     in warnDeprecation opt //
          753|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          754|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: builder for '/nix/store/lihypyx22cvqkhvijky2m7wx0jrwnvgb-emacs-straight-packages.json.drv' failed with exit code 255;
       last 10 log lines:
       >       (let ((temp-file (doom-path doom-user-dir filename)) (temp-buffer (gen...
       >       (if (let ((p (let ((file filename)) (and (stringp file) (let ((default...
       >       (let* ((template file) (filename (if template (car-safe (prog1 templat...
       >       ((closure ((yes\?) (context . #s(doom-cli-context (25763 40170 727042 ...
       >       (mapc (closure ((yes\?) (context . #s(doom-cli-context (25763 40170 72...
       >       (let ((doom-print-indent (+ (if t doom-print-indent-increment 0) doom-...
       >       (if (eq config\? :no) (doom-print (doom-print--format (doom-print--cla...
       >       (let ((default-directory doom-emacs-dir) (yes\? (progn (or (progn (and...
       >     ! Wrote extended backtrace to /build/tmp.fs4ZXIk8Op/local/logs/cli.doom.230704041538.7.error
       > Opening output file: Permission denied, /nix/store/ir6kfv1zb545562r35yplj3rzsjspbnc-doom/init.el
       For full logs, run 'nix log /nix/store/lihypyx22cvqkhvijky2m7wx0jrwnvgb-emacs-straight-packages.json.drv'.

Here's my flake.nix:

{
  description = "System configurations";

  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager/master";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    hyprpicker.url = "github:hyprwm/hyprpicker";
    hypr-contrib.url = "github:hyprwm/contrib";
    hyprland = {
      url = "github:hyprwm/Hyprland";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nix-doom-emacs = {
      url = "github:nix-community/nix-doom-emacs";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    alejandra = {
      url = "github:kamadorueda/alejandra/3.0.0";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nil.url = "github:oxalica/nil";

    emacs-overlay = {
      # Pinned by nix-doom-emacs to this commit for some reason
      # See https://github.com/nix-community/nix-doom-emacs/commit/c283bcf19b64aba8c50d5618cb58457967f6cdb7
      url = "github:nix-community/emacs-overlay/c16be6de78ea878aedd0292aa5d4a1ee0a5da501";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = inputs @ {
    self,
    nixpkgs,
    home-manager,
    hyprland,
    nix-doom-emacs,
    alejandra,
    emacs-overlay,
    ...
  }:
  # Make an object called 'input' containing the inputs
  let
    # Variables are declared here
    system = "x86_64-linux";

    pkgs = import nixpkgs {
      inherit system;
      overlays = [emacs-overlay.overlay];
      config = {
        allowUnfree = true;
      };
    };

    lib = nixpkgs.lib;
  in {
    nixosConfigurations = {
      eschatos = lib.nixosSystem {
        inherit system;

        modules = [
          # Alejandra formatter for Nix files
          {
            environment.systemPackages = [alejandra.defaultPackage.${system}];
          }

          # User configurations
          home-manager.nixosModules.home-manager
          {
            home-manager.users.apollyon = {...}: {
              home.username = "apollyon";
              home.homeDirectory = "/home/apollyon";
              home.stateVersion = "23.05";
              programs.home-manager.enable = true;
              imports = [
                nix-doom-emacs.hmModule
                ./home
              ];

              programs.doom-emacs = {
                enable = true;
                doomPrivateDir = ./doom;
              };
            };
          }
          ./hardware-configuration.nix
          ./modules
        ];
      };
    };
  };
}

Does anyone know how to fix this? Any help is appreciated!

04:19:57
5 Jul 2023
@benedikt:tissot.de@benedikt:tissot.de changed their profile picture.15:04:40
@petrichor:envs.net@petrichor:envs.net
In reply to @ruination:matrix.org

Hi, sorry for the kind of noob question, but I'm trying to install nix-doom-emacs with home-manager and flakes but I got this error:

building the system configuration...
error:
       … while calling the 'head' builtin

         at /nix/store/aw6kmwd8a02n2c1wysrfk2q31brlmqdz-source/lib/attrsets.nix:784:11:

          783|         || pred here (elemAt values 1) (head values) then
          784|           head values
             |           ^
          785|         else

       … while evaluating the attribute 'value'

         at /nix/store/aw6kmwd8a02n2c1wysrfk2q31brlmqdz-source/lib/modules.nix:753:9:

          752|     in warnDeprecation opt //
          753|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          754|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: builder for '/nix/store/lihypyx22cvqkhvijky2m7wx0jrwnvgb-emacs-straight-packages.json.drv' failed with exit code 255;
       last 10 log lines:
       >       (let ((temp-file (doom-path doom-user-dir filename)) (temp-buffer (gen...
       >       (if (let ((p (let ((file filename)) (and (stringp file) (let ((default...
       >       (let* ((template file) (filename (if template (car-safe (prog1 templat...
       >       ((closure ((yes\?) (context . #s(doom-cli-context (25763 40170 727042 ...
       >       (mapc (closure ((yes\?) (context . #s(doom-cli-context (25763 40170 72...
       >       (let ((doom-print-indent (+ (if t doom-print-indent-increment 0) doom-...
       >       (if (eq config\? :no) (doom-print (doom-print--format (doom-print--cla...
       >       (let ((default-directory doom-emacs-dir) (yes\? (progn (or (progn (and...
       >     ! Wrote extended backtrace to /build/tmp.fs4ZXIk8Op/local/logs/cli.doom.230704041538.7.error
       > Opening output file: Permission denied, /nix/store/ir6kfv1zb545562r35yplj3rzsjspbnc-doom/init.el
       For full logs, run 'nix log /nix/store/lihypyx22cvqkhvijky2m7wx0jrwnvgb-emacs-straight-packages.json.drv'.

Here's my flake.nix:

{
  description = "System configurations";

  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager/master";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    hyprpicker.url = "github:hyprwm/hyprpicker";
    hypr-contrib.url = "github:hyprwm/contrib";
    hyprland = {
      url = "github:hyprwm/Hyprland";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nix-doom-emacs = {
      url = "github:nix-community/nix-doom-emacs";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    alejandra = {
      url = "github:kamadorueda/alejandra/3.0.0";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nil.url = "github:oxalica/nil";

    emacs-overlay = {
      # Pinned by nix-doom-emacs to this commit for some reason
      # See https://github.com/nix-community/nix-doom-emacs/commit/c283bcf19b64aba8c50d5618cb58457967f6cdb7
      url = "github:nix-community/emacs-overlay/c16be6de78ea878aedd0292aa5d4a1ee0a5da501";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = inputs @ {
    self,
    nixpkgs,
    home-manager,
    hyprland,
    nix-doom-emacs,
    alejandra,
    emacs-overlay,
    ...
  }:
  # Make an object called 'input' containing the inputs
  let
    # Variables are declared here
    system = "x86_64-linux";

    pkgs = import nixpkgs {
      inherit system;
      overlays = [emacs-overlay.overlay];
      config = {
        allowUnfree = true;
      };
    };

    lib = nixpkgs.lib;
  in {
    nixosConfigurations = {
      eschatos = lib.nixosSystem {
        inherit system;

        modules = [
          # Alejandra formatter for Nix files
          {
            environment.systemPackages = [alejandra.defaultPackage.${system}];
          }

          # User configurations
          home-manager.nixosModules.home-manager
          {
            home-manager.users.apollyon = {...}: {
              home.username = "apollyon";
              home.homeDirectory = "/home/apollyon";
              home.stateVersion = "23.05";
              programs.home-manager.enable = true;
              imports = [
                nix-doom-emacs.hmModule
                ./home
              ];

              programs.doom-emacs = {
                enable = true;
                doomPrivateDir = ./doom;
              };
            };
          }
          ./hardware-configuration.nix
          ./modules
        ];
      };
    };
  };
}

Does anyone know how to fix this? Any help is appreciated!

what do you have in ./doom? this looks like the doom cli is trying to write a file in the nix store
18:45:04
@petrichor:envs.net@petrichor:envs.net
In reply to @roman.gonzalez:matrix.org
at this point, I would recommend reverting the evil-collection dependency resolution to come from emacs (e.g. remove it from the overrides.nix). This may work for Linux folks so no need to stop that from happening.
i've just switched over to nix-doom-emacs and run straight into this issue, so i'm in favour of this fix at least in the short term
18:46:03
@petrichor:envs.net@petrichor:envs.net (just done a quick fix here for myself, should probably just submit that as a PR 😅) 18:48:13
@roman.gonzalez:matrix.org@roman.gonzalez:matrix.orgPull request is up htttps://GitHub.com/nix-community/nix-doom-emacs/pull/48219:41:47
@ckie:ckie.devmei 🌒&i think i'm gonna ride this little flurry of activity & hack on making nde read flake locks19:48:41
@petrichor:envs.net@petrichor:envs.net
In reply to @roman.gonzalez:matrix.org
Pull request is up htttps://GitHub.com/nix-community/nix-doom-emacs/pull/482
seems to be an extra 't' in that link... 🤔
19:58:59

Show newer messages


Back to Room ListRoom Version: 9