Added doomemacs to configuration

This commit is contained in:
Aleksandr Lebedev 2025-01-15 00:14:11 +01:00
parent 7a14aff779
commit 22c9b99399
6 changed files with 88 additions and 0 deletions

38
flake.lock generated
View file

@ -139,6 +139,27 @@
"type": "github"
}
},
"emacs-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1736874824,
"narHash": "sha256-9s38tF1Eqmk1zNnZx4LOQAlVwHFT+F0q9m0z5iwDmxg=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "7a1e649ab6a73e0b8b728530318142f784b47054",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
@ -921,6 +942,22 @@
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1736754065,
"narHash": "sha256-hcETjfECLklW1ND8svDvN0Nw6H/1qtuoz3rbFNQ1Lrk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "67e9c880898889470f153157a96b595e758167fc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1736012469,
@ -3198,6 +3235,7 @@
"inputs": {
"apple-silicon-support": "apple-silicon-support",
"disko": "disko",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"hyprland": "hyprland",
"impermanence": "impermanence",

View file

@ -41,6 +41,10 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {

View file

@ -25,6 +25,7 @@
./modules/sddm
./modules/services/autoupgrade
./modules/sops
./modules/emacs
./hosts/${hwconfig.hostname}
]
++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;

View file

@ -0,0 +1,42 @@
{
config,
pkgs,
lib,
inputs,
...
}: let
emacs = pkgs.emacs;
in {
services.emacs.enable = true;
services.emacs.startWithGraphical = true;
services.emacs.install = true;
services.emacs.package = emacs; #pkgs.emacs-unstable
environment.systemPackages = with pkgs; [
git
emacs
ripgrep
fd
coreutils
clang
(pkgs.writeShellScriptBin "doom-install" ''
${pkgs.git}/bin/git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d
${pkgs.git}/bin/git clone https://github.com/KyleKrein/doomemacs.git ~/.doom.d
~/.emacs.d/bin/doom install
~/.emacs.d/bin/doom sync
pidof emacs || ${emacs}/bin/emacs --daemon &
'')
(pkgs.writeShellScriptBin "doom-sync" ''
~/.emacs.d/bin/doom sync
'')
(pkgs.writeShellScriptBin "doom-upgrade" ''
~/.emacs.d/bin/doom upgrade
'')
(pkgs.writeShellScriptBin "doom" ''
${emacs}/bin/emacsclient -c
'')
];
nixpkgs.overlays = [
inputs.emacs-overlay.overlays.default
];
}

View file

@ -49,6 +49,7 @@ in {
"${pkgs.clipse}/bin/clipse -listen &"
"${pkgs.swww}/bin/swww-daemon &"
"${pkgs.swww}/bin/swww img ${wallpaper-image} &"
"emacs --daemon &"
#"${pkgs.kando}/bin/kando"
];
exec = [

View file

@ -20,6 +20,8 @@
".gnupg"
".ssh"
".nixops"
".doom.d"
".emacs.d"
".local/share/keyrings"
".local/share/direnv"
{