mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-16 17:50:52 +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 = [
|
imports = [
|
||||||
../overlays
|
|
||||||
../modules/fish.nix
|
../modules/fish.nix
|
||||||
../modules/fonts.nix
|
../modules/fonts.nix
|
||||||
../modules/home-manager.nix
|
../modules/home-manager.nix
|
||||||
|
@ -9,6 +9,5 @@
|
|||||||
./home
|
./home
|
||||||
./modules
|
./modules
|
||||||
./packages
|
./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 = {
|
nixosConfigurations = {
|
||||||
nixos = nixosSystem {
|
nixos = nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = attrs;
|
specialArgs = attrs;
|
||||||
modules = [ ./. ];
|
modules = [
|
||||||
|
./.
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = builtins.attrValues self.overlays;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38,11 +43,6 @@
|
|||||||
webp-thumbnailer = callPackage ./packages/webp-thumbnailer.nix { };
|
webp-thumbnailer = callPackage ./packages/webp-thumbnailer.nix { };
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays = {
|
overlays = builtins.mapAttrs (name: value: import ./overlays/${name}) (builtins.readDir ./overlays);
|
||||||
base16-schemes = import ./overlays/base16-schemes.nix;
|
|
||||||
kitty = import ./overlays/kitty.nix;
|
|
||||||
srb2 = import ./overlays/srb2.nix;
|
|
||||||
zola = import ./overlays/zola.nix;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
{ self, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = builtins.attrValues self.overlays;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user