mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-19 16:49:04 +05:30
feat(hosts): add deploy-rs nodes and checks
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
self,
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
config,
|
config,
|
||||||
@@ -66,17 +67,61 @@ let
|
|||||||
config.flake.modules.nixOnDroid.${hostName}
|
config.flake.modules.nixOnDroid.${hostName}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
|
||||||
{
|
mkNixOSNode = hostname: {
|
||||||
flake.nixosConfigurations = builtins.mapAttrs mkHost {
|
inherit hostname;
|
||||||
alpha = { };
|
profiles.system = {
|
||||||
arcturus = { };
|
user = "root";
|
||||||
canopus = { };
|
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname};
|
||||||
sirius = { };
|
};
|
||||||
vps = { };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.nixOnDroidConfigurations = builtins.mapAttrs mkDroidHost {
|
activateNixOnDroid =
|
||||||
vega = { };
|
configuration:
|
||||||
|
inputs.deploy-rs.lib.aarch64-linux.activate.custom configuration.activationPackage "${configuration.activationPackage}/activate";
|
||||||
|
|
||||||
|
mkDroidNode = hostname: {
|
||||||
|
inherit hostname;
|
||||||
|
profiles.system = {
|
||||||
|
sshUser = "nix-on-droid";
|
||||||
|
user = "nix-on-droid";
|
||||||
|
magicRollback = true;
|
||||||
|
sshOpts = [
|
||||||
|
"-p"
|
||||||
|
"8033"
|
||||||
|
];
|
||||||
|
path = activateNixOnDroid self.nixOnDroidConfigurations.${hostname};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake = {
|
||||||
|
nixosConfigurations = builtins.mapAttrs mkHost {
|
||||||
|
sirius = { };
|
||||||
|
canopus = { };
|
||||||
|
arcturus = { };
|
||||||
|
alpha = { };
|
||||||
|
vps = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
nixOnDroidConfigurations = builtins.mapAttrs mkDroidHost {
|
||||||
|
vega = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
deploy.nodes = {
|
||||||
|
sirius = mkNixOSNode "sirius";
|
||||||
|
canopus = mkNixOSNode "canopus";
|
||||||
|
arcturus = mkNixOSNode "arcturus";
|
||||||
|
alpha = mkNixOSNode "alpha";
|
||||||
|
vega = mkDroidNode "vega";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
perSystem =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
checks = builtins.mapAttrs (
|
||||||
|
_: config: config.config.system.build.toplevel
|
||||||
|
) self.nixosConfigurations;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
timeout = 1;
|
timeout = 1;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
extra-platforms = [
|
||||||
|
"aarch64-linux"
|
||||||
|
"arm-linux"
|
||||||
|
];
|
||||||
|
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
|
|||||||
Reference in New Issue
Block a user