mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-25 06:19:00 +00:00
home-manager/suites: fix conditional for NixOS-enabled parts
This commit is contained in:
parent
5048eae58d
commit
666912d615
@ -3,7 +3,6 @@
|
||||
|
||||
let
|
||||
cfg = config.suites.desktop;
|
||||
nixosCfg = attrs.nixosConfig;
|
||||
in
|
||||
{
|
||||
options.suites.desktop = {
|
||||
@ -14,7 +13,7 @@ in
|
||||
enable = lib.mkEnableOption "installations of audio-related apps";
|
||||
pipewire.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = nixosCfg.services.pipewire.enable or false;
|
||||
default = attrs.nixosConfig.services.pipewire.enable or false;
|
||||
description = ''
|
||||
Enable whether to install Pipewire-related applications.
|
||||
|
||||
|
@ -93,11 +93,7 @@ in {
|
||||
|
||||
# Echolocation. Since you're using a home-manager configuration, you're
|
||||
# most likely using Nix anyways.
|
||||
programs.nix-index.enable =
|
||||
let
|
||||
hasNixOSModuleEnabled = attrs ? nixosConfig && lib.attrByPath [ "programs" "nix-index" "enable" ] false attrs.nixosConfig;
|
||||
in
|
||||
!hasNixOSModuleEnabled;
|
||||
programs.nix-index.enable = !attrs.nixosConfig.programs.nix-index.enable or false;
|
||||
})
|
||||
|
||||
# Level up your terminal-dwelling skills with these.
|
||||
|
Loading…
Reference in New Issue
Block a user