difftreelog
refactor recurse less
in: trunk
5 files changed
lib/default.nixdiffbeforeafterboth1{1{2 fleetConfiguration = { common ? { modules = []; }, hosts, nixpkgs }@args:2 fleetConfiguration = { nixpkgs, hosts, ... }@allConfig:3 let4 config = builtins.removeAttrs allConfig [ "nixpkgs" ];5 in3 rec {6 rec {4 root = nixpkgs.lib.evalModules {7 root = nixpkgs.lib.evalModules {5 modules = [8 modules =9 (import ../modules/modules.nix) ++ [10 config6 (11 (7 { ... }: {12 { ... }: {13 options = { };8 config = {14 config = {9 inherit hosts;10 # Secret data is available only via fleet build-systems15 # Secret data is available only via fleet build-systems11 secrets = if builtins?getEnv then16 secrets =17 if builtins?getEnv then1819 }24 }20 )25 )21 ] ++ common.modules ++ import ../modules/modules.nix {26 ];22 pkgs = nixpkgs;23 lib = nixpkgs.lib;24 };2526 specialArgs = {27 specialArgs = {28 inherit nixpkgs;27 fleet = import ./fleetLib.nix {29 fleet = import ./fleetLib.nix {28 inherit nixpkgs hosts;30 inherit nixpkgs hosts;29 };31 };40 };43 };41 }44 }42 ) (builtins.attrNames hosts)45 )46 (builtins.attrNames root.config.hosts)43 ); #nixpkgs.lib.nixosSystem {}47 ); #nixpkgs.lib.nixosSystem {}44 };48 };45}49}lib/fleetLib.nixdiffbeforeafterbothno syntactic changes
modules/modules.nixdiffbeforeafterboth1{ pkgs2, lib3, check ? true4}:5with lib; [1[6 ./networking/wireguard2 ./networking/wireguard7 ./root.nix3 ./root.nix8]4]modules/networking/wireguard/default.nixdiffbeforeafterboth1{ config, lib, nixpkgs, fleet, ... }: with lib; with fleet; let1{ config, lib, fleet, ... }: with lib; with fleet; let2 cfg = config.networking.wireguard;2 cfg = config.networking.wireguard;3 genWgKey = { owners }: {3 genWgKey = { owners }: {4 inherit owners;4 inherit owners;modules/root.nixdiffbeforeafterboth65 };65 };66 };66 };67 config = {};67 config = {68 secrets =69 if builtins?getEnv then70 let71 stringData = builtins.getEnv "SECRET_DATA";72 in73 if stringData != "" then (builtins.fromJSON stringData) else { }74 else { };75 };68}76}6977