1{ config, lib, pkgs, ... }:
2
3{
4 options = {
5 gnu = lib.mkOption {
6 type = lib.types.bool;
7 default = false;
8 description = lib.mdDoc ''
9 When enabled, GNU software is chosen by default whenever a there is
10 a choice between GNU and non-GNU software (e.g., GNU lsh
11 vs. OpenSSH).
12 '';
13 };
14 };
15
16 config = lib.mkIf config.gnu {
17
18 environment.systemPackages = with pkgs;
19 # TODO: Adjust `requiredPackages' from `system-path.nix'.
20 # TODO: Add Inetutils once it has the new `ifconfig'.
21 [ parted
22 #fdisk # XXX: GNU fdisk currently fails to build and it's redundant
23 # with the `parted' command.
24 nano zile
25 texinfo # for the stand-alone Info reader
26 ]
27 ++ lib.optional (!stdenv.isAarch32) grub2;
28
29
30 # GNU GRUB, where available.
31 boot.loader.grub.enable = !pkgs.stdenv.isAarch32;
32
33 # GNU lsh.
34 services.openssh.enable = false;
35 services.lshd.enable = true;
36 programs.ssh.startAgent = false;
37 services.xserver.startGnuPGAgent = true;
38
39 # TODO: GNU dico.
40 # TODO: GNU Inetutils' inetd.
41 # TODO: GNU Pies.
42 };
43}