2021-10-27 19:36:16 +00:00
|
|
|
{
|
|
|
|
description = "My DigitalOcean nodes flake";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/21.05";
|
|
|
|
deploy-rs.url = "github:Serokell/deploy-rs";
|
2021-10-28 20:35:02 +00:00
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
2021-10-27 19:36:16 +00:00
|
|
|
};
|
2021-10-28 20:35:02 +00:00
|
|
|
outputs = { self, nixpkgs, deploy-rs, sops-nix } : {
|
2021-10-27 19:36:16 +00:00
|
|
|
# DigitalOcean node
|
|
|
|
nixosConfigurations."nki-personal" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2021-10-28 20:07:49 +00:00
|
|
|
modules = [
|
|
|
|
../modules/my-tinc
|
2021-10-28 20:35:02 +00:00
|
|
|
sops-nix.nixosModules.sops
|
2021-10-28 20:07:49 +00:00
|
|
|
./configuration.nix
|
|
|
|
];
|
2021-10-27 19:36:16 +00:00
|
|
|
};
|
2021-10-27 23:57:51 +00:00
|
|
|
deploy.nodes."nki-personal" = {
|
|
|
|
hostname = "nki-personal";
|
|
|
|
sshUser = "root";
|
|
|
|
profiles.system = {
|
2021-10-27 19:36:16 +00:00
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."nki-personal";
|
2021-10-27 23:57:51 +00:00
|
|
|
};
|
2021-10-27 19:36:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# This is highly advised, and will prevent many possible mistakes
|
|
|
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
|
|
};
|
|
|
|
}
|