mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
treewide: implement auto importing for modules
Reduce maintenance burden and increase efficiency by automatically importing modules following a specific convention. Co-authored-by: awwpotato <awwpotato@voidq.com> Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
fefeb0e928
commit
4fca600cb1
461 changed files with 72 additions and 474 deletions
|
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
cfg = config.programs.rmpc;
|
||||
in
|
||||
{
|
||||
meta.maintainers = with lib.hm.maintainers; [ aguirre-matteo ];
|
||||
|
||||
options.programs.rmpc = {
|
||||
enable = mkEnableOption "rmpc";
|
||||
package = mkPackageOption pkgs "rmpc" { nullable = true; };
|
||||
config = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
(
|
||||
address: "127.0.0.1:6600",
|
||||
password: None,
|
||||
theme: None,
|
||||
cache_dir: None,
|
||||
on_song_change: None,
|
||||
volume_step: 5,
|
||||
max_fps: 30,
|
||||
scrolloff: 0,
|
||||
wrap_navigation: false,
|
||||
enable_mouse: true,
|
||||
enable_config_hot_reload: true,
|
||||
status_update_interval_ms: 1000,
|
||||
select_current_song_on_change: false,
|
||||
browser_song_sort: [Disc, Track, Artist, Title],
|
||||
)
|
||||
'';
|
||||
description = ''
|
||||
Configuration settings for rmpc in the Rusty Object Notation
|
||||
format. All available options can be found in the official
|
||||
documentation at <https://mierak.github.io/rmpc/next/configuration/>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = mkIf (cfg.package != null) [ cfg.package ];
|
||||
xdg.configFile = mkIf (cfg.config != "") {
|
||||
"rmpc/config.ron".text = cfg.config;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue