Flake Rework
This commit is contained in:
parent
851ffc4ed3
commit
171e9dd89e
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
starter/config.json
|
config.json
|
||||||
|
0
starter/env/n8n.env → env/n8n.env
vendored
0
starter/env/n8n.env → env/n8n.env
vendored
71
flake.lock
generated
71
flake.lock
generated
@ -1,24 +1,85 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"base-config": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741872348,
|
||||||
|
"narHash": "sha256-4d0S59c/rR5lcfqeqw3z+k4FlDwyci6dwrwMPgKuO/g=",
|
||||||
|
"ref": "stable",
|
||||||
|
"rev": "50af8d01fb5d5d5616bd1d5c38ced9946f863ca4",
|
||||||
|
"revCount": 6,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"ref": "stable",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"disko": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741786315,
|
||||||
|
"narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741379970,
|
"lastModified": 1741600792,
|
||||||
"narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
|
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f",
|
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-24.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741708242,
|
||||||
|
"narHash": "sha256-cNRqdQD4sZpN7JLqxVOze4+WsWTmv2DGH0wNCOVwrWc=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"base-config": "base-config",
|
||||||
|
"disko": "disko",
|
||||||
|
"nixpkgs": [
|
||||||
|
"base-config",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
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 = {
|
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
|
outputs = {
|
||||||
systems = [
|
self,
|
||||||
"aarch64-linux"
|
base-config,
|
||||||
"i686-linux"
|
nixpkgs,
|
||||||
"x86_64-linux"
|
...
|
||||||
"aarch64-darwin"
|
} @ inputs: {
|
||||||
"x86_64-darwin"
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||||
];
|
system = "x86_64-linux";
|
||||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
modules = [
|
||||||
in {
|
(base-config.nixosModules.default {
|
||||||
templates = {
|
tier = "starter";
|
||||||
starter = {
|
jsonConfig = builtins.fromJSON (builtins.readFile ./config.json);
|
||||||
description = ''
|
}) # Pass tier here
|
||||||
Description here!
|
inputs.disko.nixosModules.disko
|
||||||
'';
|
./configuration.nix
|
||||||
path = ./starter;
|
];
|
||||||
|
specialArgs = {
|
||||||
|
inherit self;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
formatter =
|
|
||||||
forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
88
starter/flake.lock
generated
88
starter/flake.lock
generated
@ -1,88 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"base-config": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1741872348,
|
|
||||||
"narHash": "sha256-4d0S59c/rR5lcfqeqw3z+k4FlDwyci6dwrwMPgKuO/g=",
|
|
||||||
"ref": "stable",
|
|
||||||
"rev": "50af8d01fb5d5d5616bd1d5c38ced9946f863ca4",
|
|
||||||
"revCount": 6,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "stable",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"disko": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1741786315,
|
|
||||||
"narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1741600792,
|
|
||||||
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1741708242,
|
|
||||||
"narHash": "sha256-cNRqdQD4sZpN7JLqxVOze4+WsWTmv2DGH0wNCOVwrWc=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"base-config": "base-config",
|
|
||||||
"disko": "disko",
|
|
||||||
"nixpkgs": [
|
|
||||||
"base-config",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Self-hosted server setup with Portainer, n8n, and Baserow";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
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 = {
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user