Something went wrong. Try again.
NixOS / Nix-darwin / Home Manager dotfiles for my devices
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647{ inputs, self, ...}:{ flake.wrappers = { nix-init = { imports = [ self.wrapperModules.nix-init-wrapper ];
settings = { inherit (inputs) nixpkgs; }; };
nix-init-wrapper = { config, lib, pkgs, wlib, ... }: { imports = [ wlib.modules.default ];
options.settings = lib.mkOption { type = wlib.types.structuredValueWith { nullable = false; typeName = "TOML"; }; default = { }; };
config = { package = pkgs.nix-init; flags."--config" = config.constructFiles.generatedConfig.path; constructFiles.generatedConfig = { content = builtins.toJSON config.settings; relPath = "${config.binName}-config.toml"; builder = ''${lib.getExe' pkgs.remarshal "json2toml"} "$1" "$2"''; }; }; }; };}