mirror of
https://github.com/nix-community/home-manager
synced 2025-01-12 03:59:49 +01:00
piston-cli: add module (#2052)
* piston-cli: add module * News: Remove trailing whitespace
This commit is contained in:
parent
3ffe2a4cdf
commit
9424f31f86
4 changed files with 56 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -148,6 +148,8 @@
|
||||||
|
|
||||||
/modules/programs/pidgin.nix @rycee
|
/modules/programs/pidgin.nix @rycee
|
||||||
|
|
||||||
|
/modules/programs/piston-cli.nix @ethancedwards8
|
||||||
|
|
||||||
/modules/programs/powerline-go.nix @DamienCassou
|
/modules/programs/powerline-go.nix @DamienCassou
|
||||||
|
|
||||||
/modules/programs/rbw.nix @ambroisie
|
/modules/programs/rbw.nix @ambroisie
|
||||||
|
|
|
@ -2054,6 +2054,13 @@ in
|
||||||
A new module is available: 'programs.rbw'.
|
A new module is available: 'programs.rbw'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2021-05-30T15:22:10+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.piston-cli'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,7 @@ let
|
||||||
(loadModule ./programs/pazi.nix { })
|
(loadModule ./programs/pazi.nix { })
|
||||||
(loadModule ./programs/pet.nix { })
|
(loadModule ./programs/pet.nix { })
|
||||||
(loadModule ./programs/pidgin.nix { })
|
(loadModule ./programs/pidgin.nix { })
|
||||||
|
(loadModule ./programs/piston-cli.nix { })
|
||||||
(loadModule ./programs/powerline-go.nix { })
|
(loadModule ./programs/powerline-go.nix { })
|
||||||
(loadModule ./programs/qutebrowser.nix { })
|
(loadModule ./programs/qutebrowser.nix { })
|
||||||
(loadModule ./programs/rbw.nix { })
|
(loadModule ./programs/rbw.nix { })
|
||||||
|
|
46
modules/programs/piston-cli.nix
Normal file
46
modules/programs/piston-cli.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.programs.piston-cli;
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
in {
|
||||||
|
meta.maintainers = with maintainers; [ ethancedwards8 ];
|
||||||
|
|
||||||
|
options.programs.piston-cli = {
|
||||||
|
enable = mkEnableOption "piston-cli, code runner";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.piston-cli;
|
||||||
|
defaultText = literalExample "pkgs.piston-cli";
|
||||||
|
description = "The piston-cli package to use.";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = yamlFormat.type;
|
||||||
|
default = { };
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
theme = "emacs";
|
||||||
|
box_style = "MINIMAL_DOUBLE_HEAD";
|
||||||
|
prompt_continuation = "...";
|
||||||
|
prompt_start = ">>>";
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration written to
|
||||||
|
<filename>$XDG_CONFIG_HOME/piston-cli/config.yml</filename>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
xdg.configFile."piston-cli/config.yml" = mkIf (cfg.settings != { }) {
|
||||||
|
source = yamlFormat.generate "config.yml" cfg.settings;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue