Add Niri, a scrolling tiling window manager.
This commit is contained in:
parent
325c176464
commit
b3d9d2f396
38 changed files with 758 additions and 376 deletions
|
@ -3,12 +3,12 @@
|
|||
imports = [
|
||||
./backlights
|
||||
./dconf
|
||||
./desktops
|
||||
./gaming
|
||||
./git
|
||||
./greetd
|
||||
./nh
|
||||
./qt
|
||||
./security
|
||||
./shells
|
||||
./sway
|
||||
];
|
||||
}
|
||||
|
|
11
modules/system/programs/desktops/default.nix
Normal file
11
modules/system/programs/desktops/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
programs = {
|
||||
sway.enable = config.system.desktop.enable;
|
||||
niri.enable = config.system.desktop.enable;
|
||||
xwayland.enable = lib.mkForce config.system.desktop.enable;
|
||||
};
|
||||
|
||||
services.dbus.enable = config.system.desktop.enable;
|
||||
security.pam.services.swaylock = {};
|
||||
}
|
|
@ -1,22 +1,6 @@
|
|||
{ 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 {
|
||||
services.greetd = {
|
||||
enable = config.system.desktop.enable;
|
||||
restart = true;
|
||||
settings = {
|
||||
|
@ -24,10 +8,32 @@
|
|||
vt = 2;
|
||||
switch = true;
|
||||
};
|
||||
default_session = {
|
||||
command = "${startSway}";
|
||||
user = "jimbo";
|
||||
};
|
||||
default_session.command = "${pkgs.cage}/bin/cage -d -m last ${pkgs.greetd.gtkgreet}/bin/gtkgreet";
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."greetd/environments".text = let
|
||||
initScript = ''
|
||||
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
|
||||
'';
|
||||
in ''
|
||||
${pkgs.writeScript "startsway" ''
|
||||
${initScript}
|
||||
export QT_QPA_PLATFORM="wayland;xcb"
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
sway --unsupported-gpu
|
||||
''}
|
||||
${pkgs.writeScript "startniri" ''
|
||||
${initScript}
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export XDG_CURRENT_DESKTOP=niri
|
||||
niri-session
|
||||
''}
|
||||
'';
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
qt = {
|
||||
enable = config.system.desktop.enable;
|
||||
style = "gtk2";
|
||||
platformTheme = "gtk2";
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./greetd ];
|
||||
|
||||
programs.sway = {
|
||||
enable = config.system.desktop.enable;
|
||||
extraPackages = with pkgs; [ swaylock ];
|
||||
};
|
||||
|
||||
services.dbus.enable = config.system.desktop.enable;
|
||||
security.pam.services.swaylock = {};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue