Fediversity/flake.nix

68 lines
1.8 KiB
Nix
Raw Normal View History

2024-02-22 10:56:31 +01:00
{
description = "Testing mastodon configurations";
inputs = {
nixpkgs.url = "github:radvendii/nixpkgs/nixos_rebuild_tests";
2024-02-22 10:56:31 +01:00
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosModules = {
## Fediversity modules
garage = import ./garage.nix;
mastodon = import ./mastodon.nix;
peertube = import ./peertube.nix;
pixelfed = import ./pixelfed.nix;
## VM-specific modules
interactive-vm = import ./vm/interactive-vm.nix;
mastodon-vm = import ./vm/mastodon-vm.nix;
peertube-vm = import ./vm/peertube-vm.nix;
pixelfed-vm = import ./vm/pixelfed-vm.nix;
};
2024-02-22 10:56:31 +01:00
nixosConfigurations = {
mastodon = nixpkgs.lib.nixosSystem {
inherit system;
modules = with self.nixosModules; [ interactive-vm mastodon mastodon-vm garage ];
2024-03-20 00:43:20 +01:00
};
peertube = nixpkgs.lib.nixosSystem {
inherit system;
modules = with self.nixosModules; [ interactive-vm peertube peertube-vm garage ];
2024-02-22 10:56:31 +01:00
};
2024-03-20 01:39:59 +01:00
pixelfed = nixpkgs.lib.nixosSystem {
inherit system;
modules = with self.nixosModules; [ interactive-vm pixelfed pixelfed-vm garage ];
2024-03-20 01:39:59 +01:00
};
all = nixpkgs.lib.nixosSystem {
inherit system;
modules = with self.nixosModules; [
interactive-vm
peertube peertube-vm
pixelfed pixelfed-vm
mastodon mastodon-vm
garage
];
2024-03-20 01:39:59 +01:00
};
2024-02-22 10:56:31 +01:00
};
checks.${system} = {
mastodon-garage = import ./tests/mastodon-garage.nix { inherit pkgs self; };
2024-08-30 17:23:55 +02:00
pixelfed-garage = import ./tests/pixelfed-garage.nix { inherit pkgs self; };
};
2024-02-22 10:56:31 +01:00
devShells.${system}.default = pkgs.mkShell {
inputs = with pkgs; [
nil
];
};
};
}