From 7e88fb2b26ba2c1a3aeaaaa21fe839f1a43bcc8b Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 14 Feb 2024 05:34:12 +0100 Subject: init --- krops.nix | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 krops.nix (limited to 'krops.nix') 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 ) lib pkgs; +in + +rec { + source = system-name: pkgs.krops.lib.evalSource [ + { + fysiweb.file = { + path = toString ; + filters = [ + { type = "exclude"; pattern = "/.git"; } + ] + ++ + map + (pattern: { type = "exclude"; inherit pattern; }) + (lib.filter + (lib.hasPrefix "/") + (lib.splitString "\n" + (builtins.readFile ))) + ; + }; + 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 ).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"; }; + } + ]; +} -- cgit v1.2.3