fix: add os checks

This commit is contained in:
punkfairie 2025-05-26 16:42:46 -07:00
parent af432693bd
commit 73aa0bdcca
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
8 changed files with 16 additions and 8 deletions

View file

@ -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 = "";

View file

@ -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 = {

View file

@ -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;

View file

@ -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 = {

View file

@ -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;
};

View file

@ -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 = {

View file

@ -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;

View file

@ -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;
};