Nix module: make package nullable part 2

This commit is contained in:
Mihai Fufezan 2022-07-30 18:14:46 +03:00
parent 3c544e1c31
commit 132b5ba5b6
No known key found for this signature in database
GPG key ID: 5899325F2F120900

View file

@ -33,7 +33,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [cfg.package]; environment.systemPackages = lib.optional (cfg.package != null) cfg.package;
security.polkit.enable = true; security.polkit.enable = true;
hardware.opengl.enable = mkDefault true; hardware.opengl.enable = mkDefault true;
fonts.enableDefaultFonts = mkDefault true; fonts.enableDefaultFonts = mkDefault true;