flakes: Migrate the config and miku to flakes
This commit is contained in:
@@ -1,55 +1,63 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users."${config.system.singleUser}" = {
|
||||
xdg.configFile."waybar/style.css".source = ./style.css;
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = builtins.readFile ./style.css;
|
||||
settings = [
|
||||
{
|
||||
output = [ "DP-2" ];
|
||||
layer = "bottom";
|
||||
position = "left";
|
||||
gtk-layer-shell = true;
|
||||
let
|
||||
cfg = config.ptw.programs.waybar;
|
||||
in {
|
||||
options.ptw.programs.waybar = {
|
||||
enable = lib.mkEnableOption "Enable and configure waybar using HomeManager";
|
||||
};
|
||||
|
||||
modules-left = [ "custom/applauncher" "sway/workspaces" "sway/mode" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [ "tray" "idle_inhibitor" "pulseaudio" "custom/notifications" "custom/menu" ];
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users."${config.ptw.system.singleUser}" = {
|
||||
xdg.configFile."waybar/style.css".source = ./style.css;
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = builtins.readFile ./style.css;
|
||||
settings = [
|
||||
{
|
||||
output = [ "DP-2" ];
|
||||
layer = "bottom";
|
||||
position = "left";
|
||||
gtk-layer-shell = true;
|
||||
|
||||
modules = {
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
modules-left = [ "custom/applauncher" "sway/workspaces" "sway/mode" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [ "tray" "idle_inhibitor" "pulseaudio" "custom/notifications" "custom/menu" ];
|
||||
|
||||
modules = {
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
};
|
||||
"custom/applauncher" = {
|
||||
format = " ";
|
||||
on-click = "${pkgs.nwg-launchers}/bin/nwggrid -client";
|
||||
tooltip = "false";
|
||||
};
|
||||
"custom/notifications" = {
|
||||
format = " ";
|
||||
on-click = "${pkgs.swaync}/bin/swaync-client --toggle-panel";
|
||||
tooltip = "false";
|
||||
};
|
||||
"custom/menu" = {
|
||||
format = " ";
|
||||
on-click = "${pkgs.wlogout}/bin/wlogout";
|
||||
tooltip = "false";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
#on-click = "${pkgs.stable.myxer}/bin/myxer";
|
||||
};
|
||||
};
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
};
|
||||
"custom/applauncher" = {
|
||||
format = " ";
|
||||
on-click = "${pkgs.nwg-launchers}/bin/nwggrid -client";
|
||||
tooltip = "false";
|
||||
};
|
||||
"custom/notifications" = {
|
||||
format = " ";
|
||||
on-click = "${pkgs.swaync}/bin/swaync-client --toggle-panel";
|
||||
tooltip = "false";
|
||||
};
|
||||
"custom/menu" = {
|
||||
format = " ";
|
||||
on-click = "${pkgs.wlogout}/bin/wlogout";
|
||||
tooltip = "false";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
on-click = "${pkgs.stable.myxer}/bin/myxer";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user