sxmo-utils 1.13.0 -> 1.14.1
This commit is contained in:
49
hosts/modules/gui/sxmo.nix
Normal file
49
hosts/modules/gui/sxmo.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
# this work derives from noneucat's sxmo service/packages, found via NUR
|
||||
# - <repo:nix-community/nur-combined:repos/noneucat/modules/pinephone/sxmo.nix>
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.sane.gui.phosh;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
sane.gui.sxmo.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
sane.programs.sxmoApps = {
|
||||
package = null;
|
||||
suggestedPrograms = [
|
||||
"guiApps"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf config.sane.gui.sxmo.enable {
|
||||
sane.programs.sxmoApps.enableFor.user.colin = true;
|
||||
|
||||
# TODO: probably need to enable pipewire
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.networkmanager.enable = true;
|
||||
networking.wireless.enable = lib.mkForce false;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
services.xserver.windowManager.session = [{
|
||||
name = "sxmo";
|
||||
desktopNames = [ "sxmo" ];
|
||||
start = ''
|
||||
${pkgs.sxmo-utils}/bin/sxmo_xinit.sh &
|
||||
waitPID=$!
|
||||
'';
|
||||
}];
|
||||
})
|
||||
];
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
diff --git a/configs/profile.d/sxmo_init.sh b/configs/profile.d/sxmo_init.sh
|
||||
index 55baab3..2d33ea1 100644
|
||||
--- a/configs/profile.d/sxmo_init.sh
|
||||
+++ b/configs/profile.d/sxmo_init.sh
|
||||
@@ -158,13 +158,15 @@ _sxmo_grab_session() {
|
||||
}
|
||||
|
||||
_sxmo_prepare_dirs() {
|
||||
+ uid=$(id -u)
|
||||
+ gid=$(id -g)
|
||||
mkdir -p "$XDG_RUNTIME_DIR"
|
||||
chmod 700 "$XDG_RUNTIME_DIR"
|
||||
- chown "$USER:$USER" "$XDG_RUNTIME_DIR"
|
||||
+ chown "$uid:$gid" "$XDG_RUNTIME_DIR"
|
||||
|
||||
mkdir -p "$XDG_CACHE_HOME/sxmo/"
|
||||
chmod 700 "$XDG_CACHE_HOME"
|
||||
- chown "$USER:$USER" "$XDG_CACHE_HOME"
|
||||
+ chown "$uid:$gid" "$XDG_CACHE_HOME"
|
||||
}
|
||||
|
||||
_sxmo_grab_session
|
||||
|
15
pkgs/additional/sxmo-utils/0002-ensure-log-dir.patch
Normal file
15
pkgs/additional/sxmo-utils/0002-ensure-log-dir.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/configs/profile.d/sxmo_init.sh b/configs/profile.d/sxmo_init.sh
|
||||
index 2d33ea1..76c4c94 100644
|
||||
--- a/configs/profile.d/sxmo_init.sh
|
||||
+++ b/configs/profile.d/sxmo_init.sh
|
||||
@@ -167,6 +167,10 @@ _sxmo_prepare_dirs() {
|
||||
mkdir -p "$XDG_CACHE_HOME/sxmo/"
|
||||
chmod 700 "$XDG_CACHE_HOME"
|
||||
chown "$uid:$gid" "$XDG_CACHE_HOME"
|
||||
+
|
||||
+ mkdir -p "$XDG_STATE_HOME"
|
||||
+ chmod 700 "$XDG_STATE_HOME"
|
||||
+ chown "$uid:$gid" "$XDG_STATE_HOME"
|
||||
}
|
||||
|
||||
_sxmo_grab_session
|
@@ -6,16 +6,22 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sxmo-utils";
|
||||
version = "1.13.0";
|
||||
version = "1.14.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.sr.ht/~mil/sxmo-utils";
|
||||
rev = version;
|
||||
hash = "sha256-HNkajPC/spozxRlaP0iMWvOAfriRjl2wo1wdcbVCrkU=";
|
||||
hash = "sha256-UcJid1fi3Mgu32dCqlI9RQYnu5d07MMwW3eEYuYVBw4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-group-differs-from-user.patch
|
||||
./0002-ensure-log-dir.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's@/usr/lib/udev/rules\.d@/etc/udev/rules.d@' Makefile
|
||||
sed -i "s@/etc/profile\.d/sxmo_init.sh@$out/etc/profile.d/sxmo_init.sh@" scripts/core/*.sh
|
||||
'';
|
||||
|
||||
installFlags = [
|
||||
@@ -24,7 +30,10 @@ stdenv.mkDerivation rec {
|
||||
"PREFIX="
|
||||
];
|
||||
|
||||
passthru.updateScript = gitUpdater { };
|
||||
passthru = {
|
||||
providedSessions = [ "sxmo" "swmo" ];
|
||||
updateScript = gitUpdater { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://git.sr.ht/~mil/sxmo-utils";
|
||||
|
Reference in New Issue
Block a user