Adds synth nix package.

This commit is contained in:
Bailey Stevens 2023-10-04 07:00:26 -04:00
parent c487112a58
commit 001931a1fa
3 changed files with 74 additions and 1 deletions

View File

@ -33,6 +33,24 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"napalm": {
"inputs": {
"flake-utils": "flake-utils_2",
@ -70,11 +88,33 @@
"type": "github"
}
},
"phyzzy": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1696417150,
"narHash": "sha256-9b9JcfaA9T7kDt0f31unUqYgTe5S7JMrcZMkHQdKZUE=",
"ref": "refs/heads/main",
"rev": "2097785400b5eadf9110167eba55290de98691c5",
"revCount": 22,
"type": "git",
"url": "https://fem.mint.lgbt/mmelodies/phyzzy.git"
},
"original": {
"type": "git",
"url": "https://fem.mint.lgbt/mmelodies/phyzzy.git"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"napalm": "napalm",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"phyzzy": "phyzzy"
}
},
"systems": {
@ -91,6 +131,21 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"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",

View File

@ -4,6 +4,10 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
phyzzy.url = "git+https://fem.mint.lgbt/mmelodies/phyzzy.git";
phyzzy.inputs.nixpkgs.follows = "nixpkgs";
napalm.url = "github:nix-community/napalm";
napalm.inputs.nixpkgs.follows = "nixpkgs";
};
@ -35,6 +39,7 @@
mmelodies = {
frontend = final.callPackage ./default.nix {};
backend = final.callPackage ./backend {};
synth = final.callPackage (import inputs.phyzzy) {};
};
});
};

View File

@ -28,6 +28,19 @@
};
};
systemd.services.phyzzy = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "appuser";
Group = "audio";
ExecStart = "${pkgs.mmelodies.synth}/bin/phyzzy -nogui";
Restart = "always";
CPUSchedulingPolicy = "fifo";
CPUSchedulingPriority = "20";
};
};
systemd.tmpfiles.rules = [
"d /run/mmelodies 0755 nginx nginx 12h -"
];