summaryrefslogtreecommitdiff
path: root/awesome
diff options
context:
space:
mode:
authormediocregopher <mediocregopher@gmail.com>2023-12-27 18:37:54 +0100
committermediocregopher <mediocregopher@gmail.com>2023-12-27 18:39:51 +0100
commit005334a0371227be6e35e7afd85ab64475ddcf77 (patch)
tree6886248a9c4e2bf3f2882ff80c7b96e3fb2567eb /awesome
parentd09d899d292be4e57453577e4674c00554d346ef (diff)
Merge X subdir into awesome
Diffstat (limited to 'awesome')
-rw-r--r--awesome/default.nix42
-rw-r--r--awesome/xorg.conf6
2 files changed, 45 insertions, 3 deletions
diff --git a/awesome/default.nix b/awesome/default.nix
index 6fbf524..3fedb87 100644
--- a/awesome/default.nix
+++ b/awesome/default.nix
@@ -9,6 +9,45 @@
pkgs2305 = (import ../pkgs.nix).stable2305 {};
pkgsEdge = (import ../pkgs.nix).edge {};
+ xorgInnerEnv = pkgs.buildEnv {
+ name = "xorg-inner-env";
+ paths = [
+ pkgs.xorg.xorgserver
+ pkgs.xorg.xinit
+ pkgs.xorg.xauth
+ pkgs.xorg.xset
+ pkgs.xorg.xf86inputlibinput
+ pkgs.xorg.xrandr
+ pkgs.xsel
+
+ (pkgs.runCommand "xorg-conf-inner" {} ''
+ mkdir -p "$out"/share/X11/xorg.conf.d/
+ cp ${./xorg.conf} "$out"/share/X11/xorg.conf.d/99-loadout.conf
+ '')
+ ];
+ };
+
+ xorgConf = pkgs.runCommand "xorg-conf" {} ''
+ cat >>"$out" <<EOF
+Section "Files"
+ ModulePath "${xorgInnerEnv}/lib/xorg/modules"
+EndSection
+
+${config.xorgConfExtra}
+EOF
+
+ for f in $(ls ${xorgInnerEnv}/share/X11/xorg.conf.d | sort); do
+ cat ${xorgInnerEnv}/share/X11/xorg.conf.d/"$f" >> "$out"
+ done
+ '';
+
+ startx = pkgs.writeShellScriptBin "startx" ''
+ # TODO pass .xinitrc into here, somehow
+ export XORGCONFIG=${xorgConf}
+ export PATH=${xorgInnerEnv}/bin:$PATH
+ exec startx
+ '';
+
# nativeWrap is used for apps which are not installed via nix which don't play
# nicely with it.
nativeWrap = pkgs.writeScriptBin "native-wrap" ''
@@ -29,15 +68,12 @@
env = pkgs.buildEnv {
name = "awesome-env";
paths = [
-
pkgs.awesome
pkgs.tela-icon-theme
nativeWrap
browser
- pkgs.xorg.xrandr
- pkgs.xsel
pkgs.pavucontrol
pkgs.xdg-utils
pkgs.arandr
diff --git a/awesome/xorg.conf b/awesome/xorg.conf
new file mode 100644
index 0000000..04f72e6
--- /dev/null
+++ b/awesome/xorg.conf
@@ -0,0 +1,6 @@
+Section "InputClass"
+ Identifier "system-keyboard"
+ MatchIsKeyboard "on"
+ Option "XkbLayout" "us"
+ Option "XkbOptions" "caps:swapescape"
+EndSection