mirror of
https://github.com/nix-community/srvos.git
synced 2024-08-17 01:40:26 +03:00
add digitalocean
This commit is contained in:
parent
8a4c3ea645
commit
e663d1890e
@ -50,6 +50,12 @@ in
|
||||
self.nixosModules.hardware-amazon
|
||||
];
|
||||
};
|
||||
example-hardware-digitalocean-droplet = nixosSystem {
|
||||
modules = [
|
||||
dummy
|
||||
self.nixosModules.hardware-digitalocean-droplet
|
||||
];
|
||||
};
|
||||
example-hardware-hetzner-cloud = nixosSystem {
|
||||
modules = [
|
||||
dummy
|
||||
|
@ -10,6 +10,12 @@ Hardware configuration for <https://aws.amazon.com/ec2> instances.
|
||||
|
||||
The main difference here is that the default userdata service is replaced by cloud-init.
|
||||
|
||||
### `nixosModules.hardware-digitalocean`
|
||||
|
||||
Hardware configuration for <https://www.digitalocean.com/> instances.
|
||||
|
||||
Enables cloud-init but turns of non-working dhcp.
|
||||
|
||||
### `nixosModules.hardware-hetzner-cloud`
|
||||
|
||||
Hardware configuration for <https://www.hetzner.com/cloud> instances.
|
||||
|
@ -39,6 +39,7 @@ exposeModules ./. [
|
||||
./common
|
||||
./desktop
|
||||
./hardware/amazon
|
||||
./hardware/digitalocean/droplet.nix
|
||||
./hardware/hetzner-cloud
|
||||
./hardware/hetzner-cloud/arm.nix
|
||||
./hardware/hetzner-online/amd.nix
|
||||
|
17
nixos/hardware/digitalocean/droplet.nix
Normal file
17
nixos/hardware/digitalocean/droplet.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ modulesPath, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/digital-ocean-config.nix")
|
||||
../../mixins/cloud-init.nix
|
||||
];
|
||||
services.cloud-init.settings.datasource_list = [ "DigitalOcean" ];
|
||||
services.cloud-init.settings.datasource.DigitalOcean = { };
|
||||
networking.useDHCP = lib.mkForce false;
|
||||
|
||||
# we disable mutable users in srvos
|
||||
virtualisation.digitalOcean.setRootPassword = false;
|
||||
# we don't allow to read ssh keys from /root/.ssh/authorized_keys
|
||||
virtualisation.digitalOcean.setSshKeys = false;
|
||||
# This assumes that there is NixOS configuration in /etc/nixos and channels beeing used.
|
||||
virtualisation.digitalOcean.rebuildFromUserData = false;
|
||||
}
|
Loading…
Reference in New Issue
Block a user