reinstate deploy-rs overlay

This commit is contained in:
Chris Dombroski 2024-09-05 19:07:06 -04:00
parent afd6aa4072
commit ed44f28e07

View file

@ -28,30 +28,34 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
}; };
outputs = inputs@{ flake-parts, ... }: outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ self, ... }: { flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, self, ... }: {
imports = [ inputs.devshell.flakeModule ]; imports = [ inputs.devshell.flakeModule ];
systems = [ "x86_64-linux" "aarch64-linux" ]; systems = [ "x86_64-linux" "aarch64-linux" ];
flake = { flake = {
deploy = { deploy = {
sshUser = "root"; sshUser = "root";
fastConnection = true; fastConnection = true;
nodes = { nodes = withSystem "x86_64-linux" ({ pkgs, ... }: {
smolboi = { smolboi = {
hostname = "smolboi"; hostname = "smolboi";
profiles.system.path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos profiles.system.path =
pkgs.deploy-rs.lib.activate.nixos
self.nixosConfigurations.smolboi; self.nixosConfigurations.smolboi;
}; };
zeus = { zeus = {
hostname = "zeus"; hostname = "zeus";
profiles.system.path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos profiles.system.path =
pkgs.deploy-rs.lib.activate.nixos
self.nixosConfigurations.zeus; self.nixosConfigurations.zeus;
}; };
}) // withSystem "aarch64-linux" ({ pkgs, ... }: {
orangepihole = { orangepihole = {
hostname = "orangepihole"; hostname = "orangepihole";
profiles.system.path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos profiles.system.path =
pkgs.deploy-rs.lib.activate.nixos
self.nixosConfigurations.orangepihole; self.nixosConfigurations.orangepihole;
}; };
}; });
}; };
nixosConfigurations = { nixosConfigurations = {
smolboi = inputs.nixpkgs.lib.nixosSystem { smolboi = inputs.nixpkgs.lib.nixosSystem {
@ -105,20 +109,21 @@
}; };
}; };
}; };
perSystem = { pkgs, inputs', system, ... }: { perSystem = { pkgs, system, ... }: {
# _module.args.pkgs = import inputs'.nixpkgs { _module.args.pkgs = import inputs.nixpkgs {
# inherit system; inherit system;
# overlays = [ overlays = [
# inputs.deploy-rs.overlay inputs.deploy-rs.overlay
# (final: prev: { (final: prev: {
# deploy-rs = { deploy-rs = {
# inherit (pkgs) deploy-rs; inherit (inputs.nixpkgs.legacyPackages.${system}) deploy-rs;
# lib = prev.deploy-rs.lib; lib = prev.deploy-rs.lib;
# }; };
# }) })
# ]; ];
# }; config = { };
devshells.default = { packages = with pkgs; [ deploy-rs sops ]; }; };
devshells.default = { packages = with pkgs; [ deploy-rs.deploy-rs sops ]; };
checks = inputs.deploy-rs.lib.${system}.deployChecks self.deploy; checks = inputs.deploy-rs.lib.${system}.deployChecks self.deploy;
formatter = pkgs.nixfmt; formatter = pkgs.nixfmt;
}; };