Skip to content

Commit

Permalink
feat: add xmonad
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Nov 19, 2023
1 parent c56ed4f commit 92e540a
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 1 deletion.
5 changes: 5 additions & 0 deletions home/desktop/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{...}: {
imports = [
./xmonad
];
}
17 changes: 17 additions & 0 deletions home/desktop/xmonad/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
xsession = {
enable = true;

windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
extraPackages = hp: [
hp.dbus
hp.monad-logger
hp.xmonad-contrib
];

config = ./config.hs;
};
};
}
3 changes: 3 additions & 0 deletions home/desktop/xmonad/xmonad.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import XMonad

main = xmonad defaultConfig { }
1 change: 1 addition & 0 deletions hosts/dekomori/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
./hardware.nix

../../modules/desktop.nix
../../modules/xmonad.nix
];

networking = {
Expand Down
12 changes: 11 additions & 1 deletion modules/desktop.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{...}: {
{pkgs, ...}: {
imports = [
./core.nix
];

# Get system’s power information such as cpu usage.
services.upower.enable = true;
systemd.services.upower.enable = true;

# Communication between multiple processes running concurrently on the system.
services.dbus = {
enable = true;
packages = [pkgs.gnome3.dconf];
};
}
26 changes: 26 additions & 0 deletions modules/xmonad.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}: {
services = {
xserver = {
enable = true;
layout = "us,ru";

libinput = {
enable = true;
};

displayManager.defaultSession = "none+xmonad";

windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
};

xkbOptions = "grp:win_space_toggle";
};
};
}

0 comments on commit 92e540a

Please sign in to comment.