From 73aa0bdcca2b95d1df5ad92d4dc74d6ec4bb5df2 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Mon, 26 May 2025 16:42:46 -0700 Subject: [PATCH] fix: add os checks --- modules/home/programs/fuzzel.nix | 3 ++- modules/home/programs/wlogout/default.nix | 2 +- modules/home/services/swaync.nix | 3 ++- modules/home/shell/gtk.nix | 3 ++- modules/home/shell/qt.nix | 3 ++- modules/home/shell/wayland.nix | 3 ++- modules/home/shell/xorg.nix | 3 ++- modules/home/system/session.nix | 4 +++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/home/programs/fuzzel.nix b/modules/home/programs/fuzzel.nix index 2a4dc88..0b7c940 100644 --- a/modules/home/programs/fuzzel.nix +++ b/modules/home/programs/fuzzel.nix @@ -1,13 +1,14 @@ { lib, config, + pkgs, ... }: let cfg = config.marleyos.programs.fuzzel; in { options.marleyos.programs.fuzzel.enable = lib.mkEnableOption "fuzzel"; - config = lib.mkIf cfg.enable { + config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) { marleycfg.apps.launcher = { inherit (config.programs.fuzzel) package; command = ""; diff --git a/modules/home/programs/wlogout/default.nix b/modules/home/programs/wlogout/default.nix index a301dc8..0151f22 100644 --- a/modules/home/programs/wlogout/default.nix +++ b/modules/home/programs/wlogout/default.nix @@ -8,7 +8,7 @@ in { options.marleyos.programs.wlogout.enable = lib.mkEnableOption "wlogout"; - config = lib.mkIf cfg.enable { + config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) { marleyos.programs.hyprlock.enable = true; programs.wlogout = { diff --git a/modules/home/services/swaync.nix b/modules/home/services/swaync.nix index f6eb972..10fffd5 100644 --- a/modules/home/services/swaync.nix +++ b/modules/home/services/swaync.nix @@ -1,13 +1,14 @@ { config, lib, + pkgs, ... }: let cfg = config.marleyos.services.swaync; in { options.marleyos.services.swaync.enable = lib.mkEnableOption "swaync"; - config = lib.mkIf cfg.enable { + config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) { services.swaync = { enable = true; diff --git a/modules/home/shell/gtk.nix b/modules/home/shell/gtk.nix index dcc29cf..3963c6c 100644 --- a/modules/home/shell/gtk.nix +++ b/modules/home/shell/gtk.nix @@ -1,9 +1,10 @@ { lib, config, + pkgs, ... }: { - config = lib.mkIf config.marleycfg.profiles.desktop { + config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) { home.pointerCursor.gtk.enable = true; gtk = { diff --git a/modules/home/shell/qt.nix b/modules/home/shell/qt.nix index 0c4db9e..4ae5e87 100644 --- a/modules/home/shell/qt.nix +++ b/modules/home/shell/qt.nix @@ -1,9 +1,10 @@ { lib, config, + pkgs, ... }: { - config = lib.mkIf config.marleycfg.profiles.desktop { + config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) { qt = { enable = true; }; diff --git a/modules/home/shell/wayland.nix b/modules/home/shell/wayland.nix index 98104bb..b774c0c 100644 --- a/modules/home/shell/wayland.nix +++ b/modules/home/shell/wayland.nix @@ -1,11 +1,12 @@ { lib, config, + pkgs, ... }: { options.marleyos.shell.wayland.enable = lib.mkEnableOption "wayland"; - config = lib.mkIf config.marleyos.shell.wayland.enable { + config = lib.mkIf (config.marleyos.shell.wayland.enable && pkgs.stdenv.isLinux) { # Fix the "tray.target not found" error. systemd.user.targets.tray = lib.mkIf (!config.xsession.enable) { Unit = { diff --git a/modules/home/shell/xorg.nix b/modules/home/shell/xorg.nix index ce09d18..e11c244 100644 --- a/modules/home/shell/xorg.nix +++ b/modules/home/shell/xorg.nix @@ -1,11 +1,12 @@ { lib, config, + pkgs, ... }: { options.marleyos.shell.xorg.enable = lib.mkEnableOption "xorg"; - config = lib.mkIf config.marleyos.shell.xorg.enable { + config = lib.mkIf (config.marleyos.shell.xorg.enable && pkgs.stdenv.isLinux) { xsession = { enable = true; diff --git a/modules/home/system/session.nix b/modules/home/system/session.nix index 52654f8..e574fd1 100644 --- a/modules/home/system/session.nix +++ b/modules/home/system/session.nix @@ -27,7 +27,9 @@ in { }; marleycfg.apps.pinentry = - if profiles.desktop + if pkgs.stdenv.isDarwin + then pkgs.pinentry_mac + else if profiles.desktop then pkgs.pinentry-gtk2 else pkgs.pinentry-curses; };