parallel: init module (#8240)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
time = "2025-11-29T23:04:38+00:00";
|
||||
condition = true;
|
||||
message = ''
|
||||
A new module is available: 'programs.parallel'.
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
cfg = config.programs.parallel;
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.xavwe ];
|
||||
|
||||
options.programs.parallel = {
|
||||
enable = mkEnableOption "GNU Parallel";
|
||||
|
||||
package = lib.mkPackageOption pkgs "parallel-full" { };
|
||||
|
||||
will-cite = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Accept GNU Parallels citation policy: <https://www.gnu.org/software/parallel/parallel_design.html#citation-notice>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home = {
|
||||
packages = [ cfg.package ];
|
||||
file.".parallel/will-cite" = mkIf cfg.will-cite {
|
||||
text = "generated by home manager (programs.parallel.will-cite)";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ parallel-example-config = ./example-config.nix; }
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.parallel = {
|
||||
enable = true;
|
||||
will-cite = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.parallel/will-cite
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user