mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
config: improve conditional for checking NixOS module
This is mainly for integrating NixOS modules with home-manager by setting them conditionally if certain options are enabled. This prevents duplicate configurations which often result in conflicts (like the Firefox module that is both available on NixOS and home-manager).
This commit is contained in:
parent
ac3476b839
commit
c35bb4b185
@ -26,7 +26,7 @@ in {
|
||||
ffmpeg-full # Ah yes, everyman's multimedia swiss army knife.
|
||||
imagemagick # Ah yes, everyman's image manipulation tool.
|
||||
gmic # Don't let the gimmicks fool you, it's a magical image framework.
|
||||
] ++ (lib.optional (osConfig ? programs.blender.enable && !osConfig.programs.blender.enable) blender);
|
||||
] ++ (lib.optional (osConfig ? programs.blender.enable -> !osConfig.programs.blender.enable) blender);
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.audio.enable {
|
||||
|
@ -33,7 +33,7 @@
|
||||
};
|
||||
|
||||
# Despite the name, it isn't a browser for furries.
|
||||
programs.firefox = lib.mkIf (osConfig ? programs.firefox.enable && !osConfig.programs.firefox.enable) {
|
||||
programs.firefox = lib.mkIf (osConfig ? programs.firefox.enable -> !osConfig.programs.firefox.enable) {
|
||||
enable = true;
|
||||
|
||||
package = with pkgs; wrapFirefox firefox-unwrapped {
|
||||
|
Loading…
Reference in New Issue
Block a user