forked from AnarchoBooleanism/nixos-cloud-init-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenstack-configuration.nix
More file actions
57 lines (49 loc) · 1.1 KB
/
openstack-configuration.nix
File metadata and controls
57 lines (49 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ pkgs, lib, ... }:
{
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "25.11";
services.cloud-init = {
enable = true;
network.enable = true;
settings = {
datasource_list = [
"Ec2"
"ConfigDrive"
];
ssh_pwauth = false;
growpart = {
mode = "auto";
devices = [ "/" ];
};
resize_rootfs = true;
system_info.default_user = {
name = "nixos";
lock_passwd = true;
groups = [ "wheel" ];
sudo = [ "ALL=(ALL) NOPASSWD:ALL" ];
};
};
};
# Avoid legacy EC2 user-data nixos-rebuild behavior; use cloud-init instead
systemd.services.amazon-init.enable = lib.mkForce false;
networking.useDHCP = false;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
};
services.qemuGuest.enable = true;
security.sudo.wheelNeedsPassword = false;
environment.systemPackages = with pkgs; [
cloud-init
qemu-utils
git
nano
vim
];
}