fixup sxmo persistence (prev two commits don't build
This commit is contained in:
@@ -151,7 +151,8 @@ in
|
|||||||
(lib.mkDefault (knownKeyboards."${cfg.keyboard}" or cfg.keyboard));
|
(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.programs.sxmoApps.enableFor.user.colin = true;
|
||||||
sane.gui.gtk.enable = lib.mkDefault 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.".cache/sxmo/sxmo.noidle" = lib.mkIf cfg.noidle (sane-lib.fs.wantedText "");
|
||||||
sane.user.fs.".config/sxmo/profile".symlink.text = let
|
sane.user.fs.".config/sxmo/profile".symlink.text = let
|
||||||
mkKeyValue = key: value: ''export ${key}="${value}"'';
|
mkKeyValue = key: value: ''export ${key}="${value}"'';
|
||||||
@@ -232,10 +245,16 @@ in
|
|||||||
src = ./conky-config;
|
src = ./conky-config;
|
||||||
bat = "${battery_estimate}/bin/battery_estimate";
|
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;
|
enable = true;
|
||||||
|
|
||||||
displayManager.lightdm.enable = true;
|
displayManager.lightdm.enable = true;
|
||||||
@@ -248,12 +267,6 @@ in
|
|||||||
cfg.package # this gets share/wayland-sessions/swmo.desktop linked
|
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:
|
# taken from gui/phosh:
|
||||||
# NB: setting defaultSession has the critical side-effect that it lets org.freedesktop.AccountsService
|
# 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
|
# 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
|
${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;
|
enable = true;
|
||||||
# borrowed from gui/sway
|
# borrowed from gui/sway
|
||||||
settings.default_session.command =
|
settings.default_session.command =
|
||||||
@@ -286,23 +301,13 @@ in
|
|||||||
in "${sway-as-greeter}/bin/sway-as-greeter";
|
in "${sway-as-greeter}/bin/sway-as-greeter";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services."sxmo-set-permissions" = {
|
sane.fs."/var/log/sway" = {
|
||||||
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") {
|
|
||||||
dir.acl.mode = "0777";
|
dir.acl.mode = "0777";
|
||||||
wantedBeforeBy = [ "greetd.service" "display-manager.service" ];
|
wantedBeforeBy = [ "greetd.service" "display-manager.service" ];
|
||||||
};
|
};
|
||||||
|
})
|
||||||
|
|
||||||
# lightdm-mobile-greeter: "The name org.a11y.Bus was not provided by any .service files"
|
# old, greeterless options:
|
||||||
services.gnome.at-spi2-core.enable = true;
|
|
||||||
|
|
||||||
# services.xserver.windowManager.session = [{
|
# services.xserver.windowManager.session = [{
|
||||||
# name = "sxmo";
|
# name = "sxmo";
|
||||||
# desktopNames = [ "sxmo" ];
|
# desktopNames = [ "sxmo" ];
|
||||||
@@ -322,6 +327,6 @@ in
|
|||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
})
|
]))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -79,17 +79,13 @@ let
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
persist = {
|
persist = mkOption {
|
||||||
plaintext = mkOption {
|
type = options.sane.persist.sys.type;
|
||||||
type = types.listOf (types.either types.attrs types.str);
|
default = {};
|
||||||
default = [];
|
description = ''
|
||||||
description = "list of home-relative paths to persist for this package";
|
entries to pass onto `sane.persist.sys` or `sane.user.persist`
|
||||||
};
|
when this program is enabled.
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
fs = mkOption {
|
fs = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
|
Reference in New Issue
Block a user