2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
2021-02-05 17:12:51 +00:00
|
|
|
gnu = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2020-04-24 23:36:52 +00:00
|
|
|
default = false;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
2020-04-24 23:36:52 +00:00
|
|
|
When enabled, GNU software is chosen by default whenever a there is
|
|
|
|
a choice between GNU and non-GNU software (e.g., GNU lsh
|
|
|
|
vs. OpenSSH).
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
config = lib.mkIf config.gnu {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs;
|
|
|
|
# TODO: Adjust `requiredPackages' from `system-path.nix'.
|
|
|
|
# TODO: Add Inetutils once it has the new `ifconfig'.
|
|
|
|
[ parted
|
|
|
|
#fdisk # XXX: GNU fdisk currently fails to build and it's redundant
|
|
|
|
# with the `parted' command.
|
|
|
|
nano zile
|
|
|
|
texinfo # for the stand-alone Info reader
|
|
|
|
]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional (!stdenv.isAarch32) grub2;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
# GNU GRUB, where available.
|
|
|
|
boot.loader.grub.enable = !pkgs.stdenv.isAarch32;
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
|
|
|
|
# GNU lsh.
|
|
|
|
services.openssh.enable = false;
|
|
|
|
services.lshd.enable = true;
|
|
|
|
programs.ssh.startAgent = false;
|
|
|
|
services.xserver.startGnuPGAgent = true;
|
|
|
|
|
|
|
|
# TODO: GNU dico.
|
|
|
|
# TODO: GNU Inetutils' inetd.
|
|
|
|
# TODO: GNU Pies.
|
|
|
|
};
|
|
|
|
}
|