git.delta.rocks / fleet / refs/commits / 6a5196a1ce6c

difftreelog

feat crosscompilation support

Yaroslav Bolyukin2021-12-20parent: #41ecf40.patch.diff

2 files changed

modifiedflake.nixdiffbeforeafterboth
7 flake-utils.url = "github:numtide/flake-utils";7 flake-utils.url = "github:numtide/flake-utils";
8 };8 };
9 outputs = { self, rust-overlay, flake-utils, nixpkgs }: with nixpkgs.lib; rec {9 outputs = { self, rust-overlay, flake-utils, nixpkgs }: with nixpkgs.lib; rec {
10 lib = import ./lib;10 lib = import ./lib { inherit flake-utils; };
11 } // flake-utils.lib.eachDefaultSystem (system:11 } // flake-utils.lib.eachDefaultSystem (system:
12 let12 let
13 pkgs = import nixpkgs13 pkgs = import nixpkgs
modifiedlib/default.nixdiffbeforeafterboth
1{1{ flake-utils }: {
2 fleetConfiguration = { data, nixpkgs, hosts, ... }@allConfig:2 fleetConfiguration = { data, nixpkgs, hosts, ... }@allConfig:
3 let3 let
4 config = builtins.removeAttrs allConfig [ "nixpkgs" "data" ];4 config = builtins.removeAttrs allConfig [ "nixpkgs" "data" ];
5 in5 in
6 rec {6 flake-utils.lib.eachDefaultSystem (system: rec {
7 root = nixpkgs.lib.evalModules {7 root = nixpkgs.lib.evalModules {
8 modules = (import ../modules/fleet/_modules.nix) ++ [ config data ];8 modules = (import ../modules/fleet/_modules.nix) ++ [ config data ];
9 specialArgs = {9 specialArgs = {
25 modules = configuredHosts.${name}.modules ++ (25 modules = configuredHosts.${name}.modules ++ (
26 if configuredHosts.${name}.system == "aarch64-linux" then [ (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") ]26 if configuredHosts.${name}.system == "aarch64-linux" then [ (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") ]
27 else [ ]27 else [ ]
28 );28 ) ++ [
29 ({ ... }: {
30 nixpkgs.localSystem.system = system;
31 nixpkgs.crossSystem = if system == configuredHosts.${name}.system then null else {
32 system = configuredHosts.${name}.system;
33 };
34 })
35 ];
29 };36 };
30 }37 }
31 )38 )
32 (builtins.attrNames root.config.hosts)39 (builtins.attrNames root.config.hosts)
33 ); #nixpkgs.lib.nixosSystem {}40 ); #nixpkgs.lib.nixosSystem {}
34 };41 });
35}42}
3643