mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Define Overlays to use ExportPackage of flake utils plus
Signed-off-by: Stefan Ellmauthaler <stefan.ellmauthaler@tu-dresden.de>
This commit is contained in:
parent
426fd9d1e7
commit
7dccffc415
26
flake.nix
26
flake.nix
@ -68,7 +68,9 @@
|
|||||||
discoverMachines
|
discoverMachines
|
||||||
withModules
|
withModules
|
||||||
discoverTemplates
|
discoverTemplates
|
||||||
|
discoverOverlay
|
||||||
;
|
;
|
||||||
|
inherit (flake-utils-plus.lib) genPkgOverlay;
|
||||||
in
|
in
|
||||||
flake-utils-plus.lib.mkFlake rec {
|
flake-utils-plus.lib.mkFlake rec {
|
||||||
inherit self inputs;
|
inherit self inputs;
|
||||||
@ -91,12 +93,14 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
channels.nixpkgs.overlaysBuilder = channels: [
|
channels.nixpkgs.overlaysBuilder = channels:
|
||||||
|
[
|
||||||
(final: prev: {unstable = channels.nixpkgs-unstable;})
|
(final: prev: {unstable = channels.nixpkgs-unstable;})
|
||||||
(flake-utils-plus.lib.genPkgOverlay inputs.comma "comma")
|
(flake-utils-plus.lib.genPkgOverlay inputs.comma "comma")
|
||||||
#inputs.nix.overlay
|
#inputs.nix.overlay
|
||||||
inputs.emacs-overlay.overlay
|
inputs.emacs-overlay.overlay
|
||||||
];
|
]
|
||||||
|
++ (nixpkgs.lib.attrValues overlays);
|
||||||
|
|
||||||
hostDefaults = {
|
hostDefaults = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@ -140,6 +144,24 @@
|
|||||||
stateVersion = extended-lib.mkDefault "21.05";
|
stateVersion = extended-lib.mkDefault "21.05";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
overlays = rec {
|
||||||
|
elss = discoverOverlay ./packages;
|
||||||
|
default = elss;
|
||||||
|
emacs-overlay = inputs.emacs-overlay.overlay;
|
||||||
|
flake-utils-plus = genPkgOverlay inputs.flake-utils-plus "fup-repl";
|
||||||
|
};
|
||||||
|
|
||||||
|
packages =
|
||||||
|
(flake-utils-plus.lib.exportPackages {
|
||||||
|
inherit
|
||||||
|
(overlays)
|
||||||
|
default
|
||||||
|
flake-utils-plus
|
||||||
|
;
|
||||||
|
}
|
||||||
|
channels)
|
||||||
|
// {inherit (channels.nixpkgs) emacs;};
|
||||||
|
|
||||||
outputsBuilder = channels: {
|
outputsBuilder = channels: {
|
||||||
devShells = let
|
devShells = let
|
||||||
pkgs = channels.nixpkgs;
|
pkgs = channels.nixpkgs;
|
||||||
|
|||||||
@ -23,6 +23,13 @@ with prev; rec {
|
|||||||
name,
|
name,
|
||||||
}:
|
}:
|
||||||
import path);
|
import path);
|
||||||
|
|
||||||
|
discoverOverlay = dir: final: prev: (withModules dir ({
|
||||||
|
path,
|
||||||
|
name,
|
||||||
|
}:
|
||||||
|
nameValuePair name (final.callPackage path {})));
|
||||||
|
|
||||||
discoverMachines = dir: args:
|
discoverMachines = dir: args:
|
||||||
withModules dir ({
|
withModules dir ({
|
||||||
path,
|
path,
|
||||||
|
|||||||
16
modules/emacs.nix
Normal file
16
modules/emacs.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; {
|
||||||
|
options.elss.programs.emacs.enable = mkEnableOption "Setup emacs package and install it";
|
||||||
|
config = mkIf config.elss.programs.emacs.enable {
|
||||||
|
services.emacs = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
package = pkgs.emacsPackage;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -96,23 +96,14 @@ with lib; let
|
|||||||
#zenburn-theme
|
#zenburn-theme
|
||||||
]
|
]
|
||||||
++ (with lpkgs; [org-roam-ui ligatures lean4-mode])));
|
++ (with lpkgs; [org-roam-ui ligatures lean4-mode])));
|
||||||
in {
|
in
|
||||||
options.elss.programs.emacs.enable =
|
emacsPackage
|
||||||
mkEnableOption "Setup emacs package and install it";
|
#nixpkgs.overlays = [ (self: super: { emacsOrig = super.emacs; }) (import (builtins.fetchTarball {
|
||||||
config = mkIf config.elss.programs.emacs.enable {
|
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
|
||||||
services.emacs = {
|
#})) ];
|
||||||
enable = true;
|
#nixpkgs.overlays = [
|
||||||
defaultEditor = true;
|
# (import (builtins.fetchTarball {
|
||||||
package = emacsPackage;
|
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
|
||||||
};
|
# }))
|
||||||
};
|
#];
|
||||||
#nixpkgs.overlays = [ (self: super: { emacsOrig = super.emacs; }) (import (builtins.fetchTarball {
|
|
||||||
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
|
|
||||||
#})) ];
|
|
||||||
|
|
||||||
#nixpkgs.overlays = [
|
|
||||||
# (import (builtins.fetchTarball {
|
|
||||||
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
|
|
||||||
# }))
|
|
||||||
#];
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user