Replace modules/audio/* with daw module
And add custom lmms package, since the upstream is currently broken (NixOS/nixpkgs#76074).
This commit is contained in:
parent
3e823d3b44
commit
96ffd97ac6
|
@ -1,7 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
audacity
|
||||
];
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
lmms
|
||||
];
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# services.spotifyd doesn't work so we'll have to roll our own spotifyd +
|
||||
# spotify-tui solution. I can't get the dbus interface doesn't work, though,
|
||||
# so we have to wait for spotify-tui to implement CLI command for controlling
|
||||
# spotify playback (see https://github.com/Rigellute/spotify-tui/issues/147)
|
||||
# or for spotifyd to get fixed.
|
||||
environment.systemPackages = with pkgs; [
|
||||
unstable.spotifyd
|
||||
(writeScriptBin "spt" ''
|
||||
#!${stdenv.shell}
|
||||
if ! systemctl --user is-active spotifyd >/dev/null; then
|
||||
systemctl --user start spotifyd
|
||||
fi
|
||||
${unstable.spotify-tui}/bin/spt
|
||||
'')
|
||||
|
||||
# spotify-tui is fine for selecting and playing music, but incomplete. We
|
||||
# occasionally still need the official client for more sophisticated search
|
||||
# and the "made for you" playlists.
|
||||
spotify
|
||||
];
|
||||
|
||||
systemd.user.services.spotifyd.serviceConfig =
|
||||
let spotifydConf = pkgs.writeText "spotifyd.conf" ''
|
||||
[global]
|
||||
username = accounts@v0.io
|
||||
password_cmd = ${pkgs.pass}/bin/pass www/spotify.com | head -n1
|
||||
backend = pulseaudio
|
||||
'';
|
||||
in {
|
||||
ExecStart = "${pkgs.unstable.spotifyd}/bin/spotifyd --no-daemon --cache-path /tmp/spotifyd --config-path ${spotifydConf}";
|
||||
Restart = "always";
|
||||
RestartSec = 6;
|
||||
};
|
||||
}
|
18
modules/daw.nix
Normal file
18
modules/daw.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
# I make music for my games. LMMS is my DAW. Fruityloops too, on my Windows
|
||||
# system, but I'm slowly phasing it out for open-source alternatives. When I'm
|
||||
# in the mood for a quick chiptune, I fire up sunvox instead -- it runs
|
||||
# absolutely anywhere, even on my ipad and phone.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
audacity # for recording and remastering audio
|
||||
# lmms # for making music
|
||||
sunvox # for making music (where LMMS is overkill)
|
||||
|
||||
# Build our own LMMS because the built-in nixpkg is broken, due to a 'Could
|
||||
# not find the Qt platform plugin "xcb" in ""' error on startup:
|
||||
# https://github.com/NixOS/nixpkgs/issues/76074
|
||||
(callPackage <packages/lmms.nix> {})
|
||||
];
|
||||
}
|
42
packages/lmms.nix
Normal file
42
packages/lmms.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3, makeDesktopItem }:
|
||||
|
||||
let pname = "lmms";
|
||||
version = "1.2.1";
|
||||
desktopItem = makeDesktopItem {
|
||||
name = pname;
|
||||
desktopName = "LMMS";
|
||||
comment = "Cross-platform music production software";
|
||||
icon = "lmms";
|
||||
terminal = "false";
|
||||
exec = pname;
|
||||
categories = "Audio";
|
||||
};
|
||||
in appimageTools.wrapType2 rec {
|
||||
name = "${pname}-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/LMMS/lmms/releases/download/v${version}/${name}-linux-x86_64.AppImage";
|
||||
sha256 = "0aa63c3fv84wrny7vp7ycdvapp21j09kllzs1xybb19wdkdd863v";
|
||||
};
|
||||
|
||||
profile = ''
|
||||
export LC_ALL=C.UTF-8
|
||||
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
|
||||
'';
|
||||
|
||||
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p);
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/{${name},${pname}}
|
||||
chmod +x $out/bin/${pname}
|
||||
mkdir -p "$out/share/applications/"
|
||||
cp "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||
substituteInPlace $out/share/applications/*.desktop --subst-var out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross-platform music production software";
|
||||
homepage = https://lmms.io;
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
maintainers = with maintainers; [ hlissner ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue