54 lines
1.4 KiB
Markdown
54 lines
1.4 KiB
Markdown
# 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
|
|
|
|
```console
|
|
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:
|
|
|
|
```nix
|
|
{
|
|
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:
|
|
|
|
```nix
|
|
environment.systemPackages = [
|
|
tobs-emacs.packages.${pkgs.stdenv.hostPlatform.system}.default
|
|
];
|
|
```
|