Compare commits
2 Commits
a43d2bf6b5
...
51e102bb39
Author | SHA1 | Date |
---|---|---|
![]() |
51e102bb39 | |
![]() |
13b66648fd |
|
@ -25,6 +25,9 @@
|
||||||
carla
|
carla
|
||||||
wprs
|
wprs
|
||||||
xwayland
|
xwayland
|
||||||
|
|
||||||
|
# Plugins for Carla
|
||||||
|
lsp-plugins
|
||||||
];
|
];
|
||||||
|
|
||||||
# User for audio mixing
|
# User for audio mixing
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
./terminal/foot/default.nix
|
./terminal/foot/default.nix
|
||||||
./vscode/default.nix
|
./vscode/default.nix
|
||||||
./whatsapp/default.nix
|
./whatsapp/default.nix
|
||||||
|
./wprs/default.nix
|
||||||
./winbox/default.nix
|
./winbox/default.nix
|
||||||
./zathura/default.nix
|
./zathura/default.nix
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.wprs;
|
||||||
|
|
||||||
|
wprsHostConfigurationModule = types.submodule {
|
||||||
|
options = {
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "Command name.";
|
||||||
|
};
|
||||||
|
command = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "Command to run.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.wprs = {
|
||||||
|
enable = mkEnableOption "Enable wprs";
|
||||||
|
hosts = mkOption {
|
||||||
|
type = types.attrsOf (types.listOf wprsHostConfigurationModule);
|
||||||
|
default = { };
|
||||||
|
description = "wprs commands to add as desktop files";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
wprs
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.desktopEntries = (
|
||||||
|
listToAttrs (
|
||||||
|
map
|
||||||
|
(entry: {
|
||||||
|
name = "wprs${
|
||||||
|
builtins.substring 0 12 (builtins.hashString "sha256" "${entry.name} (${entry.comment})")
|
||||||
|
}";
|
||||||
|
value = entry // {
|
||||||
|
type = "Application";
|
||||||
|
terminal = false;
|
||||||
|
genericName = entry.comment;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(
|
||||||
|
concatMap (
|
||||||
|
entry:
|
||||||
|
let
|
||||||
|
host = entry.name;
|
||||||
|
commands = entry.value;
|
||||||
|
hostEntries = [
|
||||||
|
{
|
||||||
|
name = "Attach";
|
||||||
|
comment = host;
|
||||||
|
exec = "wprs --pulseaudio-forwarding False ${host} attach";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Detach";
|
||||||
|
comment = host;
|
||||||
|
exec = "wprs ${host} detach";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
commandEntries = map (command: {
|
||||||
|
name = "${command.name}";
|
||||||
|
comment = host;
|
||||||
|
exec = "wprs --pulseaudio-forwarding False ${host} run \"${command.command}\"";
|
||||||
|
}) commands;
|
||||||
|
in
|
||||||
|
(hostEntries ++ commandEntries)
|
||||||
|
) (attrsToList cfg.hosts)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
|
@ -24,7 +24,6 @@
|
||||||
inkscape
|
inkscape
|
||||||
ente-auth
|
ente-auth
|
||||||
bitwarden
|
bitwarden
|
||||||
wprs
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# desktop.development = "river-light";
|
# desktop.development = "river-light";
|
||||||
|
@ -345,6 +344,17 @@
|
||||||
eduvpn.enable = true;
|
eduvpn.enable = true;
|
||||||
keyring.enable = true;
|
keyring.enable = true;
|
||||||
scripts.enable = true;
|
scripts.enable = true;
|
||||||
|
wprs = {
|
||||||
|
enable = true;
|
||||||
|
hosts = {
|
||||||
|
"mixer@10.20.60.251" = [
|
||||||
|
{
|
||||||
|
name = "Carla";
|
||||||
|
command = "carla -platform wayland";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
|
Loading…
Reference in New Issue