add more modules to waybar and improve mpd

This commit is contained in:
Leonardo Eugênio 2022-08-12 20:58:53 -03:00
parent c329928582
commit 40d26f0371
3 changed files with 67 additions and 16 deletions

View file

@ -4,25 +4,24 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-label/ROOT"; device = "/dev/disk/by-label/ROOT";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nixos" ]; options = [ "subvol=nixos" ];
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" = {
{ device = "/dev/disk/by-label/NIXROOT"; device = "/dev/disk/by-label/NIXROOT";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [ ];
@ -35,6 +34,7 @@
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "i15"; # Define your hostname. networking.hostName = "i15"; # Define your hostname.
} }

View file

@ -326,6 +326,16 @@ in {
services.mpd = { services.mpd = {
enable = true; enable = true;
musicDirectory = "~/Música"; musicDirectory = "~/Música";
extraConfig = ''
restore_paused "yes"
auto_update "yes"
audio_output {
type "pulse"
name "My Pulse Output"
mixer_type "hardware"
}
filesystem_charset "UTF-8"
'';
}; };
home.pointerCursor = { home.pointerCursor = {
name = "capitaine-cursors"; name = "capitaine-cursors";

View file

@ -8,9 +8,31 @@ in {
systemd.target = "sway-session.target"; systemd.target = "sway-session.target";
settings = [{ settings = [{
layer = "top"; layer = "top";
modules-left = [ "sway/workspaces" "sway/mode" ]; modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
modules-center = [ "clock" ]; modules-center = [ "clock" ];
modules-right = [ "custom/caffeine" "pulseaudio" "network" ]; modules-right = [
"sway/language"
"mpd"
"tray"
"custom/caffeine"
"pulseaudio"
"network"
"battery"
];
battery = {
tooltip = true;
states = {
full = 100;
good = 95;
warning = 25;
};
format = "{icon} ";
format-charging = "";
format-plugged = "";
format-full = "";
format-warning = "{icon} {time}";
format-icons = [ "" "" "" "" "" "" ];
};
network = { network = {
interval = 5; interval = 5;
tooltip = false; tooltip = false;
@ -40,11 +62,30 @@ in {
default = ""; default = "";
}; };
}; };
"sway/window" = { max-length = 40; };
"tray"= {
"spacing"= 7;
"icon-size"=19;
};
clock = { clock = {
interval = 60; interval = 60;
format = "<b>{:%H:%M %a %d/%m}</b>"; format = "<b>{:%H:%M %a %d/%m}</b>";
tooltip = false; tooltip = false;
}; };
mpd = {
format = "{stateIcon} {title} - {artist}";
format-paused = "{stateIcon}";
format-stopped = "";
state-icons = {
paused = "";
playing = "";
};
tooltip = false;
on-click = "mpc toggle";
on-scroll-up = "mpc vol +10";
on-scroll-down = "mpc vol -10";
};
"sway/language" = { format = "{short} {variant}"; };
"custom/caffeine" = { "custom/caffeine" = {
format = "{}"; format = "{}";
exec = "pidof swayidle > /dev/null && echo || echo "; exec = "pidof swayidle > /dev/null && echo || echo ";