why is this confusing?? its just a window manager

This commit is contained in:
Sakooooo 2024-02-04 10:16:07 +04:00
parent 31d66d48d1
commit d3f50003bc
Signed by: sako
GPG key ID: 3FD715D87D7725E0
2 changed files with 61 additions and 26 deletions

View file

@ -7,26 +7,53 @@
...
}:
with lib; let
cfg = config.modules.desktop.xmonad;
cfg = config.modules.desktop.exwm;
imports = [
../dev/editors/emacs
];
in {
options.modules.desktop.xmonad = {
options.modules.desktop.exwm = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
# add this just incase
myEmacs.extraEmacsPackage = epkgs: [
epkgs.exwm
];
# this needs to be enabled for gtk apps
programs.dconf.enable = true;
# https://nixos.wiki/wiki/XMonad
services.xserver = {
enable = true;
windowManager.xmonad = {
windowManager.exwm = {
enable = true;
enableContribAndExtras = true;
ghcArgs = [
"-hidir /tmp" # place interface files in /tmp, otherwise ghc tries to write them to the nix store
"-odir /tmp" # place object files in /tmp, otherwise ghc tries to write them to the nix store
# "-i${xmonad-contexts}" # tell ghc to search in the respective nix store path for the module
];
};
windowManager.session = let
# Allow for per-host injected desktop-related Emacs configuration.
# extraConfig = pkgs.writeText "emacs-extra-config" ''
# (setq mb/system-settings
# '((desktop/dpi . ${(toString cfg.dpi)})
# (desktop/hidpi . ${
# if cfg.hidpi
# then "t"
# else "nil"
# })))
# '';
extraConfig = pkgs.writeText "emacs-extra-config" ''
(require 'exwm-config)
(exwm-config-default)
'';
in
singleton {
name = "exwm";
start = ''
# Emacs via dbus in fullscreen lol
${pkgs.dbus.dbus-launch} --exit-with-session emacs -mm --fullscreen \
-l "${extraConfig}"
'';
};
displayManager = {
lightdm = {
@ -57,7 +84,7 @@ in {
};
users.users.sako.packages = with pkgs; [
rofi
#rofi
# network
networkmanagerapplet
# brightness
@ -72,10 +99,6 @@ in {
];
environment.systemPackages = with pkgs; [
# bar
xmobar
# tray
trayer
];
home-manager.users.sako = {pkgs, ...}: {
@ -99,8 +122,8 @@ in {
source = ../../../config/background.png;
};
};
xdg.configFile = {
};
# xdg.configFile = {
# };
};
};
}

View file

@ -9,6 +9,17 @@
}:
with lib; let
cfg = config.modules.dev.editors.emacs;
myEmacs = pkgs.emacsWithPackagesFromUsePackage {
config = ../../../../config/emacs/emacs.org;
package = pkgs.emacs-unstable;
alwaysEnsure = true;
alwaysTangle = true;
extraEmacsPackages = epkgs: [
epkgs.use-package
epkgs.mu4e
];
};
in {
options.modules.dev.editors.emacs = {
enable = mkEnableOption false;
@ -24,16 +35,17 @@ in {
enable = cfg.daemon;
install = true;
# package = pkgs.emacs29-pgtk;
package = pkgs.emacsWithPackagesFromUsePackage {
config = ../../../../config/emacs/emacs.org;
package = pkgs.emacs-unstable;
alwaysEnsure = true;
alwaysTangle = true;
extraEmacsPackages = epkgs: [
epkgs.use-package
epkgs.mu4e
];
};
# package = pkgs.emacsWithPackagesFromUsePackage {
# config = ../../../../config/emacs/emacs.org;
# package = pkgs.emacs-unstable;
# alwaysEnsure = true;
# alwaysTangle = true;
# extraEmacsPackages = epkgs: [
# epkgs.use-package
# epkgs.mu4e
# ];
# };
package = myEmacs;
};
users.users.sako.packages = with pkgs; [
# direnv