Compare commits
3 commits
58f563522f
...
ff53ca768d
Author | SHA1 | Date | |
---|---|---|---|
Artemis Tosini | ff53ca768d | ||
Artemis Tosini | 145cf2460c | ||
Artemis Tosini | 00d6f00dbd |
20
flake.nix
20
flake.nix
|
@ -14,28 +14,33 @@
|
|||
makeImage = conf:
|
||||
(conf.extendModules {
|
||||
modules = [{ config.nixpkgs.buildPlatform.system = system; }];
|
||||
}).config.system.build.sdImage;
|
||||
}).config.system.build;
|
||||
in {
|
||||
formatter = pkgs.nixfmt;
|
||||
packages = lib.mapAttrs'
|
||||
(name: value: lib.nameValuePair "${name}-sdimage" (makeImage value))
|
||||
(name: value: lib.nameValuePair "${name}" (makeImage value))
|
||||
self.nixosConfigurations;
|
||||
})) // {
|
||||
nixosModules.minify = { ... }: {
|
||||
disabledModules = [ "profiles/base.nix" ];
|
||||
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
|
||||
|
||||
|
@ -83,6 +88,9 @@
|
|||
self.nixosModules.rpiSht3x
|
||||
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
|
||||
({ pkgs, ... }: {
|
||||
boot.initrd.availableKernelModules = [ "mmc_block" ];
|
||||
sdImage.compressImage = false;
|
||||
|
||||
nixpkgs.hostPlatform = lib.systems.examples.raspberryPi;
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
|
|
Reference in a new issue