mirror of
https://github.com/nix-community/home-manager
synced 2025-03-29 17:25:09 +01:00
process-compose: add module
This commit is contained in:
parent
c2cd2a52e0
commit
c739322dec
3 changed files with 90 additions and 0 deletions
modules
|
@ -101,6 +101,12 @@
|
||||||
github = "diniamo";
|
github = "diniamo";
|
||||||
githubId = 55629891;
|
githubId = 55629891;
|
||||||
};
|
};
|
||||||
|
dudeofawesome = {
|
||||||
|
name = "Louis Orleans";
|
||||||
|
email = "louis@orleans.io";
|
||||||
|
github = "dudeofawesome";
|
||||||
|
githubId = 1683595;
|
||||||
|
};
|
||||||
dwagenk = {
|
dwagenk = {
|
||||||
email = "dwagenk@mailbox.org";
|
email = "dwagenk@mailbox.org";
|
||||||
github = "dwagenk";
|
github = "dwagenk";
|
||||||
|
|
|
@ -193,6 +193,7 @@ let
|
||||||
./programs/poetry.nix
|
./programs/poetry.nix
|
||||||
./programs/powerline-go.nix
|
./programs/powerline-go.nix
|
||||||
./programs/pqiv.nix
|
./programs/pqiv.nix
|
||||||
|
./programs/process-compose.nix
|
||||||
./programs/pubs.nix
|
./programs/pubs.nix
|
||||||
./programs/pyenv.nix
|
./programs/pyenv.nix
|
||||||
./programs/pylint.nix
|
./programs/pylint.nix
|
||||||
|
|
83
modules/programs/process-compose.nix
Normal file
83
modules/programs/process-compose.nix
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkPackageOption mkIf mkOption types;
|
||||||
|
|
||||||
|
cfg = config.programs.process-compose;
|
||||||
|
|
||||||
|
settingsFormat = pkgs.formats.yaml { };
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ lib.hm.maintainers.dudeofawesome ];
|
||||||
|
|
||||||
|
options.programs.process-compose = {
|
||||||
|
enable = mkEnableOption "process-compose";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "process-compose" { };
|
||||||
|
|
||||||
|
configDir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = if (pkgs.stdenv.targetPlatform.isDarwin) then
|
||||||
|
"Library/Application Support/process-compose/"
|
||||||
|
else
|
||||||
|
"$XDG_CONFIG_HOME/process-compose/";
|
||||||
|
description = ''
|
||||||
|
The path to the config directory.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = settingsFormat.type;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Specify the configuration for process-compose.
|
||||||
|
|
||||||
|
See https://f1bonacc1.github.io/process-compose/tui/#tui-state-settings for available options.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
shortcuts = mkOption {
|
||||||
|
type = settingsFormat.type;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Specify shortcuts for process-compose.
|
||||||
|
|
||||||
|
See https://f1bonacc1.github.io/process-compose/tui/#shortcuts-configuration for available options.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
theme = mkOption {
|
||||||
|
type = settingsFormat.type;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Specify a theme for process-compose.
|
||||||
|
|
||||||
|
See https://f1bonacc1.github.io/process-compose/tui/#tui-themes for available options.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home = {
|
||||||
|
packages = [ cfg.package ];
|
||||||
|
|
||||||
|
file.process-compose-settings = {
|
||||||
|
enable = !builtins.isNull cfg.settings;
|
||||||
|
target = "${cfg.configDir}/settings.yaml";
|
||||||
|
source = settingsFormat.generate "settings.yaml" cfg.settings;
|
||||||
|
};
|
||||||
|
|
||||||
|
file.process-compose-shortcuts = {
|
||||||
|
enable = !builtins.isNull cfg.shortcuts;
|
||||||
|
target = "${cfg.configDir}/shortcuts.yaml";
|
||||||
|
source = settingsFormat.generate "shortcuts.yaml" {
|
||||||
|
shortcuts = cfg.shortcuts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
file.process-compose-theme = {
|
||||||
|
enable = !builtins.isNull cfg.theme;
|
||||||
|
target = "${cfg.configDir}/theme.yaml";
|
||||||
|
source = settingsFormat.generate "theme.yaml" cfg.theme;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue