diff --git a/.dotter/local.laptop.toml b/.dotter/local.laptop.toml index e6091c3..dca3c4c 100644 --- a/.dotter/local.laptop.toml +++ b/.dotter/local.laptop.toml @@ -1,2 +1,2 @@ includes = [".dotter/laptop.toml"] -packages = ["emacs", "i3"] +packages = ["i3"] diff --git a/homes/x86_64-linux/julian@aspi/default.nix b/homes/x86_64-linux/julian@aspi/default.nix index d19fe49..8f11dfd 100644 --- a/homes/x86_64-linux/julian@aspi/default.nix +++ b/homes/x86_64-linux/julian@aspi/default.nix @@ -31,8 +31,9 @@ config, ... }: { topgrade.enable = true; neovim.enable = true; alacritty.enable = true; + emacs.enable = true; # i3.enable = true; - # rofi.enable = true; + rofi.enable = true; }; home.packages = with pkgs; [ diff --git a/modules/home/emacs/default.nix b/modules/home/emacs/default.nix new file mode 100644 index 0000000..ce2a6f7 --- /dev/null +++ b/modules/home/emacs/default.nix @@ -0,0 +1,35 @@ +{ +# Snowfall Lib provides a customized `lib` instance with access to your flake's library +# as well as the libraries available from your flake's inputs. +lib, +# An instance of `pkgs` with your overlays and packages applied is also available. +pkgs, +# You also have access to your flake's inputs. +inputs, + +# Additional metadata is provided by Snowfall Lib. +system, # The system architecture for this host (eg. `x86_64-linux`). +target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). +format, # A normalized name for the system target (eg. `iso`). +virtual +, # A boolean to determine whether this system is a virtual target using nixos-generators. +systems, # An attribute map of your defined hosts. + +# All other arguments come from the module system. +config, ... }: + +with lib; + +let cfg = config.modules.emacs; +in { + options.modules.emacs = { enable = mkOption { default = false; }; }; + + config = mkIf cfg.enable { + home.file = { + ".config/doom" = { + source = ./doom; + recursive = false; + }; + }; + }; +} diff --git a/non-nix/emacs/doom/config.el b/modules/home/emacs/doom/config.el similarity index 100% rename from non-nix/emacs/doom/config.el rename to modules/home/emacs/doom/config.el diff --git a/non-nix/emacs/doom/init.el b/modules/home/emacs/doom/init.el similarity index 100% rename from non-nix/emacs/doom/init.el rename to modules/home/emacs/doom/init.el diff --git a/non-nix/emacs/doom/org-agenda-files b/modules/home/emacs/doom/org-agenda-files similarity index 100% rename from non-nix/emacs/doom/org-agenda-files rename to modules/home/emacs/doom/org-agenda-files diff --git a/non-nix/emacs/doom/packages.el b/modules/home/emacs/doom/packages.el similarity index 100% rename from non-nix/emacs/doom/packages.el rename to modules/home/emacs/doom/packages.el diff --git a/modules/home/emacs/doom/snippets/latex-mode/dof-acronym b/modules/home/emacs/doom/snippets/latex-mode/dof-acronym new file mode 100644 index 0000000..a360ac4 --- /dev/null +++ b/modules/home/emacs/doom/snippets/latex-mode/dof-acronym @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: dof acronym +# uuid: dof +# key: dof +# condition: t +# -- +\ac{DOF} \ No newline at end of file diff --git a/modules/home/emacs/doom/snippets/latex-mode/equation b/modules/home/emacs/doom/snippets/latex-mode/equation new file mode 100644 index 0000000..2c436a4 --- /dev/null +++ b/modules/home/emacs/doom/snippets/latex-mode/equation @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: equation +# uuid: eq +# key: eq +# condition: t +# -- +\begin{equation} + \label{eqn:$1} + $0 +\end{equation} diff --git a/non-nix/i3/rofi/config.rasi b/modules/home/rofi/config.rasi similarity index 100% rename from non-nix/i3/rofi/config.rasi rename to modules/home/rofi/config.rasi diff --git a/modules/home/rofi/default.nix b/modules/home/rofi/default.nix index 6627686..54bcf37 100644 --- a/modules/home/rofi/default.nix +++ b/modules/home/rofi/default.nix @@ -25,10 +25,11 @@ in { options.modules.rofi = { enable = mkOption { default = false; }; }; config = mkIf cfg.enable { - programs.rofi = { enable = true; }; + # this would need you to config rofi using home-manager + # programs.rofi = { enable = true; }; - home.file = { - ".config/rofi/config.rasi".source = ../../i3/rofi/config.rasi; - }; + home.packages = with pkgs; [ rofi ]; + + home.file = { ".config/rofi/config.rasi".source = ./config.rasi; }; }; }