diff --git a/flake.nix b/flake.nix index d874936..82f1fc3 100644 --- a/flake.nix +++ b/flake.nix @@ -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