From 5b2313b8bfe929304aaf9cbe0aac257477afd65d Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sun, 24 Apr 2022 00:23:16 +0200 Subject: [PATCH] start mkGLed xsession for non nixos add non-nixos profile --- profiles/default.nix | 11 ++++++++++- profiles/non-nixos.nix | 11 +++++++++++ profiles/xsession/default.nix | 7 ++++++- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 profiles/non-nixos.nix diff --git a/profiles/default.nix b/profiles/default.nix index 957953d..bea498a 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -1 +1,10 @@ -{ imports = [ ./base ./xsession ./zsh ./gui.nix ./games ]; } +{ + imports = [ + ./base + ./xsession + ./zsh + ./gui.nix + ./non-nixos.nix + ./games + ]; +} diff --git a/profiles/non-nixos.nix b/profiles/non-nixos.nix new file mode 100644 index 0000000..e8d79c8 --- /dev/null +++ b/profiles/non-nixos.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.profiles.non-nixos; +in { + + options.profiles.non-nixos = { + enable = lib.mkEnableOption "Whether or not the profile is running on non-nixos"; + }; + +} diff --git a/profiles/xsession/default.nix b/profiles/xsession/default.nix index 7dc832e..0ea5995 100644 --- a/profiles/xsession/default.nix +++ b/profiles/xsession/default.nix @@ -2,6 +2,8 @@ let cfg = config.profiles.xsession; + non-nixos = config.profiles.non-nixos; + mkGL = program: "${lib.strings.optionalString non-nixos.enable "nixGL "}${program}"; in { imports = [ ./dunstrc.nix ./terminal.nix ./audio.nix ./polybar.nix ]; @@ -19,7 +21,7 @@ in }; services.random-background = { - enable = true; + enable = false; imageDirectory = "${pkgs.dan.wallpapers}"; interval = "30m"; }; @@ -94,6 +96,7 @@ in services.picom = { enable = true; backend = "xrender"; + experimentalBackends = true; }; @@ -114,6 +117,8 @@ in platformTheme = "gtk"; }; + xsession.windowManager.command = lib.mkIf non-nixos.enable (lib.mkForce "nixGL ${config.xsession.windowManager.i3.package}/bin/i3"); + home.packages = [ pkgs.brightnessctl pkgs.xorg.xkill