dot_testing/flake.nix

38 lines
957 B
Nix
Raw Normal View History

2023-12-20 15:19:01 -06:00
{
2024-12-26 16:19:59 -06:00
description = "stupidcomputer's nixos flake";
2023-12-20 15:19:01 -06:00
inputs = {
# regular nixos stuff
2024-06-12 12:14:31 -05:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
2024-01-18 05:07:53 -06:00
simple-nixos-mailserver = {
2024-06-12 12:14:31 -05:00
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
2024-01-18 05:07:53 -06:00
};
2023-12-20 15:19:01 -06:00
};
outputs = {
self,
nixpkgs,
simple-nixos-mailserver,
2024-03-15 18:51:36 -05:00
...
2024-12-26 16:19:59 -06:00
}@inputs: let
mkSystem = modules:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
machines = import ./lib/machines.nix;
};
inherit modules;
};
generateNixosConfigurations = configurations:
builtins.listToAttrs (
map (name: {
inherit name;
value = mkSystem [ (./boxes/. + "/${name}") ];
}) configurations
);
in {
2024-12-26 19:12:59 -06:00
nixosConfigurations = generateNixosConfigurations [ "netbox" "copernicus" "aristotle" ];
2023-12-20 15:19:01 -06:00
};
}