mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: add overlays, write TOML
This commit is contained in:
6
overlays/overlays.nix
Normal file
6
overlays/overlays.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
self: super:
|
||||
with super.lib;
|
||||
let
|
||||
eval = import <nixpkgs/nixos/lib/eval-config.nix>;
|
||||
paths = (eval {modules = [(import <nixos-config>)];}).config.nixpkgs.overlays;
|
||||
in foldl' (flip extends) (_: super) paths self
|
||||
6
overlays/toml.nix
Normal file
6
overlays/toml.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
(self: super: {
|
||||
writeTOML = object: super.runCommand "writeTOML" {} ''
|
||||
echo '${builtins.toJSON object}' | ${super.remarshal}/bin/json2toml > $out
|
||||
'';
|
||||
toTOML = object: builtins.readFile (self.writeTOML object);
|
||||
})
|
||||
Reference in New Issue
Block a user