mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 08:14:00 +01:00
feat(nix): Automatically output all overlays
Now that I have more experience with nix, I know how to write an expression that automatically outputs all the overlays in the repository, as well as automatically import them inside the nixos configuration.
This commit is contained in:
parent
da0b9b3ae6
commit
5674d3ed81
@ -2,7 +2,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../overlays
|
||||
../modules/fish.nix
|
||||
../modules/fonts.nix
|
||||
../modules/home-manager.nix
|
||||
|
@ -9,6 +9,5 @@
|
||||
./home
|
||||
./modules
|
||||
./packages
|
||||
./overlays
|
||||
];
|
||||
}
|
||||
|
16
flake.nix
16
flake.nix
@ -21,12 +21,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, ... } @ attrs: with nixpkgs.lib; {
|
||||
outputs = { self, nixpkgs, ... } @ attrs: with nixpkgs.lib; {
|
||||
nixosConfigurations = {
|
||||
nixos = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = attrs;
|
||||
modules = [ ./. ];
|
||||
modules = [
|
||||
./.
|
||||
{
|
||||
nixpkgs.overlays = builtins.attrValues self.overlays;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@ -38,11 +43,6 @@
|
||||
webp-thumbnailer = callPackage ./packages/webp-thumbnailer.nix { };
|
||||
};
|
||||
|
||||
overlays = {
|
||||
base16-schemes = import ./overlays/base16-schemes.nix;
|
||||
kitty = import ./overlays/kitty.nix;
|
||||
srb2 = import ./overlays/srb2.nix;
|
||||
zola = import ./overlays/zola.nix;
|
||||
};
|
||||
overlays = builtins.mapAttrs (name: value: import ./overlays/${name}) (builtins.readDir ./overlays);
|
||||
};
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
{ self, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = builtins.attrValues self.overlays;
|
||||
}
|
Loading…
Reference in New Issue
Block a user