pwa module, jay, many thing
This commit is contained in:
parent
d4d04d7d6d
commit
6271f4b54a
32 changed files with 5580 additions and 333 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
mainUser,
|
||||
inputs,
|
||||
getFlakePkg',
|
||||
lib,
|
||||
|
|
@ -8,14 +7,19 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
niri = (getFlakePkg' inputs.niri "niri-unstable");
|
||||
xwayland-satellite = (getFlakePkg' inputs.niri "xwayland-satellite-unstable");
|
||||
inherit (config) rice;
|
||||
niri = getFlakePkg' inputs.niri "niri-unstable";
|
||||
xwayland-satellite = getFlakePkg' inputs.niri "xwayland-satellite-unstable";
|
||||
niri-session-direct = pkgs.writeShellScript "niri-session-direct" ''
|
||||
systemctl --user import-environment
|
||||
dbus-update-activation-environment --all
|
||||
systemctl --user start niri-session-bridge.service &
|
||||
exec ${lib.getExe niri} --session
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.niri.nixosModules.niri
|
||||
inputs.niri-tag.nixosModules.niri-tag
|
||||
inputs.niri-s76.nixosModules.default
|
||||
];
|
||||
|
|
@ -51,34 +55,19 @@ in
|
|||
baseConfig;
|
||||
};
|
||||
|
||||
user.packages = [
|
||||
environment.systemPackages = [
|
||||
niri
|
||||
xwayland-satellite
|
||||
];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
restart = false;
|
||||
settings =
|
||||
let
|
||||
session = {
|
||||
command =
|
||||
let
|
||||
niri-session-direct = pkgs.writeShellScript "niri-session-direct" ''
|
||||
systemctl --user import-environment
|
||||
dbus-update-activation-environment --all
|
||||
exec ${lib.getExe niri} --session
|
||||
'';
|
||||
in
|
||||
"${niri-session-direct}";
|
||||
user = "${mainUser}";
|
||||
};
|
||||
in
|
||||
{
|
||||
default_session = session;
|
||||
initial_session = session;
|
||||
};
|
||||
};
|
||||
environment.etc."greetd/wayland-sessions/niri.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Name=Niri
|
||||
Comment=A scrollable-tiling Wayland compositor
|
||||
Exec=${niri-session-direct}
|
||||
Type=Application
|
||||
DesktopNames=niri
|
||||
'';
|
||||
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
|
|
@ -97,8 +86,26 @@ in
|
|||
|
||||
services.niri-s76-bridge.enable = true;
|
||||
|
||||
# niri runs directly from greetd (session-1.scope), not as a user service
|
||||
# niri runs directly from greetd (not as a user service),
|
||||
# so that it stays inside the logind session scope for proper polkit/dbus access.
|
||||
systemd.user.services.niri.wantedBy = lib.mkForce [ ];
|
||||
systemd.user.services.niri.enable = lib.mkForce false;
|
||||
|
||||
# bridge service to activate graphical-session.target for the direct-launched niri.
|
||||
# waits for niri IPC readiness before pulling in the target.
|
||||
systemd.user.services.niri-session-bridge = {
|
||||
unitConfig = {
|
||||
Description = "Activate graphical-session.target for direct-launched niri";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
Before = [ "graphical-session.target" ];
|
||||
Wants = [ "graphical-session-pre.target" ];
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${lib.getExe niri} msg version";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue