feat: Move deploy nodes to a different file

This commit is contained in:
uttarayan21
2025-01-03 00:50:58 +05:30
parent 9c1656ce19
commit d41168c1be
2 changed files with 49 additions and 82 deletions

View File

@@ -1,38 +1,48 @@
# {
# devices,
# inputs,
# deploy-rs,
# }: {
# mkNode = {
# device,
# target,
# config,
# }: {
# hostname = device.name;
# profiles.system = {
# user = device.user;
# path = deploy-rs.lib.${device.system}.activate.${target} config;
# };
# };
# nodes-x86_64-linux = builtins.map (device:
# mkNode {
# device = device;
# target = "nixos";
# config = self.nixosConfigurations.${device.name};
# })
# nixos_devices;
# nodes-aarch64-darwin = builtins.map (device:
# mkNode {
# device = device;
# target = "darwin";
# config = self.darwinConfigurations.${device.name};
# });
# deploy = {
# nodes = nodes-x86_64-linux ++ nodes-aarch64-darwin;
# };
#
# # checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
# # checks = {
# # x86_64-linux = deploy-rs.lib.x86_64-linux.deployChecks self.deploy;
# # };
# }
{
inputs,
self,
...
}: {
nodes = {
mirai = {
hostname = "mirai";
profiles.system = {
sshUser = "fs0c131y";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mirai;
user = "root";
};
};
ryu = {
hostname = "ryu";
profiles.system = {
sshUser = "servius";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.ryu;
user = "root";
};
};
kuro = {
hostname = "kuro";
profiles.system = {
sshUser = "fs0c131y";
path = inputs.deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.kuro;
user = "root";
};
};
deoxys = {
hostname = "deoxys";
profiles.system = {
sshUser = "servius";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.deoxys;
user = "root";
};
};
deck = {
hostname = "deck";
profiles.system = {
sshUser = "deck";
path = inputs.deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurations.deck;
user = "deck";
};
};
};
}

View File

@@ -273,50 +273,7 @@
};
};
deploy = {
nodes = {
mirai = {
hostname = "mirai";
profiles.system = {
sshUser = "fs0c131y";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mirai;
user = "root";
};
};
ryu = {
hostname = "ryu";
profiles.system = {
sshUser = "servius";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.ryu;
user = "root";
};
};
kuro = {
hostname = "kuro";
profiles.system = {
sshUser = "fs0c131y";
path = inputs.deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.kuro;
user = "root";
};
};
deoxys = {
hostname = "deoxys";
profiles.system = {
sshUser = "servius";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.deoxys;
user = "root";
};
};
deck = {
hostname = "deck";
profiles.system = {
sshUser = "deck";
path = inputs.deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurations.deck;
user = "deck";
};
};
};
};
deploy = import ./deploy.nix {inherit inputs self;};
}
// flake-utils.lib.eachDefaultSystem (
system: let