Begin the move to the import all, activate by config model

This commit is contained in:
Jimbo 2024-11-04 22:41:38 -05:00
parent 7397b614de
commit 07cb2d67a2
97 changed files with 776 additions and 633 deletions

View file

@ -1,7 +1,7 @@
{ ... }:
{ config, ... }:
{
programs.appimage = {
enable = true;
binfmt = true;
enable = config.system.desktop.enable;
binfmt = config.system.desktop.enable;
};
}

View file

@ -0,0 +1,7 @@
{ config, ... }:
{
programs = {
light.enable = config.system.desktop.enable;
kbdlight.enable = config.system.desktop.enable;
};
}

View file

@ -0,0 +1,4 @@
{ config, ... }:
{
programs.dconf.enable = config.system.desktop.enable;
}

View file

@ -2,8 +2,13 @@
{
imports = [
./appimage
./backlights
./dconf
./gaming
./git
./qt
./security
./shells
./sway
];
}

View file

@ -1,9 +1,9 @@
{ ... }:
{ config, ... }:
{
programs.gamemode = {
enable = true;
enable = config.system.desktop.enable;
settings.general.renice = 10;
};
hardware.steam-hardware.enable = true;
hardware.steam-hardware.enable = config.system.desktop.enable;
}

View file

@ -1,8 +1,6 @@
{ ... }:
{
imports = [
./gpg
];
imports = [ ./gpg ];
programs.git = {
enable = true;

View file

@ -5,7 +5,5 @@
enableSSHSupport = true;
};
environment.systemPackages = with pkgs; [
git-crypt
];
environment.systemPackages = with pkgs; [ git-crypt ];
}

View file

@ -0,0 +1,8 @@
{ config, ... }:
{
qt = {
enable = config.system.desktop.enable;
style = "gtk2";
platformTheme = "gtk2";
};
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
programs.zsh.enable = true;
}

View file

@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
imports = [
./greetd
./portals
];
programs.sway = {
enable = config.system.desktop.enable;
package = pkgs.unstable.sway;
extraPackages = with pkgs; [ swaylock ];
};
services.dbus.enable = config.system.desktop.enable;
security.pam.services.swaylock = {};
}

View file

@ -0,0 +1,33 @@
{ config, pkgs, ... }:
{
# Configure greetd for login directly to Sway
services.greetd = let
startSway = pkgs.writeScript "startsway" ''
if ${pkgs.pciutils}/bin/lspci -k | grep "in use: nvidia" &> /dev/null; then
export LIBVA_DRIVER_NAME=nvidia
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
else
:
fi
export XDG_CURRENT_DESKTOP=sway
export QT_QPA_PLATFORM="wayland;xcb"
sway --unsupported-gpu
'';
in {
enable = config.system.desktop.enable;
restart = true;
settings = {
terminal = {
vt = 2;
switch = true;
};
default_session = {
command = "${startSway}";
user = "jimbo";
};
};
};
}

View file

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
xdg.portal = {
wlr = {
enable = config.system.desktop.enable;
settings.screencast = {
max_fps = 60;
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099";
};
};
};
}