fixup sxmo persistence (prev two commits don't build
This commit is contained in:
parent
5e07882568
commit
8b3521d08f
|
@ -151,7 +151,8 @@ in
|
|||
(lib.mkDefault (knownKeyboards."${cfg.keyboard}" or cfg.keyboard));
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.enable {
|
||||
(lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
sane.programs.sxmoApps.enableFor.user.colin = true;
|
||||
sane.gui.gtk.enable = lib.mkDefault true;
|
||||
|
||||
|
@ -197,6 +198,18 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
systemd.services."sxmo-set-permissions" = {
|
||||
description = "configure specific /sys and /dev nodes to be writable by sxmo scripts";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${cfg.package}/bin/sxmo_setpermissions.sh";
|
||||
};
|
||||
wantedBy = [ "display-manager.service" ];
|
||||
};
|
||||
|
||||
# lightdm-mobile-greeter: "The name org.a11y.Bus was not provided by any .service files"
|
||||
services.gnome.at-spi2-core.enable = true;
|
||||
|
||||
sane.user.fs.".cache/sxmo/sxmo.noidle" = lib.mkIf cfg.noidle (sane-lib.fs.wantedText "");
|
||||
sane.user.fs.".config/sxmo/profile".symlink.text = let
|
||||
mkKeyValue = key: value: ''export ${key}="${value}"'';
|
||||
|
@ -232,10 +245,16 @@ in
|
|||
src = ./conky-config;
|
||||
bat = "${battery_estimate}/bin/battery_estimate";
|
||||
};
|
||||
}
|
||||
|
||||
## greeter
|
||||
(lib.mkIf (cfg.greeter == "lightdm-mobile") {
|
||||
sane.persist.sys.plaintext = [
|
||||
# this takes up 4-5 MB of fontconfig and mesa shader caches.
|
||||
# it could optionally be cleared on boot.
|
||||
{ path = "/var/lib/lightdm"; user = "lightdm"; group = "lightdm"; mode = "0770"; }
|
||||
];
|
||||
|
||||
services.xserver = lib.mkIf (cfg.greeter == "lightdm-mobile") {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
displayManager.lightdm.enable = true;
|
||||
|
@ -248,12 +267,6 @@ in
|
|||
cfg.package # this gets share/wayland-sessions/swmo.desktop linked
|
||||
];
|
||||
|
||||
sane.persist.sys.plaintext = [
|
||||
# this takes up 4-5 MB of fontconfig and mesa shader caches.
|
||||
# it could optionally be cleared on boot.
|
||||
{ path = "/var/lib/lightdm"; user = "lightdm"; group = "lightdm"; mode = "0770"; }
|
||||
];
|
||||
|
||||
# taken from gui/phosh:
|
||||
# NB: setting defaultSession has the critical side-effect that it lets org.freedesktop.AccountsService
|
||||
# know that our user exists. this ensures lightdm succeeds when calling /org/freedesktop/AccountsServices ListCachedUsers
|
||||
|
@ -263,8 +276,10 @@ in
|
|||
${pkgs.systemd}/bin/busctl call org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts CacheUser s colin
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
services.greetd = lib.mkIf (cfg.greeter == "sway") {
|
||||
(lib.mkIf (cfg.greeter == "sway") {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
# borrowed from gui/sway
|
||||
settings.default_session.command =
|
||||
|
@ -286,23 +301,13 @@ in
|
|||
in "${sway-as-greeter}/bin/sway-as-greeter";
|
||||
};
|
||||
|
||||
systemd.services."sxmo-set-permissions" = {
|
||||
description = "configure specific /sys and /dev nodes to be writable by sxmo scripts";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${cfg.package}/bin/sxmo_setpermissions.sh";
|
||||
};
|
||||
wantedBy = [ "display-manager.service" ];
|
||||
};
|
||||
|
||||
sane.fs."/var/log/sway" = lib.mkIf (cfg.greeter == "sway") {
|
||||
sane.fs."/var/log/sway" = {
|
||||
dir.acl.mode = "0777";
|
||||
wantedBeforeBy = [ "greetd.service" "display-manager.service" ];
|
||||
};
|
||||
})
|
||||
|
||||
# lightdm-mobile-greeter: "The name org.a11y.Bus was not provided by any .service files"
|
||||
services.gnome.at-spi2-core.enable = true;
|
||||
|
||||
# old, greeterless options:
|
||||
# services.xserver.windowManager.session = [{
|
||||
# name = "sxmo";
|
||||
# desktopNames = [ "sxmo" ];
|
||||
|
@ -322,6 +327,6 @@ in
|
|||
# };
|
||||
# };
|
||||
# };
|
||||
})
|
||||
]))
|
||||
];
|
||||
}
|
||||
|
|
|
@ -79,17 +79,13 @@ let
|
|||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
persist = {
|
||||
plaintext = mkOption {
|
||||
type = types.listOf (types.either types.attrs types.str);
|
||||
default = [];
|
||||
description = "list of home-relative paths to persist for this package";
|
||||
};
|
||||
private = mkOption {
|
||||
type = types.listOf (types.either types.attrs types.str);
|
||||
default = [];
|
||||
description = "list of home-relative paths to persist (in encrypted format) for this package";
|
||||
};
|
||||
persist = mkOption {
|
||||
type = options.sane.persist.sys.type;
|
||||
default = {};
|
||||
description = ''
|
||||
entries to pass onto `sane.persist.sys` or `sane.user.persist`
|
||||
when this program is enabled.
|
||||
'';
|
||||
};
|
||||
fs = mkOption {
|
||||
type = types.attrs;
|
||||
|
|
Loading…
Reference in New Issue
Block a user