minify: put nix in systemPackages

This commit is contained in:
Artemis Tosini 2023-12-09 18:54:49 +00:00
parent 00d6f00dbd
commit 145cf2460c
Signed by: artemist
GPG key ID: EE5227935FE3FF18

View file

@ -21,21 +21,26 @@
(name: value: lib.nameValuePair "${name}-sdimage" (makeImage value))
self.nixosConfigurations;
})) // {
nixosModules.minify = { ... }: {
nixosModules.minify = { config, ... }: {
disabledModules = [ "profiles/base.nix" "profiles/all-hardware.nix" ];
config = {
boot.bcache.enable = false;
boot.initrd.includeDefaultModules = false;
environment.defaultPackages = [ ];
fonts.fontconfig.enable = false;
networking.firewall.enable = false;
nix.enable = false;
programs.nano.enable = false;
services.lvm.enable = false;
# Disable nix daemon, but sdImage uses nix-env so it's in the closure anyway
# Link it in for convenience
nix.enable = false;
environment.systemPackages = [ config.nix.package.out ];
# Disable a few default packages, like rsync, but not core stuff, like coreutils
# We could theoretically disable system-path.nix so we don't have
# requiredPackages, but that seems like a lot of work.
# At that point I should just use buildroot...
environment.defaultPackages = [ ];
# Leave networking.useDHCP = true since we would reenable it anyway