114 lines
2.9 KiB
Nix
114 lines
2.9 KiB
Nix
{
|
|
description = "An empty flake template that you can adapt to your own environment";
|
|
|
|
# Flake inputs
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
colmena.url = "github:zhaofengli/colmena";
|
|
|
|
# commons
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
# zimablade inputs
|
|
disko.url = "github:nix-community/disko";
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# sin inputs
|
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
|
testing-grounds.url = "gitlab:shobu13/testing-grounds";
|
|
shoblog-front.url = "gitlab:shobu13/shoblog";
|
|
striped-front.url = "git+ssh://git@gitlab.com/striped1/striped-front";
|
|
striped-back.url = "git+ssh://git@gitlab.com/striped1/striped-back";
|
|
|
|
copyparty.url = "github:9001/copyparty";
|
|
|
|
};
|
|
|
|
# Flake outputs
|
|
outputs = inputs@{
|
|
self,
|
|
|
|
nixpkgs,
|
|
unstable,
|
|
colmena,
|
|
|
|
agenix,
|
|
|
|
disko,
|
|
|
|
shoblog-front,
|
|
striped-front,
|
|
striped-back,
|
|
nix-minecraft,
|
|
testing-grounds,
|
|
copyparty,
|
|
...
|
|
}:
|
|
let
|
|
# The systems supported for this flake
|
|
supportedSystems = [
|
|
"x86_64-linux" # 64-bit Intel/AMD Linux
|
|
];
|
|
|
|
# Helper to provide system-specific attributes
|
|
forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f {
|
|
pkgs = import inputs.nixpkgs { inherit system; };
|
|
});
|
|
in
|
|
{
|
|
colmenaHive = colmena.lib.makeHive {
|
|
meta = {
|
|
nixpkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
overlays = [];
|
|
};
|
|
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
};
|
|
|
|
thea = {name, nodes, pkgs, ...}: {
|
|
imports = [
|
|
./hosts/${name}/configuration.nix
|
|
./hosts/${name}/hardware-configuration.nix
|
|
] ++ [
|
|
# modules
|
|
./modules/gitea/${name}
|
|
];
|
|
|
|
deployment.targetHost = "thea.homelab.local";
|
|
};
|
|
|
|
sin = {name, nodes, pkgs, ...}: {
|
|
imports = [
|
|
disko.nixosModules.disko
|
|
agenix.nixosModules.default
|
|
./hosts/${name}/configuration.nix
|
|
./hosts/${name}/hardware-configuration.nix
|
|
] ++ [
|
|
# modules
|
|
./modules/gitea/${name}
|
|
];
|
|
|
|
deployment.targetHost = "sin.homelab.local";
|
|
};
|
|
};
|
|
devShells = forEachSupportedSystem ({ pkgs }: {
|
|
default = pkgs.mkShell {
|
|
# The Nix packages provided in the environment
|
|
# Add any you need here
|
|
packages = with pkgs; [ colmena.packages.${pkgs.system}.colmena ];
|
|
|
|
# Set any environment variables for your dev shell
|
|
env = { };
|
|
|
|
# Add any shell logic you want executed any time the environment is activated
|
|
shellHook = ''
|
|
'';
|
|
};
|
|
});
|
|
};
|
|
}
|