refactor(treewide): format with alejandra

This commit is contained in:
ooks-io 2024-07-29 15:00:38 +12:00
parent 7fefb94400
commit 61cef505da
216 changed files with 5995 additions and 3969 deletions

View file

@ -1,9 +1,13 @@
{ inputs, lib, config, pkgs, ... }:
let
{
inputs,
lib,
config,
pkgs,
...
}: let
wayland = config.ooknet.wayland;
inherit (lib) mkIf;
in
{
in {
imports = [
inputs.hyprland.homeManagerModules.default
./settings
@ -13,8 +17,8 @@ in
config = mkIf (wayland.compositor == "hyprland") {
home.packages = [
pkgs.hyprpicker
];
];
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;

View file

@ -1,17 +1,18 @@
{ lib, config, pkgs, inputs, ... }:
let
{
lib,
config,
pkgs,
inputs,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
home.packages = with inputs; [
# Screenshot tool
# Screenshot tool
hyprland-contrib.packages.${pkgs.system}.grimblast
# Screen recording tool
# Screen recording tool
ooks-scripts.packages.${pkgs.system}.hyprrecord
];

View file

@ -1,13 +1,14 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
home.packages = [ pkgs.hyprshade ];
home.packages = [pkgs.hyprshade];
# TODO: implement hyprshade configuration
};
}

View file

@ -1,13 +1,13 @@
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
wayland = config.ooknet.wayland;
pointer = config.home.pointerCursor;
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland = {
settings = {
@ -20,14 +20,13 @@ in
border_size = 2;
"col.active_border" = "0xff${palette.base05}";
"col.inactive_border" = "0xff${palette.base02}";
};
};
exec-once = [
"hyprctl setcursor ${pointer.name} ${toString pointer.size}"
];
decoration = {
active_opacity = 1.0;
inactive_opacity = 1.0;
fullscreen_opacity = 1.0;
@ -45,7 +44,7 @@ in
"col.shadow" = "0x44000000";
"col.shadow_inactive" = "0x66000000";
};
animations = {
enabled = false;
};

View file

@ -1,12 +1,12 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
binds = config.ooknet.binds;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
bind = [
@ -38,7 +38,7 @@ in
",XF86AudioRaiseVolume, exec, ${binds.volume.up}"
",XF86AudioLowerVolume, exec, ${binds.volume.down}"
",XF86AudioMute, exec, ${binds.volume.mute}"
# Window Management
"SUPER, Q, killactive"
"SUPER CTRL, backspace, killactive"
@ -97,7 +97,7 @@ in
# Lock Screen
"SUPER, Backspace, exec, ${binds.lock}"
];
# Mouse
# Mouse
bindm = [
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"

View file

@ -1,17 +1,15 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.env = [
"XDG_SESSION_DESKTOP,hyprland"
"XDG_CURRENT_DESKTOP,hyprland"
];
];
};
}

View file

@ -1,11 +1,12 @@
{ config, lib, pkgs, ... }:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
exec = [

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.gestures = {
workspace_swipe = true;

View file

@ -1,12 +1,12 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
wallpaperPath = config.ooknet.wallpaper.path;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
services.hyprpaper = {
enable = true;

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.input = {
kb_layout = "us";
@ -14,5 +14,4 @@ in
mouse_refocus = false;
};
};
}

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.misc = {
mouse_move_enables_dpms = true;
@ -19,4 +19,4 @@ in
focus_on_activate = true;
};
};
}
}

View file

@ -1,22 +1,34 @@
{ lib, config, osConfig, ... }:
let
{
lib,
config,
osConfig,
...
}: let
inherit (lib) mkIf concatMap;
wayland = config.ooknet.wayland;
monitors = osConfig.ooknet.host.hardware.monitors;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
monitor = concatMap (m: let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
basicConfig = "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}";
in
[ basicConfig ] ++ (if m.transform != 0 then ["${m.name},transform,${toString m.transform}"] else [])
) (monitors);
monitor =
concatMap (
m: let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
basicConfig = "${m.name},${
if m.enabled
then "${resolution},${position},1"
else "disable"
}";
in
[basicConfig]
++ (
if m.transform != 0
then ["${m.name},transform,${toString m.transform}"]
else []
)
)
monitors;
};
};
}

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
windowrulev2 = [
@ -26,7 +26,7 @@ in
"stayfocused,title:^(BTOP)$"
# Tearing
"immediate, title:^(TEKKEN8)$"
"immediate, title:^(TEKKEN8)$"
];
};
};