Mirror of sanic. Find the original here: https://gitlab.com/XenGi/sanic
				https://sanic.club.berlin.ccc.de
			
		| .forgejo/workflows | ||
| static | ||
| .editorconfig | ||
| .gitignore | ||
| architecture.drawio.svg | ||
| config.ini | ||
| Dockerfile | ||
| favicon.xcf | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| gomod2nix.toml | ||
| LICENSE | ||
| Makefile | ||
| mpd.conf | ||
| mpd.go | ||
| NOTES.md | ||
| README.md | ||
| server.go | ||
🦔 sanic
chaos music control inspired by relaxx player
✨ Features
- mpd web gui
- search music
 - organize playlists
 - control current playback queue
 
 - no authentication required to control music playback
 - add playlists from internet radios (
*.m3u,*.pls) - add music from other sources like youtube (
youtube-dl) 
Installation
NixOS (flakes)
Example flake setup (untested):
{
  description = "my host";
  inputs ={
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.11";
    sanic.url = "git.berlin.ccc.de:cccb/sanic/latest";
  };
  outputs = { self, nixpkgs, sanic }:
  let
    system = "x86_64-linux";
    pkgs = import nixpkgs { inherit system; };
  in
  {
    nixosConfigurations."myhostname".nixpkgs.lib.nixosSystem {
      inherit system;
      modules = [
        sanic.nixosModules.sanic
        {
          sanic = {
            mpd = {
              host = "localhost";
              port = 6600;
            };
            ui = {
              hostname = "[::]";
              port = "443";
              tls = true;
            };
          };
        }
      ];
    };
  };
}
Arch Linux (Manjaro, etc)
Install from the AUR:
yay -S sanic
Debian (Ubuntu, Mint, etc)
tba
Red Hat (Fedora, Rocky Linux, etc)
tba
Windows / macOS
lol! 🤣
🛠️ Development
sanic is developed using Nix, but you can also just use the usual Golang tooling.
Run local MPD instance for testing with make mpd.
Update go depdendencies like this:
go get -u  # or `make update`
go mod tidy  # or `make tidy`
gomod2nix
❄️ w/ Nix
Enter development shell (also has mpc client installed for testing):
nix develop
Build nix flake:
nix build
🐧 w/o Nix
Use these Make targets for convenience:
run: Run projectbuild: Compile projecttidy: Add missing and remove unused modulesverify: Verify dependencies have expected contentformat: Format go codelint: Run linter (staticcheck)test: Run testscert: Create https certificate for local testing
🐳 Container
You can run sanic in a container. Use these Make targets for convenience:
build-container: Build container imagerun-container: Run container image