diff options
Diffstat (limited to 'krops.nix')
-rw-r--r-- | krops.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/krops.nix b/krops.nix new file mode 100644 index 0000000..2cf401c --- /dev/null +++ b/krops.nix @@ -0,0 +1,55 @@ +let + inherit (import <fysiweb>) lib pkgs; +in + +rec { + source = system-name: pkgs.krops.lib.evalSource [ + { + fysiweb.file = { + path = toString <fysiweb>; + filters = [ + { type = "exclude"; pattern = "/.git"; } + ] + ++ + map + (pattern: { type = "exclude"; inherit pattern; }) + (lib.filter + (lib.hasPrefix "/") + (lib.splitString "\n" + (builtins.readFile <fysiweb/.gitignore>))) + ; + }; + overlay.file = { + path = toString ./.; + filters = [ + { type = "exclude"; pattern = "/.git"; } + ] + ++ + map + (pattern: { type = "exclude"; inherit pattern; }) + (lib.filter + (lib.hasPrefix "/") + (lib.splitString "\n" + (builtins.readFile ./.gitignore))) + ; + }; + nixos-config.symlink = "overlay/systems/${system-name}/configuration.nix"; + nixpkgs.git = { + url = "https://github.com/NixOS/nixpkgs"; + ref = (lib.importJSON <fysiweb/nixpkgs.json>).rev; + shallow = true; + }; + system-secrets = + let + path = ./secrets/per-system + "/${system-name}"; + in + if builtins.pathExists path then + { + pass.dir = toString path; + pass.name = "."; + } + else + { file = "/var/empty"; }; + } + ]; +} |