Another fix

This commit is contained in:
Aleksandr Lebedev 2025-01-27 22:05:29 +01:00
parent 5eab807a44
commit d56facc40b
3 changed files with 36 additions and 12 deletions

16
flake.lock generated
View file

@ -19,6 +19,21 @@
"type": "github" "type": "github"
} }
}, },
"nix-org-babel": {
"locked": {
"lastModified": 1731256202,
"narHash": "sha256-xtV0vIUhl3ZUzaUIHSaiWpybxyCgQ9Yp/MUGo3f5zvM=",
"owner": "emacs-twist",
"repo": "org-babel",
"rev": "a5d16c54aca35c07af59d216cda598163512db42",
"type": "github"
},
"original": {
"owner": "emacs-twist",
"repo": "org-babel",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1737885589, "lastModified": 1737885589,
@ -70,6 +85,7 @@
"root": { "root": {
"inputs": { "inputs": {
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"nix-org-babel": "nix-org-babel",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
} }
} }

View file

@ -8,36 +8,50 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.url = "github:nix-community/emacs-overlay";
nix-org-babel.url = "github:emacs-twist/org-babel";
}; };
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
emacs-overlay, emacs-overlay,
nix-org-babel,
}: { }: {
packages.x86_64-linux.default = import ./package.nix { packages.x86_64-linux.default = import ./package.nix {
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
overlays = [emacs-overlay.overlays.default]; overlays = [
emacs-overlay.overlays.default
nix-org-babel.overlays.default
];
}; };
}; };
packages.aarch64-linux.default = import ./package.nix { packages.aarch64-linux.default = import ./package.nix {
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "aarch64-linux"; system = "aarch64-linux";
overlays = [emacs-overlay.overlays.default]; overlays = [
emacs-overlay.overlays.default
nix-org-babel.overlays.default
];
}; };
}; };
packages.x86_64-linux.x11 = import ./package.nix { packages.x86_64-linux.x11 = import ./package.nix {
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
overlays = [emacs-overlay.overlays.default]; overlays = [
emacs-overlay.overlays.default
nix-org-babel.overlays.default
];
}; };
x11 = true; x11 = true;
}; };
packages.aarch64-linux.x11 = import ./package.nix { packages.aarch64-linux.x11 = import ./package.nix {
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "aarch64-linux"; system = "aarch64-linux";
overlays = [emacs-overlay.overlays.default]; overlays = [
emacs-overlay.overlays.default
nix-org-babel.overlays.default
];
}; };
x11 = true; x11 = true;
}; };

View file

@ -26,15 +26,9 @@ in
# src = ./emacs.el; # src = ./emacs.el;
# inherit (config.xdg) configHome dataHome; # inherit (config.xdg) configHome dataHome;
# }; # };
defaultInitFile = pkgs.substituteAll { defaultInitFile = pkgs.tangleOrgBabelFile "default.el" ./config.org {
name = "default.el"; languages = ["emacs-lisp"];
src = pkgs.writeText "init.el" ''
;;; -*- lexical-binding: t; -*-
(org-babel-load-file
${./config.org})
'';
}; };
# Package is optional, defaults to pkgs.emacs # Package is optional, defaults to pkgs.emacs
package = emacs; package = emacs;