Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
takeokunn committed Jan 4, 2025
1 parent 1f0a5d9 commit 6394e64
Show file tree
Hide file tree
Showing 40 changed files with 34 additions and 11 deletions.
12 changes: 10 additions & 2 deletions home-manager/advanced.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let
};
basicPkgs = import ./packages/basic.nix { inherit pkgs; };
advancedPkgs = import ./packages/advanced.nix { inherit pkgs; };
emacsPkg = import ./packages/emacs { inherit pkgs sources; };

# misc
misc = import ./misc;
Expand All @@ -29,12 +30,19 @@ let
basicPrograms = import ./programs/basic.nix { inherit pkgs sources; };
advancedPrograms = import ./programs/advanced.nix {
inherit (nixpkgs) lib;
inherit pkgs org-babel sources;
inherit
pkgs
org-babel
sources
emacsPkg
;
};

# services
basicServices = import ./services/basic.nix;
advancedServices = import ./services/advanced.nix { inherit pkgs; };
advancedServices = import ./services/advanced.nix {
inherit pkgs emacsPkg;
};
in
{
imports = misc ++ modules ++ basicPrograms ++ advancedPrograms ++ basicServices ++ advancedServices;
Expand Down
9 changes: 9 additions & 0 deletions home-manager/packages/emacs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
pkgs,
sources,
}:
pkgs.emacsWithPackagesFromUsePackage {
config = builtins.toFile "empty.el" "";
package = pkgs.emacs-git;
extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
}
3 changes: 2 additions & 1 deletion home-manager/programs/advanced.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
pkgs,
org-babel,
sources,
emacsPkg,
}:
let
emacs = import ./emacs { inherit pkgs org-babel sources; };
emacs = import ./emacs { inherit pkgs emacsPkg org-babel; };
gh = import ./gh;
gh-dash = import ./gh-dash;
git = import ./git { inherit pkgs; };
Expand Down
8 changes: 2 additions & 6 deletions home-manager/programs/emacs/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{
pkgs,
emacsPkg,
org-babel,
sources,
}:
let
tangle = org-babel.lib.tangleOrgBabel { languages = [ "emacs-lisp" ]; };
in
{
programs.emacs = {
enable = true;
package = pkgs.emacsWithPackagesFromUsePackage {
config = builtins.toFile "empty.el" "";
package = pkgs.emacs-git;
extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
};
package = emacsPkg;
};

home = {
Expand Down
4 changes: 3 additions & 1 deletion home-manager/services/advanced.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{ pkgs }:
{ pkgs, emacsPkg }:
let
git-sync = import ./git-sync;
emacs = import ./emacs { inherit emacsPkg; };
mako = import ./mako { inherit pkgs; };
swayidle = import ./swayidle { inherit pkgs; };
swaync = import ./swaync { inherit pkgs; };
swayosd = import ./swayosd { inherit pkgs; };
in
[
git-sync
emacs
mako
swayidle
swaync
Expand Down
7 changes: 7 additions & 0 deletions home-manager/services/emacs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ emacsPkg, ... }:
{
services.emacs = {
enable = true;
package = emacsPkg;
};
}
2 changes: 1 addition & 1 deletion script.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(interactive)
(let ((org-html-htmlize-output-type 'css)
(org-publish-project-alist `(("org"
:base-directory "./home-manager/programs/emacs/elisp/"
:base-directory "./home-manager/packages/emacs/elisp/"
:base-extension "org"
:exclude "README.org"
:publishing-directory "public/"))))
Expand Down

0 comments on commit 6394e64

Please sign in to comment.