Nixos-rebuild switch : warning: In file /etc/nixos/configuration.nix

I was about to upgrade my system and I get the following information which I should correct before:

building Nix...
building the system configuration...
trace: warning: In file /etc/nixos/configuration.nix
a list is being assigned to the option config.fileSystems.
This will soon be an error as type loaOf is deprecated.
See https://github.com/NixOS/nixpkgs/pull/63103 for more information.
Do
  fileSystems =
    { /home/bavramor/media = {...}; /home/bavramor/data = {...}; }
instead of
  fileSystems =
    [ { mountPoint = "/home/bavramor/media"; ...} { mountPoint = "/home/bavramor/data"; ...} ]

error: The option value `services.httpd.virtualHosts' in `/etc/nixos/configuration.nix' is not of type `attribute set of submodules'.
(use '--show-trace' to show detailed location information)

I am trying to upgrade from an older version 19.09 to the current version 20.09. Is it better to do an intermediate step or can I upgrade directly to version 20.09?

Can someone help me with the comments. My configuration.nix looks like this:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];
  
  nixpkgs.config.allowUnfree = true;
  # Use the systemd-boot EFI boot loader.
  #boot.loader.systemd-boot.enable = true;
  #boot.loader.efi.canTouchEfiVariables = true;
  #grub boot.loader.efi.efiSysMountPoint = "/boot/efi";
  boot.loader.grub.useOSProber = true;
  #boot.loader.grub.forceInstall = false; # RISKY!

  boot.loader.grub.enable                = true;
  boot.loader.grub.copyKernels           = true;
  boot.loader.grub.efiInstallAsRemovable = true;
  boot.loader.grub.efiSupport            = true;
  boot.loader.grub.fsIdentifier          = "label";
  #boot.loader.grub.splashImage           = ./backgrounds/grub-nixos-3.png;
  boot.loader.grub.splashMode            = "stretch";

  boot.loader.grub.devices               = [ "nodev" ];
  networking.hostName = "thorinshalle"; # Define your hostname.
  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  # Per-interface useDHCP will be mandatory in the future, so this generated config
  # replicates the default behaviour.
  networking.useDHCP = false;
  networking.interfaces.enp37s0.useDHCP = true;

  # Configure network proxy if necessary
  # networking.proxy.default = "http://user:password@proxy:port/";
  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

  # Select internationalisation properties.
  i18n = {
    consoleFont = "Lat2-Terminus16";
    consoleKeyMap = "de";
    defaultLocale = "de_DE.UTF-8";
   };

  # Set your time zone.
  time.timeZone = "Europe/Berlin";

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
     wget
     vim 
     google-chrome
     chromium
     vivaldi
     firefox  
     libreoffice-fresh
     filezilla
     gparted
     gimp
     inkscape
     scribus
     guake 
     clementine
     blender
     cmus
     vlc 	   
     git
     hexchat
     discord
     busybox
     pciutils
     deluge
     transmission
     jetbrains.phpstorm
     drush
     pulseeffects
     unrar
     ntfs3g
     brasero
     putty
     xsane
     cups
     signal-desktop
     tdesktop
     empathy
     kid3
     adoptopenjdk-jre-bin
     gnome3.gnome-tweaks
     gnome3.evolution 
     evolution-data-server
     pavucontrol
     alsaTools
     php
     php73Packages-unit.composer
     php73Packages.composer    
     putty
     tor-browser-bundle-bin
     jetbrains.goland
     go_bootstrap
     mediathekview
     qmediathekview
     adobe-reader 
     #numix-gtk-theme
   ];

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  programs.bash.enableCompletion = true;
  programs.mtr.enable = true;
  programs.gnupg.agent = { enable = true; enableSSHSupport = true; };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  services.openssh.enable = true;
  services.teamviewer.enable = true;
  networking.extraHosts =
  ''
    127.0.0.1 drupal
    127.0.0.1 localhost
    127.0.0.1 otrautwein.de
    127.0.0.1 phpinfo
    127.0.0.1 eab-local.de
    127.0.0.1 vtigercrm650.de
    127.0.0.1 vtigercrm-test.de
    127.0.0.1 berlincrm.de
    127.0.0.1 bruch-localhost.de
    127.0.0.1 landwehrcie.de
    127.0.0.1 aygikalocal.de
    127.0.0.1 katharinabaumgarten
  '';
 
  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # networking.firewall.enable = false;

  # Enable CUPS to print documents.
  # services.printing.enable = true;

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;
  
  # Add file system entries for each partition that you want to see mounted
  # at boot time.  You can add filesystems which are not mounted at boot by
  # adding the noauto option.
  fileSystems = [
   # Mount the media and data file system
   
   { mountPoint = "/home/bavramor/media";
       device = "/dev/disk/by-uuid/a2df9759-6a9f-4949-807e-5319b29cb469";
       fsType = "ext4";
    }
    { mountPoint = "/home/bavramor/data";
       device = "/dev/disk/by-uuid/52fc0b59-a497-4d38-881c-418242bbd5bc";
       fsType = "ext4"; 
     }
    ];
  
  # Enable the X11 windowing system.
  services.xserver.enable = true;
  services.xserver.layout = "de";
  services.xserver.xkbOptions = "eurosign:e";
  services.xserver.videoDrivers = [ "amdgpu" ];

  # Enable touchpad support.
  # services.xserver.libinput.enable = true;

  # Enable the KDE Desktop Environment.
  # services.xserver.displayManager.sddm.enable = true;
  # services.xserver.desktopManager.plasma5.enable = true;
  
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome3.enable = true;
  services.gnome3.chrome-gnome-shell.enable = true;
  nixpkgs.config.firefox.enableGnomeExtensions = true;
  nixpkgs.config.oraclejdk.accept_license = true;  
  services.postfix.enable = true;
  services.sshd.enable = true;
  services.mysql.enable = true;
  services.mysql.package = pkgs.mariadb;
  services.longview.mysqlPasswordFile = "/etc/mysql/dbpassword";
  services.mysql.extraOptions = 
  ''
  key_buffer_size = 6G
  table_cache = 1600
  log-error = /var/log/mysql_err.log
  innodb_large_prefix=true
  innodb_file_format=barracuda
  innodb_file_per_table=true
  '';  

# Web server
  services.httpd.adminAddr = "kontakt@robertrese.de";
  services.httpd.enable = true;
  services.httpd.documentRoot = "/home/bavramor/data/Webdesign/Webseiten/";
  services.httpd.enablePHP = true;
  services.httpd.phpPackage = pkgs.php73;
  services.httpd.hostName = "localhost";  
  
  services.httpd.phpOptions =
    ''
      display_errors = On
      display_startup_errors = On
      post_max_size = 200M
      upload_max_filesize = 200M
      max_execution_time = 6000
      max_input_time = 3000
      mbstring.http_input = pass
      mbstring.http_output = pass
      mbstring.internal_encoding = pass 
      memory_limit = 2G;
      allow_url_include = On;
      opcache.enable=1;
      opcache.memory_consumption=128;
      opcache_revalidate_freq = 240;
      opcache.max_accelerated_files=4000;    
      '';
   
   #documentRoot = "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/";
   services.httpd.virtualHosts =
    [ 
	{ 
        serverAliases = ["otrautwein.de"];
        hostName = "otrautwein.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
       	{ 
        serverAliases = ["landwehrcie.de"];
        hostName = "landwehrcie.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/landwehrcie/web";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/landwehrcie/web">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
        { 
        serverAliases = ["eab-local.de"];
        hostName = "eab-local.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/eab-berlin.eu/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/eab-berlin.eu/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
        { 
        serverAliases = ["aygikalocal.de"];
        hostName = "aygikalocal.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/aygika/web/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/aygika/web//">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
        { 
        serverAliases = ["katharinabaumgarten"];
        hostName = "katharinabaumgarten";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/katharina-baumgarten-commit/web";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/katharina-baumgarten-commit/web">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
 	{ 
        serverAliases = ["vtigercrm-test.de"];
        hostName = "vtigercrm-test.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/vtigercrm-test/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/vtigercrm-test/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
 	{ 
        serverAliases = ["berlincrm.de"];
        hostName = "berlincrm.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/berlincrm-master/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/berlincrm-master/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        '';
	} 
	{ 
        serverAliases = ["bruch-localhost.de"];
        hostName = "bruch-localhost.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/bruch-nach-hack-042017/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/bruch-nach-hack-042017/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
	{ 
        serverAliases = ["vtigercrm650.de"];
        hostName = "vtigercrm650.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/vtigercrm6.5.0/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/vtigercrm6.5.0/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
 	
	{ 
        serverAliases = ["localhost"];
        hostName = "localhost";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten";
        enableUserDir = true;
        }
	{ 
        serverAliases = ["phpinfo"];
        hostName = "phpinfo";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/phpinfo";
        enableUserDir = true;
        }
        { 
        serverAliases = ["drupal"];
        hostName = "drupal";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/drupal-7.34";
        enableUserDir = true; 
        } 
    ];

  # Define a user account. Don't forget to set a password with ‘passwd’.
  # users.users.jane = {
  #   isNormalUser = true;
  #   extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  # };
  users.extraUsers.bavramor = {
	isNormalUser = true;
        extraGroups = [ "wheel" "networkmanager" "tty" "messagebus" "postfix" "postdrop" "audio" "disk" "uucp" "lp" "video" "wwwrun" "adm" "lightdm" "mysql"];
	home = "/home/bavramor";
	};
  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "19.09"; # Did you read the comment?

}

Thnx B4VR4M0R

it’s mentioned here.

Clever says it’s changed from list to and atrribute set.

It’s mentioned in the release notes here.

The services.httpd.virtualHosts.<name> option has changed type from a list of submodules to an attribute set of submodules, better matching services.nginx.virtualHosts.<name>.

Thank you. But what does that mean exactly. I can read the error message, but I am new to NixOS.

The services.httpd.virtualHosts.<name> option has changed type from a list of submodules to an attribute set of submodules, better matching services.nginx.virtualHosts.<name>.

An example would help me perhaps. What do I have to change.

Thanks

Hi. I’ve taken a quick look over your configuration and have the following remarks/recommendations for your upgrade:

Update your environment.systemPackages to according to php changes, from:

  environment.systemPackages = with pkgs; [
    php
    php73Packages-unit.composer
    php73Packages.composer
  ];

to:

  environment.systemPackages = with pkgs; [
    php73
    php73.packages.unit-composer # I'm not sure about this one...
    php73.packages.composer
  ];

Update your fileSystems from:

  # Add file system entries for each partition that you want to see mounted
  # at boot time.  You can add filesystems which are not mounted at boot by
  # adding the noauto option.
  fileSystems = [
   # Mount the media and data file system
   
   { mountPoint = "/home/bavramor/media";
       device = "/dev/disk/by-uuid/a2df9759-6a9f-4949-807e-5319b29cb469";
       fsType = "ext4";
    }
    { mountPoint = "/home/bavramor/data";
       device = "/dev/disk/by-uuid/52fc0b59-a497-4d38-881c-418242bbd5bc";
       fsType = "ext4"; 
     }
    ];

to:

  fileSystems."/home/bavramor/media" = {
    device = "/dev/disk/by-uuid/a2df9759-6a9f-4949-807e-5319b29cb469";
    fsType = "ext4";
  };
  
  fileSystems."/home/bavramor/data";
    device = "/dev/disk/by-uuid/52fc0b59-a497-4d38-881c-418242bbd5bc";
    fsType = "ext4"; 
  };

Utilize the new services.mysql.settings option, from:

  services.mysql.extraOptions = 
  ''
  key_buffer_size = 6G
  table_cache = 1600
  log-error = /var/log/mysql_err.log
  innodb_large_prefix=true
  innodb_file_format=barracuda
  innodb_file_per_table=true
  '';

to:

  services.mysql.settings = {
    key_buffer_size = "6G";
    table_cache = 1600;
    log-error = "/var/log/mysql_err.log";
    innodb_large_prefix = true;
    innodb_file_format = "barracuda";
    innodb_file_per_table = true;
  };

Additionally, make sure you run mysql_upgrade after updating to NixOS 20.09!

Update your httpd configuration, from:

  services.httpd.adminAddr = "kontakt@robertrese.de";
  services.httpd.enable = true;
  services.httpd.documentRoot = "/home/bavramor/data/Webdesign/Webseiten/";
  services.httpd.enablePHP = true;
  services.httpd.phpPackage = pkgs.php73;
  services.httpd.hostName = "localhost";  
  
  services.httpd.phpOptions =
    ''
      display_errors = On
      display_startup_errors = On
      post_max_size = 200M
      upload_max_filesize = 200M
      max_execution_time = 6000
      max_input_time = 3000
      mbstring.http_input = pass
      mbstring.http_output = pass
      mbstring.internal_encoding = pass 
      memory_limit = 2G;
      allow_url_include = On;
      opcache.enable=1;
      opcache.memory_consumption=128;
      opcache_revalidate_freq = 240;
      opcache.max_accelerated_files=4000;    
      '';
   
   #documentRoot = "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/";
   services.httpd.virtualHosts =
    [ 
	{ 
        serverAliases = ["otrautwein.de"];
        hostName = "otrautwein.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
       	{ 
        serverAliases = ["landwehrcie.de"];
        hostName = "landwehrcie.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/landwehrcie/web";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/landwehrcie/web">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
        { 
        serverAliases = ["eab-local.de"];
        hostName = "eab-local.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/eab-berlin.eu/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/eab-berlin.eu/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
        { 
        serverAliases = ["aygikalocal.de"];
        hostName = "aygikalocal.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/aygika/web/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/aygika/web//">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
        { 
        serverAliases = ["katharinabaumgarten"];
        hostName = "katharinabaumgarten";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/katharina-baumgarten-commit/web";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/katharina-baumgarten-commit/web">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
 	{ 
        serverAliases = ["vtigercrm-test.de"];
        hostName = "vtigercrm-test.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/vtigercrm-test/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/vtigercrm-test/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
 	{ 
        serverAliases = ["berlincrm.de"];
        hostName = "berlincrm.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/berlincrm-master/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/berlincrm-master/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        '';
	} 
	{ 
        serverAliases = ["bruch-localhost.de"];
        hostName = "bruch-localhost.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/bruch-nach-hack-042017/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/bruch-nach-hack-042017/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
	{ 
        serverAliases = ["vtigercrm650.de"];
        hostName = "vtigercrm650.de";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/vtigercrm6.5.0/";
        #enableUserDir = true;
        extraConfig = 
	''
        <Directory "/home/bavramor/data/Webdesign/Webseiten/vtigercrm6.5.0/">
    	      DirectoryIndex index.php index.htm index.html
      	      Allow from All
              Options FollowSymLinks
              AllowOverride All
       </Directory>
        ''; 
	}
 	
	{ 
        serverAliases = ["localhost"];
        hostName = "localhost";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten";
        enableUserDir = true;
        }
	{ 
        serverAliases = ["phpinfo"];
        hostName = "phpinfo";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/phpinfo";
        enableUserDir = true;
        }
        { 
        serverAliases = ["drupal"];
        hostName = "drupal";
        documentRoot = "/home/bavramor/data/Webdesign/Webseiten/drupal-7.34";
        enableUserDir = true; 
        } 
    ];

to:

  services.httpd.adminAddr = "kontakt@robertrese.de";
  services.httpd.enable = true;
  services.httpd.mpm = "worker";
  services.httpd.enablePHP = true;
  services.httpd.phpPackage = pkgs.php73;  
  services.httpd.phpOptions =
    ''
      display_errors = On
      display_startup_errors = On
      post_max_size = 200M
      upload_max_filesize = 200M
      max_execution_time = 6000
      max_input_time = 3000
      mbstring.http_input = pass
      mbstring.http_output = pass
      mbstring.internal_encoding = pass 
      memory_limit = 2G;
      allow_url_include = On;
      opcache.enable=1;
      opcache.memory_consumption=128;
      opcache_revalidate_freq = 240;
      opcache.max_accelerated_files=4000;    
      '';

  services.httpd.virtualHosts."otrautwein.de" = {
    serverAliases = ["otrautwein.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/oliver-trautwein-ueberarbeitet-2018/">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };

  services.httpd.virtualHosts."landwehrcie.de" = {
    serverAliases = ["landwehrcie.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/landwehrcie/web";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/landwehrcie/web">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };

  services.httpd.virtualHosts."eab-local.de" = {
    serverAliases = ["eab-local.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/eab-berlin.eu/";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/eab-berlin.eu/">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };

  services.httpd.virtualHosts."aygikalocal.de" = {
    serverAliases = ["aygikalocal.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/aygika/web/";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/aygika/web//">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };

  services.httpd.virtualHosts."katharinabaumgarten" = {
    serverAliases = ["katharinabaumgarten"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/katharina-baumgarten-commit/web";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/katharina-baumgarten-commit/web">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };

  services.httpd.virtualHosts."vtigercrm-test.de" = {
    serverAliases = ["vtigercrm-test.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/vtigercrm-test/";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/vtigercrm-test/">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };

  services.httpd.virtualHosts."berlincrm.de" = { 
    serverAliases = ["berlincrm.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/berlincrm-master/";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/berlincrm-master/">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    '';
  };
  
  services.httpd.virtualHosts."bruch-localhost.de" = { 
    serverAliases = ["bruch-localhost.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/bruch-nach-hack-042017/";
    extraConfig =
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/bruch-nach-hack-042017/">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };

  services.httpd.virtualHosts."vtigercrm650.de" = { 
    serverAliases = ["vtigercrm650.de"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/vtigercrm6.5.0/";
    extraConfig = 
    ''
      <Directory "/home/bavramor/data/Webdesign/Webseiten/vtigercrm6.5.0/">
        DirectoryIndex index.php index.htm index.html
        Allow from All
        Options FollowSymLinks
        AllowOverride All
      </Directory>
    ''; 
  };
 	
  services.httpd.virtualHosts."localhost" = { 
    serverAliases = ["localhost"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten";
    enableUserDir = true;
  };

  services.httpd.virtualHosts."phpinfo" = { 
    serverAliases = ["phpinfo"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/phpinfo";
    enableUserDir = true;
  };

  services.httpd.virtualHosts."drupal" = { 
    serverAliases = ["drupal"];
    documentRoot = "/home/bavramor/data/Webdesign/Webseiten/drupal-7.34";
    enableUserDir = true; 
  };

Make special note that I set services.httpd.mpm = "worker";, which will keep compatibility with the mod_php your system is set to use.

I didn’t test any of this, so please let me know if there are any mistakes here which cause you problems.

2 Likes

Thanks you so much for this. You saved my day again. Now I also know how the error message is meant. I will try it tomorrow and then I will give a feedback.

Thanks

The part with the MySQL settings does not work for me:

services.mysql.settings = {
    key_buffer_size = "6G";
    table_cache = 1600;
    log-error = "/var/log/mysql_err.log";
    innodb_large_prefix = true;
    innodb_file_format = "barracuda";
    innodb_file_per_table = true;
  };
The option value `services.mysql.settings' in `/etc/nixos/configuration.nix' is not of type `attribute set of attribute set of boolean or signed integer or string or list of stringsss'.

Can yout help me again?

and composer 2 cannot be installed either:

environment.systemPackages = with pkgs; [
     .
     .
     php73
     php73Packages.composer2
     .
     .
   ];

attribute ‘composer2’ missing, at /etc/nixos/configuration.nix:100:6

And there are some new packages he should have installed with, he has not yet installed. What have I done wrong? Phpstorm is not yet in the version

[root@thorinshalle:/home/bavramor/data/Webdesign/Webseiten/aygika]# nix-channel --list
nixos https://nixos.org/channels/nixos-20.09
nixpkgs https://nixos.org/channels/nixpkgs-unstable

Is it possible that a simple “nix-channel --update” was missing? Now it seems to update all packages.

My apologies, I meant

services.mysql.settings.mysqld = {
    key_buffer_size = "6G";
    table_cache = 1600;
    log-error = "/var/log/mysql_err.log";
    innodb_large_prefix = true;
    innodb_file_format = "barracuda";
    innodb_file_per_table = true;
  };

With NixOS 20.09 and above you are better off to reference composer (or composer2) by php73.packages.composer (or php73.packages.composer2).

Great! Let me know if you have resolved all your issues or not.

1 Like

Thanks a lot, now really everything is running again with updates to 20.09.

:pray: