Flake Rework

This commit is contained in:
m3tam3re
2025-04-03 11:10:07 +02:00
parent 851ffc4ed3
commit 171e9dd89e
12 changed files with 98 additions and 154 deletions

View File

@@ -1,29 +1,40 @@
{
description = "Self Host Playbook!";
description = "Self-hosted server setup with Portainer, n8n, and Baserow";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
base-config = {
# url = "path:/home/m3tam3re/p/nix/self-host-playbook-base";
url = "git+https://code.m3tam3re.com/m3tam3re/self-host-playbook-base?ref=stable";
};
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-24.11";
follows = "base-config/nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, ...}: let
systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
templates = {
starter = {
description = ''
Description here!
'';
path = ./starter;
outputs = {
self,
base-config,
nixpkgs,
...
} @ inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(base-config.nixosModules.default {
tier = "starter";
jsonConfig = builtins.fromJSON (builtins.readFile ./config.json);
}) # Pass tier here
inputs.disko.nixosModules.disko
./configuration.nix
];
specialArgs = {
inherit self;
};
};
formatter =
forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
};
}