Initial commit
This commit is contained in:
		
						commit
						69a1c04621
					
				
					 2 changed files with 69 additions and 0 deletions
				
			
		
							
								
								
									
										47
									
								
								etc/nixos/configuration.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								etc/nixos/configuration.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,47 @@
 | 
			
		|||
{ config, pkgs, ... };
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./hardware-configuration.nix
 | 
			
		||||
    ./linode.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  networking = {
 | 
			
		||||
    hostName = "tlater.net";
 | 
			
		||||
 | 
			
		||||
    # useDHCP is deprecated
 | 
			
		||||
    useDHCP = false;
 | 
			
		||||
    # interfaces.enp0s31f6.useDHCP = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  time.timeZone = "Europe/London";
 | 
			
		||||
 | 
			
		||||
  users.users = {
 | 
			
		||||
    tlater = {
 | 
			
		||||
      isNormalUser = true;
 | 
			
		||||
      extraGroups = [ "wheel" "docker" ];
 | 
			
		||||
      openssh.authorizedKeys.keys = [];
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    lauren = {
 | 
			
		||||
      isNormalUser = true;
 | 
			
		||||
      openssh.authorizedKeys.keys = [];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  environment.systemPackages = with pkgs; [
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  services = {
 | 
			
		||||
    openssh = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      allowSFTP = false;
 | 
			
		||||
      passwordAuthentication = false;
 | 
			
		||||
      permitRootLogin = "no";
 | 
			
		||||
      ports = [ 2222 ];
 | 
			
		||||
      startWhenNeeded = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  system.stateVersion = "19.09";
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										22
									
								
								etc/nixos/linode.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								etc/nixos/linode.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
{ config, lib, pkgs, ... };
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  # Required for the lish console
 | 
			
		||||
  boot = {
 | 
			
		||||
    kernelParams = [ "console=ttyS0,19200n8" ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  boot.loader = {
 | 
			
		||||
    # Timeout to allow lish to connect
 | 
			
		||||
    timeout = 10;
 | 
			
		||||
 | 
			
		||||
    grub = {
 | 
			
		||||
      device = "nodev";
 | 
			
		||||
      extraConfig = ''
 | 
			
		||||
        serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
 | 
			
		||||
        terminal_input serial;
 | 
			
		||||
        terminal_output serial;
 | 
			
		||||
      '';
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue