1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-05 08:31:03 +01:00

parallel: init module (#8240)

This commit is contained in:
Xaver Wenhart 2025-12-02 01:44:57 +01:00 committed by GitHub
parent effe4c007d
commit ff067cfc61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,7 @@
{
time = "2025-11-29T23:04:38+00:00";
condition = true;
message = ''
A new module is available: 'programs.parallel'.
'';
}

View file

@ -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)";
};
};
};
}

View file

@ -0,0 +1 @@
{ parallel-example-config = ./example-config.nix; }

View file

@ -0,0 +1,10 @@
{
programs.parallel = {
enable = true;
will-cite = true;
};
nmt.script = ''
assertFileExists home-files/.parallel/will-cite
'';
}