nixos/modules/desktop/exwm/default.nix

141 lines
3.1 KiB
Nix
Raw Normal View History

2024-02-04 09:33:07 +04:00
{
outputs,
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.desktop.exwm;
2024-02-04 18:25:09 +04:00
imports = [
../../dev/editors/emacs
];
2024-02-04 09:33:07 +04:00
in {
options.modules.desktop.exwm = {
2024-02-04 09:33:07 +04:00
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
2024-02-04 18:25:09 +04:00
modules.dev.editors.emacs.daemon = lib.mkForce false;
2024-02-06 17:33:25 +04:00
modules.dev.editors.emacs.enable = lib.mkForce true;
2024-02-04 09:33:07 +04:00
# this needs to be enabled for gtk apps
programs.dconf.enable = true;
2024-02-06 22:19:05 +04:00
# keyring
services.gnome.gnome-keyring.enable = true;
2024-02-04 09:33:07 +04:00
services.xserver = {
enable = true;
2024-02-04 12:57:26 +04:00
# windowManager.exwm = {
# enable = true;
# };
2024-02-06 22:15:46 +04:00
# backup
windowManager.bspwm.enable = true;
2024-02-04 13:13:21 +04:00
# TODO FIX THIS !!!!!!
2024-02-04 18:25:09 +04:00
windowManager.session = let
# dpi thing ill figure out later
# extraConfig = pkgs.writeText "emacs-extra-config" ''
# (setq mb/system-settings
# '((desktop/dpi . ${(toString cfg.dpi)})
# (desktop/hidpi . ${
# if cfg.hidpi
# then "t"
# else "nil"
# })))
# '';
2024-02-04 18:25:09 +04:00
extraConfig = pkgs.writeText "emacs-loadscript" ''
(require 'exwm-config)
(exwm-config-default)
2024-02-04 12:57:26 +04:00
(exwm-enable)
'';
in
singleton {
name = "exwm";
2024-02-06 17:33:25 +04:00
# launch emacs in fullscreen with dbus lol
start = ''
${pkgs.dbus.dbus-launch} --exit-with-session emacs -mm --fullscreen \
-l "${extraConfig}"
'';
};
2024-02-04 09:33:07 +04:00
displayManager = {
lightdm = {
enable = true;
background = ../../../config/background.png;
greeters.gtk = {
enable = true;
theme = {
name = "vimix-dark-ruby";
package = pkgs.vimix-gtk-themes;
};
};
};
};
libinput = {
enable = true;
# mouse
mouse = {
accelProfile = "flat";
};
# touchpad
touchpad = {
accelProfile = "flat";
};
};
};
users.users.sako.packages = with pkgs; [
2024-02-06 22:15:46 +04:00
rofi
2024-02-04 09:33:07 +04:00
# network
networkmanagerapplet
# brightness
brightnessctl
# gee tee k
vimix-gtk-themes
vimix-icon-theme
lxappearance
catppuccin-cursors.mochaDark
# screen shot (s)
flameshot
];
2024-02-04 18:25:09 +04:00
# environment.systemPackages = with pkgs; [
# ];
2024-02-04 09:33:07 +04:00
home-manager.users.sako = {pkgs, ...}: {
home.pointerCursor = {
name = "Catppuccin-Mocha-Dark";
size = 16;
x11 = {
enable = true;
};
gtk.enable = true;
package = pkgs.catppuccin-cursors.mochaDark;
};
gtk = {
enable = true;
theme.name = "vimix-dark-ruby";
iconTheme.name = "Vimix Ruby Dark";
};
home.file = {
"background.png" = {
enable = true;
source = ../../../config/background.png;
};
};
2024-02-06 22:15:46 +04:00
xdg.configFile = {
# backup
bspwm = {
source = ../../../config/bspwm;
2024-02-06 22:16:37 +04:00
};
sxhkd = {
source = ../../../config/sxhkd;
2024-02-06 22:15:46 +04:00
};
};
2024-02-04 09:33:07 +04:00
};
};
}