diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d65c7a..b9169a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## ZaneyOS v2.3.3 -- Post GA Release Notes -** Updated: July 24th, 2025 ** +** Updated: Aug 1st, 2025 ** +- Reformatted NIX to NIX formatting standard - Added `hostID` to `variables.nix` and `network.nix` - This is needed by ZFS - Thanks to Daniel Emeery for the patch diff --git a/flake.nix b/flake.nix index bdfd894..c386f0e 100644 --- a/flake.nix +++ b/flake.nix @@ -21,84 +21,86 @@ }; }; - outputs = { - nixpkgs, - home-manager, - nix-flatpak, - quickshell, - ... - } @ inputs: let - system = "x86_64-linux"; - host = "zaneyos-oem"; - profile = "vm"; - username = "dwilliams"; - in { - nixosConfigurations = { - amd = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs; - inherit username; - inherit host; - inherit profile; + outputs = + { nixpkgs + , home-manager + , nix-flatpak + , quickshell + , ... + } @ inputs: + let + system = "x86_64-linux"; + host = "zaneyos-oem"; + profile = "vm"; + username = "dwilliams"; + in + { + nixosConfigurations = { + amd = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit username; + inherit host; + inherit profile; + }; + modules = [ + ./profiles/amd + nix-flatpak.nixosModules.nix-flatpak + ]; }; - modules = [ - ./profiles/amd - nix-flatpak.nixosModules.nix-flatpak - ]; - }; - nvidia = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs; - inherit username; - inherit host; - inherit profile; + nvidia = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit username; + inherit host; + inherit profile; + }; + modules = [ + ./profiles/nvidia + nix-flatpak.nixosModules.nix-flatpak + ]; }; - modules = [ - ./profiles/nvidia - nix-flatpak.nixosModules.nix-flatpak - ]; - }; - nvidia-laptop = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs; - inherit username; - inherit host; - inherit profile; + nvidia-laptop = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit username; + inherit host; + inherit profile; + }; + modules = [ + ./profiles/nvidia-laptop + nix-flatpak.nixosModules.nix-flatpak + ]; }; - modules = [ - ./profiles/nvidia-laptop - nix-flatpak.nixosModules.nix-flatpak - ]; - }; - intel = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs; - inherit username; - inherit host; - inherit profile; + intel = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit username; + inherit host; + inherit profile; + }; + modules = [ + ./profiles/intel + nix-flatpak.nixosModules.nix-flatpak + ]; }; - modules = [ - ./profiles/intel - nix-flatpak.nixosModules.nix-flatpak - ]; - }; - vm = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs; - inherit username; - inherit host; - inherit profile; + vm = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit username; + inherit host; + inherit profile; + }; + modules = [ + ./profiles/vm + nix-flatpak.nixosModules.nix-flatpak + ]; }; - modules = [ - ./profiles/vm - nix-flatpak.nixosModules.nix-flatpak - ]; }; }; - }; } diff --git a/hosts/default/default.nix b/hosts/default/default.nix index 6faad47..1ef7d77 100644 --- a/hosts/default/default.nix +++ b/hosts/default/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { imports = [ ./hardware.nix ./host-packages.nix diff --git a/hosts/default/hardware.nix b/hosts/default/hardware.nix index 0aebd7b..a662432 100644 --- a/hosts/default/hardware.nix +++ b/hosts/default/hardware.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ]; @@ -14,14 +15,16 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/dd005850-6230-40c4-9d70-8c8cf443658d"; + { + device = "/dev/disk/by-uuid/dd005850-6230-40c4-9d70-8c8cf443658d"; fsType = "ext4"; }; boot.initrd.luks.devices."luks-b7565781-148e-4c94-9c76-36c84dd93dc8".device = "/dev/disk/by-uuid/b7565781-148e-4c94-9c76-36c84dd93dc8"; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C2A6-DF56"; + { + device = "/dev/disk/by-uuid/C2A6-DF56"; fsType = "vfat"; options = [ "fmask=0077" "dmask=0077" ]; }; diff --git a/hosts/default/host-packages.nix b/hosts/default/host-packages.nix index 86863d7..f44b200 100644 --- a/hosts/default/host-packages.nix +++ b/hosts/default/host-packages.nix @@ -3,6 +3,5 @@ audacity discord nodejs - obs-studio ]; } diff --git a/hosts/nixstation/default.nix b/hosts/nixstation/default.nix index 6faad47..1ef7d77 100644 --- a/hosts/nixstation/default.nix +++ b/hosts/nixstation/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { imports = [ ./hardware.nix ./host-packages.nix diff --git a/hosts/nixstation/hardware.nix b/hosts/nixstation/hardware.nix index 3339e66..bff5110 100644 --- a/hosts/nixstation/hardware.nix +++ b/hosts/nixstation/hardware.nix @@ -1,8 +1,7 @@ -{ - config, - lib, - modulesPath, - ... +{ config +, lib +, modulesPath +, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -17,13 +16,13 @@ "usbhid" "sd_mod" ]; - kernelModules = []; + kernelModules = [ ]; luks.devices = { "luks-8941ac93-f043-46d1-b128-37d5e846303f".device = "/dev/disk/by-uuid/8941ac93-f043-46d1-b128-37d5e846303f"; }; }; - kernelModules = ["kvm-intel"]; - extraModulePackages = []; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; }; fileSystems = { "/" = { @@ -52,7 +51,7 @@ ]; }; }; - swapDevices = []; + swapDevices = [ ]; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/nixstation/host-packages.nix b/hosts/nixstation/host-packages.nix index 60dbba4..0934757 100644 --- a/hosts/nixstation/host-packages.nix +++ b/hosts/nixstation/host-packages.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { environment.systemPackages = with pkgs; [ audacity discord diff --git a/hosts/zaneyos-oem/default.nix b/hosts/zaneyos-oem/default.nix index 6faad47..1ef7d77 100644 --- a/hosts/zaneyos-oem/default.nix +++ b/hosts/zaneyos-oem/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { imports = [ ./hardware.nix ./host-packages.nix diff --git a/hosts/zaneyos-oem/hardware.nix b/hosts/zaneyos-oem/hardware.nix index d904a31..140a538 100644 --- a/hosts/zaneyos-oem/hardware.nix +++ b/hosts/zaneyos-oem/hardware.nix @@ -1,21 +1,20 @@ # 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, - ... +{ config +, lib +, pkgs +, modulesPath +, ... }: { imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/e5fc1006-4d0b-41db-8c43-22b3cb8110c6"; @@ -25,7 +24,7 @@ fileSystems."/boot" = { device = "/dev/disk/by-uuid/9287-3738"; fsType = "vfat"; - options = ["fmask=0077" "dmask=0077"]; + options = [ "fmask=0077" "dmask=0077" ]; }; fileSystems."/mnt/nas" = { @@ -34,7 +33,7 @@ }; swapDevices = [ - {device = "/dev/disk/by-uuid/a6e9dd8b-6767-44f4-84fa-30d02d90d087";} + { device = "/dev/disk/by-uuid/a6e9dd8b-6767-44f4-84fa-30d02d90d087"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/hosts/zaneyos-oem/host-packages.nix b/hosts/zaneyos-oem/host-packages.nix index daff304..37a6b3b 100644 --- a/hosts/zaneyos-oem/host-packages.nix +++ b/hosts/zaneyos-oem/host-packages.nix @@ -8,13 +8,11 @@ gping lunarvim luarocks - mc mission-center resources ncdu gdu ugrep waypaper - dysk ]; } diff --git a/modules/core/default.nix b/modules/core/default.nix index 77afcb3..3051639 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -1,11 +1,12 @@ -{ - inputs, - host, - ... -}: let +{ inputs +, host +, ... +}: +let # Import the host-specific variables.nix vars = import ../../hosts/${host}/variables.nix; -in { +in +{ imports = [ ./boot.nix ./flatpak.nix diff --git a/modules/core/flatpak.nix b/modules/core/flatpak.nix index e513739..9c8692c 100644 --- a/modules/core/flatpak.nix +++ b/modules/core/flatpak.nix @@ -1,8 +1,8 @@ -{pkgs, ...}: { +{ pkgs, ... }: { xdg.portal = { enable = true; - extraPortals = [pkgs.xdg-desktop-portal-hyprland]; - configPackages = [pkgs.hyprland]; + extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; + configPackages = [ pkgs.hyprland ]; }; services = { flatpak = { diff --git a/modules/core/greetd.nix b/modules/core/greetd.nix index 51cb036..f490984 100644 --- a/modules/core/greetd.nix +++ b/modules/core/greetd.nix @@ -1,7 +1,6 @@ -{ - pkgs, - username, - ... +{ pkgs +, username +, ... }: { services.greetd = { enable = true; diff --git a/modules/core/network.nix b/modules/core/network.nix index 325f7a0..132d9bc 100644 --- a/modules/core/network.nix +++ b/modules/core/network.nix @@ -1,16 +1,17 @@ -{ - pkgs, - host, - options, - ... -}: let +{ pkgs +, host +, options +, ... +}: +let inherit (import ../../hosts/${host}/variables.nix) hostId; -in { +in +{ networking = { hostName = "${host}"; hostId = hostId; networkmanager.enable = true; - timeServers = options.networking.timeServers.default ++ ["pool.ntp.org"]; + timeServers = options.networking.timeServers.default ++ [ "pool.ntp.org" ]; firewall = { enable = true; allowedTCPPorts = [ @@ -28,5 +29,5 @@ in { }; }; - environment.systemPackages = with pkgs; [networkmanagerapplet]; + environment.systemPackages = with pkgs; [ networkmanagerapplet ]; } diff --git a/modules/core/nfs.nix b/modules/core/nfs.nix index adbcde8..7999158 100644 --- a/modules/core/nfs.nix +++ b/modules/core/nfs.nix @@ -1,6 +1,8 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../hosts/${host}/variables.nix) enableNFS; -in { +in +{ services = { rpcbind.enable = enableNFS; nfs.server.enable = enableNFS; diff --git a/modules/core/nh.nix b/modules/core/nh.nix index 4785056..ce9304b 100644 --- a/modules/core/nh.nix +++ b/modules/core/nh.nix @@ -1,7 +1,6 @@ -{ - pkgs, - username, - ... +{ pkgs +, username +, ... }: { programs.nh = { enable = true; diff --git a/modules/core/packages.nix b/modules/core/packages.nix index 69dbfe0..9dfdb38 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -40,6 +40,7 @@ cowsay # Great Fun Terminal Program docker-compose # Allows Controlling Docker From A Single File duf # Utility For Viewing Disk Usage In Terminal + dysk # Disk space util nice formattting eza # Beautiful ls Replacement ffmpeg # Terminal Video / Audio Editing file-roller # Archive Manager diff --git a/modules/core/printing.nix b/modules/core/printing.nix index 982126f..a6d5e1b 100644 --- a/modules/core/printing.nix +++ b/modules/core/printing.nix @@ -1,6 +1,8 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../hosts/${host}/variables.nix) printEnable; -in { +in +{ services = { printing = { enable = printEnable; diff --git a/modules/core/quickshell.nix b/modules/core/quickshell.nix index 2d53327..33e4a49 100644 --- a/modules/core/quickshell.nix +++ b/modules/core/quickshell.nix @@ -2,7 +2,7 @@ { environment.systemPackages = with pkgs; [ inputs.quickshell.packages.${pkgs.system}.default - + # Qt6 related kits(for slove Qt5Compat problem) qt6.qt5compat qt6.qtbase @@ -10,19 +10,19 @@ qt6.qtwayland qt6.qtdeclarative qt6.qtsvg - + # alternate options - # libsForQt5.qt5compat - kdePackages.qt5compat - libsForQt5.qt5.qtgraphicaleffects + # libsForQt5.qt5compat + kdePackages.qt5compat + libsForQt5.qt5.qtgraphicaleffects ]; - + # necessary environment variables environment.variables = { QML_IMPORT_PATH = "${pkgs.qt6.qt5compat}/lib/qt-6/qml:${pkgs.qt6.qtbase}/lib/qt-6/qml"; QML2_IMPORT_PATH = "${pkgs.qt6.qt5compat}/lib/qt-6/qml:${pkgs.qt6.qtbase}/lib/qt-6/qml"; }; - + # make sure the Qt application is working properly environment.sessionVariables = { QT_QPA_PLATFORM = "wayland;xcb"; diff --git a/modules/core/sddm.nix b/modules/core/sddm.nix index 78862f4..8282ffa 100644 --- a/modules/core/sddm.nix +++ b/modules/core/sddm.nix @@ -63,7 +63,4 @@ in { }; environment.systemPackages = [sddm-astronaut]; - - # To prevent getting stuck at shutdown - systemd.extraConfig = "DefaultTimeoutStopSec=10s"; } diff --git a/modules/core/services.nix b/modules/core/services.nix index 3651646..9420305 100644 --- a/modules/core/services.nix +++ b/modules/core/services.nix @@ -1,4 +1,4 @@ -{profile, ...}: { +{ profile, ... }: { # Services to start services = { libinput.enable = true; # Input Handling @@ -11,7 +11,7 @@ PasswordAuthentication = true; #Users can SSH using kb and password KbdInteractiveAuthentication = true; }; - ports = [22]; + ports = [ 22 ]; }; blueman.enable = true; # Bluetooth Support tumbler.enable = true; # Image/video preview diff --git a/modules/core/starfish.nix b/modules/core/starfish.nix index bffc1aa..48564f1 100644 --- a/modules/core/starfish.nix +++ b/modules/core/starfish.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { programs = { starship = { enable = false; diff --git a/modules/core/steam.nix b/modules/core/steam.nix index 6fafcf7..cb8a5a5 100644 --- a/modules/core/steam.nix +++ b/modules/core/steam.nix @@ -1,11 +1,11 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs = { steam = { enable = true; remotePlay.openFirewall = true; dedicatedServer.openFirewall = false; gamescopeSession.enable = true; - extraCompatPackages = [pkgs.proton-ge-bin]; + extraCompatPackages = [ pkgs.proton-ge-bin ]; }; gamescope = { diff --git a/modules/core/stylix.nix b/modules/core/stylix.nix index 3ed5d35..800d070 100644 --- a/modules/core/stylix.nix +++ b/modules/core/stylix.nix @@ -1,10 +1,11 @@ -{ - pkgs, - host, - ... -}: let +{ pkgs +, host +, ... +}: +let inherit (import ../../hosts/${host}/variables.nix) stylixImage; -in { +in +{ # Styling Options stylix = { enable = true; diff --git a/modules/core/syncthing.nix b/modules/core/syncthing.nix index b374c5c..b214716 100644 --- a/modules/core/syncthing.nix +++ b/modules/core/syncthing.nix @@ -1,4 +1,4 @@ -{username, ...}: { +{ username, ... }: { services.syncthing = { enable = false; user = "${username}"; diff --git a/modules/core/system.nix b/modules/core/system.nix index 99cfde1..c24ff7a 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -1,6 +1,8 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../hosts/${host}/variables.nix) consoleKeyMap; -in { +in +{ nix = { settings = { download-buffer-size = 250000000; @@ -9,8 +11,8 @@ in { "nix-command" "flakes" ]; - substituters = ["https://hyprland.cachix.org"]; - trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + substituters = [ "https://hyprland.cachix.org" ]; + trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; }; }; time.timeZone = "America/Chicago"; diff --git a/modules/core/thunar.nix b/modules/core/thunar.nix index c7419e0..ea1229b 100644 --- a/modules/core/thunar.nix +++ b/modules/core/thunar.nix @@ -1,10 +1,11 @@ -{ - host, - pkgs, - ... -}: let +{ host +, pkgs +, ... +}: +let inherit (import ../../hosts/${host}/variables.nix) thunarEnable; -in { +in +{ programs = { thunar = { enable = thunarEnable; diff --git a/modules/core/user.nix b/modules/core/user.nix index 33e4aff..8e48582 100644 --- a/modules/core/user.nix +++ b/modules/core/user.nix @@ -1,21 +1,22 @@ -{ - pkgs, - inputs, - username, - host, - profile, - ... -}: let +{ pkgs +, inputs +, username +, host +, profile +, ... +}: +let inherit (import ../../hosts/${host}/variables.nix) gitUsername; -in { - imports = [inputs.home-manager.nixosModules.home-manager]; +in +{ + imports = [ inputs.home-manager.nixosModules.home-manager ]; home-manager = { useUserPackages = true; useGlobalPkgs = false; backupFileExtension = "backup"; - extraSpecialArgs = {inherit inputs username host profile;}; + extraSpecialArgs = { inherit inputs username host profile; }; users.${username} = { - imports = [./../home]; + imports = [ ./../home ]; home = { username = "${username}"; homeDirectory = "/home/${username}"; @@ -40,5 +41,5 @@ in { shell = pkgs.zsh; ignoreShellProgramCheck = true; }; - nix.settings.allowed-users = ["${username}"]; + nix.settings.allowed-users = [ "${username}" ]; } diff --git a/modules/core/virtualisation.nix b/modules/core/virtualisation.nix index f2f0268..4cae169 100644 --- a/modules/core/virtualisation.nix +++ b/modules/core/virtualisation.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { # Only enable either docker or podman -- Not both virtualisation = { docker = { diff --git a/modules/core/xserver.nix b/modules/core/xserver.nix index 3db2af6..d99dd41 100644 --- a/modules/core/xserver.nix +++ b/modules/core/xserver.nix @@ -1,6 +1,8 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../hosts/${host}/variables.nix) keyboardLayout; -in { +in +{ services.xserver = { enable = false; xkb = { diff --git a/modules/drivers/amd-drivers.nix b/modules/drivers/amd-drivers.nix index d3d3a7d..b0a51dd 100644 --- a/modules/drivers/amd-drivers.nix +++ b/modules/drivers/amd-drivers.nix @@ -1,8 +1,7 @@ -{ - lib, - pkgs, - config, - ... +{ lib +, pkgs +, config +, ... }: with lib; let diff --git a/modules/drivers/default.nix b/modules/drivers/default.nix index e19682e..6e3449e 100644 --- a/modules/drivers/default.nix +++ b/modules/drivers/default.nix @@ -1,5 +1,4 @@ -{ - ... +{ ... }: { imports = [ diff --git a/modules/drivers/intel-drivers.nix b/modules/drivers/intel-drivers.nix index 329719b..d50ab3e 100644 --- a/modules/drivers/intel-drivers.nix +++ b/modules/drivers/intel-drivers.nix @@ -1,12 +1,12 @@ -{ - lib, - pkgs, - config, - ... +{ lib +, pkgs +, config +, ... }: with lib; let cfg = config.drivers.intel; -in { +in +{ options.drivers.intel = { enable = mkEnableOption "Enable Intel Graphics Drivers"; }; diff --git a/modules/drivers/local-hardware-clock.nix b/modules/drivers/local-hardware-clock.nix index 0231dcb..cf4e73f 100644 --- a/modules/drivers/local-hardware-clock.nix +++ b/modules/drivers/local-hardware-clock.nix @@ -1,8 +1,7 @@ -{ - lib, - pkgs, - config, - ... +{ lib +, pkgs +, config +, ... }: with lib; let diff --git a/modules/drivers/nvidia-drivers.nix b/modules/drivers/nvidia-drivers.nix index 8ceacbb..2c30be9 100644 --- a/modules/drivers/nvidia-drivers.nix +++ b/modules/drivers/nvidia-drivers.nix @@ -1,8 +1,7 @@ -{ - lib, - pkgs, - config, - ... +{ lib +, pkgs +, config +, ... }: with lib; let diff --git a/modules/drivers/nvidia-prime-drivers.nix b/modules/drivers/nvidia-prime-drivers.nix index aba1acc..147df1a 100644 --- a/modules/drivers/nvidia-prime-drivers.nix +++ b/modules/drivers/nvidia-prime-drivers.nix @@ -1,8 +1,7 @@ -{ - lib, - pkgs, - config, - ... +{ lib +, pkgs +, config +, ... }: with lib; let diff --git a/modules/drivers/vm-guest-services.nix b/modules/drivers/vm-guest-services.nix index 3c337c0..d3e0555 100644 --- a/modules/drivers/vm-guest-services.nix +++ b/modules/drivers/vm-guest-services.nix @@ -1,8 +1,7 @@ -{ - lib, - pkgs, - config, - ... +{ lib +, pkgs +, config +, ... }: with lib; let diff --git a/modules/home/alacritty.nix b/modules/home/alacritty.nix index 612e31c..b8a8f4c 100644 --- a/modules/home/alacritty.nix +++ b/modules/home/alacritty.nix @@ -1,28 +1,30 @@ -{lib, ...}: { - programs.alacritty = let - font_family = lib.mkForce "Maple Mono NF"; - in { - enable = true; - settings = { - font = { - normal = { - family = font_family; - style = "Regular"; +{ lib, ... }: { + programs.alacritty = + let + font_family = lib.mkForce "Maple Mono NF"; + in + { + enable = true; + settings = { + font = { + normal = { + family = font_family; + style = "Regular"; + }; + bold = { + family = font_family; + style = "Bold"; + }; + italic = { + family = font_family; + style = "Italic"; + }; + bold_italic = { + family = font_family; + style = "Bold Italic"; + }; + size = 15; }; - bold = { - family = font_family; - style = "Bold"; - }; - italic = { - family = font_family; - style = "Italic"; - }; - bold_italic = { - family = font_family; - style = "Bold Italic"; - }; - size = 15; }; }; - }; } diff --git a/modules/home/bash.nix b/modules/home/bash.nix index ba4de54..0712618 100644 --- a/modules/home/bash.nix +++ b/modules/home/bash.nix @@ -1,4 +1,4 @@ -{profile, ...}: { +{ profile, ... }: { programs.bash = { enable = false; enableCompletion = true; diff --git a/modules/home/bashrc-personal.nix b/modules/home/bashrc-personal.nix index 01377a5..386597b 100644 --- a/modules/home/bashrc-personal.nix +++ b/modules/home/bashrc-personal.nix @@ -1,6 +1,5 @@ - -{pkgs, ...}: { - home.packages = with pkgs; [bash]; +{ pkgs, ... }: { + home.packages = with pkgs; [ bash ]; home.file."./.bashrc-personal".text = '' diff --git a/modules/home/bat.nix b/modules/home/bat.nix index 898b65a..d63242a 100644 --- a/modules/home/bat.nix +++ b/modules/home/bat.nix @@ -1,7 +1,6 @@ -{ - pkgs, - lib, - ... +{ pkgs +, lib +, ... }: { programs.bat = { enable = true; diff --git a/modules/home/bottom.nix b/modules/home/bottom.nix index 63814fc..3b24f84 100644 --- a/modules/home/bottom.nix +++ b/modules/home/bottom.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { programs.bottom = { enable = true; settings = { @@ -9,14 +9,14 @@ { ratio = 2; child = [ - {type = "cpu";} - {type = "temp";} + { type = "cpu"; } + { type = "temp"; } ]; } { ratio = 2; child = [ - {type = "network";} + { type = "network"; } ]; } { diff --git a/modules/home/btop.nix b/modules/home/btop.nix index 845d758..0f20db1 100644 --- a/modules/home/btop.nix +++ b/modules/home/btop.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.btop = { enable = true; package = pkgs.btop.override { diff --git a/modules/home/cava.nix b/modules/home/cava.nix index b835389..e3c23cd 100644 --- a/modules/home/cava.nix +++ b/modules/home/cava.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{ config, ... }: { programs.cava = { enable = true; settings = { @@ -40,4 +40,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/modules/home/default.nix b/modules/home/default.nix index 1dac591..687ed5b 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,4 +1,5 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../hosts/${host}/variables.nix) alacrittyEnable @@ -9,7 +10,8 @@ vscodeEnable helixEnable ; -in { +in +{ imports = [ ./amfora.nix @@ -53,32 +55,32 @@ in { ] ++ ( if helixEnable - then [./evil-helix.nix] - else [] + then [ ./evil-helix.nix ] + else [ ] ) ++ ( if vscodeEnable - then [./vscode.nix] - else [] + then [ ./vscode.nix ] + else [ ] ) ++ ( if weztermEnable - then [./wezterm.nix] - else [] + then [ ./wezterm.nix ] + else [ ] ) ++ ( if ghosttyEnable - then [./ghostty.nix] - else [] + then [ ./ghostty.nix ] + else [ ] ) ++ ( if tmuxEnable - then [./tmux.nix] - else [] + then [ ./tmux.nix ] + else [ ] ) ++ ( if alacrittyEnable - then [./alacritty.nix] - else [] + then [ ./alacritty.nix ] + else [ ] ); } diff --git a/modules/home/emoji.nix b/modules/home/emoji.nix index 2eb5988..f53d31b 100644 --- a/modules/home/emoji.nix +++ b/modules/home/emoji.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { home.file.".config/.emoji".text = '' 😀 grinning face face smile happy joy :D grin 😃 grinning face with big eyes face happy joy haha :D :) smile funny diff --git a/modules/home/evil-helix.nix b/modules/home/evil-helix.nix index 67c447c..911cca7 100644 --- a/modules/home/evil-helix.nix +++ b/modules/home/evil-helix.nix @@ -1,6 +1,8 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let enableEvilHelix = true; # Set to true to enable the configuration -in { +in +{ home.packages = with pkgs; ( if enableEvilHelix then [ @@ -23,7 +25,7 @@ in { docker-language-server typescript-language-server ] - else [] + else [ ] ); home.file.".config/helix/languages.toml".text = diff --git a/modules/home/fzf.nix b/modules/home/fzf.nix index 030b44c..0100ad8 100644 --- a/modules/home/fzf.nix +++ b/modules/home/fzf.nix @@ -1,13 +1,14 @@ # Fzf is a general-purpose command-line fuzzy finder. -{ - config, - lib, - ... -}: let +{ config +, lib +, ... +}: +let accent = "#" + config.lib.stylix.colors.base0D; foreground = "#" + config.lib.stylix.colors.base05; muted = "#" + config.lib.stylix.colors.base03; -in { +in +{ programs.fzf = { enable = true; enableZshIntegration = true; diff --git a/modules/home/ghostty.nix b/modules/home/ghostty.nix index 97c7dc1..9319824 100644 --- a/modules/home/ghostty.nix +++ b/modules/home/ghostty.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let # A recent issue 7/7/2025 w/ghostty causes it to hang or respond slowly # This is a workaround until a fix is released myGhostty = pkgs.ghostty.overrideAttrs (_: { @@ -8,7 +9,8 @@ shopt -u globstar ''; }); -in { +in +{ programs.ghostty = { enable = true; package = myGhostty; # to fix a but in current builds of ghostty diff --git a/modules/home/git.nix b/modules/home/git.nix index 823388b..321b250 100644 --- a/modules/home/git.nix +++ b/modules/home/git.nix @@ -1,6 +1,8 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../hosts/${host}/variables.nix) gitUsername gitEmail; -in { +in +{ programs.git = { enable = true; userName = "${gitUsername}"; diff --git a/modules/home/htop.nix b/modules/home/htop.nix index bdc77b4..263697b 100644 --- a/modules/home/htop.nix +++ b/modules/home/htop.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{ config, ... }: { programs.htop = { enable = true; settings = @@ -25,18 +25,18 @@ highlight_threads = 1; } // (with config.lib.htop; - leftMeters [ - (bar "AllCPUs2") - (bar "Memory") - (bar "Swap") - (text "Zram") - ]) + leftMeters [ + (bar "AllCPUs2") + (bar "Memory") + (bar "Swap") + (text "Zram") + ]) // (with config.lib.htop; - rightMeters [ - (text "Tasks") - (text "LoadAverage") - (text "Uptime") - (text "Systemd") - ]); + rightMeters [ + (text "Tasks") + (text "LoadAverage") + (text "Uptime") + (text "Systemd") + ]); }; } diff --git a/modules/home/hyprland/animations-def.nix b/modules/home/hyprland/animations-def.nix index e7fbe6e..dbbaea5 100644 --- a/modules/home/hyprland/animations-def.nix +++ b/modules/home/hyprland/animations-def.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { wayland.windowManager.hyprland.settings = { animations = { enabled = true; diff --git a/modules/home/hyprland/animations-dynamic.nix b/modules/home/hyprland/animations-dynamic.nix index 8977f7e..eb96614 100644 --- a/modules/home/hyprland/animations-dynamic.nix +++ b/modules/home/hyprland/animations-dynamic.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { wayland.windowManager.hyprland.settings = { # name "Dynamic" # credit https://github.com/mylinuxforwork/dotfiles diff --git a/modules/home/hyprland/animations-end4.nix b/modules/home/hyprland/animations-end4.nix index 18369a8..fd8fbce 100644 --- a/modules/home/hyprland/animations-end4.nix +++ b/modules/home/hyprland/animations-end4.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { wayland.windowManager.hyprland.settings = { # Name: END-4 # Credit: END-4 project https://github.com/end-4/dots-hyprland diff --git a/modules/home/hyprland/animations-moving.nix b/modules/home/hyprland/animations-moving.nix index c162b5f..59d8c77 100644 --- a/modules/home/hyprland/animations-moving.nix +++ b/modules/home/hyprland/animations-moving.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { wayland.windowManager.hyprland.settings = { # name "moving" # credit https://github.com/mylinuxforwork/dotfiles diff --git a/modules/home/hyprland/binds.nix b/modules/home/hyprland/binds.nix index b1d2c57..3efa265 100644 --- a/modules/home/hyprland/binds.nix +++ b/modules/home/hyprland/binds.nix @@ -1,10 +1,12 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../../hosts/${host}/variables.nix) browser terminal ; -in { +in +{ wayland.windowManager.hyprland.settings = { bind = [ "$modifier,Return,exec,${terminal}" diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix index ab286ca..25234de 100644 --- a/modules/home/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -1,6 +1,8 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../../hosts/${host}/variables.nix) animChoice; -in { +in +{ imports = [ animChoice ./binds.nix diff --git a/modules/home/hyprland/env.nix b/modules/home/hyprland/env.nix index ee61625..134cc58 100644 --- a/modules/home/hyprland/env.nix +++ b/modules/home/hyprland/env.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { wayland.windowManager.hyprland = { settings = { env = [ diff --git a/modules/home/hyprland/exec-once.nix b/modules/home/hyprland/exec-once.nix index 462a489..3c603fd 100644 --- a/modules/home/hyprland/exec-once.nix +++ b/modules/home/hyprland/exec-once.nix @@ -1,9 +1,11 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../../hosts/${host}/variables.nix) stylixImage ; -in { +in +{ wayland.windowManager.hyprland.settings = { exec-once = [ "wl-paste --type text --watch cliphist store" # Saves text diff --git a/modules/home/hyprland/hypridle.nix b/modules/home/hyprland/hypridle.nix index e5e0f68..21fbf57 100644 --- a/modules/home/hyprland/hypridle.nix +++ b/modules/home/hyprland/hypridle.nix @@ -9,7 +9,7 @@ after_sleep_cmd = "hyprctl dispatch dpms on"; ignore_dbus_inhibit = false; lock_cmd = "hyprlock"; - }; + }; listener = [ { timeout = 900; diff --git a/modules/home/hyprland/hyprland.nix b/modules/home/hyprland/hyprland.nix index 2b17a06..7029430 100644 --- a/modules/home/hyprland/hyprland.nix +++ b/modules/home/hyprland/hyprland.nix @@ -1,16 +1,17 @@ -{ - host, - config, - pkgs, - ... -}: let +{ host +, config +, pkgs +, ... +}: +let inherit (import ../../../hosts/${host}/variables.nix) extraMonitorSettings keyboardLayout stylixImage ; -in { +in +{ home.packages = with pkgs; [ swww grim @@ -39,7 +40,7 @@ in { systemd = { enable = true; enableXdgAutostart = true; - variables = ["--all"]; + variables = [ "--all" ]; }; xwayland = { enable = true; diff --git a/modules/home/hyprland/hyprlock.nix b/modules/home/hyprland/hyprlock.nix index 513a34a..d2c22b9 100644 --- a/modules/home/hyprland/hyprlock.nix +++ b/modules/home/hyprland/hyprlock.nix @@ -1,4 +1,4 @@ -{username, ...}: { +{ username, ... }: { programs.hyprlock = { enable = true; settings = { diff --git a/modules/home/hyprland/pyprland.nix b/modules/home/hyprland/pyprland.nix index 0bffe11..490b1c4 100644 --- a/modules/home/hyprland/pyprland.nix +++ b/modules/home/hyprland/pyprland.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: { - home.packages = with pkgs; [pyprland]; +{ pkgs, ... }: { + home.packages = with pkgs; [ pyprland ]; home.file.".config/hypr/pyprland.toml".text = '' [pyprland] diff --git a/modules/home/hyprland/windowrules.nix b/modules/home/hyprland/windowrules.nix index 6b6717c..982645e 100644 --- a/modules/home/hyprland/windowrules.nix +++ b/modules/home/hyprland/windowrules.nix @@ -1,9 +1,11 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../../hosts/${host}/variables.nix) extraMonitorSettings ; -in { +in +{ wayland.windowManager.hyprland = { settings = { windowrule = [ diff --git a/modules/home/kitty.nix b/modules/home/kitty.nix index e34c3a4..69a4490 100644 --- a/modules/home/kitty.nix +++ b/modules/home/kitty.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.kitty = { enable = true; package = pkgs.kitty; diff --git a/modules/home/lazygit.nix b/modules/home/lazygit.nix index 3b36794..298c74d 100644 --- a/modules/home/lazygit.nix +++ b/modules/home/lazygit.nix @@ -3,7 +3,8 @@ let accent = "#${config.lib.stylix.colors.base0D}"; muted = "#${config.lib.stylix.colors.base03}"; -in { +in +{ programs.lazygit = { enable = true; settings = lib.mkForce { diff --git a/modules/home/nvf.nix b/modules/home/nvf.nix index abc451f..26cc892 100644 --- a/modules/home/nvf.nix +++ b/modules/home/nvf.nix @@ -1,9 +1,8 @@ -{ - inputs, - config, - ... +{ inputs +, config +, ... }: { - imports = [inputs.nvf.homeManagerModules.default]; + imports = [ inputs.nvf.homeManagerModules.default ]; programs.nvf = { enable = true; @@ -51,55 +50,55 @@ keymaps = [ { key = "jk"; - mode = ["i"]; + mode = [ "i" ]; action = ""; desc = "Exit insert mode"; } { key = "nh"; - mode = ["n"]; + mode = [ "n" ]; action = ":nohl"; desc = "Clear search highlights"; } { key = "ff"; - mode = ["n"]; + mode = [ "n" ]; action = "Telescope find_files"; desc = "Search files by name"; } { key = "lg"; - mode = ["n"]; + mode = [ "n" ]; action = "Telescope live_grep"; desc = "Search files by contents"; } { key = "fe"; - mode = ["n"]; + mode = [ "n" ]; action = "Neotree toggle"; desc = "File browser toggle"; } { key = ""; - mode = ["i"]; + mode = [ "i" ]; action = ""; desc = "Move left in insert mode"; } { key = ""; - mode = ["i"]; + mode = [ "i" ]; action = ""; desc = "Move down in insert mode"; } { key = ""; - mode = ["i"]; + mode = [ "i" ]; action = ""; desc = "Move up in insert mode"; } { key = ""; - mode = ["i"]; + mode = [ "i" ]; action = ""; desc = "Move right in insert mode"; } @@ -109,7 +108,7 @@ spellcheck = { enable = true; - languages = ["en"]; + languages = [ "en" ]; programmingWordlist.enable = false; }; diff --git a/modules/home/obs-studio.nix b/modules/home/obs-studio.nix index 05d8469..d0b610c 100644 --- a/modules/home/obs-studio.nix +++ b/modules/home/obs-studio.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.obs-studio = { enable = true; #enableVirtualCamera = true; diff --git a/modules/home/qt.nix b/modules/home/qt.nix index 2674038..b8df345 100644 --- a/modules/home/qt.nix +++ b/modules/home/qt.nix @@ -1,4 +1,4 @@ -{lib, ...}: { +{ lib, ... }: { qt = { enable = true; platformTheme.name = lib.mkForce "qtct"; diff --git a/modules/home/rofi/config-long.nix b/modules/home/rofi/config-long.nix index d947a47..e8e9773 100644 --- a/modules/home/rofi/config-long.nix +++ b/modules/home/rofi/config-long.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { home.file.".config/rofi/config-long.rasi".text = '' @import "~/.config/rofi/config.rasi" window { diff --git a/modules/home/rofi/default.nix b/modules/home/rofi/default.nix index 6493e45..1b6ae5f 100644 --- a/modules/home/rofi/default.nix +++ b/modules/home/rofi/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { imports = [ ./config-long.nix ./rofi.nix diff --git a/modules/home/rofi/rofi.nix b/modules/home/rofi/rofi.nix index 3b785db..f9bb5a5 100644 --- a/modules/home/rofi/rofi.nix +++ b/modules/home/rofi/rofi.nix @@ -1,7 +1,6 @@ -{ - pkgs, - config, - ... +{ pkgs +, config +, ... }: { programs = { rofi = { @@ -17,191 +16,193 @@ display-run = " Run"; display-filebrowser = " File"; }; - theme = let - inherit (config.lib.formats.rasi) mkLiteral; - in { - "*" = { - bg = mkLiteral "#${config.stylix.base16Scheme.base00}"; - bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}"; - foreground = mkLiteral "#${config.stylix.base16Scheme.base01}"; - selected = mkLiteral "#${config.stylix.base16Scheme.base08}"; - active = mkLiteral "#${config.stylix.base16Scheme.base0B}"; - text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}"; - text-color = mkLiteral "#${config.stylix.base16Scheme.base05}"; - border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}"; - urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}"; + theme = + let + inherit (config.lib.formats.rasi) mkLiteral; + in + { + "*" = { + bg = mkLiteral "#${config.stylix.base16Scheme.base00}"; + bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}"; + foreground = mkLiteral "#${config.stylix.base16Scheme.base01}"; + selected = mkLiteral "#${config.stylix.base16Scheme.base08}"; + active = mkLiteral "#${config.stylix.base16Scheme.base0B}"; + text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}"; + text-color = mkLiteral "#${config.stylix.base16Scheme.base05}"; + border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}"; + urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}"; + }; + "window" = { + transparency = "real"; + width = mkLiteral "1000px"; + location = mkLiteral "center"; + anchor = mkLiteral "center"; + fullscreen = false; + x-offset = mkLiteral "0px"; + y-offset = mkLiteral "0px"; + cursor = "default"; + enabled = true; + border-radius = mkLiteral "15px"; + background-color = mkLiteral "@bg"; + }; + "mainbox" = { + enabled = true; + spacing = mkLiteral "0px"; + orientation = mkLiteral "horizontal"; + children = map mkLiteral [ + "imagebox" + "listbox" + ]; + background-color = mkLiteral "transparent"; + }; + "imagebox" = { + padding = mkLiteral "20px"; + background-color = mkLiteral "transparent"; + background-image = mkLiteral ''url("~/Pictures/Wallpapers/Rainnight.jpg", height)''; + orientation = mkLiteral "vertical"; + children = map mkLiteral [ + "inputbar" + "dummy" + "mode-switcher" + ]; + }; + "listbox" = { + spacing = mkLiteral "20px"; + padding = mkLiteral "20px"; + background-color = mkLiteral "transparent"; + orientation = mkLiteral "vertical"; + children = map mkLiteral [ + "message" + "listview" + ]; + }; + "dummy" = { + background-color = mkLiteral "transparent"; + }; + "inputbar" = { + enabled = true; + spacing = mkLiteral "10px"; + padding = mkLiteral "10px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "@foreground"; + children = map mkLiteral [ + "textbox-prompt-colon" + "entry" + ]; + }; + "textbox-prompt-colon" = { + enabled = true; + expand = false; + str = ""; + background-color = mkLiteral "inherit"; + text-color = mkLiteral "inherit"; + }; + "entry" = { + enabled = true; + background-color = mkLiteral "inherit"; + text-color = mkLiteral "inherit"; + cursor = mkLiteral "text"; + placeholder = "Search"; + placeholder-color = mkLiteral "inherit"; + }; + "mode-switcher" = { + enabled = true; + spacing = mkLiteral "20px"; + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@foreground"; + }; + "button" = { + padding = mkLiteral "15px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "inherit"; + cursor = mkLiteral "pointer"; + }; + "button selected" = { + background-color = mkLiteral "@selected"; + text-color = mkLiteral "@foreground"; + }; + "listview" = { + enabled = true; + columns = 1; + lines = 8; + cycle = true; + dynamic = true; + scrollbar = false; + layout = mkLiteral "vertical"; + reverse = false; + fixed-height = true; + fixed-columns = true; + spacing = mkLiteral "10px"; + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@foreground"; + cursor = "default"; + }; + "element" = { + enabled = true; + spacing = mkLiteral "15px"; + padding = mkLiteral "8px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@text-color"; + cursor = mkLiteral "pointer"; + }; + "element normal.normal" = { + background-color = mkLiteral "inherit"; + text-color = mkLiteral "@text-color"; + }; + "element normal.urgent" = { + background-color = mkLiteral "@urgent"; + text-color = mkLiteral "@text-color"; + }; + "element normal.active" = { + background-color = mkLiteral "inherit"; + text-color = mkLiteral "@text-color"; + }; + "element selected.normal" = { + background-color = mkLiteral "@selected"; + text-color = mkLiteral "@foreground"; + }; + "element selected.urgent" = { + background-color = mkLiteral "@urgent"; + text-color = mkLiteral "@text-selected"; + }; + "element selected.active" = { + background-color = mkLiteral "@urgent"; + text-color = mkLiteral "@text-selected"; + }; + "element-icon" = { + background-color = mkLiteral "transparent"; + text-color = mkLiteral "inherit"; + size = mkLiteral "36px"; + cursor = mkLiteral "inherit"; + }; + "element-text" = { + background-color = mkLiteral "transparent"; + text-color = mkLiteral "inherit"; + cursor = mkLiteral "inherit"; + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.0"; + }; + "message" = { + background-color = mkLiteral "transparent"; + }; + "textbox" = { + padding = mkLiteral "15px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "@foreground"; + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.0"; + }; + "error-message" = { + padding = mkLiteral "15px"; + border-radius = mkLiteral "20px"; + background-color = mkLiteral "@bg"; + text-color = mkLiteral "@foreground"; + }; }; - "window" = { - transparency = "real"; - width = mkLiteral "1000px"; - location = mkLiteral "center"; - anchor = mkLiteral "center"; - fullscreen = false; - x-offset = mkLiteral "0px"; - y-offset = mkLiteral "0px"; - cursor = "default"; - enabled = true; - border-radius = mkLiteral "15px"; - background-color = mkLiteral "@bg"; - }; - "mainbox" = { - enabled = true; - spacing = mkLiteral "0px"; - orientation = mkLiteral "horizontal"; - children = map mkLiteral [ - "imagebox" - "listbox" - ]; - background-color = mkLiteral "transparent"; - }; - "imagebox" = { - padding = mkLiteral "20px"; - background-color = mkLiteral "transparent"; - background-image = mkLiteral ''url("~/Pictures/Wallpapers/Rainnight.jpg", height)''; - orientation = mkLiteral "vertical"; - children = map mkLiteral [ - "inputbar" - "dummy" - "mode-switcher" - ]; - }; - "listbox" = { - spacing = mkLiteral "20px"; - padding = mkLiteral "20px"; - background-color = mkLiteral "transparent"; - orientation = mkLiteral "vertical"; - children = map mkLiteral [ - "message" - "listview" - ]; - }; - "dummy" = { - background-color = mkLiteral "transparent"; - }; - "inputbar" = { - enabled = true; - spacing = mkLiteral "10px"; - padding = mkLiteral "10px"; - border-radius = mkLiteral "10px"; - background-color = mkLiteral "@bg-alt"; - text-color = mkLiteral "@foreground"; - children = map mkLiteral [ - "textbox-prompt-colon" - "entry" - ]; - }; - "textbox-prompt-colon" = { - enabled = true; - expand = false; - str = ""; - background-color = mkLiteral "inherit"; - text-color = mkLiteral "inherit"; - }; - "entry" = { - enabled = true; - background-color = mkLiteral "inherit"; - text-color = mkLiteral "inherit"; - cursor = mkLiteral "text"; - placeholder = "Search"; - placeholder-color = mkLiteral "inherit"; - }; - "mode-switcher" = { - enabled = true; - spacing = mkLiteral "20px"; - background-color = mkLiteral "transparent"; - text-color = mkLiteral "@foreground"; - }; - "button" = { - padding = mkLiteral "15px"; - border-radius = mkLiteral "10px"; - background-color = mkLiteral "@bg-alt"; - text-color = mkLiteral "inherit"; - cursor = mkLiteral "pointer"; - }; - "button selected" = { - background-color = mkLiteral "@selected"; - text-color = mkLiteral "@foreground"; - }; - "listview" = { - enabled = true; - columns = 1; - lines = 8; - cycle = true; - dynamic = true; - scrollbar = false; - layout = mkLiteral "vertical"; - reverse = false; - fixed-height = true; - fixed-columns = true; - spacing = mkLiteral "10px"; - background-color = mkLiteral "transparent"; - text-color = mkLiteral "@foreground"; - cursor = "default"; - }; - "element" = { - enabled = true; - spacing = mkLiteral "15px"; - padding = mkLiteral "8px"; - border-radius = mkLiteral "10px"; - background-color = mkLiteral "transparent"; - text-color = mkLiteral "@text-color"; - cursor = mkLiteral "pointer"; - }; - "element normal.normal" = { - background-color = mkLiteral "inherit"; - text-color = mkLiteral "@text-color"; - }; - "element normal.urgent" = { - background-color = mkLiteral "@urgent"; - text-color = mkLiteral "@text-color"; - }; - "element normal.active" = { - background-color = mkLiteral "inherit"; - text-color = mkLiteral "@text-color"; - }; - "element selected.normal" = { - background-color = mkLiteral "@selected"; - text-color = mkLiteral "@foreground"; - }; - "element selected.urgent" = { - background-color = mkLiteral "@urgent"; - text-color = mkLiteral "@text-selected"; - }; - "element selected.active" = { - background-color = mkLiteral "@urgent"; - text-color = mkLiteral "@text-selected"; - }; - "element-icon" = { - background-color = mkLiteral "transparent"; - text-color = mkLiteral "inherit"; - size = mkLiteral "36px"; - cursor = mkLiteral "inherit"; - }; - "element-text" = { - background-color = mkLiteral "transparent"; - text-color = mkLiteral "inherit"; - cursor = mkLiteral "inherit"; - vertical-align = mkLiteral "0.5"; - horizontal-align = mkLiteral "0.0"; - }; - "message" = { - background-color = mkLiteral "transparent"; - }; - "textbox" = { - padding = mkLiteral "15px"; - border-radius = mkLiteral "10px"; - background-color = mkLiteral "@bg-alt"; - text-color = mkLiteral "@foreground"; - vertical-align = mkLiteral "0.5"; - horizontal-align = mkLiteral "0.0"; - }; - "error-message" = { - padding = mkLiteral "15px"; - border-radius = mkLiteral "20px"; - background-color = mkLiteral "@bg"; - text-color = mkLiteral "@foreground"; - }; - }; }; }; } diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index 9b02b3b..3b755e5 100644 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -1,23 +1,22 @@ -{ - pkgs, - username, - profile, - ... +{ pkgs +, username +, profile +, ... }: { home.packages = [ - (import ./emopicker9000.nix {inherit pkgs;}) - (import ./keybinds.nix {inherit pkgs;}) - (import ./task-waybar.nix {inherit pkgs;}) - (import ./squirtle.nix {inherit pkgs;}) - (import ./nvidia-offload.nix {inherit pkgs;}) + (import ./emopicker9000.nix { inherit pkgs; }) + (import ./keybinds.nix { inherit pkgs; }) + (import ./task-waybar.nix { inherit pkgs; }) + (import ./squirtle.nix { inherit pkgs; }) + (import ./nvidia-offload.nix { inherit pkgs; }) (import ./wallsetter.nix { inherit pkgs; inherit username; }) - (import ./web-search.nix {inherit pkgs;}) - (import ./rofi-launcher.nix {inherit pkgs;}) - (import ./screenshootin.nix {inherit pkgs;}) - (import ./hm-find.nix {inherit pkgs;}) + (import ./web-search.nix { inherit pkgs; }) + (import ./rofi-launcher.nix { inherit pkgs; }) + (import ./screenshootin.nix { inherit pkgs; }) + (import ./hm-find.nix { inherit pkgs; }) (import ./zcli.nix { inherit pkgs profile; backupFiles = [ diff --git a/modules/home/scripts/emopicker9000.nix b/modules/home/scripts/emopicker9000.nix index e4d908f..3d4346c 100644 --- a/modules/home/scripts/emopicker9000.nix +++ b/modules/home/scripts/emopicker9000.nix @@ -1,4 +1,4 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellScriptBin "emopicker9000" '' # check if rofi is already running if pidof rofi > /dev/null; then diff --git a/modules/home/scripts/gemini-cli.nix b/modules/home/scripts/gemini-cli.nix index 17374e2..d39d30c 100644 --- a/modules/home/scripts/gemini-cli.nix +++ b/modules/home/scripts/gemini-cli.nix @@ -34,4 +34,4 @@ in type = "Application"; categories = [ "Development" "Utility" ]; }; -} \ No newline at end of file +} diff --git a/modules/home/scripts/hm-find.nix b/modules/home/scripts/hm-find.nix index d997469..77771d5 100644 --- a/modules/home/scripts/hm-find.nix +++ b/modules/home/scripts/hm-find.nix @@ -1,4 +1,4 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellScriptBin "hm-find" '' #!/usr/bin/env bash diff --git a/modules/home/scripts/keybinds.nix b/modules/home/scripts/keybinds.nix index af267b0..5a5a9f3 100644 --- a/modules/home/scripts/keybinds.nix +++ b/modules/home/scripts/keybinds.nix @@ -1,4 +1,4 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellScriptBin "list-keybinds" '' # check if rofi is already running if pidof rofi > /dev/null; then @@ -14,4 +14,4 @@ pkgs.writeShellScriptBin "list-keybinds" '' # use rofi to display the keybinds with the modified content echo "$display_keybinds" | rofi -dmenu -i -config ~/.config/rofi/config-long.rasi -mesg "$msg" -'' \ No newline at end of file +'' diff --git a/modules/home/scripts/rofi-launcher.nix b/modules/home/scripts/rofi-launcher.nix index b1a3eb2..014802d 100644 --- a/modules/home/scripts/rofi-launcher.nix +++ b/modules/home/scripts/rofi-launcher.nix @@ -1,4 +1,4 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellScriptBin "rofi-launcher" '' # check if rofi is already running if pidof rofi > /dev/null; then diff --git a/modules/home/scripts/web-search.nix b/modules/home/scripts/web-search.nix index 263b228..7af6e86 100644 --- a/modules/home/scripts/web-search.nix +++ b/modules/home/scripts/web-search.nix @@ -1,4 +1,4 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellScriptBin "web-search" '' # check if rofi is already running if pidof rofi > /dev/null; then diff --git a/modules/home/scripts/zcli.nix b/modules/home/scripts/zcli.nix index 4bd3064..47558c8 100644 --- a/modules/home/scripts/zcli.nix +++ b/modules/home/scripts/zcli.nix @@ -1,313 +1,313 @@ -{ - pkgs, - profile, - backupFiles ? [".config/mimeapps.list.backup"], - ... -}: let +{ pkgs +, profile +, backupFiles ? [ ".config/mimeapps.list.backup" ] +, ... +}: +let backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles; in - pkgs.writeShellScriptBin "zcli" '' - #!${pkgs.bash}/bin/bash - set -euo pipefail +pkgs.writeShellScriptBin "zcli" '' + #!${pkgs.bash}/bin/bash + set -euo pipefail - # --- Configuration --- - PROJECT="zaneyos" #ddubos or zaneyos - PROFILE="${profile}" - BACKUP_FILES_STR="${backupFilesString}" - VERSION="1.0.1" - FLAKE_NIX_PATH="$HOME/$PROJECT/flake.nix" + # --- Configuration --- + PROJECT="zaneyos" #ddubos or zaneyos + PROFILE="${profile}" + BACKUP_FILES_STR="${backupFilesString}" + VERSION="1.0.1" + FLAKE_NIX_PATH="$HOME/$PROJECT/flake.nix" - read -r -a BACKUP_FILES <<< "$BACKUP_FILES_STR" + read -r -a BACKUP_FILES <<< "$BACKUP_FILES_STR" - # --- Helper Functions --- - print_help() { - echo "ZaneyOS CLI Utility -- version $VERSION" - echo "" - echo "Usage: zcli [command]" - echo "" - echo "Commands:" - echo " cleanup - Clean up old system generations. Can specify a number to keep." - echo " diag - Create a system diagnostic report." - echo " (Filename: homedir/diag.txt)" - echo " list-gens - List user and system generations." - echo " rebuild - Rebuild the NixOS system configuration." - echo " trim - Trim filesystems to improve SSD performance." - echo " update - Update the flake and rebuild the system." - echo " update-host - Auto set host and profile in flake.nix." - echo " (Opt: zcli update-host [hostname] [profile])" - echo "" - echo " help - Show this help message." - } + # --- Helper Functions --- + print_help() { + echo "ZaneyOS CLI Utility -- version $VERSION" + echo "" + echo "Usage: zcli [command]" + echo "" + echo "Commands:" + echo " cleanup - Clean up old system generations. Can specify a number to keep." + echo " diag - Create a system diagnostic report." + echo " (Filename: homedir/diag.txt)" + echo " list-gens - List user and system generations." + echo " rebuild - Rebuild the NixOS system configuration." + echo " trim - Trim filesystems to improve SSD performance." + echo " update - Update the flake and rebuild the system." + echo " update-host - Auto set host and profile in flake.nix." + echo " (Opt: zcli update-host [hostname] [profile])" + echo "" + echo " help - Show this help message." + } - handle_backups() { - if [ ''${#BACKUP_FILES[@]} -eq 0 ]; then - echo "No backup files configured to check." - return - fi - - echo "Checking for backup files to remove..." - for file_path in "''${BACKUP_FILES[@]}"; do - full_path="$HOME/$file_path" - if [ -f "$full_path" ]; then - echo "Removing stale backup file: $full_path" - rm "$full_path" - fi - done - } - - detect_gpu_profile() { - local detected_profile="" - local has_nvidia=false - local has_intel=false - local has_amd=false - local has_vm=false - - if lspci &> /dev/null; then # Check if lspci is available - if lspci | grep -qi 'vga\|3d'; then - while read -r line; do - if echo "$line" | grep -qi 'nvidia'; then - has_nvidia=true - elif echo "$line" | grep -qi 'amd'; then - has_amd=true - elif echo "$line" | grep -qi 'intel'; then - has_intel=true - elif echo "$line" | grep -qi 'virtio\|vmware'; then - has_vm=true - fi - done < <(lspci | grep -i 'vga\|3d') - - if "$has_vm"; then - detected_profile="vm" - elif "$has_nvidia" && "$has_intel"; then - detec0.1ted_profile="nvidia-laptop" - elif "$has_nvidia"; then - detected_profile="nvidia" - elif "$has_amd"; then - detected_profile="amd" - elif "$has_intel"; then - detected_profile="intel" - fi - fi - else - echo "Warning: lspci command not found. Cannot auto-detect GPU profile." >&2 - fi - echo "$detected_profile" # Return the detected profile - } - - # --- Main Logic --- - if [ "$#" -eq 0 ]; then - echo "Error: No command provided." >&2 - print_help - exit 1 + handle_backups() { + if [ ''${#BACKUP_FILES[@]} -eq 0 ]; then + echo "No backup files configured to check." + return fi - case "$1" in - cleanup) - echo "Warning! This will remove old generations of your system." - read -p "How many generations to keep (default: all)? " keep_count + echo "Checking for backup files to remove..." + for file_path in "''${BACKUP_FILES[@]}"; do + full_path="$HOME/$file_path" + if [ -f "$full_path" ]; then + echo "Removing stale backup file: $full_path" + rm "$full_path" + fi + done + } - if [ -z "$keep_count" ]; then - read -p "This will remove all but the current generation. Continue (y/N)? " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - nh clean all -v - else - echo "Cleanup cancelled." - fi - else - read -p "This will keep the last $keep_count generations. Continue (y/N)? " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - nh clean all -k "$keep_count" -v - else - echo "Cleanup cancelled." - fi - fi + detect_gpu_profile() { + local detected_profile="" + local has_nvidia=false + local has_intel=false + local has_amd=false + local has_vm=false - LOG_DIR="$HOME/zcli-cleanup-logs" - mkdir -p "$LOG_DIR" - LOG_FILE="$LOG_DIR/zcli-cleanup-$(date +%Y-%m-%d_%H-%M-%S).log" - echo "Cleaning up old log files..." >> "$LOG_FILE" - find "$LOG_DIR" -type f -mtime +3 -name "*.log" -delete >> "$LOG_FILE" 2>&1 - echo "Cleanup process logged to $LOG_FILE" - ;; - diag) - echo "Generating system diagnostic report..." - inxi --full > "$HOME/diag.txt" - echo "Diagnostic report saved to $HOME/diag.txt" - ;; - help) - print_help - ;; - list-gens) - echo "--- User Generations ---" - nix-env --list-generations | cat || echo "Could not list user generations." - echo "" - echo "--- System Generations ---" - nix profile history --profile /nix/var/nix/profiles/system | cat || echo "Could not list system generations." - ;; - rebuild) - handle_backups - echo "Starting NixOS rebuild for host: $(hostname)" - if nh os switch --hostname "$PROFILE"; then - echo "Rebuild finished successfully" - else - echo "Rebuild Failed" >&2 - exit 1 + if lspci &> /dev/null; then # Check if lspci is available + if lspci | grep -qi 'vga\|3d'; then + while read -r line; do + if echo "$line" | grep -qi 'nvidia'; then + has_nvidia=true + elif echo "$line" | grep -qi 'amd'; then + has_amd=true + elif echo "$line" | grep -qi 'intel'; then + has_intel=true + elif echo "$line" | grep -qi 'virtio\|vmware'; then + has_vm=true + fi + done < <(lspci | grep -i 'vga\|3d') + + if "$has_vm"; then + detected_profile="vm" + elif "$has_nvidia" && "$has_intel"; then + detec0.1ted_profile="nvidia-laptop" + elif "$has_nvidia"; then + detected_profile="nvidia" + elif "$has_amd"; then + detected_profile="amd" + elif "$has_intel"; then + detected_profile="intel" fi - ;; - trim) - echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance." - read -p "Enter (y/Y) to run now or enter to exit (y/N): " -n 1 -r - echo # move to a new line + fi + else + echo "Warning: lspci command not found. Cannot auto-detect GPU profile." >&2 + fi + echo "$detected_profile" # Return the detected profile + } + + # --- Main Logic --- + if [ "$#" -eq 0 ]; then + echo "Error: No command provided." >&2 + print_help + exit 1 + fi + + case "$1" in + cleanup) + echo "Warning! This will remove old generations of your system." + read -p "How many generations to keep (default: all)? " keep_count + + if [ -z "$keep_count" ]; then + read -p "This will remove all but the current generation. Continue (y/N)? " -n 1 -r + echo if [[ $REPLY =~ ^[Yy]$ ]]; then - echo "Running fstrim..." - sudo fstrim -v / - echo "fstrim complete." + nh clean all -v else - echo "Trim operation cancelled." + echo "Cleanup cancelled." fi - ;; - update) - handle_backups - echo "Updating flake and rebuilding system for host: $(hostname)" - if nh os switch --hostname "$PROFILE" --update; then - echo "Update and rebuild finished successfully" + else + read -p "This will keep the last $keep_count generations. Continue (y/N)? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + nh clean all -k "$keep_count" -v else - echo "Update and rebuild Failed" >&2 - exit 1 + echo "Cleanup cancelled." fi - ;; - update-host) - target_hostname="" - target_profile="" + fi - if [ "$#" -eq 3 ]; then # zcli update-host - target_hostname="$2" - target_profile="$3" - elif [ "$#" -eq 1 ]; then # zcli update-host (auto-detect) - echo "Attempting to auto-detect hostname and GPU profile..." - target_hostname=$(hostname) - target_profile=$(detect_gpu_profile) + LOG_DIR="$HOME/zcli-cleanup-logs" + mkdir -p "$LOG_DIR" + LOG_FILE="$LOG_DIR/zcli-cleanup-$(date +%Y-%m-%d_%H-%M-%S).log" + echo "Cleaning up old log files..." >> "$LOG_FILE" + find "$LOG_DIR" -type f -mtime +3 -name "*.log" -delete >> "$LOG_FILE" 2>&1 + echo "Cleanup process logged to $LOG_FILE" + ;; + diag) + echo "Generating system diagnostic report..." + inxi --full > "$HOME/diag.txt" + echo "Diagnostic report saved to $HOME/diag.txt" + ;; + help) + print_help + ;; + list-gens) + echo "--- User Generations ---" + nix-env --list-generations | cat || echo "Could not list user generations." + echo "" + echo "--- System Generations ---" + nix profile history --profile /nix/var/nix/profiles/system | cat || echo "Could not list system generations." + ;; + rebuild) + handle_backups + echo "Starting NixOS rebuild for host: $(hostname)" + if nh os switch --hostname "$PROFILE"; then + echo "Rebuild finished successfully" + else + echo "Rebuild Failed" >&2 + exit 1 + fi + ;; + trim) + echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance." + read -p "Enter (y/Y) to run now or enter to exit (y/N): " -n 1 -r + echo # move to a new line + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Running fstrim..." + sudo fstrim -v / + echo "fstrim complete." + else + echo "Trim operation cancelled." + fi + ;; + update) + handle_backups + echo "Updating flake and rebuilding system for host: $(hostname)" + if nh os switch --hostname "$PROFILE" --update; then + echo "Update and rebuild finished successfully" + else + echo "Update and rebuild Failed" >&2 + exit 1 + fi + ;; + update-host) + target_hostname="" + target_profile="" - if [ -z "$target_profile" ]; then - echo "Error: Could not auto-detect a specific GPU profile. Please provide it manually." >&2 - echo "Usage: zcli update-host [hostname] [profile]" >&2 - exit 1 - fi - echo "Auto-detected Hostname: $target_hostname" - echo "Auto-detected Profile: $target_profile" - else - echo "Error: Invalid number of arguments for 'update-host'." >&2 + if [ "$#" -eq 3 ]; then # zcli update-host + target_hostname="$2" + target_profile="$3" + elif [ "$#" -eq 1 ]; then # zcli update-host (auto-detect) + echo "Attempting to auto-detect hostname and GPU profile..." + target_hostname=$(hostname) + target_profile=$(detect_gpu_profile) + + if [ -z "$target_profile" ]; then + echo "Error: Could not auto-detect a specific GPU profile. Please provide it manually." >&2 echo "Usage: zcli update-host [hostname] [profile]" >&2 exit 1 fi - - echo "Updating $FLAKE_NIX_PATH..." - - # Update host - if sed -i "s/^[[:space:]]*host[[:space:]]*=[[:space:]]*\".*\"/ host = \"$target_hostname\"/" "$FLAKE_NIX_PATH"; then - echo "Successfully updated host to: $target_hostname" - else - echo "Error: Failed to update host in $FLAKE_NIX_PATH" >&2 - exit 1 - fi - - # Update profile - if sed -i "s/^[[:space:]]*profile[[:space:]]*=[[:space:]]*\".*\"/ profile = \"$target_profile\"/" "$FLAKE_NIX_PATH"; then - echo "Successfully updated profile to: $target_profile" - else - echo "Error: Failed to update profile in $FLAKE_NIX_PATH" >&2 - exit 1 - fi - - echo "Flake.nix updated successfully!" - ;; - add-host) - hostname="" - profile_arg="" - - if [ "$#" -ge 2 ]; then - hostname="$2" - fi - if [ "$#" -eq 3 ]; then - profile_arg="$3" - fi - - if [ -z "$hostname" ]; then - read -p "Enter the new hostname: " hostname - fi - - if [ -d "$HOME/$PROJECT/hosts/$hostname" ]; then - echo "Error: Host '$hostname' already exists." >&2 - exit 1 - fi - - echo "Copying default host configuration..." - cp -r "$HOME/$PROJECT/hosts/default" "$HOME/$PROJECT/hosts/$hostname" - - detected_profile="" - if [[ -n "$profile_arg" && "$profile_arg" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; then - detected_profile="$profile_arg" - else - echo "Detecting GPU profile..." - detected_profile=$(detect_gpu_profile) - echo "Detected GPU profile: $detected_profile" - read -p "Is this correct? (y/n) " -n 1 -r - echo - if [[ $REPLY =~ ^[Nn]$ ]]; then - read -p "Enter the correct profile (intel, amd, nvidia, nvidia-hybrid, vm): " new_profile - while [[ ! "$new_profile" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; do - echo "Invalid profile. Please enter one of the following: intel, amd, nvidia, nvidia-hybrid, vm" - read -p "Enter the correct profile: " new_profile - done - detected_profile=$new_profile - fi - fi - - echo "Setting profile to '$detected_profile'..." - sed -i "s/profile = .*/profile = \"$detected_profile\";/" "$HOME/$PROJECT/hosts/$hostname/default.nix" - - read -p "Generate new hardware.nix? (y/n) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo "Generating hardware.nix..." - sudo nixos-generate-config --show-hardware-config > "$HOME/$PROJECT/hosts/$hostname/hardware.nix" - echo "hardware.nix generated." - fi - - echo "Adding new host to git..." - git -C "$HOME/$PROJECT" add . - echo "hostname: $hostname added" - ;; - del-host) - hostname="" - if [ "$#" -eq 2 ]; then - hostname="$2" - else - read -p "Enter the hostname to delete: " hostname - fi - - if [ ! -d "$HOME/$PROJECT/hosts/$hostname" ]; then - echo "Error: Host '$hostname' does not exist." >&2 - exit 1 - fi - - read -p "Are you sure you want to delete the host '$hostname'? (y/N) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo "Deleting host '$hostname'..." - rm -rf "$HOME/$PROJECT/hosts/$hostname" - git -C "$HOME/$PROJECT" add . - echo "hostname: $hostname removed" - else - echo "Deletion cancelled." - fi - ;; - *) - echo "Error: Invalid command '$1'" >&2 - print_help + echo "Auto-detected Hostname: $target_hostname" + echo "Auto-detected Profile: $target_profile" + else + echo "Error: Invalid number of arguments for 'update-host'." >&2 + echo "Usage: zcli update-host [hostname] [profile]" >&2 exit 1 - ;; - esac - '' + fi + + echo "Updating $FLAKE_NIX_PATH..." + + # Update host + if sed -i "s/^[[:space:]]*host[[:space:]]*=[[:space:]]*\".*\"/ host = \"$target_hostname\"/" "$FLAKE_NIX_PATH"; then + echo "Successfully updated host to: $target_hostname" + else + echo "Error: Failed to update host in $FLAKE_NIX_PATH" >&2 + exit 1 + fi + + # Update profile + if sed -i "s/^[[:space:]]*profile[[:space:]]*=[[:space:]]*\".*\"/ profile = \"$target_profile\"/" "$FLAKE_NIX_PATH"; then + echo "Successfully updated profile to: $target_profile" + else + echo "Error: Failed to update profile in $FLAKE_NIX_PATH" >&2 + exit 1 + fi + + echo "Flake.nix updated successfully!" + ;; + add-host) + hostname="" + profile_arg="" + + if [ "$#" -ge 2 ]; then + hostname="$2" + fi + if [ "$#" -eq 3 ]; then + profile_arg="$3" + fi + + if [ -z "$hostname" ]; then + read -p "Enter the new hostname: " hostname + fi + + if [ -d "$HOME/$PROJECT/hosts/$hostname" ]; then + echo "Error: Host '$hostname' already exists." >&2 + exit 1 + fi + + echo "Copying default host configuration..." + cp -r "$HOME/$PROJECT/hosts/default" "$HOME/$PROJECT/hosts/$hostname" + + detected_profile="" + if [[ -n "$profile_arg" && "$profile_arg" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; then + detected_profile="$profile_arg" + else + echo "Detecting GPU profile..." + detected_profile=$(detect_gpu_profile) + echo "Detected GPU profile: $detected_profile" + read -p "Is this correct? (y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Nn]$ ]]; then + read -p "Enter the correct profile (intel, amd, nvidia, nvidia-hybrid, vm): " new_profile + while [[ ! "$new_profile" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; do + echo "Invalid profile. Please enter one of the following: intel, amd, nvidia, nvidia-hybrid, vm" + read -p "Enter the correct profile: " new_profile + done + detected_profile=$new_profile + fi + fi + + echo "Setting profile to '$detected_profile'..." + sed -i "s/profile = .*/profile = \"$detected_profile\";/" "$HOME/$PROJECT/hosts/$hostname/default.nix" + + read -p "Generate new hardware.nix? (y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Generating hardware.nix..." + sudo nixos-generate-config --show-hardware-config > "$HOME/$PROJECT/hosts/$hostname/hardware.nix" + echo "hardware.nix generated." + fi + + echo "Adding new host to git..." + git -C "$HOME/$PROJECT" add . + echo "hostname: $hostname added" + ;; + del-host) + hostname="" + if [ "$#" -eq 2 ]; then + hostname="$2" + else + read -p "Enter the hostname to delete: " hostname + fi + + if [ ! -d "$HOME/$PROJECT/hosts/$hostname" ]; then + echo "Error: Host '$hostname' does not exist." >&2 + exit 1 + fi + + read -p "Are you sure you want to delete the host '$hostname'? (y/N) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Deleting host '$hostname'..." + rm -rf "$HOME/$PROJECT/hosts/$hostname" + git -C "$HOME/$PROJECT" add . + echo "hostname: $hostname removed" + else + echo "Deletion cancelled." + fi + ;; + *) + echo "Error: Invalid command '$1'" >&2 + print_help + exit 1 + ;; + esac +'' diff --git a/modules/home/starship-ddubs-1.nix b/modules/home/starship-ddubs-1.nix index 6bc0434..2faa8b0 100644 --- a/modules/home/starship-ddubs-1.nix +++ b/modules/home/starship-ddubs-1.nix @@ -1,12 +1,13 @@ # starship is a minimal, fast, and extremely customizable prompt for any shell! -{ - config, - lib, - ... -}: let +{ config +, lib +, ... +}: +let accent = "#${config.lib.stylix.colors.base0D}"; background-alt = "#${config.lib.stylix.colors.base01}"; -in { +in +{ programs.starship = { enable = false; settings = { @@ -21,7 +22,7 @@ in { "\n" "$character" ]; - directory = {style = accent;}; + directory = { style = accent; }; character = { success_symbol = "[❯](${accent})"; diff --git a/modules/home/starship.nix b/modules/home/starship.nix index 05e7772..51090b9 100644 --- a/modules/home/starship.nix +++ b/modules/home/starship.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.starship = { enable = false; package = pkgs.starship; diff --git a/modules/home/swappy.nix b/modules/home/swappy.nix index 0029798..b3b62a3 100644 --- a/modules/home/swappy.nix +++ b/modules/home/swappy.nix @@ -1,4 +1,4 @@ -{username, ...}: { +{ username, ... }: { home.file = { ".config/swappy/config".text = '' [Default] diff --git a/modules/home/swaync.nix b/modules/home/swaync.nix index 07e6261..2662402 100644 --- a/modules/home/swaync.nix +++ b/modules/home/swaync.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{ config, ... }: { services.swaync = { enable = true; settings = { diff --git a/modules/home/tealdeer.nix b/modules/home/tealdeer.nix index a8e6c94..1b2c859 100644 --- a/modules/home/tealdeer.nix +++ b/modules/home/tealdeer.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { programs.tealdeer = { enable = true; settings = { diff --git a/modules/home/tmux.nix b/modules/home/tmux.nix index a23ecb0..7c15582 100644 --- a/modules/home/tmux.nix +++ b/modules/home/tmux.nix @@ -1,5 +1,5 @@ # Tmux is a terminal multiplexer that allows you to run multiple terminal sessions in a single window. -{pkgs, ...}: { +{ pkgs, ... }: { programs.tmux = { enable = true; mouse = true; diff --git a/modules/home/vscode.nix b/modules/home/vscode.nix index 78b7c7d..328de51 100644 --- a/modules/home/vscode.nix +++ b/modules/home/vscode.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { nixpkgs.config.allowUnfree = true; programs.vscode = { diff --git a/modules/home/waybar/Jerry-waybar.nix b/modules/home/waybar/Jerry-waybar.nix index 3d9890b..96e3c1f 100644 --- a/modules/home/waybar/Jerry-waybar.nix +++ b/modules/home/waybar/Jerry-waybar.nix @@ -1,9 +1,9 @@ -{ - pkgs, - config, - lib, - ... -}: let +{ pkgs +, config +, lib +, ... +}: +let terminal = "kitty"; base00 = "0F1419"; base01 = "131721"; @@ -20,337 +20,337 @@ base0E = "D2A6FF"; base0F = "E6B673"; in - with lib; { - # Configure & Theme Waybar - programs.waybar = { - enable = true; - package = pkgs.waybar; - settings = [ - { - layer = "top"; - position = "top"; +with lib; { + # Configure & Theme Waybar + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; - modules-center = ["network" "pulseaudio" "cpu" "hyprland/workspaces" "memory" "disk" "clock"]; # Eterna: [ "hyprland/window" ] - modules-left = ["custom/startmenu" "hyprland/window"]; # Eternal: [ "hyprland/workspaces" "cpu" "memory" "network" ] - modules-right = ["tray" "idle_inhibitor" "custom/notification" "battery" "custom/exit"]; # Eternal: [ "idle_inhibitor" "pulseaudio" "clock" "custom/notification" "tray" ] + modules-center = [ "network" "pulseaudio" "cpu" "hyprland/workspaces" "memory" "disk" "clock" ]; # Eterna: [ "hyprland/window" ] + modules-left = [ "custom/startmenu" "hyprland/window" ]; # Eternal: [ "hyprland/workspaces" "cpu" "memory" "network" ] + modules-right = [ "tray" "idle_inhibitor" "custom/notification" "battery" "custom/exit" ]; # Eternal: [ "idle_inhibitor" "pulseaudio" "clock" "custom/notification" "tray" ] - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; }; - "clock" = { - format = '' {:%H:%M}''; - /* + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "clock" = { + format = '' {:%H:%M}''; + /* ''{: %I:%M %p}''; */ - tooltip = true; - tooltip-format = "{:%A, %d.%B %Y }{calendar}"; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }{calendar}"; + }; + "hyprland/window" = { + max-length = 60; + separate-outputs = false; + }; + "memory" = { + interval = 5; + format = " {}%"; + tooltip = true; + on-click = "${terminal} -e btop"; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + on-click = "${terminal} -e btop"; + }; + "disk" = { + format = " {free}"; + tooltip = true; + # Not working with zaneyos window open then closes + #on-click = "${terminal} -e sh -c df -h ; read"; + }; + "network" = { + format-icons = [ "󰤯" "󰤟" "󰤢" "󰤥" "󰤨" ]; + format-ethernet = " {bandwidthDownBits}"; + format-wifi = " {bandwidthDownBits}"; + format-disconnected = "󰤮"; + tooltip = false; + on-click = "${terminal} -e btop"; + }; + "tray" = { + spacing = 12; + }; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ "" "" "" ]; }; - "hyprland/window" = { - max-length = 60; - separate-outputs = false; + on-click = "pavucontrol"; + }; + "custom/exit" = { + tooltip = false; + format = "⏻"; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = " "; + # exec = "rofi -show drun"; + on-click = "rofi -show drun"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = " "; + deactivated = " "; }; - "memory" = { - interval = 5; - format = " {}%"; - tooltip = true; - on-click = "${terminal} -e btop"; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; }; - "cpu" = { - interval = 5; - format = " {usage:2}%"; - tooltip = true; - on-click = "${terminal} -e btop"; - }; - "disk" = { - format = " {free}"; - tooltip = true; - # Not working with zaneyos window open then closes - #on-click = "${terminal} -e sh -c df -h ; read"; - }; - "network" = { - format-icons = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"]; - format-ethernet = " {bandwidthDownBits}"; - format-wifi = " {bandwidthDownBits}"; - format-disconnected = "󰤮"; - tooltip = false; - on-click = "${terminal} -e btop"; - }; - "tray" = { - spacing = 12; - }; - "pulseaudio" = { - format = "{icon} {volume}% {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = " {volume}%"; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" "" ""]; - }; - on-click = "pavucontrol"; - }; - "custom/exit" = { - tooltip = false; - format = "⏻"; - on-click = "sleep 0.1 && wlogout"; - }; - "custom/startmenu" = { - tooltip = false; - format = " "; - # exec = "rofi -show drun"; - on-click = "rofi -show drun"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = " "; - deactivated = " "; - }; - tooltip = "true"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon} {}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - inhibited-notification = ""; - inhibited-none = ""; - dnd-inhibited-notification = ""; - dnd-inhibited-none = ""; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "swaync-client -t"; - escape = true; - }; - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{icon} {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󱘖 {capacity}%"; - format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; - on-click = ""; - tooltip = false; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; + on-click = ""; + tooltip = false; + }; + } + ]; + style = concatStrings [ + '' + * { + font-size: 16px; + font-family: JetBrainsMono Nerd Font, Font Awesome, sans-serif; + font-weight: bold; } - ]; - style = concatStrings [ - '' - * { - font-size: 16px; - font-family: JetBrainsMono Nerd Font, Font Awesome, sans-serif; - font-weight: bold; - } - window#waybar { - /* - - background-color: rgba(26,27,38,0); - border-bottom: 1px solid rgba(26,27,38,0); - border-radius: 0px; - color: #${base0F}; - */ + window#waybar { + /* background-color: rgba(26,27,38,0); border-bottom: 1px solid rgba(26,27,38,0); border-radius: 0px; color: #${base0F}; - } - #workspaces { - /* - Eternal - background: linear-gradient(180deg, #${base00}, #${base01}); - margin: 5px 5px 5px 0px; - padding: 0px 10px; - border-radius: 0px 15px 50px 0px; - border: 0px; - font-style: normal; - color: #${base00}; - */ - background: linear-gradient(45deg, #${base01}, #${base01}); - margin: 5px; - padding: 0px 1px; - border-radius: 15px; + */ + + background-color: rgba(26,27,38,0); + border-bottom: 1px solid rgba(26,27,38,0); + border-radius: 0px; + color: #${base0F}; + } + #workspaces { + /* + Eternal + background: linear-gradient(180deg, #${base00}, #${base01}); + margin: 5px 5px 5px 0px; + padding: 0px 10px; + border-radius: 0px 15px 50px 0px; border: 0px; font-style: normal; color: #${base00}; - } - #workspaces button { - padding: 0px 5px; - margin: 4px 3px; - border-radius: 15px; - border: 0px; - color: #${base00}; - background: linear-gradient(45deg, #${base0D}, #${base0E}); - opacity: 0.5; - transition: all 0.3s ease-in-out; - } - #workspaces button.active { - padding: 0px 5px; - margin: 4px 3px; - border-radius: 15px; - border: 0px; - color: #${base00}; - background: linear-gradient(45deg, #${base0D}, #${base0E}); - opacity: 1.0; - min-width: 40px; - transition: all 0.3s ease-in-out; - } - #workspaces button:hover { - border-radius: 15px; - color: #${base00}; - background: linear-gradient(45deg, #${base0D}, #${base0E}); - opacity: 0.8; - } - tooltip { - background: #${base00}; - border: 1px solid #${base0E}; - border-radius: 10px; - } - tooltip label { - color: #${base07}; - } - #window { - /* - Eternal - color: #${base05}; - background: #${base00}; - border-radius: 15px; - margin: 5px; - padding: 2px 20px; - */ - margin: 5px; - padding: 2px 20px; - color: #${base05}; - background: #${base01}; - border-radius: 50px 15px 50px 15px; - } - #memory { - color: #${base0F}; - /* - Eternal - background: #${base00}; - border-radius: 50px 15px 50px 15px; - margin: 5px; - padding: 2px 20px; - */ - background: #${base01}; - margin: 5px; - padding: 2px 20px; - border-radius: 15px 50px 15px 50px; - } - #clock { - color: #${base0B}; - background: #${base00}; - border-radius: 15px 50px 15px 50px; - margin: 5px; - padding: 2px 20px; - } - #idle_inhibitor { - color: #${base0A}; - background: #${base00}; - border-radius: 50px 15px 50px 15px; - margin: 5px; - padding: 2px 20px; - } - #cpu { - color: #${base07}; - background: #${base00}; - border-radius: 50px 15px 50px 15px; - margin: 5px; - padding: 2px 20px; - } - #disk { - color: #${base0F}; - background: #${base00}; - border-radius: 15px 50px 15px 50px; - margin: 5px; - padding: 2px 20px; - } - #battery { - color: #${base08}; - background: #${base00}; - border-radius: 15px 50px 15px 50px; - margin: 5px; - padding: 2px 20px; - } - #network { - color: #${base09}; - background: #${base00}; - border-radius: 50px 15px 50px 15px; - margin: 5px; - padding: 2px 20px; - } - #tray { + */ + background: linear-gradient(45deg, #${base01}, #${base01}); + margin: 5px; + padding: 0px 1px; + border-radius: 15px; + border: 0px; + font-style: normal; + color: #${base00}; + } + #workspaces button { + padding: 0px 5px; + margin: 4px 3px; + border-radius: 15px; + border: 0px; + color: #${base00}; + background: linear-gradient(45deg, #${base0D}, #${base0E}); + opacity: 0.5; + transition: all 0.3s ease-in-out; + } + #workspaces button.active { + padding: 0px 5px; + margin: 4px 3px; + border-radius: 15px; + border: 0px; + color: #${base00}; + background: linear-gradient(45deg, #${base0D}, #${base0E}); + opacity: 1.0; + min-width: 40px; + transition: all 0.3s ease-in-out; + } + #workspaces button:hover { + border-radius: 15px; + color: #${base00}; + background: linear-gradient(45deg, #${base0D}, #${base0E}); + opacity: 0.8; + } + tooltip { + background: #${base00}; + border: 1px solid #${base0E}; + border-radius: 10px; + } + tooltip label { + color: #${base07}; + } + #window { + /* + Eternal color: #${base05}; background: #${base00}; - border-radius: 15px 50px 15px 50px; + border-radius: 15px; margin: 5px; padding: 2px 20px; - } - #pulseaudio { - color: #${base0D}; - /* - Eternal - background: #${base00}; - border-radius: 15px 50px 15px 50px; - margin: 5px; - padding: 2px 20px; - */ - background: #${base01}; - margin: 4px; - padding: 2px 20px; + */ + margin: 5px; + padding: 2px 20px; + color: #${base05}; + background: #${base01}; + border-radius: 50px 15px 50px 15px; + } + #memory { + color: #${base0F}; + /* + Eternal + background: #${base00}; border-radius: 50px 15px 50px 15px; - } - #custom-notification { - color: #${base0C}; + margin: 5px; + padding: 2px 20px; + */ + background: #${base01}; + margin: 5px; + padding: 2px 20px; + border-radius: 15px 50px 15px 50px; + } + #clock { + color: #${base0B}; background: #${base00}; border-radius: 15px 50px 15px 50px; margin: 5px; padding: 2px 20px; - } - #custom-startmenu { - color: #${base0E}; + } + #idle_inhibitor { + color: #${base0A}; background: #${base00}; - border-radius: 0px 15px 50px 0px; - margin: 5px 5px 5px 0px; + border-radius: 50px 15px 50px 15px; + margin: 5px; padding: 2px 20px; - } - #idle_inhibitor { - color: #${base09}; + } + #cpu { + color: #${base07}; + background: #${base00}; + border-radius: 50px 15px 50px 15px; + margin: 5px; + padding: 2px 20px; + } + #disk { + color: #${base0F}; background: #${base00}; border-radius: 15px 50px 15px 50px; margin: 5px; padding: 2px 20px; - } - #custom-exit { - color: #${base0E}; + } + #battery { + color: #${base08}; + background: #${base00}; + border-radius: 15px 50px 15px 50px; + margin: 5px; + padding: 2px 20px; + } + #network { + color: #${base09}; + background: #${base00}; + border-radius: 50px 15px 50px 15px; + margin: 5px; + padding: 2px 20px; + } + #tray { + color: #${base05}; + background: #${base00}; + border-radius: 15px 50px 15px 50px; + margin: 5px; + padding: 2px 20px; + } + #pulseaudio { + color: #${base0D}; + /* + Eternal background: #${base00}; - border-radius: 15px 0px 0px 50px; - margin: 5px 0px 5px 5px; + border-radius: 15px 50px 15px 50px; + margin: 5px; padding: 2px 20px; - } - '' - ]; - }; - } + */ + background: #${base01}; + margin: 4px; + padding: 2px 20px; + border-radius: 50px 15px 50px 15px; + } + #custom-notification { + color: #${base0C}; + background: #${base00}; + border-radius: 15px 50px 15px 50px; + margin: 5px; + padding: 2px 20px; + } + #custom-startmenu { + color: #${base0E}; + background: #${base00}; + border-radius: 0px 15px 50px 0px; + margin: 5px 5px 5px 0px; + padding: 2px 20px; + } + #idle_inhibitor { + color: #${base09}; + background: #${base00}; + border-radius: 15px 50px 15px 50px; + margin: 5px; + padding: 2px 20px; + } + #custom-exit { + color: #${base0E}; + background: #${base00}; + border-radius: 15px 0px 0px 50px; + margin: 5px 0px 5px 5px; + padding: 2px 20px; + } + '' + ]; + }; +} diff --git a/modules/home/waybar/waybar-curved.nix b/modules/home/waybar/waybar-curved.nix index 33e46fe..09a07e3 100644 --- a/modules/home/waybar/waybar-curved.nix +++ b/modules/home/waybar/waybar-curved.nix @@ -1,277 +1,277 @@ -{ - pkgs, - lib, - host, - config, - ... -}: let +{ pkgs +, lib +, host +, config +, ... +}: +let betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; inherit (import ../../../hosts/${host}/variables.nix) clock24h; in - with lib; { - # Configure & Theme Waybar - programs.waybar = { - enable = true; - package = pkgs.waybar; - settings = [ - { - layer = "top"; - position = "top"; - modules-center = ["hyprland/workspaces"]; - modules-left = [ - "custom/startmenu" - "hyprland/window" - "pulseaudio" - "cpu" - "memory" - "idle_inhibitor" - ]; - modules-right = [ - "custom/hyprbindings" - "custom/notification" - "custom/exit" - "battery" - "tray" - "clock" - ]; +with lib; { + # Configure & Theme Waybar + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; + modules-center = [ "hyprland/workspaces" ]; + modules-left = [ + "custom/startmenu" + "hyprland/window" + "pulseaudio" + "cpu" + "memory" + "idle_inhibitor" + ]; + modules-right = [ + "custom/hyprbindings" + "custom/notification" + "custom/exit" + "battery" + "tray" + "clock" + ]; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; }; - "clock" = { - format = - if clock24h == true - then '' {:L%H:%M}'' - else '' {:L%I:%M %p}''; - tooltip = true; - tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "clock" = { + format = + if clock24h == true + then '' {:L%H:%M}'' + else '' {:L%I:%M %p}''; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + }; + "hyprland/window" = { + max-length = 22; + separate-outputs = false; + rewrite = { + "" = " 🙈 No Windows? "; }; - "hyprland/window" = { - max-length = 22; - separate-outputs = false; - rewrite = { - "" = " 🙈 No Windows? "; - }; - }; - "memory" = { - interval = 5; - format = " {}%"; - tooltip = true; - }; - "cpu" = { - interval = 5; - format = " {usage:2}%"; - tooltip = true; - }; - "disk" = { - format = " {free}"; - tooltip = true; - }; - "network" = { - format-icons = [ - "󰤯" - "󰤟" - "󰤢" - "󰤥" - "󰤨" + }; + "memory" = { + interval = 5; + format = " {}%"; + tooltip = true; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + }; + "disk" = { + format = " {free}"; + tooltip = true; + }; + "network" = { + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + format-ethernet = " {bandwidthDownOctets}"; + format-wifi = "{icon} {signalStrength}%"; + format-disconnected = "󰤮"; + tooltip = false; + }; + "tray" = { + spacing = 12; + }; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" ]; - format-ethernet = " {bandwidthDownOctets}"; - format-wifi = "{icon} {signalStrength}%"; - format-disconnected = "󰤮"; - tooltip = false; }; - "tray" = { - spacing = 12; + on-click = "sleep 0.1 && pavucontrol"; + }; + "custom/exit" = { + tooltip = false; + format = ""; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = ""; + # exec = "rofi -show drun"; + on-click = "sleep 0.1 && rofi-launcher"; + }; + "custom/hyprbindings" = { + tooltip = false; + format = "󱕴"; + on-click = "sleep 0.1 && list-keybinds"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; }; - "pulseaudio" = { - format = "{icon} {volume}% {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = " {volume}%"; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - "" - ]; - }; - on-click = "sleep 0.1 && pavucontrol"; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; }; - "custom/exit" = { - tooltip = false; - format = ""; - on-click = "sleep 0.1 && wlogout"; - }; - "custom/startmenu" = { - tooltip = false; - format = ""; - # exec = "rofi -show drun"; - on-click = "sleep 0.1 && rofi-launcher"; - }; - "custom/hyprbindings" = { - tooltip = false; - format = "󱕴"; - on-click = "sleep 0.1 && list-keybinds"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; - tooltip = "true"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon} {}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - inhibited-notification = ""; - inhibited-none = ""; - dnd-inhibited-notification = ""; - dnd-inhibited-none = ""; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "sleep 0.1 && task-waybar"; - escape = true; - }; - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{icon} {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󱘖 {capacity}%"; - format-icons = [ - "󰁺" - "󰁻" - "󰁼" - "󰁽" - "󰁾" - "󰁿" - "󰂀" - "󰂁" - "󰂂" - "󰁹" - ]; - on-click = ""; - tooltip = false; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "sleep 0.1 && task-waybar"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + on-click = ""; + tooltip = false; + }; + } + ]; + style = concatStrings [ + '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-size: 16px; + border-radius: 0px; + border: none; + min-height: 0px; } - ]; - style = concatStrings [ - '' - * { - font-family: JetBrainsMono Nerd Font Mono; - font-size: 16px; - border-radius: 0px; - border: none; - min-height: 0px; - } - window#waybar { - background: rgba(0,0,0,0); - } - #workspaces { - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base01}; - margin: 4px 4px; - padding: 5px 5px; - border-radius: 16px; - } - #workspaces button { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - opacity: 0.5; - transition: ${betterTransition}; - } - #workspaces button.active { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - transition: ${betterTransition}; - opacity: 1.0; - min-width: 40px; - } - #workspaces button:hover { - font-weight: bold; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - opacity: 0.8; - transition: ${betterTransition}; - } - tooltip { - background: #${config.lib.stylix.colors.base00}; - border: 1px solid #${config.lib.stylix.colors.base08}; - border-radius: 12px; - } - tooltip label { - color: #${config.lib.stylix.colors.base08}; - } - #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { - font-weight: bold; - margin: 4px 0px; - margin-left: 7px; - padding: 0px 18px; - background: #${config.lib.stylix.colors.base04}; - color: #${config.lib.stylix.colors.base00}; - border-radius: 24px 10px 24px 10px; - } - #custom-startmenu { - color: #${config.lib.stylix.colors.base0B}; - background: #${config.lib.stylix.colors.base02}; - font-size: 28px; - margin: 0px; - padding: 0px 30px 0px 15px; - border-radius: 0px 0px 40px 0px; - } - #custom-hyprbindings, #network, #battery, - #custom-notification, #tray, #custom-exit { - font-weight: bold; - background: #${config.lib.stylix.colors.base0F}; - color: #${config.lib.stylix.colors.base00}; - margin: 4px 0px; - margin-right: 7px; - border-radius: 10px 24px 10px 24px; - padding: 0px 18px; - } - #clock { - font-weight: bold; - color: #0D0E15; - background: linear-gradient(90deg, #${config.lib.stylix.colors.base0E}, #${config.lib.stylix.colors.base0C}); - margin: 0px; - padding: 0px 15px 0px 30px; - border-radius: 0px 0px 0px 40px; - } - '' - ]; - }; - } + window#waybar { + background: rgba(0,0,0,0); + } + #workspaces { + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base01}; + margin: 4px 4px; + padding: 5px 5px; + border-radius: 16px; + } + #workspaces button { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + opacity: 0.5; + transition: ${betterTransition}; + } + #workspaces button.active { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + transition: ${betterTransition}; + opacity: 1.0; + min-width: 40px; + } + #workspaces button:hover { + font-weight: bold; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + opacity: 0.8; + transition: ${betterTransition}; + } + tooltip { + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base08}; + border-radius: 12px; + } + tooltip label { + color: #${config.lib.stylix.colors.base08}; + } + #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { + font-weight: bold; + margin: 4px 0px; + margin-left: 7px; + padding: 0px 18px; + background: #${config.lib.stylix.colors.base04}; + color: #${config.lib.stylix.colors.base00}; + border-radius: 24px 10px 24px 10px; + } + #custom-startmenu { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base02}; + font-size: 28px; + margin: 0px; + padding: 0px 30px 0px 15px; + border-radius: 0px 0px 40px 0px; + } + #custom-hyprbindings, #network, #battery, + #custom-notification, #tray, #custom-exit { + font-weight: bold; + background: #${config.lib.stylix.colors.base0F}; + color: #${config.lib.stylix.colors.base00}; + margin: 4px 0px; + margin-right: 7px; + border-radius: 10px 24px 10px 24px; + padding: 0px 18px; + } + #clock { + font-weight: bold; + color: #0D0E15; + background: linear-gradient(90deg, #${config.lib.stylix.colors.base0E}, #${config.lib.stylix.colors.base0C}); + margin: 0px; + padding: 0px 15px 0px 30px; + border-radius: 0px 0px 0px 40px; + } + '' + ]; + }; +} diff --git a/modules/home/waybar/waybar-ddubs-2.nix b/modules/home/waybar/waybar-ddubs-2.nix index 441abdd..cbd62fe 100644 --- a/modules/home/waybar/waybar-ddubs-2.nix +++ b/modules/home/waybar/waybar-ddubs-2.nix @@ -1,9 +1,9 @@ -{ - pkgs, - config, - lib, - ... -}: let +{ pkgs +, config +, lib +, ... +}: +let terminal = "kitty"; base00 = "0F1419"; base01 = "131721"; @@ -20,337 +20,337 @@ base0E = "D2A6FF"; base0F = "E6B673"; in - with lib; { - # Configure & Theme Waybar - programs.waybar = { - enable = true; - package = pkgs.waybar; - settings = [ - { - layer = "top"; - position = "top"; +with lib; { + # Configure & Theme Waybar + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; - modules-left = ["custom/startmenu" "tray" "hyprland/window"]; - modules-center = ["hyprland/workspaces"]; - modules-right = ["idle_inhibitor" "custom/notification" "pulseaudio" "battery" "clock" "custom/exit"]; + modules-left = [ "custom/startmenu" "tray" "hyprland/window" ]; + modules-center = [ "hyprland/workspaces" ]; + modules-right = [ "idle_inhibitor" "custom/notification" "pulseaudio" "battery" "clock" "custom/exit" ]; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; }; - "clock" = { - format = '' {:%H:%M}''; - /* + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "clock" = { + format = '' {:%H:%M}''; + /* ''{: %I:%M %p}''; */ - tooltip = true; - tooltip-format = "{:%A, %d.%B %Y }{calendar}"; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }{calendar}"; + }; + "hyprland/window" = { + max-length = 60; + separate-outputs = false; + }; + "memory" = { + interval = 5; + format = " {}%"; + tooltip = true; + on-click = "${terminal} -e btop"; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + on-click = "${terminal} -e btop"; + }; + "disk" = { + format = " {free}"; + tooltip = true; + # Not working with zaneyos window open then closes + #on-click = "${terminal} -e sh -c df -h ; read"; + }; + "network" = { + format-icons = [ "󰤯" "󰤟" "󰤢" "󰤥" "󰤨" ]; + format-ethernet = " {bandwidthDownBits}"; + format-wifi = " {bandwidthDownBits}"; + format-disconnected = "󰤮"; + tooltip = false; + on-click = "${terminal} -e btop"; + }; + "tray" = { + spacing = 12; + }; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ "" "" "" ]; }; - "hyprland/window" = { - max-length = 60; - separate-outputs = false; + on-click = "pavucontrol"; + }; + "custom/exit" = { + tooltip = false; + format = "⏻"; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = " "; + # exec = "rofi -show drun"; + on-click = "rofi -show drun"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = " "; + deactivated = " "; }; - "memory" = { - interval = 5; - format = " {}%"; - tooltip = true; - on-click = "${terminal} -e btop"; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; }; - "cpu" = { - interval = 5; - format = " {usage:2}%"; - tooltip = true; - on-click = "${terminal} -e btop"; - }; - "disk" = { - format = " {free}"; - tooltip = true; - # Not working with zaneyos window open then closes - #on-click = "${terminal} -e sh -c df -h ; read"; - }; - "network" = { - format-icons = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"]; - format-ethernet = " {bandwidthDownBits}"; - format-wifi = " {bandwidthDownBits}"; - format-disconnected = "󰤮"; - tooltip = false; - on-click = "${terminal} -e btop"; - }; - "tray" = { - spacing = 12; - }; - "pulseaudio" = { - format = "{icon} {volume}% {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = " {volume}%"; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" "" ""]; - }; - on-click = "pavucontrol"; - }; - "custom/exit" = { - tooltip = false; - format = "⏻"; - on-click = "sleep 0.1 && wlogout"; - }; - "custom/startmenu" = { - tooltip = false; - format = " "; - # exec = "rofi -show drun"; - on-click = "rofi -show drun"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = " "; - deactivated = " "; - }; - tooltip = "true"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon} {}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - inhibited-notification = ""; - inhibited-none = ""; - dnd-inhibited-notification = ""; - dnd-inhibited-none = ""; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "swaync-client -t"; - escape = true; - }; - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{icon} {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󱘖 {capacity}%"; - format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; - on-click = ""; - tooltip = false; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; + on-click = ""; + tooltip = false; + }; + } + ]; + style = concatStrings [ + '' + * { + font-size: 16px; + font-family: JetBrainsMono Nerd Font, Font Awesome, sans-serif; + font-weight: bold; } - ]; - style = concatStrings [ - '' - * { - font-size: 16px; - font-family: JetBrainsMono Nerd Font, Font Awesome, sans-serif; - font-weight: bold; - } - window#waybar { - /* - - background-color: rgba(26,27,38,0); - border-bottom: 1px solid rgba(26,27,38,0); - border-radius: 0px; - color: #${base0F}; - */ + window#waybar { + /* background-color: rgba(26,27,38,0); border-bottom: 1px solid rgba(26,27,38,0); border-radius: 0px; color: #${base0F}; - } - #workspaces { - /* - Eternal - background: linear-gradient(180deg, #${base00}, #${base01}); - margin: 5px 5px 5px 0px; - padding: 0px 10px; - border-radius: 0px 15px 15px 0px; - border: 0px; - font-style: normal; - color: #${base00}; - */ - background: linear-gradient(45deg, #${base01}, #${base01}); - margin: 5px; - padding: 0px 1px; - border-radius: 15px; + */ + + background-color: rgba(26,27,38,0); + border-bottom: 1px solid rgba(26,27,38,0); + border-radius: 0px; + color: #${base0F}; + } + #workspaces { + /* + Eternal + background: linear-gradient(180deg, #${base00}, #${base01}); + margin: 5px 5px 5px 0px; + padding: 0px 10px; + border-radius: 0px 15px 15px 0px; border: 0px; font-style: normal; color: #${base00}; - } - #workspaces button { - padding: 0px 5px; - margin: 4px 3px; - border-radius: 15px; - border: 0px; - color: #${base00}; - background: linear-gradient(45deg, #${base0D}, #${base0E}); - opacity: 0.5; - transition: all 0.3s ease-in-out; - } - #workspaces button.active { - padding: 0px 5px; - margin: 4px 3px; - border-radius: 15px; - border: 0px; - color: #${base00}; - background: linear-gradient(45deg, #${base0D}, #${base0E}); - opacity: 1.0; - min-width: 40px; - transition: all 0.3s ease-in-out; - } - #workspaces button:hover { - border-radius: 15px; - color: #${base00}; - background: linear-gradient(45deg, #${base0D}, #${base0E}); - opacity: 0.8; - } - tooltip { - background: #${base00}; - border: 1px solid #${base0E}; - border-radius: 10px; - } - tooltip label { - color: #${base07}; - } - #window { - /* - Eternal - color: #${base05}; - background: #${base00}; - border-radius: 15px; - margin: 5px; - padding: 2px 20px; - */ - margin: 5px; - padding: 2px 20px; - color: #${base05}; - background: #${base01}; - border-radius: 15px 15px 15px 15px; - } - #memory { - color: #${base0F}; - /* - Eternal - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 5px; - padding: 2px 20px; - */ - background: #${base01}; - margin: 5px; - padding: 2px 20px; - border-radius: 15px 15px 15px 15px; - } - #clock { - color: #${base0B}; - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 5px; - padding: 2px 20px; - } - #idle_inhibitor { - color: #${base0A}; - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 3px; - padding: 2px 20px; - } - #cpu { - color: #${base07}; - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 5px; - padding: 2px 20px; - } - #disk { - color: #${base0F}; - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 5px; - padding: 2px 20px; - } - #battery { - color: #${base08}; - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 5px; - padding: 2px 20px; - } - #network { - color: #${base09}; - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 5px; - padding: 2px 20px; - } - #tray { + */ + background: linear-gradient(45deg, #${base01}, #${base01}); + margin: 5px; + padding: 0px 1px; + border-radius: 15px; + border: 0px; + font-style: normal; + color: #${base00}; + } + #workspaces button { + padding: 0px 5px; + margin: 4px 3px; + border-radius: 15px; + border: 0px; + color: #${base00}; + background: linear-gradient(45deg, #${base0D}, #${base0E}); + opacity: 0.5; + transition: all 0.3s ease-in-out; + } + #workspaces button.active { + padding: 0px 5px; + margin: 4px 3px; + border-radius: 15px; + border: 0px; + color: #${base00}; + background: linear-gradient(45deg, #${base0D}, #${base0E}); + opacity: 1.0; + min-width: 40px; + transition: all 0.3s ease-in-out; + } + #workspaces button:hover { + border-radius: 15px; + color: #${base00}; + background: linear-gradient(45deg, #${base0D}, #${base0E}); + opacity: 0.8; + } + tooltip { + background: #${base00}; + border: 1px solid #${base0E}; + border-radius: 10px; + } + tooltip label { + color: #${base07}; + } + #window { + /* + Eternal color: #${base05}; background: #${base00}; - border-radius: 15px 15px 15px 15px; + border-radius: 15px; margin: 5px; - padding: 2px 15px; - } - #pulseaudio { - color: #${base0D}; - /* - Eternal - background: #${base00}; - border-radius: 15px 15px 15px 15px; - margin: 5px; - padding: 2px 20px; - */ - background: #${base01}; - margin: 4px; padding: 2px 20px; - border-radius: 15px 15px 15px 15px; - } - #custom-notification { - color: #${base0C}; + */ + margin: 5px; + padding: 2px 20px; + color: #${base05}; + background: #${base01}; + border-radius: 15px 15px 15px 15px; + } + #memory { + color: #${base0F}; + /* + Eternal background: #${base00}; border-radius: 15px 15px 15px 15px; margin: 5px; padding: 2px 20px; - } - #custom-startmenu { - color: #${base0E}; - background: #${base00}; - border-radius: 0px 15px 15px 0px; - margin: 5px 5px 5px 0px; - padding: 2px 20px; - } - #idle_inhibitor { - color: #${base09}; + */ + background: #${base01}; + margin: 5px; + padding: 2px 20px; + border-radius: 15px 15px 15px 15px; + } + #clock { + color: #${base0B}; background: #${base00}; border-radius: 15px 15px 15px 15px; margin: 5px; padding: 2px 20px; - } - #custom-exit { - color: #${base0E}; + } + #idle_inhibitor { + color: #${base0A}; background: #${base00}; - border-radius: 15px 0px 0px 15px; - margin: 5px 0px 5px 5px; + border-radius: 15px 15px 15px 15px; + margin: 3px; padding: 2px 20px; - } - '' - ]; - }; - } + } + #cpu { + color: #${base07}; + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 20px; + } + #disk { + color: #${base0F}; + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 20px; + } + #battery { + color: #${base08}; + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 20px; + } + #network { + color: #${base09}; + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 20px; + } + #tray { + color: #${base05}; + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 15px; + } + #pulseaudio { + color: #${base0D}; + /* + Eternal + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 20px; + */ + background: #${base01}; + margin: 4px; + padding: 2px 20px; + border-radius: 15px 15px 15px 15px; + } + #custom-notification { + color: #${base0C}; + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 20px; + } + #custom-startmenu { + color: #${base0E}; + background: #${base00}; + border-radius: 0px 15px 15px 0px; + margin: 5px 5px 5px 0px; + padding: 2px 20px; + } + #idle_inhibitor { + color: #${base09}; + background: #${base00}; + border-radius: 15px 15px 15px 15px; + margin: 5px; + padding: 2px 20px; + } + #custom-exit { + color: #${base0E}; + background: #${base00}; + border-radius: 15px 0px 0px 15px; + margin: 5px 0px 5px 5px; + padding: 2px 20px; + } + '' + ]; + }; +} diff --git a/modules/home/waybar/waybar-ddubs.nix b/modules/home/waybar/waybar-ddubs.nix index 08edf50..094babe 100644 --- a/modules/home/waybar/waybar-ddubs.nix +++ b/modules/home/waybar/waybar-ddubs.nix @@ -1,283 +1,283 @@ -{ - pkgs, - lib, - host, - config, - ... -}: let +{ pkgs +, lib +, host +, config +, ... +}: +let betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; inherit (import ../../../hosts/${host}/variables.nix) clock24h; in - with lib; { - # Configure & Theme Waybar - programs.waybar = { - enable = true; - package = pkgs.waybar; - settings = [ - { - layer = "top"; - position = "top"; - modules-center = ["hyprland/workspaces"]; - modules-left = [ - "custom/startmenu" - "hyprland/window" - "pulseaudio" - "cpu" - "memory" - "idle_inhibitor" - ]; - modules-right = [ - "custom/hyprbindings" - "custom/notification" - "custom/exit" - "battery" - "tray" - "clock" - ]; +with lib; { + # Configure & Theme Waybar + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; + modules-center = [ "hyprland/workspaces" ]; + modules-left = [ + "custom/startmenu" + "hyprland/window" + "pulseaudio" + "cpu" + "memory" + "idle_inhibitor" + ]; + modules-right = [ + "custom/hyprbindings" + "custom/notification" + "custom/exit" + "battery" + "tray" + "clock" + ]; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; }; - "clock" = { - format = - if clock24h == true - then '' {:L%H:%M}'' - else '' {:L%I:%M %p}''; - tooltip = true; - tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "clock" = { + format = + if clock24h == true + then '' {:L%H:%M}'' + else '' {:L%I:%M %p}''; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + }; + "hyprland/window" = { + max-length = 22; + separate-outputs = false; + rewrite = { + "" = " 🙈 No Windows? "; }; - "hyprland/window" = { - max-length = 22; - separate-outputs = false; - rewrite = { - "" = " 🙈 No Windows? "; - }; - }; - "memory" = { - interval = 5; - format = " {}%"; - tooltip = true; - }; - "cpu" = { - interval = 5; - format = " {usage:2}%"; - tooltip = true; - }; - "disk" = { - format = " {free}"; - tooltip = true; - }; - "network" = { - format-icons = [ - "󰤯" - "󰤟" - "󰤢" - "󰤥" - "󰤨" + }; + "memory" = { + interval = 5; + format = " {}%"; + tooltip = true; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + }; + "disk" = { + format = " {free}"; + tooltip = true; + }; + "network" = { + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + format-ethernet = " {bandwidthDownOctets}"; + format-wifi = "{icon} {signalStrength}%"; + format-disconnected = "󰤮"; + tooltip = false; + }; + "tray" = { + spacing = 12; + }; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" ]; - format-ethernet = " {bandwidthDownOctets}"; - format-wifi = "{icon} {signalStrength}%"; - format-disconnected = "󰤮"; - tooltip = false; }; - "tray" = { - spacing = 12; + on-click = "sleep 0.1 && pavucontrol"; + }; + "custom/exit" = { + tooltip = false; + format = ""; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = ""; + # exec = "rofi -show drun"; + #on-click = "sleep 0.1 && rofi-launcher"; + on-click = "sleep 0.1 && nwg-drawer -mb 200 -mt 200 -mr 200 -ml 200"; + }; + "custom/hyprbindings" = { + tooltip = false; + format = "󱕴"; + on-click = "sleep 0.1 && list-keybinds"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; }; - "pulseaudio" = { - format = "{icon} {volume}% {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = " {volume}%"; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - "" - ]; - }; - on-click = "sleep 0.1 && pavucontrol"; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; }; - "custom/exit" = { - tooltip = false; - format = ""; - on-click = "sleep 0.1 && wlogout"; - }; - "custom/startmenu" = { - tooltip = false; - format = ""; - # exec = "rofi -show drun"; - #on-click = "sleep 0.1 && rofi-launcher"; - on-click = "sleep 0.1 && nwg-drawer -mb 200 -mt 200 -mr 200 -ml 200"; - }; - "custom/hyprbindings" = { - tooltip = false; - format = "󱕴"; - on-click = "sleep 0.1 && list-keybinds"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; - tooltip = "true"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon} {}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - inhibited-notification = ""; - inhibited-none = ""; - dnd-inhibited-notification = ""; - dnd-inhibited-none = ""; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "sleep 0.1 && task-waybar"; - escape = true; - }; - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{icon} {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󱘖 {capacity}%"; - format-icons = [ - "󰁺" - "󰁻" - "󰁼" - "󰁽" - "󰁾" - "󰁿" - "󰂀" - "󰂁" - "󰂂" - "󰁹" - ]; - on-click = ""; - tooltip = false; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "sleep 0.1 && task-waybar"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + on-click = ""; + tooltip = false; + }; + } + ]; + style = concatStrings [ + '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-size: 18px; + border-radius: 0px; + border: none; + min-height: 0px; } - ]; - style = concatStrings [ - '' - * { - font-family: JetBrainsMono Nerd Font Mono; - font-size: 18px; - border-radius: 0px; - border: none; - min-height: 0px; - } - window#waybar { - background: rgba(0,0,0,0); - } - #workspaces { - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base01}; - margin: 4px 4px; - padding: 5px 5px; - border-radius: 16px; - } - #workspaces button { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - opacity: 0.5; - transition: ${betterTransition}; - } - #workspaces button.active { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - transition: ${betterTransition}; - opacity: 1.0; - min-width: 40px; - } - #workspaces button:hover { - font-weight: bold; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - opacity: 0.8; - transition: ${betterTransition}; - } - tooltip { - background: #${config.lib.stylix.colors.base00}; - border: 1px solid #${config.lib.stylix.colors.base08}; - border-radius: 12px; - } - tooltip label { - color: #${config.lib.stylix.colors.base08}; - } - #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { - font-weight: bold; - margin: 4px 0px; - margin-left: 7px; - padding: 0px 18px; - background: #${config.lib.stylix.colors.base00}; - color: #${config.lib.stylix.colors.base08}; - border-radius: 8px 8px 8px 8px; - } - #idle_inhibitor { - font-size: 28px; - } - #custom-startmenu { - color: #${config.lib.stylix.colors.base0B}; - background: #${config.lib.stylix.colors.base02}; - font-size: 22px; - margin: 0px; - padding: 0px 5px 0px 5px; - border-radius: 16px 16px 16px 16px; - } - #custom-hyprbindings, #network, #battery, - #custom-notification, #tray, #custom-exit { - /* font-weight: bold; */ - font-size: 20px; - background: #${config.lib.stylix.colors.base00}; - color: #${config.lib.stylix.colors.base08}; - margin: 4px 0px; - margin-right: 7px; - border-radius: 8px 8px 8px 8px; - padding: 0px 18px; - } - #clock { - font-weight: bold; - font-size: 16px; - color: #0D0E15; - background: linear-gradient(90deg, #${config.lib.stylix.colors.base0B}, #${config.lib.stylix.colors.base02}); - margin: 0px; - padding: 0px 5px 0px 5px; - border-radius: 16px 16px 16px 16px; - } - '' - ]; - }; - } + window#waybar { + background: rgba(0,0,0,0); + } + #workspaces { + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base01}; + margin: 4px 4px; + padding: 5px 5px; + border-radius: 16px; + } + #workspaces button { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + opacity: 0.5; + transition: ${betterTransition}; + } + #workspaces button.active { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + transition: ${betterTransition}; + opacity: 1.0; + min-width: 40px; + } + #workspaces button:hover { + font-weight: bold; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + opacity: 0.8; + transition: ${betterTransition}; + } + tooltip { + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base08}; + border-radius: 12px; + } + tooltip label { + color: #${config.lib.stylix.colors.base08}; + } + #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { + font-weight: bold; + margin: 4px 0px; + margin-left: 7px; + padding: 0px 18px; + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base08}; + border-radius: 8px 8px 8px 8px; + } + #idle_inhibitor { + font-size: 28px; + } + #custom-startmenu { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base02}; + font-size: 22px; + margin: 0px; + padding: 0px 5px 0px 5px; + border-radius: 16px 16px 16px 16px; + } + #custom-hyprbindings, #network, #battery, + #custom-notification, #tray, #custom-exit { + /* font-weight: bold; */ + font-size: 20px; + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base08}; + margin: 4px 0px; + margin-right: 7px; + border-radius: 8px 8px 8px 8px; + padding: 0px 18px; + } + #clock { + font-weight: bold; + font-size: 16px; + color: #0D0E15; + background: linear-gradient(90deg, #${config.lib.stylix.colors.base0B}, #${config.lib.stylix.colors.base02}); + margin: 0px; + padding: 0px 5px 0px 5px; + border-radius: 16px 16px 16px 16px; + } + '' + ]; + }; +} diff --git a/modules/home/waybar/waybar-nekodyke.nix b/modules/home/waybar/waybar-nekodyke.nix index c7a07dc..5df5cdc 100755 --- a/modules/home/waybar/waybar-nekodyke.nix +++ b/modules/home/waybar/waybar-nekodyke.nix @@ -1,306 +1,306 @@ -{ - pkgs, - lib, - host, - config, - ... -}: let +{ pkgs +, lib +, host +, config +, ... +}: +let betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; inherit (import ../../../hosts/${host}/variables.nix) clock24h; in - with lib; { - # Configure & Theme Waybar - programs.waybar = { - enable = true; - package = pkgs.waybar; - settings = [ - { - layer = "top"; - position = "top"; - margin-top = 6; - margin-left = 6; - margin-right = 6; - modules-center = ["hyprland/workspaces"]; - modules-left = [ - "custom/startmenu" - "cpu" - "memory" - "temperature" - "disk" - "hyprland/window" - "idle_inhibitor" - ]; - modules-right = [ - "pulseaudio" - "battery" - "custom/hyprbindings" - "custom/notification" - "clock" - "tray" - ]; +with lib; { + # Configure & Theme Waybar + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; + margin-top = 6; + margin-left = 6; + margin-right = 6; + modules-center = [ "hyprland/workspaces" ]; + modules-left = [ + "custom/startmenu" + "cpu" + "memory" + "temperature" + "disk" + "hyprland/window" + "idle_inhibitor" + ]; + modules-right = [ + "pulseaudio" + "battery" + "custom/hyprbindings" + "custom/notification" + "clock" + "tray" + ]; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; }; - "pulseaudio/slider" = { - min = 0; - max = 100; - orientation = "horizontal"; + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "pulseaudio/slider" = { + min = 0; + max = 100; + orientation = "horizontal"; + }; + "temperature" = { + format = " {temperatureC}°C "; + }; + "clock" = { + format = + if clock24h == true + then '' {:L%H:%M}'' + else '' {:L%I:%M %p}''; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + }; + "hyprland/window" = { + max-length = 22; + separate-outputs = false; + rewrite = { + "" = " 🙈 No Windows? "; }; - "temperature" = { - format = " {temperatureC}°C "; - }; - "clock" = { - format = - if clock24h == true - then '' {:L%H:%M}'' - else '' {:L%I:%M %p}''; - tooltip = true; - tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; - }; - "hyprland/window" = { - max-length = 22; - separate-outputs = false; - rewrite = { - "" = " 🙈 No Windows? "; - }; - }; - "memory" = { - interval = 5; - icon-size = 20; - format = " {}%"; - tooltip = true; - }; - "cpu" = { - interval = 5; - format = " {usage:2}%"; - tooltip = true; - }; - "disk" = { - format = "󱛟 {free}"; - tooltip = true; - }; - "network" = { - format-icons = [ - "󰤯" - "󰤟" - "󰤢" - "󰤥" - "󰤨" + }; + "memory" = { + interval = 5; + icon-size = 20; + format = " {}%"; + tooltip = true; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + }; + "disk" = { + format = "󱛟 {free}"; + tooltip = true; + }; + "network" = { + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + format-ethernet = " {bandwidthDownOctets}"; + format-wifi = "{icon} {signalStrength}%"; + format-disconnected = "󰤮"; + tooltip = false; + }; + "tray" = { + spacing = 12; + }; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" ]; - format-ethernet = " {bandwidthDownOctets}"; - format-wifi = "{icon} {signalStrength}%"; - format-disconnected = "󰤮"; - tooltip = false; }; - "tray" = { - spacing = 12; + on-click = "sleep 0.1 && pavucontrol"; + scroll-step = 2; + }; + "custom/exit" = { + tooltip = false; + format = ""; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = ""; + # exec = "rofi -show drun"; + #on-click = "sleep 0.1 && rofi-launcher"; + on-click = "sleep 0.1 && nwg-drawer -mb 200 -mt 200 -mr 200 -ml 200"; + }; + "custom/hyprbindings" = { + tooltip = false; + format = "󱕴"; + on-click = "sleep 0.1 && list-keybinds"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; }; - "pulseaudio" = { - format = "{icon} {volume}% {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = " {volume}%"; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - "" - ]; - }; - on-click = "sleep 0.1 && pavucontrol"; - scroll-step = 2; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; }; - "custom/exit" = { - tooltip = false; - format = ""; - on-click = "sleep 0.1 && wlogout"; - }; - "custom/startmenu" = { - tooltip = false; - format = ""; - # exec = "rofi -show drun"; - #on-click = "sleep 0.1 && rofi-launcher"; - on-click = "sleep 0.1 && nwg-drawer -mb 200 -mt 200 -mr 200 -ml 200"; - }; - "custom/hyprbindings" = { - tooltip = false; - format = "󱕴"; - on-click = "sleep 0.1 && list-keybinds"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; - tooltip = "true"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon} {}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - inhibited-notification = ""; - inhibited-none = ""; - dnd-inhibited-notification = ""; - dnd-inhibited-none = ""; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "sleep 0.1 && task-waybar"; - escape = true; - }; - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{icon} {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󱘖 {capacity}%"; - format-icons = [ - "󰁺" - "󰁻" - "󰁼" - "󰁽" - "󰁾" - "󰁿" - "󰂀" - "󰂁" - "󰂂" - "󰁹" - ]; - on-click = ""; - tooltip = false; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "sleep 0.1 && task-waybar"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + on-click = ""; + tooltip = false; + }; + } + ]; + style = concatStrings [ + '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-size: 18px; + border-radius: 0px; + border: none; + min-height: 0px; + margin: 0px; } - ]; - style = concatStrings [ - '' - * { - font-family: JetBrainsMono Nerd Font Mono; - font-size: 18px; - border-radius: 0px; - border: none; - min-height: 0px; - margin: 0px; - } - window#waybar { - background: #${config.lib.stylix.colors.base00}; - padding: 2px; - border-radius: 4px; - } - #workspaces { - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base00}; - border: 2px solid #${config.lib.stylix.colors.base0B}; - margin: 2px 4px; - padding: 5px 5px; - border-radius: 4px; - } - #workspaces button { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: #${config.lib.stylix.colors.base0B}; - background: #${config.lib.stylix.colors.base00}; + window#waybar { + background: #${config.lib.stylix.colors.base00}; + padding: 2px; + border-radius: 4px; + } + #workspaces { + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base00}; + border: 2px solid #${config.lib.stylix.colors.base0B}; + margin: 2px 4px; + padding: 5px 5px; + border-radius: 4px; + } + #workspaces button { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base00}; - } - #workspaces button.active { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 4px; - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base0B}; - transition: ${betterTransition}; - opacity: 1.0; - min-width: 40px; - } - #workspaces button:hover { - font-weight: bold; - border-radius: 4px; - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base0B}; - opacity: 0.8; - } - tooltip { - background: #${config.lib.stylix.colors.base00}; - border: 1px solid #${config.lib.stylix.colors.base08}; - border-radius: 12px; - } - tooltip label { - color: #${config.lib.stylix.colors.base08}; - } - #window, #pulseaudio, #temperature, #cpu, #memory, #idle_inhibitor, #disk { - font-weight: bold; - margin: 2px 0px; - margin-right: 7px; - padding: 0px 18px; - background: #${config.lib.stylix.colors.base00}; - color: #${config.lib.stylix.colors.base0B}; - border: 2px solid #${config.lib.stylix.colors.base0B}; - border-radius: 4px; - } - #idle_inhibitor { - font-size: 28px; - } - #custom-startmenu { - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base0B}; - font-size: 22px; - padding: 0px 5px 0px 5px; - border-radius: 4px; - padding: 0px 8px; - margin: 0px; - margin-right:7px; + } + #workspaces button.active { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 4px; + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base0B}; + transition: ${betterTransition}; + opacity: 1.0; + min-width: 40px; + } + #workspaces button:hover { + font-weight: bold; + border-radius: 4px; + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base0B}; + opacity: 0.8; + } + tooltip { + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base08}; + border-radius: 12px; + } + tooltip label { + color: #${config.lib.stylix.colors.base08}; + } + #window, #pulseaudio, #temperature, #cpu, #memory, #idle_inhibitor, #disk { + font-weight: bold; + margin: 2px 0px; + margin-right: 7px; + padding: 0px 18px; + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base0B}; + border: 2px solid #${config.lib.stylix.colors.base0B}; + border-radius: 4px; + } + #idle_inhibitor { + font-size: 28px; + } + #custom-startmenu { + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base0B}; + font-size: 22px; + padding: 0px 5px 0px 5px; + border-radius: 4px; + padding: 0px 8px; + margin: 0px; + margin-right:7px; - } - #custom-hyprbindings, #network, #battery, - #custom-notification, #clock, #custom-exit { - /* font-weight: bold; */ - font-size: 20px; - background: #${config.lib.stylix.colors.base00}; - color: #${config.lib.stylix.colors.base0B}; - margin: 2px 0px; - margin-right: 7px; - border: 2px solid #${config.lib.stylix.colors.base0B}; - border-radius: 4px; - padding: 0px 12px; - } - #tray{ - font-weight: bold; - font-size: 16px; - margin: 0px; - background: #${config.lib.stylix.colors.base0B}; - color: #${config.lib.stylix.colors.base00}; - border: 2px solid #${config.lib.stylix.colors.base0B}; - padding: 0px 18px; - margin: 0px 0px; - border-radius: 4px; - } - '' - ]; - }; - } + } + #custom-hyprbindings, #network, #battery, + #custom-notification, #clock, #custom-exit { + /* font-weight: bold; */ + font-size: 20px; + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base0B}; + margin: 2px 0px; + margin-right: 7px; + border: 2px solid #${config.lib.stylix.colors.base0B}; + border-radius: 4px; + padding: 0px 12px; + } + #tray{ + font-weight: bold; + font-size: 16px; + margin: 0px; + background: #${config.lib.stylix.colors.base0B}; + color: #${config.lib.stylix.colors.base00}; + border: 2px solid #${config.lib.stylix.colors.base0B}; + padding: 0px 18px; + margin: 0px 0px; + border-radius: 4px; + } + '' + ]; + }; +} diff --git a/modules/home/waybar/waybar-simple.nix b/modules/home/waybar/waybar-simple.nix index 04f1ae0..9ffb056 100644 --- a/modules/home/waybar/waybar-simple.nix +++ b/modules/home/waybar/waybar-simple.nix @@ -1,305 +1,305 @@ -{ - pkgs, - lib, - host, - config, - ... -}: let +{ pkgs +, lib +, host +, config +, ... +}: +let inherit (import ../../../hosts/${host}/variables.nix) clock24h; in - with lib; { - # Configure & Theme Waybar - programs.waybar = { - enable = true; - package = pkgs.waybar; - settings = [ - { - layer = "top"; - position = "top"; - modules-center = ["hyprland/workspaces"]; - modules-left = [ - "custom/startmenu" - "custom/arrow6" - "pulseaudio" - "cpu" - "memory" - "idle_inhibitor" - "custom/arrow7" - "hyprland/window" - ]; - modules-right = [ - "custom/arrow4" - "custom/hyprbindings" - "custom/arrow3" - "custom/notification" - "custom/arrow3" - "custom/exit" - "battery" - "custom/arrow2" - "tray" - "custom/arrow1" - "clock" - ]; +with lib; { + # Configure & Theme Waybar + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; + modules-center = [ "hyprland/workspaces" ]; + modules-left = [ + "custom/startmenu" + "custom/arrow6" + "pulseaudio" + "cpu" + "memory" + "idle_inhibitor" + "custom/arrow7" + "hyprland/window" + ]; + modules-right = [ + "custom/arrow4" + "custom/hyprbindings" + "custom/arrow3" + "custom/notification" + "custom/arrow3" + "custom/exit" + "battery" + "custom/arrow2" + "tray" + "custom/arrow1" + "clock" + ]; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; }; - "clock" = { - format = - if clock24h == true - then '' {:L%H:%M}'' - else '' {:L%I:%M %p}''; - tooltip = true; - tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "clock" = { + format = + if clock24h == true + then '' {:L%H:%M}'' + else '' {:L%I:%M %p}''; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + }; + "hyprland/window" = { + max-length = 22; + separate-outputs = false; + rewrite = { + "" = " 🙈 No Windows? "; }; - "hyprland/window" = { - max-length = 22; - separate-outputs = false; - rewrite = { - "" = " 🙈 No Windows? "; - }; - }; - "memory" = { - interval = 5; - format = " {}%"; - tooltip = true; - }; - "cpu" = { - interval = 5; - format = " {usage:2}%"; - tooltip = true; - }; - "disk" = { - format = " {free}"; - tooltip = true; - }; - "network" = { - format-icons = [ - "󰤯" - "󰤟" - "󰤢" - "󰤥" - "󰤨" + }; + "memory" = { + interval = 5; + format = " {}%"; + tooltip = true; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + }; + "disk" = { + format = " {free}"; + tooltip = true; + }; + "network" = { + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + format-ethernet = " {bandwidthDownOctets}"; + format-wifi = "{icon} {signalStrength}%"; + format-disconnected = "󰤮"; + tooltip = false; + }; + "tray" = { + spacing = 12; + }; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" ]; - format-ethernet = " {bandwidthDownOctets}"; - format-wifi = "{icon} {signalStrength}%"; - format-disconnected = "󰤮"; - tooltip = false; }; - "tray" = { - spacing = 12; + on-click = "sleep 0.1 && pavucontrol"; + }; + "custom/exit" = { + tooltip = false; + format = ""; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = ""; + on-click = "sleep 0.1 && rofi-launcher"; + }; + "custom/hyprbindings" = { + tooltip = false; + format = "󱕴"; + on-click = "sleep 0.1 && list-keybinds"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; }; - "pulseaudio" = { - format = "{icon} {volume}% {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = " {volume}%"; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - "" - ]; - }; - on-click = "sleep 0.1 && pavucontrol"; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; }; - "custom/exit" = { - tooltip = false; - format = ""; - on-click = "sleep 0.1 && wlogout"; - }; - "custom/startmenu" = { - tooltip = false; - format = ""; - on-click = "sleep 0.1 && rofi-launcher"; - }; - "custom/hyprbindings" = { - tooltip = false; - format = "󱕴"; - on-click = "sleep 0.1 && list-keybinds"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; - tooltip = "true"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon} {}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - inhibited-notification = ""; - inhibited-none = ""; - dnd-inhibited-notification = ""; - dnd-inhibited-none = ""; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "sleep 0.1 && task-waybar"; - escape = true; - }; - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{icon} {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󱘖 {capacity}%"; - format-icons = [ - "󰁺" - "󰁻" - "󰁼" - "󰁽" - "󰁾" - "󰁿" - "󰂀" - "󰂁" - "󰂂" - "󰁹" - ]; - on-click = ""; - tooltip = false; - }; - "custom/arrow1" = { - format = ""; - }; - "custom/arrow2" = { - format = ""; - }; - "custom/arrow3" = { - format = ""; - }; - "custom/arrow4" = { - format = ""; - }; - "custom/arrow5" = { - format = ""; - }; - "custom/arrow6" = { - format = ""; - }; - "custom/arrow7" = { - format = ""; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "sleep 0.1 && task-waybar"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + on-click = ""; + tooltip = false; + }; + "custom/arrow1" = { + format = ""; + }; + "custom/arrow2" = { + format = ""; + }; + "custom/arrow3" = { + format = ""; + }; + "custom/arrow4" = { + format = ""; + }; + "custom/arrow5" = { + format = ""; + }; + "custom/arrow6" = { + format = ""; + }; + "custom/arrow7" = { + format = ""; + }; + } + ]; + style = concatStrings [ + '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-size: 14px; + border-radius: 0px; + border: none; + min-height: 0px; } - ]; - style = concatStrings [ - '' - * { - font-family: JetBrainsMono Nerd Font Mono; - font-size: 14px; - border-radius: 0px; - border: none; - min-height: 0px; - } - window#waybar { - background: #${config.lib.stylix.colors.base00}; - color: #${config.lib.stylix.colors.base05}; - } - #workspaces button { - padding: 0px 5px; - background: transparent; - color: #${config.lib.stylix.colors.base04}; - } - #workspaces button.active { - color: #${config.lib.stylix.colors.base08}; - } - #workspaces button:hover { - color: #${config.lib.stylix.colors.base08}; - } - tooltip { - background: #${config.lib.stylix.colors.base00}; - border: 1px solid #${config.lib.stylix.colors.base05}; - border-radius: 12px; - } - tooltip label { - color: #${config.lib.stylix.colors.base05}; - } - #window { - padding: 0px 10px; - } - #pulseaudio, #cpu, #memory, #idle_inhibitor { - padding: 0px 10px; - background: #${config.lib.stylix.colors.base04}; - color: #${config.lib.stylix.colors.base00}; - } - #custom-startmenu { - color: #${config.lib.stylix.colors.base02}; - padding: 0px 14px; - font-size: 20px; - background: #${config.lib.stylix.colors.base0B}; - } - #custom-hyprbindings, #network, #battery, - #custom-notification, #custom-exit { - background: #${config.lib.stylix.colors.base0F}; - color: #${config.lib.stylix.colors.base00}; - padding: 0px 10px; - } - #tray { - background: #${config.lib.stylix.colors.base02}; - color: #${config.lib.stylix.colors.base00}; - padding: 0px 10px; - } - #clock { - font-weight: bold; - padding: 0px 10px; - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base0E}; - } - #custom-arrow1 { - font-size: 24px; - color: #${config.lib.stylix.colors.base0E}; - background: #${config.lib.stylix.colors.base02}; - } - #custom-arrow2 { - font-size: 24px; - color: #${config.lib.stylix.colors.base02}; - background: #${config.lib.stylix.colors.base0F}; - } - #custom-arrow3 { - font-size: 24px; - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base0F}; - } - #custom-arrow4 { - font-size: 24px; - color: #${config.lib.stylix.colors.base0F}; - background: transparent; - } - #custom-arrow6 { - font-size: 24px; - color: #${config.lib.stylix.colors.base0B}; - background: #${config.lib.stylix.colors.base04}; - } - #custom-arrow7 { - font-size: 24px; - color: #${config.lib.stylix.colors.base04}; - background: transparent; - } - '' - ]; - }; - } + window#waybar { + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base05}; + } + #workspaces button { + padding: 0px 5px; + background: transparent; + color: #${config.lib.stylix.colors.base04}; + } + #workspaces button.active { + color: #${config.lib.stylix.colors.base08}; + } + #workspaces button:hover { + color: #${config.lib.stylix.colors.base08}; + } + tooltip { + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base05}; + border-radius: 12px; + } + tooltip label { + color: #${config.lib.stylix.colors.base05}; + } + #window { + padding: 0px 10px; + } + #pulseaudio, #cpu, #memory, #idle_inhibitor { + padding: 0px 10px; + background: #${config.lib.stylix.colors.base04}; + color: #${config.lib.stylix.colors.base00}; + } + #custom-startmenu { + color: #${config.lib.stylix.colors.base02}; + padding: 0px 14px; + font-size: 20px; + background: #${config.lib.stylix.colors.base0B}; + } + #custom-hyprbindings, #network, #battery, + #custom-notification, #custom-exit { + background: #${config.lib.stylix.colors.base0F}; + color: #${config.lib.stylix.colors.base00}; + padding: 0px 10px; + } + #tray { + background: #${config.lib.stylix.colors.base02}; + color: #${config.lib.stylix.colors.base00}; + padding: 0px 10px; + } + #clock { + font-weight: bold; + padding: 0px 10px; + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base0E}; + } + #custom-arrow1 { + font-size: 24px; + color: #${config.lib.stylix.colors.base0E}; + background: #${config.lib.stylix.colors.base02}; + } + #custom-arrow2 { + font-size: 24px; + color: #${config.lib.stylix.colors.base02}; + background: #${config.lib.stylix.colors.base0F}; + } + #custom-arrow3 { + font-size: 24px; + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base0F}; + } + #custom-arrow4 { + font-size: 24px; + color: #${config.lib.stylix.colors.base0F}; + background: transparent; + } + #custom-arrow6 { + font-size: 24px; + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base04}; + } + #custom-arrow7 { + font-size: 24px; + color: #${config.lib.stylix.colors.base04}; + background: transparent; + } + '' + ]; + }; +} diff --git a/modules/home/wezterm.nix b/modules/home/wezterm.nix index ab274ff..d939ca0 100644 --- a/modules/home/wezterm.nix +++ b/modules/home/wezterm.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.wezterm = { enable = true; package = pkgs.wezterm; diff --git a/modules/home/xdg.nix b/modules/home/xdg.nix index 82b4b63..b485c29 100644 --- a/modules/home/xdg.nix +++ b/modules/home/xdg.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { xdg = { enable = true; mime.enable = true; @@ -7,8 +7,8 @@ }; portal = { enable = true; - extraPortals = [pkgs.xdg-desktop-portal-hyprland]; - configPackages = [pkgs.hyprland]; + extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; + configPackages = [ pkgs.hyprland ]; }; }; } diff --git a/modules/home/yazi/default.nix b/modules/home/yazi/default.nix index 9364039..2b758e2 100644 --- a/modules/home/yazi/default.nix +++ b/modules/home/yazi/default.nix @@ -1,8 +1,10 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let settings = import ./yazi.nix; keymap = import ./keymap.nix; theme = import ./theme.nix; -in { +in +{ programs.yazi = { enable = true; enableZshIntegration = true; diff --git a/modules/home/yazi/keymap.nix b/modules/home/yazi/keymap.nix index c8e2561..d4e4267 100644 --- a/modules/home/yazi/keymap.nix +++ b/modules/home/yazi/keymap.nix @@ -92,7 +92,7 @@ desc = "Move cursor down one page"; } { - on = ["g" "g"]; + on = [ "g" "g" ]; run = "arrow top"; desc = "Move cursor to the top"; } @@ -133,7 +133,7 @@ } { on = ""; - run = ["toggle" "arrow 1"]; + run = [ "toggle" "arrow 1" ]; desc = "Toggle the current selection state"; } { @@ -297,52 +297,52 @@ desc = "Jump to a file/directory via fzf"; } { - on = ["m" "s"]; + on = [ "m" "s" ]; run = "linemode size"; desc = "Linemode: size"; } { - on = ["m" "p"]; + on = [ "m" "p" ]; run = "linemode permissions"; desc = "Linemode: permissions"; } { - on = ["m" "b"]; + on = [ "m" "b" ]; run = "linemode btime"; desc = "Linemode: btime"; } { - on = ["m" "m"]; + on = [ "m" "m" ]; run = "linemode mtime"; desc = "Linemode: mtime"; } { - on = ["m" "o"]; + on = [ "m" "o" ]; run = "linemode owner"; desc = "Linemode: owner"; } { - on = ["m" "n"]; + on = [ "m" "n" ]; run = "linemode none"; desc = "Linemode: none"; } { - on = ["c" "c"]; + on = [ "c" "c" ]; run = "copy path"; desc = "Copy the file path"; } { - on = ["c" "d"]; + on = [ "c" "d" ]; run = "copy dirname"; desc = "Copy the directory path"; } { - on = ["c" "f"]; + on = [ "c" "f" ]; run = "copy filename"; desc = "Copy the filename"; } { - on = ["c" "n"]; + on = [ "c" "n" ]; run = "copy name_without_ext"; desc = "Copy the filename without extension"; } @@ -372,87 +372,87 @@ desc = "Goto the previous found"; } { - on = ["," "m"]; - run = ["sort mtime --reverse=no" "linemode mtime"]; + on = [ "," "m" ]; + run = [ "sort mtime --reverse=no" "linemode mtime" ]; desc = "Sort by modified time"; } { - on = ["," "M"]; - run = ["sort mtime --reverse" "linemode mtime"]; + on = [ "," "M" ]; + run = [ "sort mtime --reverse" "linemode mtime" ]; desc = "Sort by modified time (reverse)"; } { - on = ["," "b"]; - run = ["sort btime --reverse=no" "linemode btime"]; + on = [ "," "b" ]; + run = [ "sort btime --reverse=no" "linemode btime" ]; desc = "Sort by birth time"; } { - on = ["," "B"]; - run = ["sort btime --reverse" "linemode btime"]; + on = [ "," "B" ]; + run = [ "sort btime --reverse" "linemode btime" ]; desc = "Sort by birth time (reverse)"; } { - on = ["," "e"]; + on = [ "," "e" ]; run = "sort extension --reverse=no"; desc = "Sort by extension"; } { - on = ["," "E"]; + on = [ "," "E" ]; run = "sort extension --reverse"; desc = "Sort by extension (reverse)"; } { - on = ["," "a"]; + on = [ "," "a" ]; run = "sort alphabetical --reverse=no"; desc = "Sort alphabetically"; } { - on = ["," "A"]; + on = [ "," "A" ]; run = "sort alphabetical --reverse"; desc = "Sort alphabetically (reverse)"; } { - on = ["," "n"]; + on = [ "," "n" ]; run = "sort natural --reverse=no"; desc = "Sort naturally"; } { - on = ["," "N"]; + on = [ "," "N" ]; run = "sort natural --reverse"; desc = "Sort naturally (reverse)"; } { - on = ["," "s"]; - run = ["sort size --reverse=no" "linemode size"]; + on = [ "," "s" ]; + run = [ "sort size --reverse=no" "linemode size" ]; desc = "Sort by size"; } { - on = ["," "S"]; - run = ["sort size --reverse" "linemode size"]; + on = [ "," "S" ]; + run = [ "sort size --reverse" "linemode size" ]; desc = "Sort by size (reverse)"; } { - on = ["," "r"]; + on = [ "," "r" ]; run = "sort random --reverse=no"; desc = "Sort randomly"; } { - on = ["g" "h"]; + on = [ "g" "h" ]; run = "cd ~"; desc = "Go home"; } { - on = ["g" "c"]; + on = [ "g" "c" ]; run = "cd ~/.config"; desc = "Goto ~/.config"; } { - on = ["g" "d"]; + on = [ "g" "d" ]; run = "cd ~/Downloads"; desc = "Goto ~/Downloads"; } { - on = ["g" ""]; + on = [ "g" "" ]; run = "cd --interactive"; desc = "Jump interactively"; } @@ -544,7 +544,7 @@ ]; prepend_keymap = [ { - on = ["g" "i"]; + on = [ "g" "i" ]; run = "plugin lazygit"; desc = "run lazygit"; } @@ -682,7 +682,7 @@ desc = "Swipe to the previous file"; } { - on = ["c" "c"]; + on = [ "c" "c" ]; run = "copy cell"; desc = "Copy selected cell"; } @@ -781,7 +781,7 @@ } { on = "I"; - run = ["move first-char" "insert"]; + run = [ "move first-char" "insert" ]; desc = "Move to the BOL, and enter insert mode"; } { @@ -791,7 +791,7 @@ } { on = "A"; - run = ["move eol" "insert --append"]; + run = [ "move eol" "insert --append" ]; desc = "Move to the EOL, and enter append mode"; } { @@ -806,17 +806,17 @@ } { on = "V"; - run = ["move bol" "visual" "move eol"]; + run = [ "move bol" "visual" "move eol" ]; desc = "Select from BOL to EOL"; } { on = ""; - run = ["move eol" "visual" "move bol"]; + run = [ "move eol" "visual" "move bol" ]; desc = "Select from EOL to BOL"; } { on = ""; - run = ["move bol" "visual" "move eol"]; + run = [ "move bol" "visual" "move eol" ]; desc = "Select from BOL to EOL"; } { @@ -976,7 +976,7 @@ } { on = "D"; - run = ["delete --cut" "move eol"]; + run = [ "delete --cut" "move eol" ]; desc = "Cut until the EOL"; } { @@ -986,12 +986,12 @@ } { on = "C"; - run = ["delete --cut --insert" "move eol"]; + run = [ "delete --cut --insert" "move eol" ]; desc = "Cut until the EOL, and enter insert mode"; } { on = "x"; - run = ["delete --cut" "move 1 --in-operating"]; + run = [ "delete --cut" "move 1 --in-operating" ]; desc = "Cut the current character"; } { @@ -1109,7 +1109,7 @@ } { on = ""; - run = ["close --submit" "close_input --submit"]; + run = [ "close --submit" "close_input --submit" ]; desc = "Submit the completion and input"; } { diff --git a/modules/home/yazi/theme.nix b/modules/home/yazi/theme.nix index 9950ad8..77bee22 100644 --- a/modules/home/yazi/theme.nix +++ b/modules/home/yazi/theme.nix @@ -11,26 +11,24 @@ tab_width = 1; border_symbol = "│"; }; - mode = {}; + mode = { }; status = { - overall = {bold = true;}; - sep_left = ["░▒▓" "▓▒░"]; - sep_right = ["░▒▓" "▓▒░"]; + overall = { bold = true; }; + sep_left = [ "░▒▓" "▓▒░" ]; + sep_right = [ "░▒▓" "▓▒░" ]; }; which = { cols = 3; separator = "  "; }; confirm = { - border = {fg = "gray";}; + border = { fg = "gray"; }; title = { fg = "blue"; bold = true; }; - content = { - }; - list = { - }; + content = { }; + list = { }; btn_yes = { bg = "green"; fg = "black"; @@ -41,40 +39,39 @@ fg = "black"; bold = true; }; - btn_labels = [" [Y]es " " (N)o "]; + btn_labels = [ " [Y]es " " (N)o " ]; }; spot = { - border = {fg = "blue";}; - title = {fg = "blue";}; - tbl_col = {fg = "blue";}; + border = { fg = "blue"; }; + title = { fg = "blue"; }; + tbl_col = { fg = "blue"; }; tbl_cell = { fg = "yellow"; reversed = true; }; }; notify = { - title_info = {fg = "green";}; - title_warn = {fg = "yellow";}; - title_error = {fg = "red";}; + title_info = { fg = "green"; }; + title_warn = { fg = "yellow"; }; + title_error = { fg = "red"; }; icon_info = ""; icon_warn = ""; icon_error = ""; }; - pick = {}; - input = {}; + pick = { }; + input = { }; cmp = { - active = {reversed = true;}; - inactive = { - }; + active = { reversed = true; }; + inactive = { }; icon_file = ""; icon_folder = ""; icon_command = ""; }; - tasks = {}; - help = {}; - filetype = {}; + tasks = { }; + help = { }; + filetype = { }; icon = { - globs = []; + globs = [ ]; dirs = [ { name = ".config"; diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix index 35e4b8f..50e0f7d 100644 --- a/modules/home/zsh/default.nix +++ b/modules/home/zsh/default.nix @@ -1,8 +1,7 @@ -{ - profile, - pkgs, - lib, - ... +{ profile +, pkgs +, lib +, ... }: { imports = [ ./zshrc-personal.nix @@ -13,7 +12,7 @@ autosuggestion.enable = true; syntaxHighlighting = { enable = true; - highlighters = ["main" "brackets" "pattern" "regexp" "root" "line"]; + highlighters = [ "main" "brackets" "pattern" "regexp" "root" "line" ]; }; historySubstringSearch.enable = true; diff --git a/modules/home/zsh/zshrc-personal.nix b/modules/home/zsh/zshrc-personal.nix index 31d0302..545cfd2 100644 --- a/modules/home/zsh/zshrc-personal.nix +++ b/modules/home/zsh/zshrc-personal.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: { - home.packages = with pkgs; [zsh]; +{ pkgs, ... }: { + home.packages = with pkgs; [ zsh ]; home.file."./.zshrc-personal".text = '' diff --git a/profiles/amd/default.nix b/profiles/amd/default.nix index 1b5506b..9c1d8ce 100644 --- a/profiles/amd/default.nix +++ b/profiles/amd/default.nix @@ -1,4 +1,4 @@ -{host, ...}: { +{ host, ... }: { imports = [ ../../hosts/${host} ../../modules/drivers diff --git a/profiles/intel/default.nix b/profiles/intel/default.nix index f99a114..cc0d3d6 100644 --- a/profiles/intel/default.nix +++ b/profiles/intel/default.nix @@ -1,4 +1,4 @@ -{host, ...}: { +{ host, ... }: { imports = [ ../../hosts/${host} ../../modules/drivers diff --git a/profiles/nvidia-laptop/default.nix b/profiles/nvidia-laptop/default.nix index 2c4444b..6d58b83 100644 --- a/profiles/nvidia-laptop/default.nix +++ b/profiles/nvidia-laptop/default.nix @@ -1,6 +1,8 @@ -{host, ...}: let +{ host, ... }: +let inherit (import ../../hosts/${host}/variables.nix) intelID nvidiaID; -in { +in +{ imports = [ ../../hosts/${host} ../../modules/drivers diff --git a/profiles/nvidia/default.nix b/profiles/nvidia/default.nix index 5b50370..6beee5f 100644 --- a/profiles/nvidia/default.nix +++ b/profiles/nvidia/default.nix @@ -1,4 +1,4 @@ -{host, ...}: { +{ host, ... }: { imports = [ ../../hosts/${host} ../../modules/drivers diff --git a/profiles/vm/default.nix b/profiles/vm/default.nix index 130c1b7..cf51f94 100644 --- a/profiles/vm/default.nix +++ b/profiles/vm/default.nix @@ -1,4 +1,4 @@ -{host, ...}: { +{ host, ... }: { imports = [ ../../hosts/${host} ../../modules/drivers