Add emacs

This commit is contained in:
outfoxxed 2023-06-27 15:37:18 -07:00
parent f7da38b9e4
commit 00cbab381d
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 153 additions and 4 deletions

View file

@ -1,15 +1,40 @@
{
"nodes": {
"emacs-overlay": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1686301695,
"narHash": "sha256-Ma0XINJkbKRRsl4RSCm4wEgCTWFs0UHCLpG7j9GSt5I=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "b7a065e692e944e6b68d4285013ca426a8de6663",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "b7a065e692e944e6b68d4285013ca426a8de6663",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@ -137,6 +162,22 @@
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1686237827,
"narHash": "sha256-fAZB+Zkcmc+qlauiFnIH9+2qgwM0NO/ru5pWEw3tDow=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "81ed90058a851eb73be835c770e062c6938c8a9e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1687838990,
@ -154,6 +195,8 @@
},
"root": {
"inputs": {
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-hy3": "hyprland-hy3",
@ -166,7 +209,9 @@
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]

View file

@ -2,12 +2,19 @@
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
stable.url = "nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay?rev=b7a065e692e944e6b68d4285013ca426a8de6663";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
@ -29,6 +36,7 @@
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};

View file

@ -3,12 +3,19 @@
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
stable.url = "nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay?rev=b7a065e692e944e6b68d4285013ca426a8de6663";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
@ -30,6 +37,7 @@
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};

87
modules/emacs/default.nix Normal file
View file

@ -0,0 +1,87 @@
{ inputs, config, pkgs, ... }: let
newpkgs = pkgs.appendOverlays
(with inputs.emacs-overlay.overlays; [ emacs package ]);
tree-sitter-parsers = grammars: with grammars; [
tree-sitter-bash
tree-sitter-c
tree-sitter-c-sharp
tree-sitter-cmake
tree-sitter-cpp
tree-sitter-css
tree-sitter-dot
tree-sitter-elisp
tree-sitter-glsl
tree-sitter-html
tree-sitter-java
tree-sitter-javascript
tree-sitter-json
tree-sitter-json5
tree-sitter-kotlin
tree-sitter-latex
tree-sitter-llvm
tree-sitter-lua
tree-sitter-make
tree-sitter-markdown
tree-sitter-markdown-inline
tree-sitter-nickel
tree-sitter-nix
tree-sitter-prisma
tree-sitter-python
tree-sitter-regex
tree-sitter-rust
tree-sitter-scss
tree-sitter-sql
tree-sitter-toml
tree-sitter-tsx
tree-sitter-typescript
tree-sitter-vim
tree-sitter-yaml
];
custom-emacs =
with newpkgs;
((emacsPackagesFor emacs-unstable).emacsWithPackages (epkgs: with epkgs; [
avy
company
cmake-font-lock
direnv
editorconfig
evil
evil-collection
evil-goggles
face-explorer
flycheck
frames-only-mode
fussy
kotlin-mode
lsp-mode
lsp-treemacs
lsp-ui
magit
markdown-mode
nasm-mode
nix-mode reformatter # required by nix mode
projectile
rainbow-mode
string-inflection
(treesit-grammars.with-grammars (grammars: tree-sitter-parsers grammars))
treemacs
treemacs-evil
treemacs-projectile
treemacs-magit
use-package
vertico
which-key
ws-butler
]));
in {
home-manager.users.${config.main-user} = {
home.packages = [ custom-emacs ];
services.emacs = {
enable = true;
package = custom-emacs;
};
};
}

View file

@ -4,6 +4,7 @@
./theme
./overlay-pkgs
./user
./emacs
];
programs.dconf.enable = true;