From c31fb8b184df21662f6cae2dfe3e07167a32a799 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 3 Oct 2019 17:56:17 +0200 Subject: nixos conf examples, how to override them and embedded usecase --- res/cross-build-1.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 res/cross-build-1.nix (limited to 'res/cross-build-1.nix') diff --git a/res/cross-build-1.nix b/res/cross-build-1.nix new file mode 100644 index 0000000..0598129 --- /dev/null +++ b/res/cross-build-1.nix @@ -0,0 +1,44 @@ +{ nixpkgs ? import , ... }: + +let + pkgs = nixpkgs { + config = { }; + # https://github.com/NixOS/nixpkgs/blob/master/lib/systems/examples.nix + crossSystem = { + config = "armv7l-unknown-linux-gnueabihf"; + }; + #overlays = [ (import ./overlay.nix) ]; + }; + + config = { ... }: + { + environment.noXlibs = true; + documentation.enable = false; + + # btrfs-progs fails to build + services.udisks2.enable = false; + + fonts.fontconfig.enable = false; + + nixpkgs.overlays = with pkgs.lib; singleton (const (super: { + polkit = super.polkit.override { withGnome = false; }; + + # pkcs11 needs opensc which depends on libXt? which fails to build and is X library + rng-tools = super.rng-tools.override { withPkcs11 = false; }; + + nix = super.nix.override { withAWS = false; }; + })); + + fileSystems."/".fsType = "tmpfs"; + + boot = { + loader.grub.enable = false; + enableContainers = false; + hardwareScan = false; + }; + + powerManagement.enable = false; + }; + +in + pkgs.nixos config -- cgit v1.2.3