Upgraded snowfall lib
This commit is contained in:
parent
7e87dbc55b
commit
a1709f033f
58 changed files with 22 additions and 19 deletions
51
modules/nixos/desktop/addons/alacritty/default.nix
Normal file
51
modules/nixos/desktop/addons/alacritty/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.alacritty;
|
||||
in {
|
||||
options.aa.desktop.addons.alacritty = with types; {
|
||||
enable = mkEnableOption "alacritty";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
aa.system.fonts.enable = true;
|
||||
|
||||
# alacritty won't start without opengl
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
aa.home = {
|
||||
extraOptions = {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window.opacity = 0.95;
|
||||
font = {
|
||||
size = 12.0;
|
||||
normal = {
|
||||
family = "Hack Nerd Font";
|
||||
style = "Regular";
|
||||
};
|
||||
bold = {
|
||||
family = "Hack Nerd Font";
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = "Hack Nerd Font";
|
||||
style = "Italic";
|
||||
};
|
||||
bold_italic = {
|
||||
family = "Hack Nerd Font";
|
||||
style = "Bold Italic";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
25
modules/nixos/desktop/addons/gammastep/default.nix
Normal file
25
modules/nixos/desktop/addons/gammastep/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.gammastep;
|
||||
in {
|
||||
options.aa.desktop.addons.gammastep = with types; {
|
||||
enable = mkEnableOption "gammastep";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.geoclue2.enable = true;
|
||||
|
||||
aa.home.extraOptions = {
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
35
modules/nixos/desktop/addons/mako/default.nix
Normal file
35
modules/nixos/desktop/addons/mako/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.mako;
|
||||
in {
|
||||
options.aa.desktop.addons.mako = with types; {
|
||||
enable = mkEnableOption "mako";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
aa.system.fonts.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [mako libnotify];
|
||||
|
||||
aa.home.extraOptions = {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
|
||||
font = "'Hack Nerd Font' Regular 9";
|
||||
|
||||
backgroundColor = "#1D2021F0";
|
||||
textColor = "#FFFFDF";
|
||||
borderColor = "#1C1C1C";
|
||||
borderRadius = 10;
|
||||
|
||||
padding = "10";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
22
modules/nixos/desktop/addons/playerctl/default.nix
Normal file
22
modules/nixos/desktop/addons/playerctl/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.playerctl;
|
||||
in {
|
||||
options.aa.desktop.addons.playerctl = with types; {
|
||||
enable = mkEnableOption "playerctl";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [playerctl];
|
||||
|
||||
aa.home.extraOptions = {
|
||||
services.playerctld.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
27
modules/nixos/desktop/addons/rofi/default.nix
Normal file
27
modules/nixos/desktop/addons/rofi/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.rofi;
|
||||
in {
|
||||
options.aa.desktop.addons.rofi = with types; {
|
||||
enable = mkEnableOption "rofi";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
aa.home.extraOptions = {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "Hack Nerd Font 10";
|
||||
theme = "gruvbox-dark-hard";
|
||||
extraConfig = {
|
||||
show-icons = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
41
modules/nixos/desktop/addons/swayidle/default.nix
Normal file
41
modules/nixos/desktop/addons/swayidle/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.swayidle;
|
||||
in {
|
||||
options.aa.desktop.addons.swayidle = with types; {
|
||||
enable = mkEnableOption "swayidle";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [swayidle];
|
||||
|
||||
aa.home.extraOptions = {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${pkgs.swaylock}/bin/swaylock";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
|
||||
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock}/bin/swaylock";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
29
modules/nixos/desktop/addons/swaylock/default.nix
Normal file
29
modules/nixos/desktop/addons/swaylock/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.swaylock;
|
||||
user_cfg = config.home-manager.users.${config.aa.user.name};
|
||||
in {
|
||||
options.aa.desktop.addons.swaylock = with types; {
|
||||
enable = mkEnableOption "swaylock";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [swaylock];
|
||||
|
||||
aa.home.extraOptions = {
|
||||
programs.swaylock.settings = {
|
||||
image = "${user_cfg.xdg.dataHome}/${config.aa.desktop.sway.wallpaperPath}";
|
||||
};
|
||||
};
|
||||
|
||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/158025
|
||||
# This comment specifically: https://github.com/NixOS/nixpkgs/issues/158025#issuecomment-1344766809
|
||||
security.pam.services.swaylock = {};
|
||||
};
|
||||
}
|
155
modules/nixos/desktop/addons/waybar/default.nix
Normal file
155
modules/nixos/desktop/addons/waybar/default.nix
Normal file
|
@ -0,0 +1,155 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.desktop.addons.waybar;
|
||||
in {
|
||||
options.aa.desktop.addons.waybar = with types; {
|
||||
enable = mkEnableOption "waybar";
|
||||
|
||||
thermal-zone = mkOption {
|
||||
type = int;
|
||||
default = 0;
|
||||
description = "The thermal zone, as in `/sys/class/thermal/`.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
aa.system.fonts.enable = true;
|
||||
|
||||
aa.home = {
|
||||
extraOptions = {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
style = builtins.readFile ./waybar_style.css;
|
||||
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
height = 20;
|
||||
modules-left = ["sway/workspaces"];
|
||||
modules-center = ["clock"];
|
||||
modules-right = [
|
||||
"idle_inhibitor"
|
||||
"temperature"
|
||||
"cpu"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"memory"
|
||||
"backlight"
|
||||
"network"
|
||||
"tray"
|
||||
];
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = false;
|
||||
all-outputs = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "q";
|
||||
"2" = "w";
|
||||
"3" = "e";
|
||||
"4" = "r";
|
||||
"5" = "t";
|
||||
"6" = "y";
|
||||
"7" = "u";
|
||||
"8" = "i";
|
||||
"9" = "o";
|
||||
};
|
||||
};
|
||||
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = " ";
|
||||
deactivated = " ";
|
||||
};
|
||||
};
|
||||
|
||||
temperature = {
|
||||
critical-threshold = 80;
|
||||
format = "{icon}{temperatureC}°C";
|
||||
format-icons = [" " " " " "];
|
||||
thermal-zone = cfg.thermal-zone;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = " {usage}%";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth-muted = " {volume}% {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " ";
|
||||
format-source-muted = " ";
|
||||
format-icons = {
|
||||
headphone = " ";
|
||||
hands-free = " ";
|
||||
headset = " ";
|
||||
phone = " ";
|
||||
portable = " ";
|
||||
car = " ";
|
||||
default = [" " " " " "];
|
||||
};
|
||||
tooltip-format = "{desc}, {volume}%";
|
||||
# TODO: Figure out how to get pactl binary?
|
||||
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
on-click-right = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
on-click-middle = "pavucontrol";
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 1;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
tooltip-format = "{timeTo}, {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " ";
|
||||
format-alt = "{time} {icon}";
|
||||
format-icons = [" " " " " " " " " "];
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = " {}%";
|
||||
};
|
||||
|
||||
backlight = {
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = ["`" ""];
|
||||
on-scroll-up = "light -A 1";
|
||||
on-scroll-down = "light -U 1";
|
||||
};
|
||||
|
||||
network = {
|
||||
format-wifi = " ";
|
||||
format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "睊 ";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
tooltip-format = "{essid} {signalStrength}%";
|
||||
};
|
||||
|
||||
tray = {
|
||||
spacing = 10;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
wayland.windowManager.sway.config.bars = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
132
modules/nixos/desktop/addons/waybar/waybar_style.css
Normal file
132
modules/nixos/desktop/addons/waybar/waybar_style.css
Normal file
|
@ -0,0 +1,132 @@
|
|||
* {
|
||||
border: none;
|
||||
font-family: Hack Nerd Font, sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(29, 32, 33, 0.9);
|
||||
border-bottom: 3px solid #1d2021;
|
||||
color: #ffffdf;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#mode,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#clock,
|
||||
#idle_inhibitor,
|
||||
#language,
|
||||
#pulseaudio,
|
||||
#backlight,
|
||||
#battery,
|
||||
#network,
|
||||
#tray {
|
||||
background-color: #303030;
|
||||
padding: 0 10px;
|
||||
margin: 3px;
|
||||
border: 3px solid rgba(0, 0, 0, 0);
|
||||
border-radius: 90px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
min-width: 20px;
|
||||
color: #87afaf;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: rgba(0, 0, 0, 1)
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #ffaf00;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: #61afef;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #abb2bf;
|
||||
color: #1e222a;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: #fb4934;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #1d2021;
|
||||
background-color: #9d0006;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #ff8700;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #87af87;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: #b8bb26;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
background-color: #1f321c;
|
||||
color: #ffffaf;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #1f321c;
|
||||
color: #ffffaf;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #afaf00;
|
||||
color: #303030;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #fabd2f;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #b57614;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
color: #17ccd5;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #d787af;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #875f87;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue