home: cosmetic changes

- moved wm and wm/bar to ui
This commit is contained in:
Dmitriy Pleshevskiy 2022-08-28 15:02:53 +03:00
parent 70b7bdfb8e
commit f0c921332c
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
9 changed files with 15 additions and 17 deletions

View file

@ -4,7 +4,7 @@ let
secrets = import ../secrets.nix;
in
{
imports = (import ./wm) ++ (import ./shell) ++ (import ./progs);
imports = (import ./ui) ++ (import ./shell) ++ (import ./progs);
# targets.genericLinux.enable = true;
@ -21,7 +21,6 @@ in
};
home.packages = with pkgs; [
# TODO: move packages to separate modules
kotatogram-desktop
docker-compose
@ -37,20 +36,18 @@ in
# haskell
stylish-haskell # formatter
# database
postgresql_12 # 🤷 I need only psql
# browser
librewolf # a fork of firefox, focused on privacy, security and freedom
# for work
google-cloud-sdk
kubectl
postgresql_12 # 🤷 I need only psql
];
# window manager
wm = {
xmonad.enable = true;
# user interface
ui = {
wm.xmonad.enable = true;
bar.polybar.enable = true;
};
@ -65,9 +62,8 @@ in
progs = {
git = with secrets.git; {
enable = true;
inherit userName;
inherit userEmail;
gpgKey = gpgSigningKey;
inherit userName userEmail;
};
# password manager

View file

@ -70,7 +70,7 @@ with lib;
};
};
"module/xmonad" = mkIf config.wm.xmonad.enable {
"module/xmonad" = mkIf config.ui.wm.xmonad.enable {
type = "custom/script";
exec = "${pkgs.xmonad-log}/bin/xmonad-log";
tail = true;

View file

@ -3,7 +3,7 @@
with lib;
let
cfg = config.wm.bar.polybar;
cfg = config.ui.bar.polybar;
pcfg = config.services.polybar;
# TODO: create a theme
@ -14,7 +14,7 @@ let
polybarConfig = import ./config.nix { inherit lib config pkgs colors; };
in
{
options.wm.bar.polybar = {
options.ui.bar.polybar = {
enable = mkOption {
type = types.bool;
default = false;

1
home/ui/default.nix Normal file
View file

@ -0,0 +1 @@
(import ./wm) ++ (import ./bar)

1
home/ui/wm/default.nix Normal file
View file

@ -0,0 +1 @@
[ ./xmonad ]

View file

@ -3,10 +3,11 @@
with lib;
let
cfg = config.wm.xmonad;
uiCfg = config.ui;
cfg = uiCfg.wm.xmonad;
in
{
options.wm.xmonad = {
options.ui.wm.xmonad = {
enable = mkOption {
type = types.bool;
default = false;
@ -29,7 +30,7 @@ in
enable = true;
enableContribAndExtras = true;
config = ./config.hs;
extraPackages = mkIf config.wm.bar.polybar.enable (hp: [
extraPackages = mkIf uiCfg.bar.polybar.enable (hp: [
hp.dbus
hp.monad-logger
]);

View file

@ -1 +0,0 @@
[ ./xmonad ] ++ (import ./bar)