dotfiles/flakes/emacs
2026-07-22 15:03:09 +07:00
..
config Configure fonts for tables and code in org mode 2026-06-22 10:00:46 +02:00
pkgs Fix version and rev drift in agent-shell derivation 2026-04-28 19:11:38 +02:00
flake.lock Make Emacs flake standalone 2026-07-18 10:57:45 +02:00
flake.nix Make Emacs flake standalone 2026-07-18 10:57:45 +02:00
home.nix Make Emacs flake standalone 2026-07-18 10:57:45 +02:00
package.nix Fix TSX tree-sitter grammar location 2026-07-22 15:03:09 +07:00
README.md Make Emacs flake standalone 2026-07-18 10:57:45 +02:00

Tobmacs flake

This flake builds the complete Emacs configuration without Home Manager. It contains Emacs, all Emacs packages, tree-sitter grammars, snippets, Hunspell, and dictionaries.

Run or install directly

nix run 'git+https://codeberg.org/oibot/dotfiles?dir=flakes/emacs'
nix profile install 'git+https://codeberg.org/oibot/dotfiles?dir=flakes/emacs'

From this repository, use nix run path:./flakes/emacs.

NixOS

Add the flake as an input and make its nixpkgs follow the system nixpkgs:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    tobs-emacs = {
      url = "git+https://codeberg.org/oibot/dotfiles?dir=flakes/emacs";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, tobs-emacs, ... }: {
    nixosConfigurations.server = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        tobs-emacs.nixosModules.default
        {
          # Installs Tobmacs and starts an Emacs user service. No Home Manager
          # module is involved.
          services.emacs.enable = true;
          services.emacs.startWithGraphical = false;
        }
      ];
    };
  };
}

If no daemon is wanted, either set services.emacs.install = true instead of enable, or install the package directly:

environment.systemPackages = [
  tobs-emacs.packages.${pkgs.stdenv.hostPlatform.system}.default
];