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": {
|
||||
"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": 1741379970,
|
||||
"narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
|
||||
"lastModified": 1741600792,
|
||||
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f",
|
||||
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"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": {
|
||||
"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 = {
|
||||
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);
|
||||
};
|
||||
}
|
||||
|
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