default.nix 1.14 KB
Newer Older
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
{ config, lib, pkgs, ... }:

with lib;
let
  cfg=config.environment.argo.provider-tacc;
in
  {
    options.environment.argo.provider-tacc = {
      enable = mkEnableOption "provider_tacc";
    };

    imports = [
      <nixpkgs/nixos/modules/profiles/headless.nix>
      <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
    ];

    config = {
      boot.growPartition=true;
      boot.kernelParams = [ "console=tty1" ];
      #boot.kernelParams = [ "console=ttyS0" ];
      boot.kernelPackages = pkgs.linuxPackages_latest;

      services.nixosManual.enable = false;

      systemd.services = {
         "serial-getty@ttyS0".enable = pkgs.lib.mkForce true;
         "getty@tty1".enable = pkgs.lib.mkForce true;
         "getty@tty1".wantedBy = [ "getty.target" ];
       };

      fileSystems."/" = {
        device = "/dev/disk/by-label/nixos";
        autoResize = true;
      };

      boot.loader.grub.device = "/dev/vda";
      boot.loader.timeout = 0;

      services.openssh = {
        enable = true;
        permitRootLogin = "prohibit-password";
        passwordAuthentication = mkDefault false;
      };

      services.cloud-init.enable = true;
    };
  }