diff --git a/flake.nix b/flake.nix
index 9d6e815..3a9719e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -10,7 +10,12 @@
};
};
- outputs = { self, nixpkgs, ... }@inputs: {
+ outputs = {
+ self,
+ nixpkgs,
+ ...
+ } @ inputs: {
+ formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix
index 3151b47..d7d0cf9 100644
--- a/hosts/default/configuration.nix
+++ b/hosts/default/configuration.nix
@@ -1,16 +1,17 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
-
-{ config, pkgs, inputs, ... }:
-
{
- imports =
- [
- ../../modules/nixos/main-user.nix
- ./hardware-configuration.nix
- inputs.home-manager.nixosModules.default
- ];
+ config,
+ pkgs,
+ inputs,
+ ...
+}: {
+ imports = [
+ ../../modules/nixos/main-user.nix
+ ./hardware-configuration.nix
+ inputs.home-manager.nixosModules.default
+ ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
@@ -52,7 +53,7 @@
services.xserver.desktopManager.gnome.enable = true;
services.pcscd.enable = true;
- services.dbus.packages = [ pkgs.gcr ];
+ services.dbus.packages = [pkgs.gcr];
# Configure keymap in X11
services.xserver.xkb = {
@@ -82,29 +83,28 @@
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ nix.settings.experimental-features = ["nix-command" "flakes"];
# Define a user account. Don't forget to set a password with ‘passwd’.
- main-user = {
+ main-user = {
enable = true;
username = "sprechtl";
};
home-manager = {
- extraSpecialArgs = { inherit inputs; };
+ extraSpecialArgs = {inherit inputs;};
users = {
"sprechtl" = import ./home.nix;
};
};
-
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
- vim
+ vim
wget
usbutils
alacritty
@@ -136,7 +136,7 @@
wdisplays
];
- programs = {
+ programs = {
neovim = {
enable = true;
defaultEditor = true;
@@ -146,9 +146,9 @@
firefox.enable = true;
hyprland.enable = true;
gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- pinentryPackage = pkgs.pinentry-qt;
+ enable = true;
+ enableSSHSupport = true;
+ pinentryPackage = pkgs.pinentry-qt;
};
};
@@ -160,7 +160,6 @@
# enableSSHSupport = true;
# };
-
services.fprintd.enable = true;
# List services that you want to enable:
@@ -182,5 +181,4 @@
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
-
}
diff --git a/hosts/default/hardware-configuration.nix b/hosts/default/hardware-configuration.nix
index 9248617..3e1b7a6 100644
--- a/hosts/default/hardware-configuration.nix
+++ b/hosts/default/hardware-configuration.nix
@@ -1,32 +1,36 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
-{ config, lib, pkgs, modulesPath, ... }:
-
{
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix")
- ];
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}: {
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
- boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ "kvm-amd" ];
- boot.extraModulePackages = [ ];
+ boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod"];
+ boot.initrd.kernelModules = [];
+ boot.kernelModules = ["kvm-amd"];
+ boot.extraModulePackages = [];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/ed1afa26-1c26-4da6-a4b4-b5cb6e0b2222";
- fsType = "ext4";
- };
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/ed1afa26-1c26-4da6-a4b4-b5cb6e0b2222";
+ fsType = "ext4";
+ };
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/1FDC-CD90";
- fsType = "vfat";
- options = [ "fmask=0077" "dmask=0077" ];
- };
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/1FDC-CD90";
+ fsType = "vfat";
+ options = ["fmask=0077" "dmask=0077"];
+ };
- swapDevices =
- [ { device = "/dev/disk/by-uuid/cee4a6a9-f044-4258-9d4b-35c67cc59e2c"; }
- ];
+ swapDevices = [
+ {device = "/dev/disk/by-uuid/cee4a6a9-f044-4258-9d4b-35c67cc59e2c";}
+ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
diff --git a/hosts/default/home.nix b/hosts/default/home.nix
index 78c27f1..0e06920 100644
--- a/hosts/default/home.nix
+++ b/hosts/default/home.nix
@@ -1,17 +1,19 @@
-{ config, pkgs, ... }:
-
{
+ config,
+ pkgs,
+ ...
+}: {
imports = [
- ../../modules/home-manager/hyprland.nix
- ../../modules/home-manager/pass.nix
- ../../modules/home-manager/btop.nix
- ../../modules/home-manager/git.nix
- ../../modules/home-manager/wofi.nix
- ../../modules/home-manager/waybar.nix
- ../../modules/home-manager/alacritty.nix
- ../../modules/home-manager/nextcloud.nix
- ../../modules/home-manager/zsh.nix
- ];
+ ../../modules/home-manager/hyprland.nix
+ ../../modules/home-manager/pass.nix
+ ../../modules/home-manager/btop.nix
+ ../../modules/home-manager/git.nix
+ ../../modules/home-manager/wofi.nix
+ ../../modules/home-manager/waybar.nix
+ ../../modules/home-manager/alacritty.nix
+ ../../modules/home-manager/nextcloud.nix
+ ../../modules/home-manager/zsh.nix
+ ];
home.username = "sprechtl";
home.homeDirectory = "/home/sprechtl";
@@ -36,7 +38,6 @@
# '')
];
-
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
diff --git a/modules/home-manager/alacritty.nix b/modules/home-manager/alacritty.nix
index 1f2dc4d..6f4e514 100644
--- a/modules/home-manager/alacritty.nix
+++ b/modules/home-manager/alacritty.nix
@@ -1,42 +1,44 @@
-{ config, pkgs, ... }:
-
{
- programs.alacritty = {
- enable = true;
- settings = {
- colors = {
- bright = {
- black = "#928374";
- blue = "#83a598";
- cyan = "#8ec07c";
- green = "#b8bb26";
- magenta = "#d3869b";
- red = "#fb4934";
- white = "#ebdbb2";
- yellow = "#fabd2f";
- };
- normal = {
- black = "#282828";
- blue = "#458588";
- cyan = "#689d6a";
- green = "#98971a";
- magenta = "#b16286";
- red = "#cc241d";
- white = "#a89984";
- yellow = "#d79921";
- };
- primary = {
- background = "#282828";
- foreground = "#ebdbb2";
- };
- };
- env = {
- TERM = "xterm-256color";
- };
- font = {
- size = 12.0;
- normal.family = "JetBrainsMono Nerd Font Mono";
- };
- };
- };
+ config,
+ pkgs,
+ ...
+}: {
+ programs.alacritty = {
+ enable = true;
+ settings = {
+ colors = {
+ bright = {
+ black = "#928374";
+ blue = "#83a598";
+ cyan = "#8ec07c";
+ green = "#b8bb26";
+ magenta = "#d3869b";
+ red = "#fb4934";
+ white = "#ebdbb2";
+ yellow = "#fabd2f";
+ };
+ normal = {
+ black = "#282828";
+ blue = "#458588";
+ cyan = "#689d6a";
+ green = "#98971a";
+ magenta = "#b16286";
+ red = "#cc241d";
+ white = "#a89984";
+ yellow = "#d79921";
+ };
+ primary = {
+ background = "#282828";
+ foreground = "#ebdbb2";
+ };
+ };
+ env = {
+ TERM = "xterm-256color";
+ };
+ font = {
+ size = 12.0;
+ normal.family = "JetBrainsMono Nerd Font Mono";
+ };
+ };
+ };
}
diff --git a/modules/home-manager/btop.nix b/modules/home-manager/btop.nix
index 240f1a1..4223a61 100644
--- a/modules/home-manager/btop.nix
+++ b/modules/home-manager/btop.nix
@@ -1,11 +1,13 @@
-{ config, pkgs, ... }:
-
{
- programs.btop = {
- enable = true;
- settings = {
- color_theme = "gruvbox_dark_v2";
- vim_keys = true;
- };
- };
+ config,
+ pkgs,
+ ...
+}: {
+ programs.btop = {
+ enable = true;
+ settings = {
+ color_theme = "gruvbox_dark_v2";
+ vim_keys = true;
+ };
+ };
}
diff --git a/modules/home-manager/git.nix b/modules/home-manager/git.nix
index f37128b..2909657 100644
--- a/modules/home-manager/git.nix
+++ b/modules/home-manager/git.nix
@@ -1,14 +1,16 @@
-{ config, pkgs, ... }:
-
{
- programs.git = {
- enable = true;
- delta.enable = true;
- userEmail = "stefan@tague.at";
- userName = "s-prechtl";
- extraConfig = {
- init.defaultBranch = "master";
- push.autoSetupRemote = true;
- };
- };
+ config,
+ pkgs,
+ ...
+}: {
+ programs.git = {
+ enable = true;
+ delta.enable = true;
+ userEmail = "stefan@tague.at";
+ userName = "s-prechtl";
+ extraConfig = {
+ init.defaultBranch = "master";
+ push.autoSetupRemote = true;
+ };
+ };
}
diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix
index c660cf8..12dd9ab 100644
--- a/modules/home-manager/hyprland.nix
+++ b/modules/home-manager/hyprland.nix
@@ -1,156 +1,159 @@
-{ config, pkgs, ... }:
-
{
+ config,
+ pkgs,
+ ...
+}: {
imports = [
- ./hyprlock.nix
- ];
+ ./hyprlock.nix
+ ];
wayland.windowManager.hyprland = {
- enable = true;
- xwayland.enable = true;
- systemd.enable = true;
- settings = {
- # BINDS
- "$mod" = "SUPER";
- bind = [
- "SUPERSHIFT, E, exit"
- "$mod, Q, killactive"
- "$mod, B, exec, brave"
- "$mod, return, exec, alacritty"
- "$mod,E,exec,nautilus"
- "$mod,D,exec,killall -q wofi; wofi --show drun -I"
- "SUPERSHIFT,R,exec,hyprctl reload"
- "$mod,space,togglefloating,"
- "ALTSHIFT, L, exec, swaylock"
- "$mod,F,fullscreen"
- "ALTSHIFT,K,exec,amixer set 'Master' 5%+"
- "ALTSHIFT,J,exec,amixer set 'Master' 5%-"
- "SUPERSHIFT,N,exec, swaync-client -t -sw"
- "$mod, M, exec,hyprctl keyword monitor 'eDP-1, enable'"
- "SUPERSHIFT, M, exec,hyprctl keyword monitor 'eDP-1, disable'"
- "SUPERSHIFT,P,exec,hyprshot -m region -o ~/Screenshot/"
- "SUPERALTSHIFT, P, exec, hyprshot -m window -o ~/Screenshot/"
+ enable = true;
+ xwayland.enable = true;
+ systemd.enable = true;
+ settings = {
+ # BINDS
+ "$mod" = "SUPER";
+ bind =
+ [
+ "SUPERSHIFT, E, exit"
+ "$mod, Q, killactive"
+ "$mod, B, exec, brave"
+ "$mod, return, exec, alacritty"
+ "$mod,E,exec,nautilus"
+ "$mod,D,exec,killall -q wofi; wofi --show drun -I"
+ "SUPERSHIFT,R,exec,hyprctl reload"
+ "$mod,space,togglefloating,"
+ "ALTSHIFT, L, exec, swaylock"
+ "$mod,F,fullscreen"
+ "ALTSHIFT,K,exec,amixer set 'Master' 5%+"
+ "ALTSHIFT,J,exec,amixer set 'Master' 5%-"
+ "SUPERSHIFT,N,exec, swaync-client -t -sw"
+ "$mod, M, exec,hyprctl keyword monitor 'eDP-1, enable'"
+ "SUPERSHIFT, M, exec,hyprctl keyword monitor 'eDP-1, disable'"
+ "SUPERSHIFT,P,exec,hyprshot -m region -o ~/Screenshot/"
+ "SUPERALTSHIFT, P, exec, hyprshot -m window -o ~/Screenshot/"
- "$mod,left,movefocus,l"
- "$mod, H,movefocus,l"
- "SUPERALT, left, movewindow, l"
- "SUPERALT, H, movewindow, l"
- "$mod,right,movefocus,r"
- "$mod, L,movefocus,r"
- "SUPERALT, right, movewindow, r"
- "SUPERALT, L, movewindow, r"
- "$mod,up,movefocus,u"
- "$mod, K,movefocus,u"
- "SUPERALT, up, movewindow, u"
- "SUPERALT, K, movewindow, u"
- "$mod,down,movefocus,d"
- "$mod, J,movefocus,d"
- "SUPERALT, down, movewindow, d"
- "SUPERALT, J, movewindow, d"
- ]
- ++ (
- # workspaces
- # binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
- builtins.concatLists (builtins.genList (i:
- let ws = i + 1;
- in [
- "$mod, code:1${toString i}, workspace, ${toString ws}"
- "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
- ]
- )
- 9)
- );
+ "$mod,left,movefocus,l"
+ "$mod, H,movefocus,l"
+ "SUPERALT, left, movewindow, l"
+ "SUPERALT, H, movewindow, l"
+ "$mod,right,movefocus,r"
+ "$mod, L,movefocus,r"
+ "SUPERALT, right, movewindow, r"
+ "SUPERALT, L, movewindow, r"
+ "$mod,up,movefocus,u"
+ "$mod, K,movefocus,u"
+ "SUPERALT, up, movewindow, u"
+ "SUPERALT, K, movewindow, u"
+ "$mod,down,movefocus,d"
+ "$mod, J,movefocus,d"
+ "SUPERALT, down, movewindow, d"
+ "SUPERALT, J, movewindow, d"
+ ]
+ ++ (
+ # workspaces
+ # binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
+ builtins.concatLists (builtins.genList (
+ i: let
+ ws = i + 1;
+ in [
+ "$mod, code:1${toString i}, workspace, ${toString ws}"
+ "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
+ ]
+ )
+ 9)
+ );
- bindm = [
- "$mod, mouse:272,movewindow"
- "$mod, mouse:273,resizewindow"
- ];
- binde = [
- ",XF86MonBrightnessDown,exec,brightnessctl --device=intel_backlight s 5%-"
- ",XF86MonBrightnessUp,exec,brightnessctl --device=intel_backlight s 5%+"
- "SUPERSHIFT,right,resizeactive, 10 0"
- "SUPERSHIFT,L,resizeactive, 10 0"
- "SUPERSHIFT,down,resizeactive, 0 10"
- "SUPERSHIFT,J,resizeactive, 0 10"
- "SUPERSHIFT,left,resizeactive, -10 0"
- "SUPERSHIFT,H,resizeactive, -10 0"
- "SUPERSHIFT,up,resizeactive, 0 -10"
- "SUPERSHIFT,K,resizeactive, 0 -10"
- ];
+ bindm = [
+ "$mod, mouse:272,movewindow"
+ "$mod, mouse:273,resizewindow"
+ ];
+ binde = [
+ ",XF86MonBrightnessDown,exec,brightnessctl --device=intel_backlight s 5%-"
+ ",XF86MonBrightnessUp,exec,brightnessctl --device=intel_backlight s 5%+"
+ "SUPERSHIFT,right,resizeactive, 10 0"
+ "SUPERSHIFT,L,resizeactive, 10 0"
+ "SUPERSHIFT,down,resizeactive, 0 10"
+ "SUPERSHIFT,J,resizeactive, 0 10"
+ "SUPERSHIFT,left,resizeactive, -10 0"
+ "SUPERSHIFT,H,resizeactive, -10 0"
+ "SUPERSHIFT,up,resizeactive, 0 -10"
+ "SUPERSHIFT,K,resizeactive, 0 -10"
+ ];
- # MONITOR
+ # MONITOR
- monitor = [
- "eDP-1,2560x1600@165.0,0x0,2"
- ];
+ monitor = [
+ "eDP-1,2560x1600@165.0,0x0,2"
+ ];
- # INPUT
+ # INPUT
- input = {
- kb_layout="us";
- kb_options="compose:ralt,caps:escape";
- follow_mouse=2;
+ input = {
+ kb_layout = "us";
+ kb_options = "compose:ralt,caps:escape";
+ follow_mouse = 2;
- touchpad = {
- natural_scroll="yes";
- };
+ touchpad = {
+ natural_scroll = "yes";
+ };
- sensitivity=0.0; # -1.0 - 1.0, 0 means no modification.
- };
+ sensitivity = 0.0; # -1.0 - 1.0, 0 means no modification.
+ };
- # GENERAL
- general = {
- gaps_in=10;
- gaps_out=20;
+ # GENERAL
+ general = {
+ gaps_in = 10;
+ gaps_out = 20;
- border_size=2;
- "col.active_border"="0xffBF616A";
- "col.inactive_border"="0xffebdbb2";
- };
+ border_size = 2;
+ "col.active_border" = "0xffBF616A";
+ "col.inactive_border" = "0xffebdbb2";
+ };
- # CURSOR
- cursor = {
- no_warps=true;
- inactive_timeout=3;
- };
+ # CURSOR
+ cursor = {
+ no_warps = true;
+ inactive_timeout = 3;
+ };
- # DECORATION
- decoration = {
- active_opacity=0.95;
- inactive_opacity=0.95;
- rounding=10;
- };
+ # DECORATION
+ decoration = {
+ active_opacity = 0.95;
+ inactive_opacity = 0.95;
+ rounding = 10;
+ };
- # ANIMATION
- animations = {
- enabled=1;
- bezier="overshot,0.13,0.99,0.29,1.1";
- animation = [
- "windows,1,4,overshot,slide"
- "border,1,10,default"
- "fade,1,10,default"
- "workspaces,1,6,overshot,slide"
- ];
- };
+ # ANIMATION
+ animations = {
+ enabled = 1;
+ bezier = "overshot,0.13,0.99,0.29,1.1";
+ animation = [
+ "windows,1,4,overshot,slide"
+ "border,1,10,default"
+ "fade,1,10,default"
+ "workspaces,1,6,overshot,slide"
+ ];
+ };
- # EXEC ONCE
- exec-once = [
- "waybar"
- "nm-applet"
- "swaync"
- "whatpulse"
- ];
+ # EXEC ONCE
+ exec-once = [
+ "waybar"
+ "nm-applet"
+ "swaync"
+ "whatpulse"
+ ];
-
- # WINDOW RULES
- windowrule = [
- "move 400 400, float, title:(jetbrains toolbox)"
- "float,wofi"
- "opacity 1 override,title:^(.*)(Brave)(.*)$"
- ];
+ # WINDOW RULES
+ windowrule = [
+ "move 400 400, float, title:(jetbrains toolbox)"
+ "float,wofi"
+ "opacity 1 override,title:^(.*)(Brave)(.*)$"
+ ];
+ };
};
-};
# Optional, hint Electron apps to use Wayland:
home.sessionVariables = {
- NIXOS_OZONE_WL = "1";
+ NIXOS_OZONE_WL = "1";
};
}
diff --git a/modules/home-manager/hyprlock.nix b/modules/home-manager/hyprlock.nix
index e8b0ff9..2a8174d 100644
--- a/modules/home-manager/hyprlock.nix
+++ b/modules/home-manager/hyprlock.nix
@@ -1,39 +1,41 @@
-{ config, pkgs, ... }:
-
{
- programs.hyprlock = {
- enable = true;
- settings = {
- general = {
- disable_loading_bar = true;
- grace = 300;
- hide_cursor = true;
- no_fade_in = false;
- };
+ config,
+ pkgs,
+ ...
+}: {
+ programs.hyprlock = {
+ enable = true;
+ settings = {
+ general = {
+ disable_loading_bar = true;
+ grace = 300;
+ hide_cursor = true;
+ no_fade_in = false;
+ };
- background = [
- {
- path = "screenshot";
- blur_passes = 3;
- blur_size = 8;
- }
- ];
+ background = [
+ {
+ path = "screenshot";
+ blur_passes = 3;
+ blur_size = 8;
+ }
+ ];
- input-field = [
- {
- size = "200, 50";
- position = "0, -80";
- monitor = "";
- dots_center = true;
- fade_on_empty = false;
- font_color = "rgb(202, 211, 245)";
- inner_color = "rgb(91, 96, 120)";
- outer_color = "rgb(24, 25, 38)";
- outline_thickness = 5;
- placeholder_text = "Password...";
- shadow_passes = 2;
- }
- ];
- };
- };
+ input-field = [
+ {
+ size = "200, 50";
+ position = "0, -80";
+ monitor = "";
+ dots_center = true;
+ fade_on_empty = false;
+ font_color = "rgb(202, 211, 245)";
+ inner_color = "rgb(91, 96, 120)";
+ outer_color = "rgb(24, 25, 38)";
+ outline_thickness = 5;
+ placeholder_text = "Password...";
+ shadow_passes = 2;
+ }
+ ];
+ };
+ };
}
diff --git a/modules/home-manager/nextcloud.nix b/modules/home-manager/nextcloud.nix
index 0a9bd35..c100550 100644
--- a/modules/home-manager/nextcloud.nix
+++ b/modules/home-manager/nextcloud.nix
@@ -1,8 +1,10 @@
-{ config, pkgs, ... }:
-
{
- services.nextcloud-client = {
- enable = true;
- startInBackground = true;
- };
+ config,
+ pkgs,
+ ...
+}: {
+ services.nextcloud-client = {
+ enable = true;
+ startInBackground = true;
+ };
}
diff --git a/modules/home-manager/pass.nix b/modules/home-manager/pass.nix
index 2b1995d..f079c4f 100644
--- a/modules/home-manager/pass.nix
+++ b/modules/home-manager/pass.nix
@@ -1,12 +1,14 @@
-{ config, pkgs, ... }:
-
{
- programs.password-store = {
+ config,
+ pkgs,
+ ...
+}: {
+ programs.password-store = {
enable = true;
settings = {
- PASSWORD_STORE_DIR="$HOME/.password-store";
- PASSWORD_STORE_GENERATED_LENGTH = "20";
- PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
+ PASSWORD_STORE_DIR = "$HOME/.password-store";
+ PASSWORD_STORE_GENERATED_LENGTH = "20";
+ PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
};
};
programs.browserpass.enable = true;
diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix
index 5c23ef4..721b995 100644
--- a/modules/home-manager/waybar.nix
+++ b/modules/home-manager/waybar.nix
@@ -1,697 +1,699 @@
-{ config, pkgs, ... }:
-
{
- programs.waybar = {
- enable = true;
- settings = {
- mainBar = {
- layer = "top";
- position = "top";
- # height = 36; # Auto height by default
- modules-left = [
- "clock#time"
- "custom/arrow1"
- "clock#date"
- "custom/arrow2"
- "hyprland/workspaces"
- "custom/arrow3"
- ];
- modules-center = [
- "custom/arrow4"
- "hyprland/window"
- "custom/arrow5"
- ];
- modules-right = [
- "custom/arrow6"
- "battery"
- "custom/arrow7"
- "network"
- "bluetooth"
- "custom/arrow8"
- "pulseaudio"
- "custom/kdeconnect"
- "tray"
- ];
-
- # Module configurations
- "hyprland/window" = {
- format = "{}";
- };
-
- "keyboard-state" = {
- numlock = true;
- capslock = true;
- format = {
- numlock = "N {icon}";
- capslock = "C {icon}";
- };
- format-icons = {
- locked = "";
- unlocked = "";
- };
- };
-
- battery = {
- states = {
- good = 95;
- warning = 30;
- critical = 20;
- };
- format = "{icon} {capacity}%";
- format-charging = " {capacity}%";
- format-plugged = " {capacity}%";
- format-alt = "{time} {icon}";
- format-icons = [
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ];
- };
-
- bluetooth = {
- format = " {status}";
- format-disabled = "";
- format-connected = " {num_connections} connected";
- tooltip-format = "{controller_alias}\t{controller_address}";
- tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{device_enumerate}";
- tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
- };
-
- idle_inhibitor = {
- format = "{icon}";
- format-icons = {
- activated = "";
- deactivated = "";
- };
- tooltip = true;
- };
-
- tray = {
- spacing = 4;
- };
-
- "clock#time" = {
- interval = 10;
- format = " {:%H:%M}";
- tooltip = false;
- };
-
- "clock#date" = {
- interval = 20;
- format = " {:%a %e/%m}";
- on-click = "gnome-calendar";
- };
-
- temperature = {
- interval = 1;
- hwmon-path = "/sys/class/hwmon/hwmon3/temp1_input";
- critical-threshold = 75;
- format-critical = " {temperatureC}°C";
- format = "{icon} {temperatureC}°C";
- format-icons = [
- ""
- ""
- ""
- ];
- max-length = 8;
- min-length = 7;
- tooltip = false;
- };
-
- cpu = {
- interval = 5;
- format = " {max_frequency:1}GHz {usage:2}%";
- on-click = "kitty -e htop --sort-key PERCENT_CPU";
- tooltip = false;
- };
-
- "custom/gpu" = {
- exec = "$HOME/.config/waybar/custom_modules/custom-gpu-lite.sh";
- return-type = "json";
- format = "{}";
- interval = 5;
- tooltip = "{tooltip}";
- on-click = "powerupp";
- };
-
- network = {
- format-wifi = " {essid}";
- format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
- format-linked = "{ifname} (No IP) ";
- format-disconnected = "";
- format-alt = "{ifname}: {ipaddr}/{cidr}";
- family = "ipv4";
- tooltip-format-wifi = " {ifname} @ {essid}\nIP: {ipaddr}\nStrength: {signalStrength}%\nFreq: {frequency}MHz\n {bandwidthUpBits} {bandwidthDownBits}";
- tooltip-format-ethernet = " {ifname}\nIP: {ipaddr}\n {bandwidthUpBits} {bandwidthDownBits}";
- };
-
- "custom/kdeconnect" = {
- exec = "$HOME/.config/waybar/custom_modules/custom-kdeconnect.sh battery";
- format = "{}";
- interval = 60;
- on-click = "$HOME/.config/waybar/custom_modules/custom-kdeconnect.sh ring";
- };
-
- pulseaudio = {
- scroll-step = 3;
- format = "{icon} {volume:2}% {format_source}";
- format-bluetooth = "{volume}% {icon} {format_source}";
- format-bluetooth-muted = " {icon} {format_source}";
- format-muted = " {format_source}";
- format-source = "";
- format-source-muted = "";
- format-icons = {
- headphone = "";
- hands-free = "";
- headset = "";
- phone = "";
- portable = "";
- car = "";
- default = [
- ""
- ""
- ""
- ];
- };
- on-click = "pavucontrol";
- on-click-right = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
- };
-
- "custom/pacman" = {
- format = "↓ {}";
- interval = 3600;
- exec = "yay -Qu | wc -l";
- exec-if = "exit 0";
- on-click = "alacritty -e 'yay'; pkill -SIGRTMIN+8 waybar";
- signal = 8;
- max-length = 5;
- min-length = 3;
- };
-
- "custom/weather" = {
- exec = "curl 'https://wttr.in/?format=1'";
- interval = 3600;
- };
-
- "custom/cpugovernor" = {
- format = "{icon}";
- interval = "once";
- return-type = "json";
- exec = "$HOME/.config/waybar/custom_modules/cpugovernor.sh";
- min-length = 2;
- max-length = 3;
- signal = 8;
- format-icons = {
- perf = "";
- ondemand = "";
- };
- on-click = "$HOME/.config/waybar/custom_modules/cpugovernor.sh switch";
- };
-
- "custom/playerctl" = {
- exec = "$HOME/.config/waybar/custom_modules/media-player-status.py";
- return-type = "json";
- on-click = "playerctl play-pause";
- };
-
- "custom/media" = {
- format = "{icon} {}";
- return-type = "json";
- max-length = 40;
- format-icons = {
- spotify = "";
- default = "🎜";
- };
- escape = false;
- exec = "$HOME/.config/waybar/custom_modules/mediaplayer.py 2> /dev/null";
- };
-
- "custom/scratchpad-indicator" = {
- interval = 3;
- return-type = "json";
- exec = "swaymsg -t get_tree | jq --unbuffered --compact-output '( select(.name == \"root\") | .nodes[] | select(.name == \"__i3\") | .nodes[] | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") }'";
- format = "{} ";
- on-click = "exec swaymsg 'scratchpad show'";
- on-click-right = "exec swaymsg 'move scratchpad'";
- };
-
- "custom/arrow1" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow2" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow3" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow4" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow5" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow6" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow7" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow8" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow9" = {
- format = "";
- tooltip = false;
- };
-
- "custom/arrow10" = {
- format = "";
- tooltip = false;
- };
- };
- };
-
- style = ''
- @keyframes blink-warning {
- 70% {
- color: @light;
- }
-
- to {
- color: @light;
- background-color: @warning;
- }
- }
-
- @keyframes blink-critical {
- 70% {
- color: @light;
- }
-
- to {
- color: @light;
- background-color: @critical;
- }
- }
-
-
- /* -----------------------------------------------------------------------------
- * Styles
- * -------------------------------------------------------------------------- */
-
- /* COLORS */
-
- /* Gruvbox Dark */
-
- /*@define-color bg #353C4A;*/
- @define-color light #D8DEE9;
- /*@define-color dark @nord_dark_font;*/
- @define-color warning #ebcb8b;
- /*@define-color critical #BF616A;*/
- /*@define-color mode @bg;*/
- /*@define-color workspaces @bg;*/
- /*@define-color workspaces @nord_dark_font;*/
- /*@define-color workspacesfocused #655b53;*/
- /*@define-color tray @bg;*/
- /*@define-color workspacesfocused #4C566A;
- @define-color tray @workspacesfocused;
- @define-color sound #EBCB8B;
- @define-color network #5D7096;
- @define-color memory #546484;
- @define-color cpu #596A8D;
- @define-color temp #4D5C78;
- @define-color layout #5e81ac;
- @define-color battery #88c0d0;
- @define-color date #434C5E;
- @define-color time #434C5E;
- @define-color backlight #434C5E;*/
- @define-color nord_bg #282828;
- @define-color nord_bg_blue @bg;
- @define-color nord_light #D8DEE9;
-
- @define-color nord_dark_font #272727;
-
-
- @define-color bg #282828;
- @define-color critical #BF616A;
- @define-color tray @bg;
- @define-color mode @bg;
-
- @define-color bluetint #448488;
- @define-color bluelight #83a597;
- @define-color magenta-dark #b16185;
-
-
- @define-color font_gruv_normal #ebdbb2;
- @define-color font_gruv_faded #a89985;
- @define-color font_gruv_darker #D8DEE9;
- @define-color font_dark_alternative #655b53;
-
- /* Reset all styles */
- * {
- border: none;
- border-radius: 0px;
- min-height: 0;
- /*margin: 0.15em 0.25em 0.15em 0.25em;*/
- }
-
- /* The whole bar */
- #waybar {
- background: @bg;
- color: @light;
- font-family: JetBrainsMono Nerd Font Mono;
- font-size: 9pt;
- font-weight: bold;
- }
-
- /* Each module */
- #battery,
- #clock,
- #cpu,
- #custom-layout,
- #memory,
- #mode,
- #network,
- #pulseaudio,
- #temperature,
- #custom-alsa,
- #custom-pacman,
- #custom-weather,
- #custom-gpu,
- #custom-playerctl,
- #tray,
- #backlight,
- #language,
- #custom-cpugovernor,
- #battery,
- #custom-scratchpad-indicator,
- #custom-pacman,
- #idle_inhibitor,
- #bluetooth {
- /* padding-left: 0.3em;
- padding-right: 0.3em;*/
- padding: 0.6em 0.8em;
- }
-
- /* Each module that should blink */
- #mode,
- #memory,
- #temperature,
- #battery {
- animation-timing-function: linear;
- animation-iteration-count: infinite;
- animation-direction: alternate;
- }
-
- /* Each critical module */
- #memory.critical,
- #cpu.critical,
- #temperature.critical,
- #battery.critical {
- color: @critical;
- }
-
- /* Each critical that should blink */
- #mode,
- #memory.critical,
- #temperature.critical,
- #battery.critical.discharging {
- animation-name: blink-critical;
- animation-duration: 2s;
- }
-
- /* Each warning */
- #network.disconnected,
- #memory.warning,
- #cpu.warning,
- #temperature.warning,
- #battery.warning {
- background: @warning;
- color: @nord_dark_font;
- }
-
- /* Each warning that should blink */
- #battery.warning.discharging {
- animation-name: blink-warning;
- animation-duration: 3s;
- }
-
- /* Adding arrows to boxes */
- /*#custom-arrow1 {
- font-size: 16px;
- color: @sound;
- background: transparent;
- }
-
- #custom-arrow2 {
- font-size: 16px;
- color: @network;
- background: @sound;
- }
-
- #custom-arrow3 {
- font-size: 16px;
- color: @memory;
- background: @network;
- }
-
- #custom-arrow4 {
- font-size: 16px;
- color: @cpu;
- background: @memory;
- }
-
- #custom-arrow5 {
- font-size: 16px;
- color: @temp;
- background: @cpu;
- }
-
- #custom-arrow6 {
- font-size: 16px;
- color: @layout;
- background: @temp;
- }
-
- #custom-arrow7 {
- font-size: 16px;
- color: @battery;
- background: @layout;
- }
-
- #custom-arrow8 {
- font-size: 16px;
- color: @date;
- background: @battery;
- }
-
- #custom-arrow9 {
- font-size: 16px;
- color: @time;
- background: @date;
- }*/
-
- #custom-arrow1 {
- font-size: 2em;
- color: @bg;
- background: @bluetint;
- }
- #custom-arrow2 {
- font-size: 2em;
- color: @bluetint;
- background: @font_dark_alternative;
- }
- #custom-arrow3 {
- font-size: 2em;
- color: @font_dark_alternative;
- background: @bg;
- }
- #custom-arrow4 {
- font-size: 2em;
- color: @font_gruv_normal;
- background: @bg;
- }
- #custom-arrow5 {
- font-size: 2em;
- color: @font_gruv_normal;
- background: @bg;
- }
- #custom-arrow6 {
- font-size: 2em;
- color: @font_dark_alternative;
- background: @bg;
- }
- #custom-arrow7 {
- font-size: 2em;
- color: @bluetint;
- background: @font_dark_alternative;
- }
- #custom-arrow8 {
- font-size: 2em;
- color: @bg;
- background: @bluetint;
- }
-
- /* And now modules themselves in their respective order */
- #clock.time {
- background: @bg;
- color: @font_gruv_normal;
- }
- #clock.date {
- background: @bluetint;
- color: @font_gruv_normal;
- }
-
- #custom-scratchpad-indicator {
- background: @bluetint;
- color: @font_gruv_normal;
- }
- #language {
- background: @bg;
- color: @font_gruv_normal;
- }
- #custom-kdeconnect {
- background: @bg;
- color: @font_gruv_normal;
- }
- #custom-pacman {
- background: @bluetint;
- color: @font_gruv_normal;
- }
- #idle_inhibitor {
- background: @font_dark_alternative;
- color: @font_gruv_normal;
- }
- #custom-playerctl {
- font-size: 0.9em;
- color: @font_gruv_normal;
- }
- #custom-playerctl.paused{
- color: @font_dark_alternative;
- font-size: 0.9em;
- }
- /* Workspaces stuff */
- #workspaces {
- }
- #workspaces button {
- background: @font_dark_alternative;
- color: @font_gruv_normal;
- padding: 0em 1.2em;
- min-width: 0em;
- }
- #workspaces button.focused {
- font-weight: bolder; /* Somewhy the bar-wide setting is ignored*/
- }
- #workspaces button.urgent {
- color: #c9545d;
- opacity: 1;
- }
- #battery {
- color: @font_gruv_normal;
- background: @font_dark_alternative;
- }
- #custom-cpugovernor.perf {
-
- }
- #cpu {
- background: @bluetint;
- color: @font_gruv_normal;
- padding-left: 0em;
- padding-right: 0.2em;
- }
- #cpu.critical {
- color: @nord_dark_font;
- background: @critical;
- }
- #temperature {
- background-color: @bluetint;
- color: @font_gruv_normal;
- padding-right: 0em;
- }
- #temperature.critical {
- background: @critical;
- }
- #custom-gpu {
- background: @bluetint;
- color: @font_gruv_normal;
- padding-left: 0em;
- }
- #pulseaudio {
- background: @bg;
- color: @font_gruv_normal;
- }
- #pulseaudio.muted {
- color: #fb4833;
- }
- #pulseaudio.source-muted {
- /* moved to config */
- }
- #bluetooth {
- background: @bluetint;
- color: @font_gruv_normal;
- }
- #network {
- background: @bluetint;
- color: @font_gruv_normal;
- }
- #tray {
- background: @bg;
- color: @font_gruv_normal;
- }
-
- #custom-alsa {
- background: @sound;
- }
- #memory {
- background: @memory;
- }
- #custom-layout {
- background: @layout;
- }
- #mode { /* Shown current Sway mode (resize etc.) */
- color: @light;
- background: @mode;
- }
-
- #backlight {
- background: @backlight;
- }
- #window {
- padding: 0px 10px 0px 10px;
- font-weight: bold;
- font-size: 1em;
- color: @bg;
- background: @font_gruv_normal;
- }
- #custom-weather {
- background: @mode;
- font-weight: bold;
- padding: 0 0.6em;
- }
-'';
- };
+ config,
+ pkgs,
+ ...
+}: {
+ programs.waybar = {
+ enable = true;
+ settings = {
+ mainBar = {
+ layer = "top";
+ position = "top";
+ # height = 36; # Auto height by default
+ modules-left = [
+ "clock#time"
+ "custom/arrow1"
+ "clock#date"
+ "custom/arrow2"
+ "hyprland/workspaces"
+ "custom/arrow3"
+ ];
+ modules-center = [
+ "custom/arrow4"
+ "hyprland/window"
+ "custom/arrow5"
+ ];
+ modules-right = [
+ "custom/arrow6"
+ "battery"
+ "custom/arrow7"
+ "network"
+ "bluetooth"
+ "custom/arrow8"
+ "pulseaudio"
+ "custom/kdeconnect"
+ "tray"
+ ];
+
+ # Module configurations
+ "hyprland/window" = {
+ format = "{}";
+ };
+
+ "keyboard-state" = {
+ numlock = true;
+ capslock = true;
+ format = {
+ numlock = "N {icon}";
+ capslock = "C {icon}";
+ };
+ format-icons = {
+ locked = "";
+ unlocked = "";
+ };
+ };
+
+ battery = {
+ states = {
+ good = 95;
+ warning = 30;
+ critical = 20;
+ };
+ format = "{icon} {capacity}%";
+ format-charging = " {capacity}%";
+ format-plugged = " {capacity}%";
+ format-alt = "{time} {icon}";
+ format-icons = [
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ];
+ };
+
+ bluetooth = {
+ format = " {status}";
+ format-disabled = "";
+ format-connected = " {num_connections} connected";
+ tooltip-format = "{controller_alias}\t{controller_address}";
+ tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{device_enumerate}";
+ tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
+ };
+
+ idle_inhibitor = {
+ format = "{icon}";
+ format-icons = {
+ activated = "";
+ deactivated = "";
+ };
+ tooltip = true;
+ };
+
+ tray = {
+ spacing = 4;
+ };
+
+ "clock#time" = {
+ interval = 10;
+ format = " {:%H:%M}";
+ tooltip = false;
+ };
+
+ "clock#date" = {
+ interval = 20;
+ format = " {:%a %e/%m}";
+ on-click = "gnome-calendar";
+ };
+
+ temperature = {
+ interval = 1;
+ hwmon-path = "/sys/class/hwmon/hwmon3/temp1_input";
+ critical-threshold = 75;
+ format-critical = " {temperatureC}°C";
+ format = "{icon} {temperatureC}°C";
+ format-icons = [
+ ""
+ ""
+ ""
+ ];
+ max-length = 8;
+ min-length = 7;
+ tooltip = false;
+ };
+
+ cpu = {
+ interval = 5;
+ format = " {max_frequency:1}GHz {usage:2}%";
+ on-click = "kitty -e htop --sort-key PERCENT_CPU";
+ tooltip = false;
+ };
+
+ "custom/gpu" = {
+ exec = "$HOME/.config/waybar/custom_modules/custom-gpu-lite.sh";
+ return-type = "json";
+ format = "{}";
+ interval = 5;
+ tooltip = "{tooltip}";
+ on-click = "powerupp";
+ };
+
+ network = {
+ format-wifi = " {essid}";
+ format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
+ format-linked = "{ifname} (No IP) ";
+ format-disconnected = "";
+ format-alt = "{ifname}: {ipaddr}/{cidr}";
+ family = "ipv4";
+ tooltip-format-wifi = " {ifname} @ {essid}\nIP: {ipaddr}\nStrength: {signalStrength}%\nFreq: {frequency}MHz\n {bandwidthUpBits} {bandwidthDownBits}";
+ tooltip-format-ethernet = " {ifname}\nIP: {ipaddr}\n {bandwidthUpBits} {bandwidthDownBits}";
+ };
+
+ "custom/kdeconnect" = {
+ exec = "$HOME/.config/waybar/custom_modules/custom-kdeconnect.sh battery";
+ format = "{}";
+ interval = 60;
+ on-click = "$HOME/.config/waybar/custom_modules/custom-kdeconnect.sh ring";
+ };
+
+ pulseaudio = {
+ scroll-step = 3;
+ format = "{icon} {volume:2}% {format_source}";
+ format-bluetooth = "{volume}% {icon} {format_source}";
+ format-bluetooth-muted = " {icon} {format_source}";
+ format-muted = " {format_source}";
+ format-source = "";
+ format-source-muted = "";
+ format-icons = {
+ headphone = "";
+ hands-free = "";
+ headset = "";
+ phone = "";
+ portable = "";
+ car = "";
+ default = [
+ ""
+ ""
+ ""
+ ];
+ };
+ on-click = "pavucontrol";
+ on-click-right = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
+ };
+
+ "custom/pacman" = {
+ format = "↓ {}";
+ interval = 3600;
+ exec = "yay -Qu | wc -l";
+ exec-if = "exit 0";
+ on-click = "alacritty -e 'yay'; pkill -SIGRTMIN+8 waybar";
+ signal = 8;
+ max-length = 5;
+ min-length = 3;
+ };
+
+ "custom/weather" = {
+ exec = "curl 'https://wttr.in/?format=1'";
+ interval = 3600;
+ };
+
+ "custom/cpugovernor" = {
+ format = "{icon}";
+ interval = "once";
+ return-type = "json";
+ exec = "$HOME/.config/waybar/custom_modules/cpugovernor.sh";
+ min-length = 2;
+ max-length = 3;
+ signal = 8;
+ format-icons = {
+ perf = "";
+ ondemand = "";
+ };
+ on-click = "$HOME/.config/waybar/custom_modules/cpugovernor.sh switch";
+ };
+
+ "custom/playerctl" = {
+ exec = "$HOME/.config/waybar/custom_modules/media-player-status.py";
+ return-type = "json";
+ on-click = "playerctl play-pause";
+ };
+
+ "custom/media" = {
+ format = "{icon} {}";
+ return-type = "json";
+ max-length = 40;
+ format-icons = {
+ spotify = "";
+ default = "🎜";
+ };
+ escape = false;
+ exec = "$HOME/.config/waybar/custom_modules/mediaplayer.py 2> /dev/null";
+ };
+
+ "custom/scratchpad-indicator" = {
+ interval = 3;
+ return-type = "json";
+ exec = "swaymsg -t get_tree | jq --unbuffered --compact-output '( select(.name == \"root\") | .nodes[] | select(.name == \"__i3\") | .nodes[] | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") }'";
+ format = "{} ";
+ on-click = "exec swaymsg 'scratchpad show'";
+ on-click-right = "exec swaymsg 'move scratchpad'";
+ };
+
+ "custom/arrow1" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow2" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow3" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow4" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow5" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow6" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow7" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow8" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow9" = {
+ format = "";
+ tooltip = false;
+ };
+
+ "custom/arrow10" = {
+ format = "";
+ tooltip = false;
+ };
+ };
+ };
+
+ style = ''
+ @keyframes blink-warning {
+ 70% {
+ color: @light;
+ }
+
+ to {
+ color: @light;
+ background-color: @warning;
+ }
+ }
+
+ @keyframes blink-critical {
+ 70% {
+ color: @light;
+ }
+
+ to {
+ color: @light;
+ background-color: @critical;
+ }
+ }
+
+
+ /* -----------------------------------------------------------------------------
+ * Styles
+ * -------------------------------------------------------------------------- */
+
+ /* COLORS */
+
+ /* Gruvbox Dark */
+
+ /*@define-color bg #353C4A;*/
+ @define-color light #D8DEE9;
+ /*@define-color dark @nord_dark_font;*/
+ @define-color warning #ebcb8b;
+ /*@define-color critical #BF616A;*/
+ /*@define-color mode @bg;*/
+ /*@define-color workspaces @bg;*/
+ /*@define-color workspaces @nord_dark_font;*/
+ /*@define-color workspacesfocused #655b53;*/
+ /*@define-color tray @bg;*/
+ /*@define-color workspacesfocused #4C566A;
+ @define-color tray @workspacesfocused;
+ @define-color sound #EBCB8B;
+ @define-color network #5D7096;
+ @define-color memory #546484;
+ @define-color cpu #596A8D;
+ @define-color temp #4D5C78;
+ @define-color layout #5e81ac;
+ @define-color battery #88c0d0;
+ @define-color date #434C5E;
+ @define-color time #434C5E;
+ @define-color backlight #434C5E;*/
+ @define-color nord_bg #282828;
+ @define-color nord_bg_blue @bg;
+ @define-color nord_light #D8DEE9;
+
+ @define-color nord_dark_font #272727;
+
+
+ @define-color bg #282828;
+ @define-color critical #BF616A;
+ @define-color tray @bg;
+ @define-color mode @bg;
+
+ @define-color bluetint #448488;
+ @define-color bluelight #83a597;
+ @define-color magenta-dark #b16185;
+
+
+ @define-color font_gruv_normal #ebdbb2;
+ @define-color font_gruv_faded #a89985;
+ @define-color font_gruv_darker #D8DEE9;
+ @define-color font_dark_alternative #655b53;
+
+ /* Reset all styles */
+ * {
+ border: none;
+ border-radius: 0px;
+ min-height: 0;
+ /*margin: 0.15em 0.25em 0.15em 0.25em;*/
+ }
+
+ /* The whole bar */
+ #waybar {
+ background: @bg;
+ color: @light;
+ font-family: JetBrainsMono Nerd Font Mono;
+ font-size: 9pt;
+ font-weight: bold;
+ }
+
+ /* Each module */
+ #battery,
+ #clock,
+ #cpu,
+ #custom-layout,
+ #memory,
+ #mode,
+ #network,
+ #pulseaudio,
+ #temperature,
+ #custom-alsa,
+ #custom-pacman,
+ #custom-weather,
+ #custom-gpu,
+ #custom-playerctl,
+ #tray,
+ #backlight,
+ #language,
+ #custom-cpugovernor,
+ #battery,
+ #custom-scratchpad-indicator,
+ #custom-pacman,
+ #idle_inhibitor,
+ #bluetooth {
+ /* padding-left: 0.3em;
+ padding-right: 0.3em;*/
+ padding: 0.6em 0.8em;
+ }
+
+ /* Each module that should blink */
+ #mode,
+ #memory,
+ #temperature,
+ #battery {
+ animation-timing-function: linear;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+ }
+
+ /* Each critical module */
+ #memory.critical,
+ #cpu.critical,
+ #temperature.critical,
+ #battery.critical {
+ color: @critical;
+ }
+
+ /* Each critical that should blink */
+ #mode,
+ #memory.critical,
+ #temperature.critical,
+ #battery.critical.discharging {
+ animation-name: blink-critical;
+ animation-duration: 2s;
+ }
+
+ /* Each warning */
+ #network.disconnected,
+ #memory.warning,
+ #cpu.warning,
+ #temperature.warning,
+ #battery.warning {
+ background: @warning;
+ color: @nord_dark_font;
+ }
+
+ /* Each warning that should blink */
+ #battery.warning.discharging {
+ animation-name: blink-warning;
+ animation-duration: 3s;
+ }
+
+ /* Adding arrows to boxes */
+ /*#custom-arrow1 {
+ font-size: 16px;
+ color: @sound;
+ background: transparent;
+ }
+
+ #custom-arrow2 {
+ font-size: 16px;
+ color: @network;
+ background: @sound;
+ }
+
+ #custom-arrow3 {
+ font-size: 16px;
+ color: @memory;
+ background: @network;
+ }
+
+ #custom-arrow4 {
+ font-size: 16px;
+ color: @cpu;
+ background: @memory;
+ }
+
+ #custom-arrow5 {
+ font-size: 16px;
+ color: @temp;
+ background: @cpu;
+ }
+
+ #custom-arrow6 {
+ font-size: 16px;
+ color: @layout;
+ background: @temp;
+ }
+
+ #custom-arrow7 {
+ font-size: 16px;
+ color: @battery;
+ background: @layout;
+ }
+
+ #custom-arrow8 {
+ font-size: 16px;
+ color: @date;
+ background: @battery;
+ }
+
+ #custom-arrow9 {
+ font-size: 16px;
+ color: @time;
+ background: @date;
+ }*/
+
+ #custom-arrow1 {
+ font-size: 2em;
+ color: @bg;
+ background: @bluetint;
+ }
+ #custom-arrow2 {
+ font-size: 2em;
+ color: @bluetint;
+ background: @font_dark_alternative;
+ }
+ #custom-arrow3 {
+ font-size: 2em;
+ color: @font_dark_alternative;
+ background: @bg;
+ }
+ #custom-arrow4 {
+ font-size: 2em;
+ color: @font_gruv_normal;
+ background: @bg;
+ }
+ #custom-arrow5 {
+ font-size: 2em;
+ color: @font_gruv_normal;
+ background: @bg;
+ }
+ #custom-arrow6 {
+ font-size: 2em;
+ color: @font_dark_alternative;
+ background: @bg;
+ }
+ #custom-arrow7 {
+ font-size: 2em;
+ color: @bluetint;
+ background: @font_dark_alternative;
+ }
+ #custom-arrow8 {
+ font-size: 2em;
+ color: @bg;
+ background: @bluetint;
+ }
+
+ /* And now modules themselves in their respective order */
+ #clock.time {
+ background: @bg;
+ color: @font_gruv_normal;
+ }
+ #clock.date {
+ background: @bluetint;
+ color: @font_gruv_normal;
+ }
+
+ #custom-scratchpad-indicator {
+ background: @bluetint;
+ color: @font_gruv_normal;
+ }
+ #language {
+ background: @bg;
+ color: @font_gruv_normal;
+ }
+ #custom-kdeconnect {
+ background: @bg;
+ color: @font_gruv_normal;
+ }
+ #custom-pacman {
+ background: @bluetint;
+ color: @font_gruv_normal;
+ }
+ #idle_inhibitor {
+ background: @font_dark_alternative;
+ color: @font_gruv_normal;
+ }
+ #custom-playerctl {
+ font-size: 0.9em;
+ color: @font_gruv_normal;
+ }
+ #custom-playerctl.paused{
+ color: @font_dark_alternative;
+ font-size: 0.9em;
+ }
+ /* Workspaces stuff */
+ #workspaces {
+ }
+ #workspaces button {
+ background: @font_dark_alternative;
+ color: @font_gruv_normal;
+ padding: 0em 1.2em;
+ min-width: 0em;
+ }
+ #workspaces button.focused {
+ font-weight: bolder; /* Somewhy the bar-wide setting is ignored*/
+ }
+ #workspaces button.urgent {
+ color: #c9545d;
+ opacity: 1;
+ }
+ #battery {
+ color: @font_gruv_normal;
+ background: @font_dark_alternative;
+ }
+ #custom-cpugovernor.perf {
+
+ }
+ #cpu {
+ background: @bluetint;
+ color: @font_gruv_normal;
+ padding-left: 0em;
+ padding-right: 0.2em;
+ }
+ #cpu.critical {
+ color: @nord_dark_font;
+ background: @critical;
+ }
+ #temperature {
+ background-color: @bluetint;
+ color: @font_gruv_normal;
+ padding-right: 0em;
+ }
+ #temperature.critical {
+ background: @critical;
+ }
+ #custom-gpu {
+ background: @bluetint;
+ color: @font_gruv_normal;
+ padding-left: 0em;
+ }
+ #pulseaudio {
+ background: @bg;
+ color: @font_gruv_normal;
+ }
+ #pulseaudio.muted {
+ color: #fb4833;
+ }
+ #pulseaudio.source-muted {
+ /* moved to config */
+ }
+ #bluetooth {
+ background: @bluetint;
+ color: @font_gruv_normal;
+ }
+ #network {
+ background: @bluetint;
+ color: @font_gruv_normal;
+ }
+ #tray {
+ background: @bg;
+ color: @font_gruv_normal;
+ }
+
+ #custom-alsa {
+ background: @sound;
+ }
+ #memory {
+ background: @memory;
+ }
+ #custom-layout {
+ background: @layout;
+ }
+ #mode { /* Shown current Sway mode (resize etc.) */
+ color: @light;
+ background: @mode;
+ }
+
+ #backlight {
+ background: @backlight;
+ }
+ #window {
+ padding: 0px 10px 0px 10px;
+ font-weight: bold;
+ font-size: 1em;
+ color: @bg;
+ background: @font_gruv_normal;
+ }
+ #custom-weather {
+ background: @mode;
+ font-weight: bold;
+ padding: 0 0.6em;
+ }
+ '';
+ };
}
diff --git a/modules/home-manager/wofi.nix b/modules/home-manager/wofi.nix
index c542682..9581844 100644
--- a/modules/home-manager/wofi.nix
+++ b/modules/home-manager/wofi.nix
@@ -1,68 +1,70 @@
-{ config, pkgs, ... }:
-
{
- programs.wofi = {
- enable = true;
- settings = {
- allow-images=true;
- image-size="64px";
- gtk_dark=true;
- insensitive=true;
- halign=true;
- location="center";
- prompt="Search...";
- orientation="vertical";
- };
- style = ''
- @define-color base00 #282828;
- @define-color base01 #3C3836;
- @define-color base02 #504945;
- @define-color base03 #665C54;
- @define-color base04 #BDAE93;
- @define-color base06 #D5C4A1;
- @define-color base06 #EBDBB2;
- @define-color base07 #FBF1C7;
- @define-color base08 #FB4934;
- @define-color base09 #FE8019;
- @define-color base0A #FABD2F;
- @define-color base0B #B8BB26;
- @define-color base0C #8EC07C;
- @define-color base0D #83A598;
- @define-color base0E #D3869B;
- @define-color base0F #D65D0E;
+ config,
+ pkgs,
+ ...
+}: {
+ programs.wofi = {
+ enable = true;
+ settings = {
+ allow-images = true;
+ image-size = "64px";
+ gtk_dark = true;
+ insensitive = true;
+ halign = true;
+ location = "center";
+ prompt = "Search...";
+ orientation = "vertical";
+ };
+ style = ''
+ @define-color base00 #282828;
+ @define-color base01 #3C3836;
+ @define-color base02 #504945;
+ @define-color base03 #665C54;
+ @define-color base04 #BDAE93;
+ @define-color base06 #D5C4A1;
+ @define-color base06 #EBDBB2;
+ @define-color base07 #FBF1C7;
+ @define-color base08 #FB4934;
+ @define-color base09 #FE8019;
+ @define-color base0A #FABD2F;
+ @define-color base0B #B8BB26;
+ @define-color base0C #8EC07C;
+ @define-color base0D #83A598;
+ @define-color base0E #D3869B;
+ @define-color base0F #D65D0E;
- window {
- margin: 5px;
- border-radius: 10px;
- background-color: @base03;
- }
+ window {
+ margin: 5px;
+ border-radius: 10px;
+ background-color: @base03;
+ }
- #input {
- border-radius: 5px;
- background-color: @base03;
- color: @base06;
- }
+ #input {
+ border-radius: 5px;
+ background-color: @base03;
+ color: @base06;
+ }
- #inner-box {
- margin: 5px;
- color: @base06;
- background-color: @base00;
- }
+ #inner-box {
+ margin: 5px;
+ color: @base06;
+ background-color: @base00;
+ }
- #outer-box {
- margin: 5px;
- background-color: @base00;
- }
+ #outer-box {
+ margin: 5px;
+ background-color: @base00;
+ }
- #scroll {
- margin: 5px;
- background-color: @base00;
- }
+ #scroll {
+ margin: 5px;
+ background-color: @base00;
+ }
- #text {
- margin: 2px;
- }
+ #text {
+ margin: 2px;
+ }
- '';
- };
+ '';
+ };
}
diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix
index 4b9b454..99e385e 100644
--- a/modules/home-manager/zsh.nix
+++ b/modules/home-manager/zsh.nix
@@ -1,25 +1,27 @@
-{ config, pkgs, ... }:
-
{
- programs.eza.enable = true;
- programs.zsh = {
- enable = true;
- shellAliases = {
- ll = "exa --icons -l";
- l = "exa --icons -la";
- ls = "exa --icons";
- update = "sudo nixos-rebuild switch";
- clear = "clear && fastfetch";
- };
+ config,
+ pkgs,
+ ...
+}: {
+ programs.eza.enable = true;
+ programs.zsh = {
+ enable = true;
+ shellAliases = {
+ ll = "exa --icons -l";
+ l = "exa --icons -la";
+ ls = "exa --icons";
+ update = "sudo nixos-rebuild switch";
+ clear = "clear && fastfetch";
+ };
- history.size = 10000;
- autosuggestion.enable = true;
- syntaxHighlighting.enable = true;
+ history.size = 10000;
+ autosuggestion.enable = true;
+ syntaxHighlighting.enable = true;
- oh-my-zsh = {
- enable = true;
- plugins = [ "git" "docker" ];
- theme = "strug";
- };
- };
+ oh-my-zsh = {
+ enable = true;
+ plugins = ["git" "docker"];
+ theme = "strug";
+ };
+ };
}
diff --git a/modules/nixos/main-user.nix b/modules/nixos/main-user.nix
index fc51b90..b5673cb 100644
--- a/modules/nixos/main-user.nix
+++ b/modules/nixos/main-user.nix
@@ -1,12 +1,14 @@
-{ lib, config, pkgs, ... }:
-
-let
- cfg = config.main-user;
-in
{
+ lib,
+ config,
+ pkgs,
+ ...
+}: let
+ cfg = config.main-user;
+in {
options.main-user = {
- enable
- = lib.mkEnableOption "enable user module";
+ enable =
+ lib.mkEnableOption "enable user module";
username = lib.mkOption {
default = "mainuser";
@@ -21,7 +23,7 @@ in
users.users.${cfg.username} = {
isNormalUser = true;
initialPassword = "12345";
- extraGroups = [ "input" "networkmanager" "wheel" ];
+ extraGroups = ["input" "networkmanager" "wheel"];
description = "Stefan";
shell = pkgs.zsh;
};