amberol: add module
Amberol is a small and simple music player.
This commit is contained in:
parent
1451d2866d
commit
e866aae5bb
|
@ -1470,6 +1470,14 @@ in {
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-03-28T17:02:19+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'services.amberol'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
time = "2024-04-08T21:43:38+00:00";
|
time = "2024-04-08T21:43:38+00:00";
|
||||||
message = ''
|
message = ''
|
||||||
|
@ -1516,6 +1524,19 @@ in {
|
||||||
packages. See https://python-poetry.org/ for more.
|
packages. See https://python-poetry.org/ for more.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-04-22T18:04:47+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'services.amberol'.
|
||||||
|
|
||||||
|
Amberol is a music player with no delusions of grandeur. If you just
|
||||||
|
want to play music available on your local system then Amberol is the
|
||||||
|
music player you are looking for. See https://apps.gnome.org/Amberol/
|
||||||
|
for more.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,8 +261,9 @@ let
|
||||||
./programs/zsh.nix
|
./programs/zsh.nix
|
||||||
./programs/zsh/prezto.nix
|
./programs/zsh/prezto.nix
|
||||||
./programs/zsh/zsh-abbr.nix
|
./programs/zsh/zsh-abbr.nix
|
||||||
./services/arrpc.nix
|
|
||||||
./services/activitywatch.nix
|
./services/activitywatch.nix
|
||||||
|
./services/amberol.nix
|
||||||
|
./services/arrpc.nix
|
||||||
./services/autorandr.nix
|
./services/autorandr.nix
|
||||||
./services/avizo.nix
|
./services/avizo.nix
|
||||||
./services/barrier.nix
|
./services/barrier.nix
|
||||||
|
|
70
modules/services/amberol.nix
Normal file
70
modules/services/amberol.nix
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.amberol;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = with lib.maintainers; [ surfaceflinger ];
|
||||||
|
|
||||||
|
options.services.amberol = {
|
||||||
|
enable = lib.mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
|
Whether to enable Amberol music player as a daemon.
|
||||||
|
|
||||||
|
Note, it is necessary to add
|
||||||
|
```nix
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
```
|
||||||
|
to your system configuration for the daemon to work correctly.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "amberol" { };
|
||||||
|
|
||||||
|
enableRecoloring = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "UI recoloring using the album art.";
|
||||||
|
};
|
||||||
|
|
||||||
|
replaygain = lib.mkOption {
|
||||||
|
type = lib.types.enum [ "album" "track" "off" ];
|
||||||
|
default = "track";
|
||||||
|
description = "ReplayGain mode.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
(lib.hm.assertions.assertPlatform "services.amberol" pkgs
|
||||||
|
lib.platforms.linux)
|
||||||
|
];
|
||||||
|
|
||||||
|
# Running amberol will just attach itself to gapplication service.
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
dconf.settings."io/bassi/Amberol" = {
|
||||||
|
background-play = true;
|
||||||
|
enable-recoloring = cfg.enableRecoloring;
|
||||||
|
replay-gain = cfg.replaygain;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.amberol = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Amberol music player daemon";
|
||||||
|
Requires = [ "dbus.service" ];
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${lib.getExe cfg.package} --gapplication-service";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue