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 with lib; let
cfg = config.modules.desktop.xmonad; cfg = config.modules.desktop.exwm;
imports = [
../dev/editors/emacs
];
in { in {
options.modules.desktop.xmonad = { options.modules.desktop.exwm = {
enable = mkEnableOption false; enable = mkEnableOption false;
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# add this just incase
myEmacs.extraEmacsPackage = epkgs: [
epkgs.exwm
];
# this needs to be enabled for gtk apps # this needs to be enabled for gtk apps
programs.dconf.enable = true; programs.dconf.enable = true;
# https://nixos.wiki/wiki/XMonad # https://nixos.wiki/wiki/XMonad
services.xserver = { services.xserver = {
enable = true; enable = true;
windowManager.xmonad = { windowManager.exwm = {
enable = true; enable = true;
enableContribAndExtras = true; };
ghcArgs = [
"-hidir /tmp" # place interface files in /tmp, otherwise ghc tries to write them to the nix store windowManager.session = let
"-odir /tmp" # place object files in /tmp, otherwise ghc tries to write them to the nix store # Allow for per-host injected desktop-related Emacs configuration.
# "-i${xmonad-contexts}" # tell ghc to search in the respective nix store path for the module # 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 = { displayManager = {
lightdm = { lightdm = {
@ -57,7 +84,7 @@ in {
}; };
users.users.sako.packages = with pkgs; [ users.users.sako.packages = with pkgs; [
rofi #rofi
# network # network
networkmanagerapplet networkmanagerapplet
# brightness # brightness
@ -72,10 +99,6 @@ in {
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# bar
xmobar
# tray
trayer
]; ];
home-manager.users.sako = {pkgs, ...}: { home-manager.users.sako = {pkgs, ...}: {
@ -99,8 +122,8 @@ in {
source = ../../../config/background.png; source = ../../../config/background.png;
}; };
}; };
xdg.configFile = { # xdg.configFile = {
}; # };
}; };
}; };
} }

View file

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