working emacs!

This commit is contained in:
vali 2024-05-20 01:17:59 +02:00
commit b9d6ac98c6
4 changed files with 54 additions and 9 deletions

34
flake.lock generated
View file

@ -200,6 +200,38 @@
"type": "github"
}
},
"doom-emacs-config": {
"flake": false,
"locked": {
"lastModified": 1716154542,
"narHash": "sha256-Nx632y+SLXQm/Wdyckfa6D65SqWQGi6w6A2afjii4U4=",
"owner": "bloxx12",
"repo": "doom-emacs-config",
"rev": "392fd7b74f117af3c5ce458c9f47b8326a13a39e",
"type": "github"
},
"original": {
"owner": "bloxx12",
"repo": "doom-emacs-config",
"type": "github"
}
},
"doomemacs": {
"flake": false,
"locked": {
"lastModified": 1713464448,
"narHash": "sha256-Fhir4WlcfEh70V8+oNS1LVAGBftiqtD2qaHzOC8BJUI=",
"owner": "doomemacs",
"repo": "doomemacs",
"rev": "9620bb45ac4cd7b0274c497b2d9d93c4ad9364ee",
"type": "github"
},
"original": {
"owner": "doomemacs",
"repo": "doomemacs",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
@ -1180,6 +1212,8 @@
"inputs": {
"agenix": "agenix",
"anyrun": "anyrun",
"doom-emacs-config": "doom-emacs-config",
"doomemacs": "doomemacs",
"fenix": "fenix",
"home-manager": "home-manager_2",
"hyprland": "hyprland",

View file

@ -21,6 +21,14 @@
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
};
doomemacs = {
url = "github:doomemacs/doomemacs";
flake = false;
};
doom-emacs-config = {
url = "github:bloxx12/doom-emacs-config";
flake = false;
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -46,6 +46,7 @@ in {
krita
lazygit
librewolf
libtool
links2
lutris
mars-mips
@ -58,6 +59,7 @@ in {
nicotine-plus
nil
nitch
nixfmt
nixpkgs-wayland.swww
nmap
notesnook

View file

@ -1,13 +1,12 @@
# Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, inputs, ... }:
with lib;
# with lib.my;
let
cfg = config.modules.editors.emacs;
forgeUrl = "https://github.com";
repoUrl = "${forgeUrl}/doomemacs/doomemacs";
configRepoUrl = "${forgeUrl}/bloxx12/doom-emacs-config";
username = config.modules.other.system.username;
repoUrl = inputs.doomemacs;
configRepoUrl = inputs.doom-emacs-config;
in {
options.modules.editors.emacs = {
enable = mkEnableOption "emacs";
@ -49,7 +48,8 @@ in {
beancount
];
environment.sessionVariables.PATH = [ "$XDG_CONFIG_HOME/emacs/bin" ];
home-manager.users.${username}.home.sessionPath =
[ "/home/vali/.config/emacs/bin" ];
# modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];
@ -57,9 +57,10 @@ in {
system.userActivationScripts = mkIf cfg.doom.enable {
installDoomEmacs = ''
if [ ! -d "$XDG_CONFIG_HOME/emacs" ]; then
git clone --depth=1 --single-branch "${repoUrl}" "$XDG_CONFIG_HOME/emacs"
git clone "${configRepoUrl}" "$XDG_CONFIG_HOME/doom"
#!/bin/bash
if [ ! -d "/home/${username}/.config/emacs" ]; then
git clone --depth=1 --single-branch "${repoUrl}" "/home/${username}/.config/emacs"
git clone "${configRepoUrl}" "/home/${username}/.config/doom"
fi
'';
};