From a4c5e7aca8b8d1556080c8aafe1ca0f9ca5ea18e Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 28 Oct 2024 11:04:52 +0100 Subject: [PATCH] cleanup: nixfmt everything --- common/boot.nix | 5 +- common/ccid-overlay.nix | 18 ---- common/colors.nix | 7 +- common/discord/discord.nix | 6 +- common/locale.nix | 2 +- common/spotify.nix | 8 +- common/substitutors.nix | 15 ++- hosts/lambdaos/configuration.nix | 45 ++++---- hosts/lambdaos/hardware-configuration.nix | 51 +++++---- hosts/lambdaos/home.nix | 44 ++++---- hosts/lambdaos/restic.nix | 4 +- hosts/lambdaos/root.nix | 8 +- hosts/muos/configuration.nix | 38 ++++--- hosts/muos/disk-config.nix | 1 - hosts/muos/hardware-configuration.nix | 23 +++-- hosts/muos/home.nix | 42 ++++---- hosts/muos/root.nix | 8 +- hosts/nuos/configuration.nix | 41 +++++--- hosts/nuos/hardware-configuration.nix | 21 ++-- hosts/nuos/home.nix | 19 ++-- hosts/nuos/root.nix | 15 +-- modules/hyprland.nix | 120 +++++++++++++--------- 22 files changed, 317 insertions(+), 224 deletions(-) delete mode 100644 common/ccid-overlay.nix diff --git a/common/boot.nix b/common/boot.nix index 55dc5f4..52a1e33 100644 --- a/common/boot.nix +++ b/common/boot.nix @@ -1,4 +1,7 @@ -{ lib, ... }: +{ + lib, + ... +}: { boot.loader = { timeout = lib.mkDefault 0; diff --git a/common/ccid-overlay.nix b/common/ccid-overlay.nix deleted file mode 100644 index eb4c029..0000000 --- a/common/ccid-overlay.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, pkgs, ... }: { - nixpkgs.overlays = [ - (self: super: { - ccid = super.ccid.overrideAttrs (old: rec { - pname = "ccid"; - version = "1.5.5"; - src = super.fetchurl { - url = "https://ccid.apdu.fr/files/${pname}-${version}.tar.bz2"; - hash = "sha256-GUcI91/jadRd18Feiz6Kfbi0nPxVV1dMoqLnbvEsoMo="; - }; - postPatch = '' - patchShebangs . - substituteInPlace src/Makefile.in --replace-fail /bin/echo echo - ''; - }); - }) - ]; -} diff --git a/common/colors.nix b/common/colors.nix index e3aadbf..073e890 100644 --- a/common/colors.nix +++ b/common/colors.nix @@ -1,4 +1,9 @@ -{ config, pkgs, nix-colors, ... }: +{ + config, + pkgs, + nix-colors, + ... +}: { imports = [ diff --git a/common/discord/discord.nix b/common/discord/discord.nix index 7b18cf1..bfa0220 100644 --- a/common/discord/discord.nix +++ b/common/discord/discord.nix @@ -1,5 +1,7 @@ -{ pkgs, ... }: - +{ + pkgs, + ... +}: { home.packages = with pkgs; [ (symlinkJoin { diff --git a/common/locale.nix b/common/locale.nix index a73a467..dba7e9c 100644 --- a/common/locale.nix +++ b/common/locale.nix @@ -1,4 +1,4 @@ -{...}: +{ ... }: { # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; diff --git a/common/spotify.nix b/common/spotify.nix index a98e479..2125256 100644 --- a/common/spotify.nix +++ b/common/spotify.nix @@ -1,5 +1,9 @@ -{ config, pkgs, inputs, ... }: - +{ + config, + pkgs, + inputs, + ... +}: { services.spotifyd.enable = true; home.packages = with pkgs; [ diff --git a/common/substitutors.nix b/common/substitutors.nix index fae6eb9..b9f62c0 100644 --- a/common/substitutors.nix +++ b/common/substitutors.nix @@ -1,9 +1,15 @@ -{ config, lib, ... }: { +{ + ... +}: +{ nix = { settings = { # auto optimise every so often auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; substituters = [ "https://cosmic.cachix.org/" "https://hyprland.cachix.org" @@ -20,7 +26,10 @@ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ]; - system-features = [ "kvm" "big-parallel" ]; + system-features = [ + "kvm" + "big-parallel" + ]; allowed-uris = [ "github:" "gitlab:" diff --git a/hosts/lambdaos/configuration.nix b/hosts/lambdaos/configuration.nix index 32016fb..c75e271 100644 --- a/hosts/lambdaos/configuration.nix +++ b/hosts/lambdaos/configuration.nix @@ -2,24 +2,28 @@ # your system.Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, inputs, nix-colors, lib, ... }: { - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../modules/games/steam.nix - ../../modules/plasma + config, + pkgs, + inputs, + nix-colors, + lib, + ... +}: +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../modules/games/steam.nix + ../../modules/plasma - ../../common - - ./restic.nix - ]; + ../../common + ./restic.nix + ]; age.identityPaths = [ "${config.users.users.noa.home}/.ssh/id_ed25519" ]; - hardware = { bluetooth = { enable = true; @@ -47,7 +51,10 @@ sandbox = true; show-trace = true; - system-features = [ "nixos-test" "recursive-nix" ]; + system-features = [ + "nixos-test" + "recursive-nix" + ]; sandbox-paths = [ "/bin/sh=${pkgs.busybox-sandbox-shell.out}/bin/busybox" ]; }; @@ -69,7 +76,6 @@ # Set your time zone. time.timeZone = "Europe/Amsterdam"; - # Configure console keymap console.keyMap = "us-acentos"; @@ -81,7 +87,13 @@ noa = { isNormalUser = true; description = "Noa Aarts"; - extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" "dialout" ]; + extraGroups = [ + "networkmanager" + "wheel" + "docker" + "wireshark" + "dialout" + ]; hashedPassword = "$6$rounds=512400$Zip3xoK2zcoR4qEL$N13YTHO5tpWfx2nKb1sye.ZPwfoRtMQ5f3YrMZqKzzoFoSSHHJ.l5ulCEa9HygFxZmBtPnwlseFEtl8ERnwF50"; openssh.authorizedKeys.keys = (import ../../common/ssh-keys.nix); }; @@ -102,7 +114,6 @@ restic ]; - # TODO: find list of fonts to install fonts.packages = with pkgs; [ font-awesome @@ -150,7 +161,6 @@ security.rtkit.enable = true; boot = rec { - kernelPackages = pkgs.linuxPackages_latest; extraModulePackages = with kernelPackages; [ v4l2loopback @@ -341,7 +351,6 @@ # Or disable the firewall altogether. # networking.firewall.enable = false; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/lambdaos/hardware-configuration.nix b/hosts/lambdaos/hardware-configuration.nix index 5c7df9e..9f9950f 100644 --- a/hosts/lambdaos/hardware-configuration.nix +++ b/hosts/lambdaos/hardware-configuration.nix @@ -1,36 +1,45 @@ # 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 + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "ahci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/263716dd-52cb-4a91-ba0b-e39e492ed0e5"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/263716dd-52cb-4a91-ba0b-e39e492ed0e5"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/B08E-916D"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/B08E-916D"; + fsType = "vfat"; + }; - fileSystems."/home/noa/Pictures/library" = - { - device = "/dev/disk/by-uuid/93a74173-8719-4be2-86b3-dc80588b9cf8"; - fsType = "ext4"; - }; + fileSystems."/home/noa/Pictures/library" = { + device = "/dev/disk/by-uuid/93a74173-8719-4be2-86b3-dc80588b9cf8"; + fsType = "ext4"; + }; swapDevices = [ ]; diff --git a/hosts/lambdaos/home.nix b/hosts/lambdaos/home.nix index d1ee180..668878b 100644 --- a/hosts/lambdaos/home.nix +++ b/hosts/lambdaos/home.nix @@ -1,15 +1,20 @@ -{ config, pkgs, inputs, lib, ... }: +{ + config, + pkgs, + inputs, + lib, + ... +}: { - imports = - [ - ../../modules/hyprland.nix - ../../modules/games - ../../modules/applications - ../../common/nvim/nvim.nix - ../../common/discord/discord.nix - ../../common/spotify.nix - ]; + imports = [ + ../../modules/hyprland.nix + ../../modules/games + ../../modules/applications + ../../common/nvim/nvim.nix + ../../common/discord/discord.nix + ../../common/spotify.nix + ]; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "noa"; @@ -93,13 +98,12 @@ yubikey-manager-qt yubico-piv-tool - libreoffice-qt6 + libreoffice-qt6 inputs.flurry.packages.${system}.flurry inputs.tsunami.packages.${system}.tsunami ]; - # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. home.file = { @@ -132,7 +136,6 @@ # /etc/profiles/per-user/noa/etc/profile.d/hm-session-vars.sh # - home.sessionVariables = { EDITOR = "nvim"; TERM = "kitty"; @@ -153,8 +156,6 @@ }; }; - - dconf = { enable = true; settings = { @@ -198,14 +199,15 @@ x11.enable = true; name = name; size = 32; - package = - pkgs.runCommand "moveUp" { } '' - mkdir -p $out/share/icons - ln -s ${pkgs.fetchzip { + package = pkgs.runCommand "moveUp" { } '' + mkdir -p $out/share/icons + ln -s ${ + pkgs.fetchzip { url = url; hash = hash; - }} $out/share/icons/${name} - ''; + } + } $out/share/icons/${name} + ''; }; in getFrom diff --git a/hosts/lambdaos/restic.nix b/hosts/lambdaos/restic.nix index 49fa53f..f5f8bbc 100644 --- a/hosts/lambdaos/restic.nix +++ b/hosts/lambdaos/restic.nix @@ -1,4 +1,5 @@ -{ config, ... }: { +{ config, ... }: +{ # configure agenix secrets age.secrets = { "restic/env".file = ../../secrets/restic/env.age; @@ -31,4 +32,3 @@ }; }; } - diff --git a/hosts/lambdaos/root.nix b/hosts/lambdaos/root.nix index 73555dc..84c0b19 100644 --- a/hosts/lambdaos/root.nix +++ b/hosts/lambdaos/root.nix @@ -1,4 +1,9 @@ -{ config, pkgs, inputs, ... }: +{ + config, + pkgs, + inputs, + ... +}: { imports = [ @@ -34,7 +39,6 @@ lsd ]; - modules = { apps = { enable = true; diff --git a/hosts/muos/configuration.nix b/hosts/muos/configuration.nix index 0a4aa5d..242cee7 100644 --- a/hosts/muos/configuration.nix +++ b/hosts/muos/configuration.nix @@ -2,20 +2,23 @@ # your system.Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, inputs, nix-colors, lib, ... }: { - imports = - [ - # Include the results of the hardware scan. - ../../modules/games/steam.nix - ./disk-config.nix - ./hardware-configuration.nix - - ../../common - ]; - - + config, + pkgs, + inputs, + nix-colors, + lib, + ... +}: +{ + imports = [ + # Include the results of the hardware scan. + ../../modules/games/steam.nix + ./disk-config.nix + ./hardware-configuration.nix + ../../common + ]; hardware = { bluetooth = { @@ -48,7 +51,6 @@ # Set your time zone. time.timeZone = "Europe/Amsterdam"; - # Configure console keymap console.keyMap = "us-acentos"; @@ -60,7 +62,12 @@ noa = { isNormalUser = true; description = "Noa Aarts"; - extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" ]; + extraGroups = [ + "networkmanager" + "wheel" + "docker" + "wireshark" + ]; hashedPassword = "$6$rounds=512400$Zip3xoK2zcoR4qEL$N13YTHO5tpWfx2nKb1sye.ZPwfoRtMQ5f3YrMZqKzzoFoSSHHJ.l5ulCEa9HygFxZmBtPnwlseFEtl8ERnwF50"; openssh.authorizedKeys.keys = import ../../common/ssh-keys.nix; }; @@ -123,7 +130,6 @@ security.rtkit.enable = true; boot = rec { - kernelPackages = pkgs.linuxPackages_latest; extraModulePackages = with kernelPackages; [ v4l2loopback @@ -276,8 +282,6 @@ # Or disable the firewall altogether. # networking.firewall.enable = false; - - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/muos/disk-config.nix b/hosts/muos/disk-config.nix index e8459df..e3b7c81 100644 --- a/hosts/muos/disk-config.nix +++ b/hosts/muos/disk-config.nix @@ -30,4 +30,3 @@ }; }; } - diff --git a/hosts/muos/hardware-configuration.nix b/hosts/muos/hardware-configuration.nix index 21ca1cb..6768607 100644 --- a/hosts/muos/hardware-configuration.nix +++ b/hosts/muos/hardware-configuration.nix @@ -1,15 +1,26 @@ # 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 + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; diff --git a/hosts/muos/home.nix b/hosts/muos/home.nix index cb3fac3..540a554 100644 --- a/hosts/muos/home.nix +++ b/hosts/muos/home.nix @@ -1,15 +1,20 @@ -{ config, pkgs, inputs, lib, ... }: +{ + config, + pkgs, + inputs, + lib, + ... +}: { - imports = - [ - ../../modules/hyprland.nix - ../../modules/games - ../../modules/applications - ../../common/nvim/nvim.nix - ../../common/discord/discord.nix - ../../common/spotify.nix - ]; + imports = [ + ../../modules/hyprland.nix + ../../modules/games + ../../modules/applications + ../../common/nvim/nvim.nix + ../../common/discord/discord.nix + ../../common/spotify.nix + ]; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "noa"; @@ -85,7 +90,6 @@ yubico-piv-tool ]; - # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. home.file = { @@ -118,7 +122,6 @@ # /etc/profiles/per-user/noa/etc/profile.d/hm-session-vars.sh # - home.sessionVariables = { EDITOR = "nvim"; TERM = "kitty"; @@ -139,8 +142,6 @@ }; }; - - dconf = { enable = true; settings = { @@ -183,14 +184,15 @@ x11.enable = true; name = name; size = 32; - package = - pkgs.runCommand "moveUp" { } '' - mkdir -p $out/share/icons - ln -s ${pkgs.fetchzip { + package = pkgs.runCommand "moveUp" { } '' + mkdir -p $out/share/icons + ln -s ${ + pkgs.fetchzip { url = url; hash = hash; - }} $out/share/icons/${name} - ''; + } + } $out/share/icons/${name} + ''; }; in getFrom diff --git a/hosts/muos/root.nix b/hosts/muos/root.nix index 73555dc..84c0b19 100644 --- a/hosts/muos/root.nix +++ b/hosts/muos/root.nix @@ -1,4 +1,9 @@ -{ config, pkgs, inputs, ... }: +{ + config, + pkgs, + inputs, + ... +}: { imports = [ @@ -34,7 +39,6 @@ lsd ]; - modules = { apps = { enable = true; diff --git a/hosts/nuos/configuration.nix b/hosts/nuos/configuration.nix index 0b5c8e7..17d8fce 100644 --- a/hosts/nuos/configuration.nix +++ b/hosts/nuos/configuration.nix @@ -2,19 +2,26 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ modulesPath, pkgs, inputs, lib, nix-colors, config, ... }: { - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - inputs.home-manager.nixosModules.default - ./disk-config.nix - (modulesPath + "/installer/scan/not-detected.nix") - (modulesPath + "/profiles/qemu-guest.nix") + modulesPath, + pkgs, + inputs, + lib, + nix-colors, + config, + ... +}: +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + inputs.home-manager.nixosModules.default + ./disk-config.nix + (modulesPath + "/installer/scan/not-detected.nix") + (modulesPath + "/profiles/qemu-guest.nix") - ../../common - ]; + ../../common + ]; # LOVE me some blob hardware.enableRedistributableFirmware = true; @@ -39,7 +46,12 @@ users.users = { noa = { isNormalUser = true; - extraGroups = [ "networkmanager" "wheel" "docker" "libvirt" ]; + extraGroups = [ + "networkmanager" + "wheel" + "docker" + "libvirt" + ]; hashedPassword = "$6$rounds=512400$g/s4dcRttXi4ux6c$Z6pKnhJXcWxv0TBSMtvJu5.piETdUBSgBVN7oDPKiQV.lbTYz1r.0XQLwMYxzcvaaX0DL6Iw/SEUTiC2M50wC/"; openssh.authorizedKeys.keys = import ../../common/ssh-keys.nix; }; @@ -66,7 +78,6 @@ # enableSSHSupport = true; # }; - programs.zsh.enable = true; home-manager = { @@ -153,7 +164,7 @@ github-runners = { flurry-runner = { enable = true; - extraPackages = with pkgs;[ + extraPackages = with pkgs; [ nodejs curl ]; @@ -206,7 +217,6 @@ modules = [ pkgs.nginxModules.brotli ]; }; - recommendedOptimisation = true; recommendedProxySettings = true; recommendedTlsSettings = true; @@ -253,7 +263,6 @@ }; }; - security.acme = { acceptTerms = true; defaults.email = "noa@voorwaarts.nl"; diff --git a/hosts/nuos/hardware-configuration.nix b/hosts/nuos/hardware-configuration.nix index 8befc5e..afd63e9 100644 --- a/hosts/nuos/hardware-configuration.nix +++ b/hosts/nuos/hardware-configuration.nix @@ -1,15 +1,24 @@ # 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 + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; diff --git a/hosts/nuos/home.nix b/hosts/nuos/home.nix index 90285cc..0666ae8 100644 --- a/hosts/nuos/home.nix +++ b/hosts/nuos/home.nix @@ -1,11 +1,16 @@ -{ config, pkgs, mineflake, inputs, ... }: +{ + config, + pkgs, + mineflake, + inputs, + ... +}: { - imports = - [ - ../../modules/applications - ../../common/nvim/nvim.nix - ]; + imports = [ + ../../modules/applications + ../../common/nvim/nvim.nix + ]; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "noa"; @@ -56,8 +61,6 @@ enable = true; }; - - # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. home.file = { diff --git a/hosts/nuos/root.nix b/hosts/nuos/root.nix index adc2a43..d31959e 100644 --- a/hosts/nuos/root.nix +++ b/hosts/nuos/root.nix @@ -1,10 +1,14 @@ -{ config, pkgs, inputs, ... }: +{ + config, + pkgs, + inputs, + ... +}: { - imports = - [ - ../../common/nvim/nvim.nix - ]; + imports = [ + ../../common/nvim/nvim.nix + ]; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "root"; @@ -34,7 +38,6 @@ lsd ]; - # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. home.file = { diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 04378b6..d82f836 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: let cfg = config.modules.hyprland; in @@ -23,15 +29,14 @@ in default = pkgs.xdg-desktop-portal-hyprland; }; displays = lib.mkOption { - type = lib.types.listOf - (lib.types.submodule { + type = lib.types.listOf ( + lib.types.submodule { options = { - name = lib.mkOption - { - type = lib.types.str; - description = "the display identifier"; - example = "DP-2"; - }; + name = lib.mkOption { + type = lib.types.str; + description = "the display identifier"; + example = "DP-2"; + }; horizontal = lib.mkOption { type = lib.types.ints.positive; description = "the horizontal resolution"; @@ -64,7 +69,8 @@ in example = "1.5"; }; }; - }); + } + ); description = "the display layout to use"; }; }; @@ -84,9 +90,23 @@ in }; waybar = { modules = { - left = [ "hyprland/workspaces" "tray" "hyprland/window" ]; - center = [ "clock" "custom/spotify" ]; - right = [ "custom/vpn" "wireplumber" "network" "cpu" "memory" "custom/poweroff" ]; + left = [ + "hyprland/workspaces" + "tray" + "hyprland/window" + ]; + center = [ + "clock" + "custom/spotify" + ]; + right = [ + "custom/vpn" + "wireplumber" + "network" + "cpu" + "memory" + "custom/poweroff" + ]; }; enable = lib.mkDefault true; }; @@ -102,7 +122,6 @@ in playerctl ]; - xdg.portal = { extraPortals = [ cfg.portalPackage ]; config.common.default = "*"; @@ -127,7 +146,9 @@ in package = cfg.package; settings = let - make-display-string = display: "${display.name}, ${builtins.toString display.horizontal}x${builtins.toString display.vertical}@${builtins.toString display.refresh-rate}, ${builtins.toString display.horizontal-offset}x${builtins.toString display.vertical-offset}, ${display.scale}"; + make-display-string = + display: + "${display.name}, ${builtins.toString display.horizontal}x${builtins.toString display.vertical}@${builtins.toString display.refresh-rate}, ${builtins.toString display.horizontal-offset}x${builtins.toString display.vertical-offset}, ${display.scale}"; in { monitor = builtins.map make-display-string cfg.displays; @@ -179,38 +200,38 @@ in ]; }; "$mod" = "SUPER"; - bind = [ - "$mod,Return,exec,${cfg.terminal}/bin/${cfg.terminal.pname}" - "$mod,tab,cyclenext" - "SUPERSHIFT,Q,killactive" - "$mod,SPACE,exec,wofi-launch" - "$mod,P,exec,wofi-power" - "SUPERSHIFT,m,exit" - "$mod,H,movefocus,l" - "$mod,J,movefocus,u" - "$mod,K,movefocus,d" - "$mod,L,movefocus,r" - "SUPERSHIFT,H,movewindow,l" - "SUPERSHIFT,J,movewindow,u" - "SUPERSHIFT,K,movewindow,d" - "SUPERSHIFT,L,movewindow,r" - "$mod,F,togglefloating" - "$mod,X,togglespecialworkspace" - "SUPERSHIFT,X,movetoworkspace,special" - "SUPERSHIFT,S,exec,${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only" - "$mod,f11,fullscreen,0" - ",XF86AudioLowerVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%-" - ",XF86AudioRaiseVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%+" - ",XF86AudioMute,exec,${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle" - ",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause" - ",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous" - ",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next" - "$mod,mouse_up,workspace,r-1" - "$mod,mouse_down,workspace,r+1" - ] - ++ ( - builtins.concatLists (builtins.genList - ( + bind = + [ + "$mod,Return,exec,${cfg.terminal}/bin/${cfg.terminal.pname}" + "$mod,tab,cyclenext" + "SUPERSHIFT,Q,killactive" + "$mod,SPACE,exec,wofi-launch" + "$mod,P,exec,wofi-power" + "SUPERSHIFT,m,exit" + "$mod,H,movefocus,l" + "$mod,J,movefocus,u" + "$mod,K,movefocus,d" + "$mod,L,movefocus,r" + "SUPERSHIFT,H,movewindow,l" + "SUPERSHIFT,J,movewindow,u" + "SUPERSHIFT,K,movewindow,d" + "SUPERSHIFT,L,movewindow,r" + "$mod,F,togglefloating" + "$mod,X,togglespecialworkspace" + "SUPERSHIFT,X,movetoworkspace,special" + "SUPERSHIFT,S,exec,${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only" + "$mod,f11,fullscreen,0" + ",XF86AudioLowerVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%-" + ",XF86AudioRaiseVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%+" + ",XF86AudioMute,exec,${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle" + ",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause" + ",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous" + ",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next" + "$mod,mouse_up,workspace,r-1" + "$mod,mouse_down,workspace,r+1" + ] + ++ (builtins.concatLists ( + builtins.genList ( x: let ws = builtins.toString (x); @@ -219,9 +240,8 @@ in "$mod,${ws},workspace,${ws}" "ALT,${ws},movetoworkspace,${ws}" ] - ) - 10) - ); + ) 10 + )); bindm = [ "$mod,mouse:272,movewindow" "$mod,mouse:273,resizewindow"