c1 config that passes nix flake check
This commit is contained in:
36
flake.nix
Normal file
36
flake.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
description = "Alo cluster";
|
||||
|
||||
inputs = {
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, deploy-rs, ... }@inputs:
|
||||
let
|
||||
mkNixos = hostname: modules: nixpkgs.lib.nixosSystem {
|
||||
inherit modules;
|
||||
specialArgs = { inherit inputs hostname; };
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
c1 = mkNixos "c1" [ ./c1.nix ];
|
||||
};
|
||||
|
||||
deploy = {
|
||||
nodes = {
|
||||
c1 = {
|
||||
hostname = "c1";
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.c1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user