Codroipo
This commit is contained in:
parent
3a60ed192d
commit
394208f8e7
6 changed files with 90 additions and 19 deletions
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
|
@ -7,7 +7,7 @@ on:
|
||||||
- update_flake_lock_action
|
- update_flake_lock_action
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-thinkpad:
|
build:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
systems = ["x86_64-linux"];
|
systems = ["x86_64-linux"];
|
||||||
imports = [
|
imports = [
|
||||||
# flake-parts.flakeModules.easyOverlay
|
|
||||||
./packages
|
./packages
|
||||||
|
|
||||||
./hmModules
|
./hmModules
|
||||||
./formatter
|
./formatter
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{self, inputs, ...}: {
|
{
|
||||||
flake.overlays.default = self: super: {
|
self,
|
||||||
ccrEmacs = self.packages.${self.system}.ccrEmacs;
|
inputs,
|
||||||
};
|
...
|
||||||
|
}: {
|
||||||
flake.hmModules = {
|
flake.hmModules = {
|
||||||
default = self.hmModules.ccrEmacs;
|
default = self.hmModules.ccrEmacs;
|
||||||
ccrEmacs = {
|
ccrEmacs = {
|
||||||
|
@ -22,9 +23,9 @@
|
||||||
ccrEmacsConfig = config.ccrEmacs;
|
ccrEmacsConfig = config.ccrEmacs;
|
||||||
in
|
in
|
||||||
lib.mkIf ccrEmacsConfig.enable {
|
lib.mkIf ccrEmacsConfig.enable {
|
||||||
nixpkgs.overlays = [(self: super: {
|
nixpkgs.overlays = [
|
||||||
ccrEmacs = super.hello;
|
inputs.emacs-overlay.overlays.default
|
||||||
})];
|
];
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = ccrEmacsConfig.package;
|
package = ccrEmacsConfig.package;
|
||||||
|
@ -62,13 +63,13 @@
|
||||||
]);
|
]);
|
||||||
home.activation = {
|
home.activation = {
|
||||||
cloneCcrEmacsFlake = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
cloneCcrEmacsFlake = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
PATH=$PATH:${lib.makeBinPath (with pkgs; [ git openssh ])}
|
PATH=$PATH:${lib.makeBinPath (with pkgs; [git openssh])}
|
||||||
if [ ! -d "$HOME/.config/emacs" ]; then
|
if [ ! -d "$HOME/.config/emacs" ]; then
|
||||||
$DRY_RUN_CMD git clone \
|
$DRY_RUN_CMD git clone \
|
||||||
https://github.com/aciceri/emacs.git \
|
https://github.com/aciceri/emacs.git \
|
||||||
"$HOME/.config/emacs"
|
"$HOME/.config/emacs"
|
||||||
ln -s "$HOME/.config/emacs" "$HOME/emacs"
|
ln -s "$HOME/.config/emacs" "$HOME/emacs"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
7
overlays/default.nix
Normal file
7
overlays/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
perSystem = {config, ...}: {
|
||||||
|
overlayAttrs = {
|
||||||
|
inherit (config.packages) ccrEmacs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,21 +1,38 @@
|
||||||
{inputs, ...}: {
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
inputs.flake-parts.flakeModules.easyOverlay
|
||||||
|
];
|
||||||
perSystem = {
|
perSystem = {
|
||||||
|
config,
|
||||||
self',
|
self',
|
||||||
inputs',
|
inputs',
|
||||||
pkgs,
|
pkgs,
|
||||||
|
final,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (inputs.emacs-overlay.overlays.default pkgs pkgs) emacsPackagesFor;
|
||||||
|
in {
|
||||||
packages = {
|
packages = {
|
||||||
ccrEmacs =
|
ccrEmacsWithoutPackages =
|
||||||
(inputs'.emacs-overlay.packages.emacsPgtk.override {
|
(inputs'.emacs-overlay.packages.emacsPgtk.override {
|
||||||
treeSitterPlugins = builtins.attrValues (builtins.removeAttrs pkgs.tree-sitter-grammars ["recurseForDerivations"]);
|
treeSitterPlugins =
|
||||||
|
builtins.attrValues
|
||||||
|
(builtins.removeAttrs pkgs.tree-sitter-grammars ["recurseForDerivations"]);
|
||||||
})
|
})
|
||||||
.overrideAttrs (_: {
|
.overrideAttrs (_: {
|
||||||
name = "ccr-emacs-${inputs.emacs-src.rev}";
|
name = "ccr-emacs-${inputs.emacs-src.rev}";
|
||||||
src = inputs.emacs-src.outPath;
|
src = inputs.emacs-src.outPath;
|
||||||
version = inputs.emacs-src.rev;
|
version = inputs.emacs-src.rev;
|
||||||
});
|
});
|
||||||
|
ccrEmacs =
|
||||||
|
(emacsPackagesFor self'.packages.ccrEmacsWithoutPackages).emacsWithPackages
|
||||||
|
(import ./packages.nix pkgs);
|
||||||
default = self'.packages.ccrEmacs;
|
default = self'.packages.ccrEmacs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
apps = {
|
||||||
|
ccrEmacs.program = "${self'.packages.ccrEmacs}/bin/emacs";
|
||||||
|
default = self'.apps.ccrEmacs;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
46
packages/packages.nix
Normal file
46
packages/packages.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
pkgs: epkgs:
|
||||||
|
with epkgs; [
|
||||||
|
meow
|
||||||
|
ef-themes
|
||||||
|
delight
|
||||||
|
vertico
|
||||||
|
marginalia
|
||||||
|
all-the-icons
|
||||||
|
all-the-icons-completion
|
||||||
|
consult
|
||||||
|
orderless
|
||||||
|
embark
|
||||||
|
embark-consult
|
||||||
|
fira-code-mode
|
||||||
|
vterm
|
||||||
|
setup
|
||||||
|
magit
|
||||||
|
magit-delta
|
||||||
|
diff-hl
|
||||||
|
corfu
|
||||||
|
corfu-terminal
|
||||||
|
corfu-doc
|
||||||
|
kind-icon
|
||||||
|
cape
|
||||||
|
which-key
|
||||||
|
nix-mode
|
||||||
|
envrc
|
||||||
|
flycheck
|
||||||
|
flycheck-posframe
|
||||||
|
flycheck-inline
|
||||||
|
consult-flycheck
|
||||||
|
popper
|
||||||
|
paredit
|
||||||
|
tree-sitter
|
||||||
|
tree-sitter-langs
|
||||||
|
yaml-mode
|
||||||
|
hl-todo
|
||||||
|
markdown-mode
|
||||||
|
haskell-mode
|
||||||
|
terraform-mode
|
||||||
|
org-roam-ui
|
||||||
|
org-roam
|
||||||
|
dirvish
|
||||||
|
diredfl
|
||||||
|
pdf-tools
|
||||||
|
]
|
Reference in a new issue