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
|
let
|
||||||
cfg = config.suites.desktop;
|
cfg = config.suites.desktop;
|
||||||
nixosCfg = attrs.nixosConfig;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.suites.desktop = {
|
options.suites.desktop = {
|
||||||
@ -14,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 = nixosCfg.services.pipewire.enable or false;
|
default = attrs.nixosConfig.services.pipewire.enable or false;
|
||||||
description = ''
|
description = ''
|
||||||
Enable whether to install Pipewire-related applications.
|
Enable whether to install Pipewire-related applications.
|
||||||
|
|
||||||
|
@ -93,11 +93,7 @@ in {
|
|||||||
|
|
||||||
# Echolocation. Since you're using a home-manager configuration, you're
|
# Echolocation. Since you're using a home-manager configuration, you're
|
||||||
# most likely using Nix anyways.
|
# most likely using Nix anyways.
|
||||||
programs.nix-index.enable =
|
programs.nix-index.enable = !attrs.nixosConfig.programs.nix-index.enable or false;
|
||||||
let
|
|
||||||
hasNixOSModuleEnabled = attrs ? nixosConfig && lib.attrByPath [ "programs" "nix-index" "enable" ] false attrs.nixosConfig;
|
|
||||||
in
|
|
||||||
!hasNixOSModuleEnabled;
|
|
||||||
})
|
})
|
||||||
|
|
||||||
# Level up your terminal-dwelling skills with these.
|
# Level up your terminal-dwelling skills with these.
|
||||||
|
Loading…
Reference in New Issue
Block a user