add vm config (graphics seem borked)
This commit is contained in:
parent
112a5f7b8d
commit
b1c446ebfe
5 changed files with 113 additions and 86 deletions
90
home/programs/sway.nix
Normal file
90
home/programs/sway.nix
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
(import ./swaylock.nix)
|
||||
(import ./swayidle.nix)
|
||||
(import ./waybar.nix)
|
||||
];
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [pkgs.sway];
|
||||
extraPortals = [pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
command = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.mako.enable = true;
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 36;
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = ["mpris" "pulseaudio" "clock" "tray" "battery"];
|
||||
clock = {
|
||||
format = "📅 {:%a %b-%d %I:%M %p}";
|
||||
};
|
||||
pulseaudio = {
|
||||
format-muted = "🔇 {volume}";
|
||||
format = "{icon} {volume}";
|
||||
format-icons.default = ["🔈" "🔉" "🔊"];
|
||||
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
mpris = {
|
||||
format = "{player_icon} {artist} - {title}";
|
||||
format-paused = "{status_icon} {player_icon} {artist} - {title}";
|
||||
player-icons = {
|
||||
default = "▶️";
|
||||
mpd = "🎵";
|
||||
kdeconnect = "☎️";
|
||||
};
|
||||
status-icons = {
|
||||
paused = "⏸️";
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = ["🤏" "🪫" "🔋" "🔋"];
|
||||
format-charging = "🔌 {capacity}%";
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue