diff --git a/flake.lock b/flake.lock index b21c164..71bdebe 100644 --- a/flake.lock +++ b/flake.lock @@ -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", diff --git a/flake.nix b/flake.nix index 084f81b..17d5285 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; diff --git a/hosts/vali/mars/programs.nix b/hosts/vali/mars/programs.nix index abb3b42..6a6d45d 100644 --- a/hosts/vali/mars/programs.nix +++ b/hosts/vali/mars/programs.nix @@ -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 diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index e68b2ee..bf3eab4 100644 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -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 ''; };