Format
This commit is contained in:
parent
97ca185951
commit
1b0367dca5
2 changed files with 59 additions and 58 deletions
55
flake.nix
55
flake.nix
|
|
@ -18,44 +18,39 @@
|
|||
nixpkgs,
|
||||
emacs-overlay,
|
||||
nix-org-babel,
|
||||
}: {
|
||||
packages.x86_64-linux.default = import ./package.nix {
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [
|
||||
emacs-overlay.overlays.default
|
||||
nix-org-babel.overlays.default
|
||||
];
|
||||
};
|
||||
};
|
||||
packages.aarch64-linux.default = import ./package.nix {
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [
|
||||
emacs-overlay.overlays.default
|
||||
nix-org-babel.overlays.default
|
||||
];
|
||||
};
|
||||
};
|
||||
packages.x86_64-linux.with-lsps = import ./package.nix {
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
}: let
|
||||
systems = ["aarch64-linux" "x86_64-linux"];
|
||||
eachSystem = nixpkgs.lib.genAttrs systems;
|
||||
pkgsFor = eachSystem (system:
|
||||
import nixpkgs {
|
||||
localSystem = system;
|
||||
overlays = [
|
||||
emacs-overlay.overlays.default
|
||||
nix-org-babel.overlays.default
|
||||
];
|
||||
});
|
||||
in {
|
||||
formatter = eachSystem (
|
||||
system: let
|
||||
pkgs = pkgsFor.${system};
|
||||
in
|
||||
pkgs.alejandra
|
||||
);
|
||||
packages = eachSystem (system: let
|
||||
pkgs = pkgsFor.${system};
|
||||
in {
|
||||
default = import ./package.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
with-lsps = self.packages.${system}.default.override {
|
||||
withLsps = true;
|
||||
};
|
||||
packages.aarch64-linux.with-lsps = import ./package.nix {
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [
|
||||
emacs-overlay.overlays.default
|
||||
nix-org-babel.overlays.default
|
||||
];
|
||||
native = self.packages.${system}.default.override {
|
||||
native = true;
|
||||
};
|
||||
withLsps = true;
|
||||
with-lsps-native = self.packages.${system}.with-lsps.override {
|
||||
native = true;
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
18
package.nix
18
package.nix
|
|
@ -33,11 +33,15 @@
|
|||
# };
|
||||
defaultInitFile = true;
|
||||
# Package is optional, defaults to pkgs.emacs
|
||||
package = if native then pkgs.emacs30-pgtk.overrideAttrs (
|
||||
package =
|
||||
if native
|
||||
then
|
||||
pkgs.emacs30-pgtk.overrideAttrs (
|
||||
oldAttrs: {
|
||||
NIX_CFLAGS_COMPILE = builtins.toString oldAttrs.NIX_CFLAGS_COMPILE or "" + "-march=native -O3";
|
||||
}
|
||||
) else pkgs.emacs30-pgtk;
|
||||
)
|
||||
else pkgs.emacs30-pgtk;
|
||||
|
||||
# By default emacsWithPackagesFromUsePackage will only pull in
|
||||
# packages with `:ensure`, `:ensure t` or `:ensure <package name>`.
|
||||
|
|
@ -60,8 +64,8 @@
|
|||
# Optionally provide extra packages not in the configuration file.
|
||||
# This can also include extra executables to be run by Emacs (linters,
|
||||
# language servers, formatters, etc)
|
||||
extraEmacsPackages = epkgs:
|
||||
(with pkgs; [
|
||||
extraEmacsPackages = epkgs: (with pkgs;
|
||||
[
|
||||
#nerd-fonts.jetbrains-mono
|
||||
#jetbrains-mono
|
||||
unzip
|
||||
|
|
@ -78,12 +82,14 @@
|
|||
poppler-utils
|
||||
gzip
|
||||
gnutar
|
||||
] ++ (with epkgs;[
|
||||
]
|
||||
++ (with epkgs; [
|
||||
tree-sitter
|
||||
tree-sitter-langs
|
||||
treesit-grammars.with-all-grammars
|
||||
el-easydraw
|
||||
]) ++ lib.optionals (withLsps) [
|
||||
])
|
||||
++ lib.optionals withLsps [
|
||||
csharp-ls
|
||||
clang-tools
|
||||
cmake-language-server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue