diff --git a/flake.nix b/flake.nix
index ebe6f84..080cf62 100755
--- a/flake.nix
+++ b/flake.nix
@@ -31,20 +31,10 @@
outputs = inputs:
- let
- gen = import ./generator.nix { inherit inputs; };
- forEachSystem =
- inputs.nixpkgs.lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
-
+ let gen = import ./generator.nix { inherit inputs; };
in {
- devShells = forEachSystem (system:
- let
- overlays = import ./pkgs/overlay.nix { inherit pkgs; };
- overrides = { custom = import ./pkgs { inherit pkgs; }; };
- pkgs = import inputs.nixpkgs { inherit system overlays; }
- // overrides;
- in { default = import ./shells/vevsh { inherit pkgs; }; });
+ devShells = import ./shells { inherit inputs; };
nixosConfigurations = {
valinor = gen.generate {
diff --git a/modules/home/wayland/apps/dunst/default.nix b/modules/home/wayland/apps/dunst/default.nix
index 491a0ad..36fa80d 100755
--- a/modules/home/wayland/apps/dunst/default.nix
+++ b/modules/home/wayland/apps/dunst/default.nix
@@ -12,7 +12,8 @@
width = "400";
scale = "0";
origin = "top-right";
- offset = "${config.colorScheme.colors.gaps-bar}x${config.colorScheme.colors.gaps-screen}";
+ offset =
+ "${config.colorScheme.colors.gaps-bar}x${config.colorScheme.colors.gaps-screen}";
notification_limit = "0";
progress_bar = "true";
progress_bar_height = "10";
diff --git a/modules/home/wayland/apps/waybar/default.nix b/modules/home/wayland/apps/waybar/default.nix
index ae48203..309e4a0 100644
--- a/modules/home/wayland/apps/waybar/default.nix
+++ b/modules/home/wayland/apps/waybar/default.nix
@@ -1,20 +1,25 @@
-{ lib, config, pkgs, ... }:
+{ lib, config, pkgs, ... }:
let
- jsonOutput = name: { pre ? "", text ? "", tooltip ? "", alt ? "", class ? "", percentage ? "" }: "${pkgs.writeShellScriptBin "waybar-${name}" ''
- set -euo pipefail
- ${pre}
- ${pkgs.jq}/bin/jq -cn \
- --arg text "${text}" \
- --arg tooltip "${tooltip}" \
- --arg alt "${alt}" \
- --arg class "${class}" \
- --arg percentage "${percentage}" \
- '{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}'
- ''}/bin/waybar-${name}";
+ jsonOutput = name:
+ { pre ? "", text ? "", tooltip ? "", alt ? "", class ? "", percentage ? ""
+ }:
+ "${
+ pkgs.writeShellScriptBin "waybar-${name}" ''
+ set -euo pipefail
+ ${pre}
+ ${pkgs.jq}/bin/jq -cn \
+ --arg text "${text}" \
+ --arg tooltip "${tooltip}" \
+ --arg alt "${alt}" \
+ --arg class "${class}" \
+ --arg percentage "${percentage}" \
+ '{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}'
+ ''
+ }/bin/waybar-${name}";
in {
config = lib.mkIf (config.homecfg.wm == "Wayland") {
- home.packages = [pkgs.custom.amdgpu_top pkgs.jq];
+ home.packages = [ pkgs.custom.amdgpu_top pkgs.jq ];
programs.waybar = {
enable = true;
@@ -105,11 +110,8 @@ in {
settings = [{
"layer" = "top";
"position" = "right";
- modules-left = [
- "hyprland/workspaces"
- ];
- modules-center = [
- ];
+ modules-left = [ "hyprland/workspaces" ];
+ modules-center = [ ];
modules-right = [
"pulseaudio"
"backlight"
@@ -133,21 +135,21 @@ in {
"focused" = "";
};
"persistent-workspaces" = {
- "1" = [];
- "2" = [];
- "3" = [];
- "4" = [];
- "5" = [];
- "6" = [];
- "7" = [];
- "8" = [];
- "9" = [];
- "10" = [];
+ "1" = [ ];
+ "2" = [ ];
+ "3" = [ ];
+ "4" = [ ];
+ "5" = [ ];
+ "6" = [ ];
+ "7" = [ ];
+ "8" = [ ];
+ "9" = [ ];
+ "10" = [ ];
};
"on-scroll-up" = "hyprctl dispatch workspace r-1";
"on-scroll-down" = "hyprctl dispatch workspace r+1";
};
-
+
"backlight" = {
"device" = "amd_backlight";
"on-scroll-up" = "light -A 5";
@@ -163,7 +165,8 @@ in {
"on-click" = "amixer -D pulse sset Master toggle -q";
};
"battery" = {
- "interval" = 30; "states" = {
+ "interval" = 30;
+ "states" = {
"warning" = 20;
"critical" = 10;
};
@@ -174,32 +177,41 @@ in {
};
"clock" = {
"interval" = 30;
- "format" = "{:%H\n%M}";
- "tooltip-format" = "{:%d/%m/%Y}\n{calendar}";
- "calendar" = {
- "months"= "";
- };
+ "format" = ''
+ {:%H
+ %M}'';
+ "tooltip-format" = ''
+ {:%d/%m/%Y}
+ {calendar}'';
+ "calendar" = { "months" = ""; };
};
"memory" = {
"interval" = 5;
- "format" = "\n{icon}";
- "format-icons" = [ "" "" "" "" "" "" "" "" "" ];
+ "format" = ''
+
+ {icon}'';
+ "format-icons" = [ "" "" "" "" "" "" "" "" "" ];
"states" = { "warning" = 85; };
};
"cpu" = {
"interval" = 1;
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
- "format" = "\n{icon}";
+ "format" = ''
+
+ {icon}'';
};
"custom/gpu" = {
- "exec" = jsonOutput "gpu" {
- tooltip = ''...'';
- percentage = ''$(amdgpu_top -J -n 1 | jq -r '.devices[0].GRBM2."Command Processor - Graphics".value')'';
+ "exec" = jsonOutput "gpu" {
+ tooltip = "...";
+ percentage = ''
+ $(amdgpu_top -J -n 1 | jq -r '.devices[0].GRBM2."Command Processor - Graphics".value')'';
};
"return-type" = "json";
"interval" = 5;
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
- "format" = "\n{icon}";
+ "format" = ''
+
+ {icon}'';
};
"network" = {
"format-disconnected" = "";
diff --git a/modules/shared/colors/default.nix b/modules/shared/colors/default.nix
index 10d764b..e250165 100755
--- a/modules/shared/colors/default.nix
+++ b/modules/shared/colors/default.nix
@@ -1,9 +1,9 @@
-{ config, ... }: {
- imports = [ ./sorahiro_soft.nix ];
+{ config, ... }: {
+ imports = [ ./sorahiro_soft.nix ];
- colorScheme.colors.border-radius = "#8";
- colorScheme.colors.border-width = "#2";
- colorScheme.colors.gaps-screen = "#8";
- colorScheme.colors.gaps-window = "#4";
- colorScheme.colors.gaps-bar = "#32";
+ colorScheme.colors.border-radius = "#8";
+ colorScheme.colors.border-width = "#2";
+ colorScheme.colors.gaps-screen = "#8";
+ colorScheme.colors.gaps-window = "#4";
+ colorScheme.colors.gaps-bar = "#32";
}
diff --git a/packages/amdgpu_top/default.nix b/packages/amdgpu_top/default.nix
index bad9664..cb15156 100644
--- a/packages/amdgpu_top/default.nix
+++ b/packages/amdgpu_top/default.nix
@@ -1,16 +1,5 @@
-{ lib
-, rustPlatform
-, fetchFromGitHub
-, libdrm
-, libX11
-, libGL
-, wayland
-, wayland-protocols
-, libxkbcommon
-, libXrandr
-, libXi
-, libXcursor
-}:
+{ lib, rustPlatform, fetchFromGitHub, libdrm, libX11, libGL, wayland
+, wayland-protocols, libxkbcommon, libXrandr, libXi, libXcursor }:
rustPlatform.buildRustPackage rec {
pname = "amdgpu_top";
@@ -25,7 +14,8 @@ rustPlatform.buildRustPackage rec {
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
- "libdrm_amdgpu_sys-0.2.2" = "sha256-2QXT/6octEzokW8+0mHx02R8qQ3kCBDxZT4yyfDkM5A=";
+ "libdrm_amdgpu_sys-0.2.2" =
+ "sha256-2QXT/6octEzokW8+0mHx02R8qQ3kCBDxZT4yyfDkM5A=";
};
};
@@ -57,4 +47,4 @@ rustPlatform.buildRustPackage rec {
maintainers = with maintainers; [ geri1701 ];
platforms = platforms.linux;
};
-}
\ No newline at end of file
+}
diff --git a/shells/default.nix b/shells/default.nix
new file mode 100644
index 0000000..8638cb6
--- /dev/null
+++ b/shells/default.nix
@@ -0,0 +1,15 @@
+{ ... }:
+let
+ forEachSystem =
+ inputs.nixpkgs.lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
+in
+ forEachSystem (system:
+ let
+ overlays = import ./pkgs/overlay.nix { inherit pkgs; };
+ overrides = { custom = import ./pkgs { inherit pkgs; }; };
+ pkgs = import inputs.nixpkgs { inherit system overlays; } // overrides;
+ in {
+ default = import ./shells/devsh { inherit pkgs; };
+ devsh = import ./shells/devsh { inherit pkgs; };
+ }
+ )