mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-10 06:50:03 +01:00
Will extend upon this later, but this basically makes it possible to guarantee that the flake can be used inside another flake and be customized as expected. Note that hardware-configuration.nix is optional if you're just using the configuration for virtual machines and containers, which is why it's optional here. A default file isn't provided to help users understand that they have to bring their own.
26 lines
664 B
Nix
26 lines
664 B
Nix
{
|
|
description = "An example of creating your own flake that extends this nix-config";
|
|
|
|
inputs = {
|
|
nix-config.url = "github:donovanglover/nix-config";
|
|
};
|
|
|
|
outputs = { nix-config, ... } @ attrs:
|
|
let
|
|
inherit (nix-config.inputs) nixpkgs;
|
|
inherit (nixpkgs.lib) nixosSystem optional;
|
|
inherit (builtins) pathExists;
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
hyprland = nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = attrs;
|
|
modules = [
|
|
./configuration.nix
|
|
] ++ optional (pathExists ./hardware-configuration.nix) ./hardware-configuration.nix;
|
|
};
|
|
};
|
|
};
|
|
}
|