66 lines
1.7 KiB
Nix
66 lines
1.7 KiB
Nix
{
|
|
description = "Yadunand's Configuration";
|
|
|
|
inputs = {
|
|
agenix.url = "github:ryantm/agenix";
|
|
colmena.url = "github:zhaofengli/colmena";
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
snowfall-lib = {
|
|
url = "github:snowfallorg/lib";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs:
|
|
let
|
|
flake = inputs.snowfall-lib.mkFlake {
|
|
inherit inputs;
|
|
src = ./.;
|
|
snowfall = {
|
|
namespace = "snowfall";
|
|
};
|
|
systems.modules.nixos = with inputs; [
|
|
agenix.nixosModules.default
|
|
];
|
|
homes.modules = with inputs; [
|
|
agenix.homeManagerModules.default
|
|
];
|
|
channels-config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
inv = import ./inventory.nix;
|
|
mkNode = name: node: {
|
|
imports = [ (./systems/x86_64-linux + "/${name}") ];
|
|
deployment.targetHost = node.zerotierIp;
|
|
};
|
|
colmenaNodes = builtins.mapAttrs mkNode inv.nodes;
|
|
colmenaHive = inputs.colmena.lib.makeHive (
|
|
{
|
|
meta = {
|
|
nixpkgs = import inputs.nixpkgs {
|
|
system = "x86_64-linux";
|
|
config.allowUnfree = true;
|
|
};
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
}
|
|
// colmenaNodes
|
|
);
|
|
in
|
|
flake // { colmenaHive = colmenaHive; };
|
|
}
|