fix: add os checks
This commit is contained in:
parent
af432693bd
commit
73aa0bdcca
8 changed files with 16 additions and 8 deletions
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.fuzzel;
|
cfg = config.marleyos.programs.fuzzel;
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.fuzzel.enable = lib.mkEnableOption "fuzzel";
|
options.marleyos.programs.fuzzel.enable = lib.mkEnableOption "fuzzel";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
marleycfg.apps.launcher = {
|
marleycfg.apps.launcher = {
|
||||||
inherit (config.programs.fuzzel) package;
|
inherit (config.programs.fuzzel) package;
|
||||||
command = "";
|
command = "";
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.wlogout.enable = lib.mkEnableOption "wlogout";
|
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;
|
marleyos.programs.hyprlock.enable = true;
|
||||||
|
|
||||||
programs.wlogout = {
|
programs.wlogout = {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.services.swaync;
|
cfg = config.marleyos.services.swaync;
|
||||||
in {
|
in {
|
||||||
options.marleyos.services.swaync.enable = lib.mkEnableOption "swaync";
|
options.marleyos.services.swaync.enable = lib.mkEnableOption "swaync";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
services.swaync = {
|
services.swaync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.marleycfg.profiles.desktop {
|
config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) {
|
||||||
home.pointerCursor.gtk.enable = true;
|
home.pointerCursor.gtk.enable = true;
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.marleycfg.profiles.desktop {
|
config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) {
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.marleyos.shell.wayland.enable = lib.mkEnableOption "wayland";
|
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.
|
# Fix the "tray.target not found" error.
|
||||||
systemd.user.targets.tray = lib.mkIf (!config.xsession.enable) {
|
systemd.user.targets.tray = lib.mkIf (!config.xsession.enable) {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.marleyos.shell.xorg.enable = lib.mkEnableOption "xorg";
|
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 = {
|
xsession = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
marleycfg.apps.pinentry =
|
marleycfg.apps.pinentry =
|
||||||
if profiles.desktop
|
if pkgs.stdenv.isDarwin
|
||||||
|
then pkgs.pinentry_mac
|
||||||
|
else if profiles.desktop
|
||||||
then pkgs.pinentry-gtk2
|
then pkgs.pinentry-gtk2
|
||||||
else pkgs.pinentry-curses;
|
else pkgs.pinentry-curses;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue