home-manager/suites: make use of nixosConfig instead of osConfig

This commit is contained in:
Gabriel Arazas 2024-01-22 14:50:00 +08:00
parent 9b7cc8a850
commit fb6c1ad004
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ in
enable = lib.mkEnableOption "installations of audio-related apps"; enable = lib.mkEnableOption "installations of audio-related apps";
pipewire.enable = lib.mkOption { pipewire.enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = attrs ? osConfig && lib.attrByPath [ "services" "pipewire" "enable" ] false attrs.osConfig; default = attrs ? nixosConfig && lib.attrByPath [ "services" "pipewire" "enable" ] false attrs.nixosConfig;
description = '' description = ''
Enable whether to install Pipewire-related applications. Enable whether to install Pipewire-related applications.
@ -43,7 +43,7 @@ in
] ]
++ ( ++ (
let let
hasBlenderNixOSModule = attrs ? osConfig && lib.attrByPath [ "programs" "blender" "enable" ] false attrs.osConfig; hasBlenderNixOSModule = attrs ? nixosConfig && lib.attrByPath [ "programs" "blender" "enable" ] false attrs.nixosConfig;
in in
lib.optional (!hasBlenderNixOSModule) pkgs.blender lib.optional (!hasBlenderNixOSModule) pkgs.blender
); );
@ -61,7 +61,7 @@ in
] ]
++ ( ++ (
let let
hasWineProfile = attrs ? osConfig && lib.attrByPath [ "profiles" "desktop" "wine" "enable" ] false attrs.osConfig; hasWineProfile = attrs ? nixosConfig && lib.attrByPath [ "profiles" "desktop" "wine" "enable" ] false attrs.nixosConfig;
in in
lib.optionals hasWineProfile (with pkgs; [ lib.optionals hasWineProfile (with pkgs; [
yabridge # Building bridges to Windows and Linux audio tools. yabridge # Building bridges to Windows and Linux audio tools.
@ -77,7 +77,7 @@ in
enable = true; enable = true;
soundService = soundService =
let let
hasNixOSPipewirePulseEnabled = attrs ? osConfig && lib.attrByPath [ "services" "pipewire" "pulse" "enable" ] false attrs.osConfig; hasNixOSPipewirePulseEnabled = attrs ? nixosConfig && lib.attrByPath [ "services" "pipewire" "pulse" "enable" ] false attrs.nixosConfig;
in in
lib.mkIf hasNixOSPipewirePulseEnabled "pipewire-pulse"; lib.mkIf hasNixOSPipewirePulseEnabled "pipewire-pulse";
}; };

View File

@ -87,7 +87,7 @@ in {
# most likely using Nix anyways. # most likely using Nix anyways.
programs.nix-index.enable = programs.nix-index.enable =
let let
hasNixOSModuleEnabled = attrs ? osConfig && lib.attrByPath [ "programs" "nix-index" "enable" ] false attrs.osConfig; hasNixOSModuleEnabled = attrs ? nixosConfig && lib.attrByPath [ "programs" "nix-index" "enable" ] false attrs.nixosConfig;
in in
!hasNixOSModuleEnabled; !hasNixOSModuleEnabled;
}) })