start mkGLed xsession for non nixos

add non-nixos profile
This commit is contained in:
Daniel Olsen 2022-04-24 00:23:16 +02:00
parent 87bc5a0a37
commit 5b2313b8bf
3 changed files with 27 additions and 2 deletions

View File

@ -1 +1,10 @@
{ imports = [ ./base ./xsession ./zsh ./gui.nix ./games ]; }
{
imports = [
./base
./xsession
./zsh
./gui.nix
./non-nixos.nix
./games
];
}

11
profiles/non-nixos.nix Normal file
View File

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

View File

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