Flake Rework
This commit is contained in:
51
flake.nix
51
flake.nix
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user