about summary refs log tree commit diff
path: root/nixos/modules/profiles/perlless.nix
blob: 90abd14f077e4d80f17c0f8d1cb2c1bbb446a219 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# WARNING: If you enable this profile, you will NOT be able to switch to a new
# configuration and thus you will not be able to rebuild your system with
# nixos-rebuild!

{ lib, ... }:

{

  # Disable switching to a new configuration. This is not a necessary
  # limitation of a perlless system but just a current one. In the future,
  # perlless switching might be possible.
  system.switch.enable = lib.mkDefault false;

  # Remove perl from activation
  boot.initrd.systemd.enable = lib.mkDefault true;
  system.etc.overlay.enable = lib.mkDefault true;
  systemd.sysusers.enable = lib.mkDefault true;

  # Random perl remnants
  system.disableInstallerTools = lib.mkDefault true;
  programs.less.lessopen = lib.mkDefault null;
  programs.command-not-found.enable = lib.mkDefault false;
  boot.enableContainers = lib.mkDefault false;
  environment.defaultPackages = lib.mkDefault [ ];
  documentation.info.enable = lib.mkDefault false;

  # Check that the system does not contain a Nix store path that contains the
  # string "perl".
  system.forbiddenDependenciesRegex = "perl";

}