mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-26 08:48:38 +03:00
nixos/profiles/perlless: init
This commit is contained in:
parent
7763ea212a
commit
8710a27bc6
31
nixos/modules/profiles/perlless.nix
Normal file
31
nixos/modules/profiles/perlless.nix
Normal file
@ -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";
|
||||||
|
|
||||||
|
}
|
24
nixos/tests/activation/perlless.nix
Normal file
24
nixos/tests/activation/perlless.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
name = "activation-perlless";
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ nikstur ];
|
||||||
|
|
||||||
|
nodes.machine = { pkgs, modulesPath, ... }: {
|
||||||
|
imports = [ "${modulesPath}/profiles/perlless.nix" ];
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
virtualisation.mountHostNixStore = false;
|
||||||
|
virtualisation.useNixStoreImage = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
perl_store_paths = machine.succeed("ls /nix/store | grep perl || true")
|
||||||
|
print(perl_store_paths)
|
||||||
|
assert len(perl_store_paths) == 0
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
@ -287,6 +287,7 @@ in {
|
|||||||
activation-nix-channel = runTest ./activation/nix-channel.nix;
|
activation-nix-channel = runTest ./activation/nix-channel.nix;
|
||||||
activation-etc-overlay-mutable = runTest ./activation/etc-overlay-mutable.nix;
|
activation-etc-overlay-mutable = runTest ./activation/etc-overlay-mutable.nix;
|
||||||
activation-etc-overlay-immutable = runTest ./activation/etc-overlay-immutable.nix;
|
activation-etc-overlay-immutable = runTest ./activation/etc-overlay-immutable.nix;
|
||||||
|
activation-perlless = runTest ./activation/perlless.nix;
|
||||||
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
|
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
|
||||||
etcd-cluster = handleTestOn ["x86_64-linux"] ./etcd-cluster.nix {};
|
etcd-cluster = handleTestOn ["x86_64-linux"] ./etcd-cluster.nix {};
|
||||||
etebase-server = handleTest ./etebase-server.nix {};
|
etebase-server = handleTest ./etebase-server.nix {};
|
||||||
|
Loading…
Reference in New Issue
Block a user