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

View file

@ -3,7 +3,7 @@
with lib; with lib;
let let
cfg = config.wm.bar.polybar; cfg = config.ui.bar.polybar;
pcfg = config.services.polybar; pcfg = config.services.polybar;
# TODO: create a theme # TODO: create a theme
@ -14,7 +14,7 @@ let
polybarConfig = import ./config.nix { inherit lib config pkgs colors; }; polybarConfig = import ./config.nix { inherit lib config pkgs colors; };
in in
{ {
options.wm.bar.polybar = { options.ui.bar.polybar = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; 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; with lib;
let let
cfg = config.wm.xmonad; uiCfg = config.ui;
cfg = uiCfg.wm.xmonad;
in in
{ {
options.wm.xmonad = { options.ui.wm.xmonad = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -29,7 +30,7 @@ in
enable = true; enable = true;
enableContribAndExtras = true; enableContribAndExtras = true;
config = ./config.hs; config = ./config.hs;
extraPackages = mkIf config.wm.bar.polybar.enable (hp: [ extraPackages = mkIf uiCfg.bar.polybar.enable (hp: [
hp.dbus hp.dbus
hp.monad-logger hp.monad-logger
]); ]);

View file

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