This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
simple-nixos-fediverse/flake.nix

91 lines
2.2 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
};
2024-09-25 09:42:08 +02:00
outputs = inputs@{ self, nixpkgs }:
2024-02-22 10:56:31 +01:00
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosModules = {
## Fediversity modules
2024-09-25 09:42:08 +02:00
fediversity = { pkgs, ... }: {
imports = [ ./fediversity ];
2024-09-25 09:42:08 +02:00
services.pixelfed.package = inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.pixelfed.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./fediversity/pixelfed-group-permissions.patch ];
});
};
## VM-specific modules
interactive-vm = {
imports = [
./vm/interactive-vm.nix
self.nixosModules.fediversity
];
};
mastodon-vm = {
imports = [
./vm/mastodon-vm.nix
self.nixosModules.fediversity
];
};
peertube-vm = {
imports = [
./vm/peertube-vm.nix
self.nixosModules.fediversity
];
};
pixelfed-vm = {
imports = [
./vm/pixelfed-vm.nix
self.nixosModules.fediversity
];
};
};
2024-02-22 10:56:31 +01:00
nixosConfigurations = {
mastodon = nixpkgs.lib.nixosSystem {
inherit system;
modules = with self.nixosModules; [ fediversity interactive-vm mastodon-vm ];
2024-03-20 00:43:20 +01:00
};
peertube = nixpkgs.lib.nixosSystem {
inherit system;
modules = with self.nixosModules; [ fediversity interactive-vm peertube-vm ];
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; [ fediversity interactive-vm pixelfed-vm ];
2024-03-20 01:39:59 +01:00
};
all = nixpkgs.lib.nixosSystem {
inherit system;
modules = with self.nixosModules; [
fediversity
interactive-vm
peertube-vm
pixelfed-vm
mastodon-vm
];
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
];
};
};
}