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 6536195 commit 6bc0402
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 22 deletions.
13 changes: 9 additions & 4 deletions home-manager/advanced.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ let
};
basicPkgs = import ./packages/basic.nix { inherit pkgs; };
advancedPkgs = import ./packages/advanced.nix { inherit pkgs; };
emacsPkg = import ./packages/emacs { inherit pkgs sources; };

# emacs package
emacs = import ./packages/emacs { inherit pkgs sources; };
emacsPkg = emacs.emacs-stable;

# misc
misc = import ./misc;
Expand All @@ -27,11 +30,13 @@ let
modules = import ./modules;

# programs
basicPrograms = import ./programs/basic.nix { inherit pkgs sources; };
basicPrograms = import ./programs/basic.nix {
inherit pkgs sources;
inherit org-babel emacsPkg;
};
advancedPrograms = import ./programs/advanced.nix {
inherit (nixpkgs) lib;
inherit pkgs org-babel sources;
inherit emacsPkg;
inherit pkgs sources;
};

# services
Expand Down
15 changes: 13 additions & 2 deletions home-manager/basic.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ system, nixpkgs }:
{
system,
nixpkgs,
org-babel,
}:
let
# nvfetcher
sources = pkgs.callPackage ../_sources/generated.nix { };
Expand All @@ -12,11 +16,18 @@ let
};
basicPkgs = import ./packages/basic.nix { inherit pkgs; };

# emacs package
emacs = import ./packages/emacs { inherit pkgs sources; };
emacsPkg = emacs.emacs-stable;

# modules
modules = import ./modules;

# programs
basicPrograms = import ./programs/basic.nix { inherit pkgs sources; };
basicPrograms = import ./programs/basic.nix {
inherit pkgs sources;
inherit org-babel emacsPkg;
};

# services
basicServices = import ./services/basic.nix;
Expand Down
22 changes: 18 additions & 4 deletions home-manager/packages/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
pkgs,
sources,
}:
pkgs.emacsWithPackagesFromUsePackage {
config = builtins.toFile "empty.el" "";
package = pkgs.emacs-git;
extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
{
emacs-git = pkgs.emacsWithPackagesFromUsePackage {
config = builtins.toFile "empty.el" "";
package = pkgs.emacs-git;
extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
};

emacs-unstable = pkgs.emacsWithPackagesFromUsePackage {
config = builtins.toFile "empty.el" "";
package = pkgs.emacs-unstable;
extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
};

emacs-stable = pkgs.emacsWithPackagesFromUsePackage {
config = builtins.toFile "empty.el" "";
package = pkgs.emacs;
extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
};
}
4 changes: 0 additions & 4 deletions home-manager/programs/advanced.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
lib,
pkgs,
org-babel,
sources,
emacsPkg,
}:
let
emacs = import ./emacs { inherit pkgs emacsPkg org-babel; };
gh = import ./gh;
gh-dash = import ./gh-dash;
git = import ./git { inherit pkgs; };
Expand All @@ -28,7 +25,6 @@ let
waybar = import ./waybar { inherit pkgs; };
in
[
emacs
gh
gh-dash
git
Expand Down
9 changes: 8 additions & 1 deletion home-manager/programs/basic.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{ pkgs, sources }:
{
pkgs,
sources,
org-babel,
emacsPkg,
}:
let
bat = import ./bat { inherit pkgs sources; };
bottom = import ./bottom;
direnv = import ./direnv;
dust = import ./dust;
editorconfig = import ./editorconfig { inherit pkgs; };
emacs = import ./emacs { inherit pkgs emacsPkg org-babel; };
eza = import ./eza;
fish = import ./fish { inherit pkgs sources; };
gnupg = import ./gnupg;
Expand All @@ -27,6 +33,7 @@ in
direnv
dust
editorconfig
emacs
eza
fish
gnupg
Expand Down
4 changes: 2 additions & 2 deletions hosts/OPPO-A79/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ inputs }:
let
inherit (inputs) nixpkgs nix-on-droid;
inherit (inputs) nixpkgs nix-on-droid org-babel;
system = "aarch64-linux";
in
nix-on-droid.lib.nixOnDroidConfiguration {
modules = [ ../../nix-on-droid ];
pkgs = import nixpkgs { inherit system; };
extraSpecialArgs = {
inherit nixpkgs system;
inherit nixpkgs system org-babel;
};
}
8 changes: 3 additions & 5 deletions nix-on-droid/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
nixpkgs,
pkgs,
system,
org-babel,
...
}:
{
environment.packages = with pkgs; [
git
emacs
];
environment.packages = with pkgs; [ git ];

time.timeZone = "Asia/Tokyo";

Expand All @@ -19,6 +17,6 @@
home-manager = {
backupFileExtension = "hm-bak";
useGlobalPkgs = true;
config = import ../home-manager/basic.nix { inherit system nixpkgs; };
config = import ../home-manager/basic.nix { inherit system nixpkgs org-babel; };
};
}

0 comments on commit 6bc0402

Please sign in to comment.