summaryrefslogtreecommitdiffstats
path: root/nixos/modules/profiles
diff options
context:
space:
mode:
authornikstur <nikstur@outlook.com>2023-10-17 16:40:26 +0200
committernikstur <nikstur@outlook.com>2024-01-22 00:54:13 +0100
commit8710a27bc6dc56a77808757b49b9bc5ad165d7ce (patch)
treefc94d88e409c1e5821c785ed96b3bfd78aafd3a4 /nixos/modules/profiles
parent7763ea212ab5359e19e447ac2cf24afb5c4b9a04 (diff)
nixos/profiles/perlless: init
Diffstat (limited to 'nixos/modules/profiles')
-rw-r--r--nixos/modules/profiles/perlless.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/profiles/perlless.nix b/nixos/modules/profiles/perlless.nix
new file mode 100644
index 000000000000..90abd14f077e
--- /dev/null
+++ b/nixos/modules/profiles/perlless.nix
@@ -0,0 +1,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";
+
+}