!SlMumQZnFjwLRjWFbW:nixos.org

Nix + Doom Emacs

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

Load older messages


SenderMessageTime
12 Sep 2022
@ckie:ckie.devckie (they/them; limited keyboard usage, voice preferred) * (though it might have to not be in the flake since theres no rec-Nix yet) 21:44:18
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de

i have the nixos+hm flake.nix as

{
  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,
    ...
  }:
    let
      system      = "x86_64-linux";
    in {
    nixosConfigurations.exampleHost = lib.nixosSystem {
      inherit system;
      modules = [
        ./default.nix
        home-manager.nixosModules.home-manager
        {
          home-manager.users.exampleUser = { ... }: {
            imports = [ nix-doom-emacs.hmModule ]
            programs.doom-emacs = {
              enable = true;
              doomPrivateDir = true;
            }
          };
        }
      ];
    };
  };
}
Also, remove the ./default.nix
21:44:19
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
how should it be indented?
system = "x86_64-linux";
21:44:34
@k0kada:matrix.orgk0kada (he/him) Actually, even this let is unnecessary there 21:44:59
@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; limited keyboard usage, voice preferred) k0kada: mine is quite flat 21:57:03
@ckie:ckie.devckie (they/them; limited keyboard usage, voice preferred)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; limited keyboard usage, voice preferred)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; limited keyboard usage, voice preferred) * 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; limited keyboard usage, voice preferred)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; limited keyboard usage, voice preferred)

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; limited keyboard usage, voice preferred)well that is dumb!21:59:50
@ckie:ckie.devckie (they/them; limited keyboard usage, voice preferred)config.networking.hostName!21:59:53
@ckie:ckie.devckie (they/them; limited keyboard usage, voice preferred)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

Show newer messages


Back to Room ListRoom Version: 9