emacs: use nix-community overlay

This commit is contained in:
Grigory Shipunov 2022-08-05 02:08:32 +02:00
parent 5547ef23bc
commit 693849fbaf
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
3 changed files with 60 additions and 10 deletions

39
flake.lock generated
View file

@ -1,5 +1,26 @@
{ {
"nodes": { "nodes": {
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1659638214,
"narHash": "sha256-lXa01G06Ey9qgj+rYN7Nzc53FP3p2UMMnAuxpWXu9Ko=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "a151f9ff5b9fa813ac8918f3a3a67c643e7e2edc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -22,6 +43,21 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": { "locked": {
"lastModified": 1653893745, "lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
@ -38,7 +74,7 @@
}, },
"microvm": { "microvm": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -107,6 +143,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"emacs-overlay": "emacs-overlay",
"fenix": "fenix", "fenix": "fenix",
"microvm": "microvm", "microvm": "microvm",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",

View file

@ -14,10 +14,15 @@
url = github:nix-community/fenix; url = github:nix-community/fenix;
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
emacs-overlay = {
url = github:nix-community/emacs-overlay;
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
}; };
outputs = outputs =
inputs@{ self inputs@{ self
, emacs-overlay
, nixpkgs , nixpkgs
, nixpkgs-unstable , nixpkgs-unstable
, sops-nix , sops-nix
@ -35,6 +40,7 @@
./modules/basic-tools.nix ./modules/basic-tools.nix
./modules/binary-caches.nix ./modules/binary-caches.nix
./modules/chromium.nix ./modules/chromium.nix
./modules/emacs.nix
./modules/gnupg.nix ./modules/gnupg.nix
./modules/graphical.nix ./modules/graphical.nix
./modules/hw-accel-intel.nix ./modules/hw-accel-intel.nix
@ -42,6 +48,9 @@
./modules/radio.nix ./modules/radio.nix
./modules/science.nix ./modules/science.nix
./modules/tlp.nix ./modules/tlp.nix
{
nixpkgs.overlays = [ emacs-overlay.overlay ];
}
({ pkgs, ... }: { ({ pkgs, ... }: {
nixpkgs.overlays = [ fenix.overlay ]; nixpkgs.overlays = [ fenix.overlay ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -1,20 +1,24 @@
{ lib, pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# language servers direnv
clang-tools
clang
sqlite
graphviz
]; ];
programs.zsh.shellInit = ''
eval "$(direnv hook zsh)"
'';
programs.bash.shellInit = ''
eval "$(direnv hook bash)"
'';
services.emacs = { services.emacs = {
install = true; install = true;
enable = false; enable = false;
# pure gtk, native compiled emacs with vterm and pdf-tools package = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: with epkgs; [
package = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (epkgs: [ epkgs.vterm ])); vterm
]));
defaultEditor = false; defaultEditor = false;
}; };