From 4bebdc4fe4a502d603e47e8a039f2e7c0e4560e6 Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Thu, 26 Dec 2024 13:24:03 +0300 Subject: [PATCH] format according to nixpkgs standards --- krops.nix | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/krops.nix b/krops.nix index b9c6a05..2adacfe 100644 --- a/krops.nix +++ b/krops.nix @@ -3,25 +3,27 @@ let url = "https://cgit.krebsco.de/krops/"; }; lib = import "${krops}/lib"; - pkgs = import "${krops}/pkgs" {}; - importJson = (import {}).lib.importJSON; + pkgs = import "${krops}/pkgs" { }; + importJson = (import { }).lib.importJSON; - source = name: lib.evalSource [ - { - config.file = toString ./config/${name}; - modules.file = toString ./modules; - nixos-config.symlink = "config/configuration.nix"; - secrets.pass = { - dir = toString ~/.password-store/nixin-password-store/krops; - name = "${name}"; - }; - nixpkgs.git = { - ref = (importJson ./nixpkgs.json).rev; - url = https://github.com/NixOS/nixpkgs; - shallow = true; - }; - } - ]; + source = + name: + lib.evalSource [ + { + config.file = toString ./config/${name}; + modules.file = toString ./modules; + nixos-config.symlink = "config/configuration.nix"; + secrets.pass = { + dir = toString ~/.password-store/nixin-password-store/krops; + name = "${name}"; + }; + nixpkgs.git = { + ref = (importJson ./nixpkgs.json).rev; + url = "https://github.com/NixOS/nixpkgs"; + shallow = true; + }; + } + ]; arachnide = pkgs.krops.writeDeploy "deploy-server-arachnide" { source = source "arachnide"; @@ -89,13 +91,20 @@ let ''; }; -in { +in +{ arachnide = arachnide; framboise = framboise; grille-pain = grille-pain; dromadaire = dromadaire; - all = pkgs.writeScript "deploy-all-servers" - (lib.concatStringsSep "\n" [ arachnide framboise grille-pain dromadaire ]); + all = pkgs.writeScript "deploy-all-servers" ( + lib.concatStringsSep "\n" [ + arachnide + framboise + grille-pain + dromadaire + ] + ); register-runner = register-runner; gen-token-arachnide = gen-token-arachnide; gen-token-framboise = gen-token-framboise;