4C7QF3UWQW2VYVVYXU6OZQLYWDMKHYPXTNJNBTWLU3K7GKQBHZRQC 644AVXYM7Z5WZSQ3CJM7XY6Q4XF32DL2GI72JZKPB7H6DJMJWMDQC HAQKKM7WZURFZ5GPUQZGGL5SUGXUSNB445A4O4YMYNKYSH4EFSOAC IR44XS6SXVQFVZOFSLBKRJ235ZEHYNVBJ5RZKX4BJTQBX4VBCCWQC JU3FNMQQ2AZ4NITYUGSBZPJO645Y5TVL5TEQPNKVW2QXQQDIL6JQC YLW6ZFTIGIC2V6ZUA3I2T7MMPW5BZCOORLB2WSJYNUB3AGWLSEKQC V2RX2Y7VB7Y3BHX3ALK4GTCMFJATMLCKIAT4U3XCYZZZIUBIIZ5QC R3PMYATMF554P6ZCSMOFNEBZECLFBIT53DKHG2KZ2CIIBO5IJPGQC QE55SHCRM4EPX5UKNQMPDSEGR33P3CNUU6IJCEHXRDSFEMG6FETQC ADJBSSJQYK6JNUKKP4AOQWLBIXR2DUMBRWTGXJKZASF6M2BSFYCQC VOADPSMR462VG27DZYFYVJKMKMHNVJIBHPQTDOWYR6H4FJEJYQSAC YVII7NUI5Z6DPUDQZG2ZVJ6QNQRCEUYX5547IYCMPZI7GJ3GDZQAC CTCIAQGFIKAIP7JGXIBYWNGE7A5QMF6U662OV3KZOT4HKIWOSTZQC UBB7TTAXVPQQCOVHACKWXSPV2NPARSHREYJB6J3RSEDZZIXPFGOAC commonModule =
inherit (lib.attrsets) filterAttrs mapAttrsToList;inherit (lib.trivial) const;inherit (lib.types) isType;inherit (lib.strings) concatStringsSep;inherit (lib) mkDefault;registryMap = inputs |> filterAttrs (const <| isType "flake");nixSettingsBase =
inherit (lib.modules) mkIf;inherit (lib.attrsets)filterAttrsremoveAttrsmapAttrsmapAttrsToListoptionalAttrs;inherit (lib.strings) concatStringsSep;inherit (lib.trivial) const flip id;inherit (lib.types) isType;inherit (lib.lists) optionals;inherit (config) isServer isDarwin;registryMap = inputs |> filterAttrs (const <| isType "flake");
inherit (lib.attrsets) mapAttrs;
}// optionalAttrs config.isLinux {dates = "weekly";persistent = true;}// optionalAttrs isServer {# Servers build and upload to S3 cache, so they can be more aggressive with GC.dates = "daily";options = "--delete-older-than 1d";
nix.nixPath =(registryMap|> mapAttrsToList (name: value: "${name}=${value}")|> (if isDarwin then concatStringsSep ":" else id))++ [ "nixpkgs=${inputs.os}" ];
nix.registry = registryMap // { default = inputs.os; } |> mapAttrs (_: flake: { inherit flake; });nix.settings = {extra-substituters = ["https://cache.garnix.io""https://nix-community.cachix.org"];extra-trusted-public-keys = ["cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=""nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];experimental-features = ["cgroups""flakes""nix-command""pipe-operators"];builders-use-substitutes = true;flake-registry = "";http-connections = 0;max-jobs = "auto";use-cgroups = true;show-trace = true;trusted-users = ["root""@wheel""build""gitea-runner"];warn-dirty = false;use-xdg-base-directories = true;};
builders-use-substitutes = true;flake-registry = "";http-connections = 0;max-jobs = "auto";use-cgroups = true;show-trace = true;trusted-users = ["root""@wheel""build""gitea-runner"];warn-dirty = false;use-xdg-base-directories = true;}|> flip removeAttrs (optionals isDarwin ["use-cgroups""cgroups"]);
nix.settings = {use-cgroups = true;experimental-features = [ "cgroups" ];};};
nix.extraOptions = ''min-free = ${toString (2 * 1024 * 1024 * 1024)} # 2Gmax-free = ${toString (1 * 1024 * 1024 * 1024)} # 1G'';};nixSettingsDarwinExtra = {nix.nixPath =(registryMap |> mapAttrsToList (name: value: "${name}=${value}") |> concatStringsSep ":")++ [ "nixpkgs=${inputs.os}" ];};
flake.modules.darwin.nix-settings = {imports = [commonModule];};
flake.modules.nixos.nix-settings-extra-desktop = nixSettingsDesktopExtra;flake.modules.nixos.nix-settings-extra-server = nixSettingsServerExtra;flake.modules.darwin.nix-settings-extra-darwin = nixSettingsDarwinExtra;