mirror of
https://github.com/Gaelan/minifedi
synced 2024-11-10 06:14:17 +00:00
Make os-agnostic.
This commit is contained in:
parent
cfda968d66
commit
8c56a5d784
4 changed files with 111 additions and 85 deletions
25
README.md
25
README.md
|
@ -1,5 +1,28 @@
|
|||
# MINIFEDI IS NOT DONE. It's like 80% of the way there, but the docs below remain slightly aspirational for the moment.
|
||||
|
||||
# Minifedi
|
||||
|
||||
Minifedi is a tool to quickly spin up a bunch of ActivityPub servers for local testing.
|
||||
|
||||
Minifedi should run on any macOS or Linux system with [Nix](https://nixos.org) installed. (Nix itself works fine on any Linux distribution; you don't need to be using NixOS.) Windows isn't natively supported, but WSL should work. Besides Nix, it is entirely self-contained and needs no changes to your system configuration; you can install it with a git clone, delete it with `rm -rf`, and your system will be exactly the way it was before.
|
||||
Minifedi should run on any macOS or Linux system with [Nix](https://nixos.org) installed. (Nix itself works fine on any Linux distribution; you don't need to be using NixOS.) Windows isn't natively supported, but WSL should work. Minifedi is entirely self-contained and needs no changes to your system configuration besides installing Nix; you can install it with a git clone, delete it with `rm -rf`, and your system will be exactly the way it was before.
|
||||
|
||||
Minifedi's goal is to "just work" on every machine. If the instructions below fail for you, please file an issue; I'll fix it if at all possible.
|
||||
|
||||
## Getting Started
|
||||
|
||||
```
|
||||
git clone https://github.com/Gaelan/minifedi.git
|
||||
cd minifedi
|
||||
vi nix/services.nix # if you'd like, edit the list of instances - by default, we run one of each
|
||||
nix run
|
||||
```
|
||||
|
||||
Give it some time, and you should see
|
||||
|
||||
## Supported Software
|
||||
|
||||
Minifedi currently supports:
|
||||
|
||||
- Mastodon (and forks)
|
||||
- Akkoma
|
||||
- GoToSocial
|
||||
|
|
2
TODO
2
TODO
|
@ -1,5 +1,5 @@
|
|||
- fix flake.nix to handle arbitrary arches
|
||||
- rip out or fix GtS (need to handle certs somehow)
|
||||
- figure out how to support local clones, and document this
|
||||
- data generation?
|
||||
- separate out config into separate file, and document this
|
||||
- license
|
||||
|
|
34
flake.lock
34
flake.lock
|
@ -1,5 +1,23 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1688221086,
|
||||
|
@ -16,8 +34,24 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
49
flake.nix
49
flake.nix
|
@ -1,37 +1,10 @@
|
|||
{
|
||||
outputs = { self, nixpkgs }: {
|
||||
# nixosModules.base = {pkgs, ...}: {
|
||||
# system.stateVersion = "22.05";
|
||||
|
||||
# # Configure networking
|
||||
# networking.useDHCP = false;
|
||||
# networking.interfaces.eth0.useDHCP = true;
|
||||
|
||||
# # Create user "test"
|
||||
# services.getty.autologinUser = "test";
|
||||
# users.users.test.isNormalUser = true;
|
||||
|
||||
# # Enable passwordless ‘sudo’ for the "test" user
|
||||
# users.users.test.extraGroups = ["wheel"];
|
||||
# security.sudo.wheelNeedsPassword = false;
|
||||
# };
|
||||
# nixosModules.vm = {...}: {
|
||||
# # Make VM output to the terminal instead of a separate window
|
||||
# virtualisation.vmVariant.virtualisation.graphics = false;
|
||||
# };
|
||||
# nixosConfigurations.darwinVM = nixpkgs.lib.nixosSystem {
|
||||
# system = "x86_64-linux";
|
||||
# modules = [
|
||||
# (builtins.trace (builtins.attrNames self) self.nixosModules.base)
|
||||
# self.nixosModules.vm
|
||||
# {
|
||||
# virtualisation.vmVariant.virtualisation.host.pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# packages.x86_64-darwin.darwinVM = self.nixosConfigurations.darwinVM.config.system.build.vm;
|
||||
apps.x86_64-darwin.default = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
outputs = { self, flake-utils, nixpkgs }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
apps.default = let
|
||||
s6 = (import ./nix/s6.nix {
|
||||
inherit pkgs;
|
||||
services = pkgs.lib.attrsets.mapAttrs (_: v: v.service)
|
||||
|
@ -59,9 +32,7 @@
|
|||
'';
|
||||
in "${script}";
|
||||
};
|
||||
apps.x86_64-darwin.install-cert =
|
||||
let pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||
in {
|
||||
apps.install-cert = {
|
||||
type = "app";
|
||||
program = let
|
||||
script = pkgs.writeShellScript "minifedi-install-cert" ''
|
||||
|
@ -77,13 +48,11 @@
|
|||
'';
|
||||
in "${script}";
|
||||
};
|
||||
apps.x86_64-darwin.mastodon-mk-version =
|
||||
let pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||
in {
|
||||
apps.x86_64-darwin.mastodon-mk-version = {
|
||||
type = "app";
|
||||
program = "${
|
||||
import ./nix/fedi/mastodon/mk-version { inherit pkgs; }
|
||||
}/bin/mastodon-mk-version";
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue