Skip to content

Instantly share code, notes, and snippets.

@yankcrime
Created May 4, 2021 21:04
Show Gist options
  • Select an option

  • Save yankcrime/77a10e436fed5920e1cc6a9b4a5efc19 to your computer and use it in GitHub Desktop.

Select an option

Save yankcrime/77a10e436fed5920e1cc6a9b4a5efc19 to your computer and use it in GitHub Desktop.
NixOS configuration for OpenStack
{ config, lib, pkgs, modulesPath, ... }:
{
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.efiSupport = false;
boot.loader.grub.device = "/dev/vda";
boot.kernelParams = [
"console=ttyS0,115200"
"console=tty1"
];
services.sshd.enable = true;
networking.firewall.enable = false;
users.users.root.password = "nixos";
services.openssh.permitRootLogin = lib.mkDefault "yes";
services.mingetty.autologinUser = lib.mkDefault "root";
}
@yankcrime
Copy link
Author

Built using nixos-generators:

nixos-generate -f openstack -c configuration.nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment