cluster/flake.nix

59 lines
1.4 KiB
Nix

{
inputs = {
nixpkgs.url = "nixpkgs";
nixpkgs-unstable.url = "nixpkgs-unstable";
csi-driver-nfs = {
flake = false;
url = "github:MagicRB/csi-driver-nfs";
};
klippy = {
url = "github:KevinOConnor/klipper?rev=e68cf08d15a985ecce7497b58408ee233dd54eb9";
flake = false;
};
moonraker = {
url = "github:MagicRB/moonraker?ref=master";
flake = false;
};
};
outputs = { self, nixpkgs, ... }@inputs:
let
rlib =
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
import ./lib.nix { inherit system nixpkgs pkgs inputs; };
flakes = rlib.flakes ./nix-packages [
"klippy"
"mainsail"
"moonraker"
];
pkgs = rlib.pkgsWithFlakes flakes;
dockerImages = rlib.dockerImages pkgs ./docker [
"klippy-moonraker"
"postgresql"
"gitea"
"csi-driver-nfs"
"nix"
"mariadb"
];
containerTest = let
all-modules = import <nixpkgs/nixos/modules/module-list.nix>;
custom-module = rec {
services.mysql.enable = true;
};
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
pkgs.writeText "test" (pkgs.lib.evalModules {
modules = all-modules ++ [ custom-module ];
}).config.services.mysql.dataDir;
in {
inherit flakes dockerImages containerTest;
};
}