dotfiles/etcnixos/flake.nix
2025-02-04 14:27:15 -05:00

59 lines
1.1 KiB
Nix

{
description = "System nixOS flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
lanzaboote,
nixos-hardware,
agenix,
...
}@inputs:
let
username = "primary";
system = "x86_64-linux";
hostnames = [
"mreow"
"yarn"
];
in
{
nixosConfigurations = nixpkgs.lib.foldl' (
config: hostname:
config
// {
"${hostname}" = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs username hostname;
};
modules = [
./system-${hostname}.nix
];
};
}
) { } hostnames;
};
}