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
a9f6c0aec2
34
flake.nix
34
flake.nix
@ -68,7 +68,9 @@
|
||||
discoverMachines
|
||||
withModules
|
||||
discoverTemplates
|
||||
discoverOverlay
|
||||
;
|
||||
inherit (flake-utils-plus.lib) genPkgOverlay;
|
||||
in
|
||||
flake-utils-plus.lib.mkFlake rec {
|
||||
inherit self inputs;
|
||||
@ -91,12 +93,14 @@
|
||||
];
|
||||
};
|
||||
|
||||
channels.nixpkgs.overlaysBuilder = channels: [
|
||||
(final: prev: {unstable = channels.nixpkgs-unstable;})
|
||||
(flake-utils-plus.lib.genPkgOverlay inputs.comma "comma")
|
||||
#inputs.nix.overlay
|
||||
inputs.emacs-overlay.overlay
|
||||
];
|
||||
channels.nixpkgs.overlaysBuilder = channels:
|
||||
[
|
||||
(final: prev: {unstable = channels.nixpkgs-unstable;})
|
||||
(flake-utils-plus.lib.genPkgOverlay inputs.comma "comma")
|
||||
#inputs.nix.overlay
|
||||
inputs.emacs-overlay.overlay
|
||||
]
|
||||
++ (nixpkgs.lib.attrValues overlays);
|
||||
|
||||
hostDefaults = {
|
||||
system = "x86_64-linux";
|
||||
@ -140,6 +144,24 @@
|
||||
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: {
|
||||
devShells = let
|
||||
pkgs = channels.nixpkgs;
|
||||
|
||||
@ -23,6 +23,13 @@ with prev; rec {
|
||||
name,
|
||||
}:
|
||||
import path);
|
||||
|
||||
discoverOverlay = dir: final: prev: (withModules dir ({
|
||||
path,
|
||||
name,
|
||||
}:
|
||||
nameValuePair name (final.callPackage path {})));
|
||||
|
||||
discoverMachines = dir: args:
|
||||
withModules dir ({
|
||||
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
|
||||
]
|
||||
++ (with lpkgs; [org-roam-ui ligatures lean4-mode])));
|
||||
in {
|
||||
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 = emacsPackage;
|
||||
};
|
||||
};
|
||||
#nixpkgs.overlays = [ (self: super: { emacsOrig = super.emacs; }) (import (builtins.fetchTarball {
|
||||
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
|
||||
#})) ];
|
||||
in
|
||||
emacsPackage
|
||||
#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;
|
||||
# }))
|
||||
#];
|
||||
|
||||
#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