Use Colmena for deployment
This commit is contained in:
parent
51312397b5
commit
cca6d259a7
9 changed files with 203 additions and 173 deletions
59
flake.nix
59
flake.nix
|
@ -75,24 +75,17 @@
|
|||
formatter = forAllSystems (system: (treefmtEval.${system}.config.build.wrapper));
|
||||
|
||||
nixosConfigurations = nixpkgs.lib.mapAttrs (
|
||||
name: {
|
||||
nixosModule,
|
||||
homeManagerModule,
|
||||
}:
|
||||
name: nixosModule:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
flake = self;
|
||||
inherit inputs system self;
|
||||
};
|
||||
|
||||
modules = [
|
||||
nixosModule
|
||||
./nixos
|
||||
{
|
||||
home-manager.users.pim.imports = [homeManagerModule];
|
||||
}
|
||||
];
|
||||
}
|
||||
) (import ./machines);
|
||||
|
@ -115,5 +108,53 @@
|
|||
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
|
||||
};
|
||||
});
|
||||
|
||||
colmena = {
|
||||
meta = {
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
};
|
||||
|
||||
nodeSpecialArgs = {
|
||||
sue = {};
|
||||
};
|
||||
};
|
||||
|
||||
sue = {
|
||||
name,
|
||||
nodes,
|
||||
...
|
||||
}: {
|
||||
deployment = {
|
||||
allowLocalDeployment = true;
|
||||
targetHost = null;
|
||||
};
|
||||
|
||||
imports = [
|
||||
(import ./machines).sue
|
||||
./nixos
|
||||
];
|
||||
};
|
||||
|
||||
gamepc = {
|
||||
name,
|
||||
nodes,
|
||||
...
|
||||
}: {
|
||||
deployment = {
|
||||
targetHost = "gamepc.lan";
|
||||
targetUser = "root";
|
||||
};
|
||||
|
||||
imports = [
|
||||
(import ./machines).gamepc
|
||||
./nixos
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue