nixos/lemurs: init
This commit is contained in:
parent
87927b482f
commit
140a6b4522
@ -66,6 +66,8 @@
|
|||||||
|
|
||||||
- [SuiteNumérique Meet](https://github.com/suitenumerique/meet) is an open source alternative to Google Meet and Zoom powered by LiveKit: HD video calls, screen sharing, and chat features. Built with Django and React. Available as [services.lasuite-meet](#opt-services.lasuite-meet.enable).
|
- [SuiteNumérique Meet](https://github.com/suitenumerique/meet) is an open source alternative to Google Meet and Zoom powered by LiveKit: HD video calls, screen sharing, and chat features. Built with Django and React. Available as [services.lasuite-meet](#opt-services.lasuite-meet.enable).
|
||||||
|
|
||||||
|
- [lemurs](https://github.com/coastalwhite/lemurs), a customizable TUI display/login manager. Available at [services.displayManager.lemurs](#opt-services.displayManager.lemurs.enable).
|
||||||
|
|
||||||
- [paisa](https://github.com/ananthakumaran/paisa), a personal finance tracker and dashboard. Available as [services.paisa](#opt-services.paisa.enable).
|
- [paisa](https://github.com/ananthakumaran/paisa), a personal finance tracker and dashboard. Available as [services.paisa](#opt-services.paisa.enable).
|
||||||
|
|
||||||
## Backward Incompatibilities {#sec-release-25.11-incompatibilities}
|
## Backward Incompatibilities {#sec-release-25.11-incompatibilities}
|
||||||
|
|||||||
@ -597,6 +597,7 @@
|
|||||||
./services/display-managers/default.nix
|
./services/display-managers/default.nix
|
||||||
./services/display-managers/gdm.nix
|
./services/display-managers/gdm.nix
|
||||||
./services/display-managers/greetd.nix
|
./services/display-managers/greetd.nix
|
||||||
|
./services/display-managers/lemurs.nix
|
||||||
./services/display-managers/ly.nix
|
./services/display-managers/ly.nix
|
||||||
./services/display-managers/sddm.nix
|
./services/display-managers/sddm.nix
|
||||||
./services/editors/emacs.nix
|
./services/editors/emacs.nix
|
||||||
|
|||||||
@ -257,7 +257,12 @@ in
|
|||||||
dmConf = config.services.xserver.displayManager;
|
dmConf = config.services.xserver.displayManager;
|
||||||
noDmUsed =
|
noDmUsed =
|
||||||
!(
|
!(
|
||||||
cfg.gdm.enable || cfg.sddm.enable || dmConf.xpra.enable || dmConf.lightdm.enable || cfg.ly.enable
|
cfg.gdm.enable
|
||||||
|
|| cfg.sddm.enable
|
||||||
|
|| dmConf.xpra.enable
|
||||||
|
|| dmConf.lightdm.enable
|
||||||
|
|| cfg.ly.enable
|
||||||
|
|| cfg.lemurs.enable
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
lib.mkIf noDmUsed (lib.mkDefault false);
|
lib.mkIf noDmUsed (lib.mkDefault false);
|
||||||
|
|||||||
127
nixos/modules/services/display-managers/lemurs.nix
Normal file
127
nixos/modules/services/display-managers/lemurs.nix
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.services.displayManager.lemurs;
|
||||||
|
settingsFormat = pkgs.formats.toml { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.displayManager.lemurs = {
|
||||||
|
enable = lib.mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
|
Whether to enable lemurs, a customizable TUI display/login manager.
|
||||||
|
|
||||||
|
::: {.note}
|
||||||
|
For Wayland compositors, your user must be in the "seat" group.
|
||||||
|
:::
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "lemurs" { };
|
||||||
|
|
||||||
|
settings = lib.mkOption {
|
||||||
|
type = settingsFormat.type;
|
||||||
|
default = { };
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
{
|
||||||
|
do_log = true;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration for lemurs, provided as a Nix attribute set and automatically
|
||||||
|
serialized to TOML.
|
||||||
|
See [lemurs configuration documentation](https://github.com/coastalwhite/lemurs/blob/main/extra/config.toml) for available options.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
vt = lib.mkOption {
|
||||||
|
type = lib.types.ints.positive;
|
||||||
|
default = 2;
|
||||||
|
description = ''
|
||||||
|
The virtual console (tty) that lemurs should use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = !config.services.displayManager.autoLogin.enable;
|
||||||
|
message = ''
|
||||||
|
lemurs doesn't support auto login.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
security.pam.services.lemurs = {
|
||||||
|
unixAuth = true;
|
||||||
|
startSession = true;
|
||||||
|
# See https://github.com/coastalwhite/lemurs/issues/166
|
||||||
|
setLoginUid = false;
|
||||||
|
enableGnomeKeyring = lib.mkDefault config.services.gnome.gnome-keyring.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
dbus.packages = [ cfg.package ];
|
||||||
|
# Required for wayland with setLoginUid = false;
|
||||||
|
seatd.enable = true;
|
||||||
|
xserver = {
|
||||||
|
# To enable user switching, allow lemurs to allocate TTYs/displays dynamically.
|
||||||
|
tty = null;
|
||||||
|
display = null;
|
||||||
|
};
|
||||||
|
displayManager = {
|
||||||
|
enable = true;
|
||||||
|
execCmd = "exec ${lib.getExe cfg.package} --config ${settingsFormat.generate "config.toml" cfg.settings}";
|
||||||
|
# set default settings
|
||||||
|
lemurs.settings =
|
||||||
|
let
|
||||||
|
desktops = config.services.displayManager.sessionData.desktops;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
tty = lib.mkDefault cfg.vt;
|
||||||
|
system_shell = lib.mkDefault "${pkgs.bash}/bin/bash";
|
||||||
|
initial_path = lib.mkDefault "/run/current-system/sw/bin";
|
||||||
|
x11 = {
|
||||||
|
xauth_path = lib.mkDefault "${pkgs.xorg.xauth}/bin/xauth";
|
||||||
|
xserver_path = lib.mkDefault "${pkgs.xorg.xorgserver}/bin/X";
|
||||||
|
xsessions_path = lib.mkDefault "${desktops}/share/xsessions";
|
||||||
|
xsetup_path = lib.mkDefault config.services.displayManager.sessionData.wrapper;
|
||||||
|
};
|
||||||
|
wayland.wayland_sessions_path = lib.mkDefault "${desktops}/share/wayland-sessions";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.display-manager = {
|
||||||
|
unitConfig = {
|
||||||
|
Wants = [ "systemd-user-sessions.service" ];
|
||||||
|
After = [
|
||||||
|
"systemd-user-sessions.service"
|
||||||
|
"getty@tty${toString cfg.vt}.service"
|
||||||
|
"plymouth-quit-wait.service"
|
||||||
|
];
|
||||||
|
Conflicts = [ "getty@tty${toString cfg.vt}.service" ];
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "idle";
|
||||||
|
# Defaults from lemurs upstream configuration
|
||||||
|
StandardInput = "tty";
|
||||||
|
TTYPath = "/dev/tty${toString cfg.vt}";
|
||||||
|
TTYReset = "yes";
|
||||||
|
TTYVHangup = "yes";
|
||||||
|
};
|
||||||
|
# Don't kill a user session when using nixos-rebuild
|
||||||
|
restartIfChanged = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [
|
||||||
|
nullcube
|
||||||
|
stunkymonkey
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -768,6 +768,7 @@ in
|
|||||||
|| dmConf.startx.enable
|
|| dmConf.startx.enable
|
||||||
|| config.services.greetd.enable
|
|| config.services.greetd.enable
|
||||||
|| config.services.displayManager.ly.enable
|
|| config.services.displayManager.ly.enable
|
||||||
|
|| config.services.displayManager.lemurs.enable
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
mkIf (default) (mkDefault true);
|
mkIf (default) (mkDefault true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user