!SlMumQZnFjwLRjWFbW:nixos.org

Nix + Doom Emacs

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

Load older messages


SenderMessageTime
12 Sep 2022
@k0kada:matrix.orgk0kada (he/him)Let me format it a little21:45:07
@mon:tchncs.deribosomerocker
{
  inputs = {
    home-manager.url = "github:nix-community/home-manager";
    nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
  };

  outputs = {
    self,
    nixpkgs,
    lib,
    home-manager,
    nix-doom-emacs,
    ...
  }: {
    nixosConfigurations.exampleHost = lib.nixosSystem {
      system  = "x86_64-linux";
      modules = [
        home-manager.nixosModules.home-manager
        {
          home-manager.users.exampleUser = { ... }: {
            imports = [ nix-doom-emacs.hmModule ];
            programs.doom-emacs = {
              enable = true;
              doomPrivateDir = ./doom; # Directory containing your config.el, init.el
                                       # and packages.el files
            };
          };
        }
      ];
    };
  };
}

is this better?

21:48:12
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
{
  inputs = {
    home-manager.url = "github:nix-community/home-manager";
    nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
  };

  outputs = {
    self,
    nixpkgs,
    lib,
    home-manager,
    nix-doom-emacs,
    ...
  }: {
    nixosConfigurations.exampleHost = lib.nixosSystem {
      system  = "x86_64-linux";
      modules = [
        home-manager.nixosModules.home-manager
        {
          home-manager.users.exampleUser = { ... }: {
            imports = [ nix-doom-emacs.hmModule ];
            programs.doom-emacs = {
              enable = true;
              doomPrivateDir = ./doom; # Directory containing your config.el, init.el
                                       # and packages.el files
            };
          };
        }
      ];
    };
  };
}

is this better?

Almost
21:48:46
@k0kada:matrix.orgk0kada (he/him)lib doesn't exist as an input21:48:56
@k0kada:matrix.orgk0kada (he/him) Remove it and change to nixpkgs.lib 21:49:04
@k0kada:matrix.orgk0kada (he/him)
In reply to @ckie:ckie.dev
we should try pairing sometime, could be interesting
Yeah
21:53:12
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
{
  inputs = {
    home-manager.url = "github:nix-community/home-manager";
    nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
  };

  outputs = {
    self,
    nixpkgs,
    lib,
    home-manager,
    nix-doom-emacs,
    ...
  }: {
    nixosConfigurations.exampleHost = lib.nixosSystem {
      system  = "x86_64-linux";
      modules = [
        home-manager.nixosModules.home-manager
        {
          home-manager.users.exampleUser = { ... }: {
            imports = [ nix-doom-emacs.hmModule ];
            programs.doom-emacs = {
              enable = true;
              doomPrivateDir = ./doom; # Directory containing your config.el, init.el
                                       # and packages.el files
            };
          };
        }
      ];
    };
  };
}

is this better?

Ok, this is not working, let me fix it
21:54:16
@k0kada:matrix.orgk0kada (he/him)Just realized that my NixOS config became what I didn't want it to become21:55:10
@k0kada:matrix.orgk0kada (he/him)A very abstract mess21:55:15
@ckie:ckie.devckie (they/them) k0kada: mine is quite flat 21:57:03
@ckie:ckie.devckie (they/them)the most is a machine can have desktop21:57:21
@k0kada:matrix.orgk0kada (he/him)
In reply to @ckie:ckie.dev
k0kada: mine is quite flat
Mine used to be
21:57:21
@ckie:ckie.devckie (they/them)everything else is either autodetected defaults or manually enabled in the hosts/*21:57:48
@k0kada:matrix.orgk0kada (he/him)But you know, it is always that "ohh, there is so many repetition here. I know, I will create an abstraction"21:57:48
@ckie:ckie.devckie (they/them) * everything else is either autodetected defaults or manually enabled in the hosts/*/default.nix 21:57:50
@k0kada:matrix.orgk0kada (he/him) * But you know, it is always that "ohh, there are so much repetition here. I know, I will create an abstraction"21:58:01
@ckie:ckie.devckie (they/them)where do you have repetition?21:58:16
@mon:tchncs.deribosomerocker thankfully i'm one of the rare programmers that rewrites their projects/configurations the moment I notice it isn't as good as i want it to be :P 21:58:19
@mon:tchncs.deribosomerocker it's been small until now, though im not really a giant nix nerd 21:58:39
@ckie:ckie.devckie (they/them)

i have this everywhere:

    services.nginx = {
      virtualHosts."${cfg.host}" = {
       # …
        extraConfig = ''
          access_log /var/log/nginx/foo.access.log;
        '';
      };
    };
    cookie.services.prometheus.nginx-vhosts = [ "foo" ];
21:59:23
@k0kada:matrix.orgk0kada (he/him)
In reply to @ckie:ckie.dev
where do you have repetition?
The one that I am lamenting right now to have abstract
21:59:32
@k0kada:matrix.orgk0kada (he/him)Is the fact that I needed to declare the hostname twice21:59:39
@ckie:ckie.devckie (they/them)well that is dumb!21:59:50
@ckie:ckie.devckie (they/them)config.networking.hostName!21:59:53
@ckie:ckie.devckie (they/them)spray that shit everywhere21:59:56
@k0kada:matrix.orgk0kada (he/him)
In reply to @ckie:ckie.dev
config.networking.hostName!
Not this
22:00:09
@mon:tchncs.deribosomerocker
In reply to@k0kada:matrix.org
Ok, this is not working, let me fix it
if it requires mkMerge, then I think we should go back to the specialArguments solution since it's really elegant IMO
22:00:21
@k0kada:matrix.orgk0kada (he/him)I mean, one for that config22:00:20
@k0kada:matrix.orgk0kada (he/him) Another one for the nixosConfiguration.${hostname} 22:00:33
@k0kada:matrix.orgk0kada (he/him)I had the brilliant idea to create a function that returned a attrset just to avoid this22:00:51

Show newer messages


Back to Room ListRoom Version: 9