Use deploy-rs from nixpkgs, use caddy module from nixos-unstable #17

Merged
b12f merged 2 commits from deploy-rs-from-nixpkgs into main 2023-10-28 13:07:30 +00:00
2 changed files with 13 additions and 1 deletions
Showing only changes of commit 3c9f9c9fc7 - Show all commits

View file

@ -91,6 +91,8 @@
};
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
nixosModules = {
# Common nixos/nix-darwin configuration shared between Linux and macOS.
common = { pkgs, ... }: {

View file

@ -6,6 +6,16 @@
*/
{ lib, inputs }: let
# https://github.com/serokell/deploy-rs#overall-usage
system = "x86_64-linux";
pkgs = import inputs.nixpkgs { inherit system; };
deployPkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.deploy-rs.overlay
(self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; })
];
};
getFqdn = c: let
net = c.config.networking;
fqdn =
@ -53,7 +63,7 @@ in {
hostname = getFqdn c;
profiles.system = {
user = "root";
path = inputs.deploy-rs.lib.${c.pkgs.stdenv.hostPlatform.system}.activate.nixos c;
path = deployPkgs.deploy-rs.lib.activate.nixos c;
};
}
)