aboutsummaryrefslogtreecommitdiffstats
path: root/krops.nix
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-14 05:34:12 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-19 05:19:05 +0100
commit7e88fb2b26ba2c1a3aeaaaa21fe839f1a43bcc8b (patch)
treeab8dfb61657f88fe11215aaaac4d1b3f04775e20 /krops.nix
init
Diffstat (limited to 'krops.nix')
-rw-r--r--krops.nix55
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"; };
+ }
+ ];
+}