mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
grafana
This commit is contained in:
parent
f5323fb47d
commit
782298e561
17
flake.lock
17
flake.lock
|
|
@ -258,6 +258,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1708831307,
|
||||||
|
"narHash": "sha256-0iL/DuGjiUeck1zEaL+aIe2WvA3/cVhp/SlmTcOZXH4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5bf1cadb72ab4e77cb0b700dab76bcdaf88f706b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-23.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708807242,
|
"lastModified": 1708807242,
|
||||||
|
|
@ -313,6 +329,7 @@
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"home-manager-unstable": "home-manager-unstable",
|
"home-manager-unstable": "home-manager-unstable",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"telegram-desktop-patched": "telegram-desktop-patched",
|
"telegram-desktop-patched": "telegram-desktop-patched",
|
||||||
"telegram-desktop-patched-unstable": "telegram-desktop-patched-unstable"
|
"telegram-desktop-patched-unstable": "telegram-desktop-patched-unstable"
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@
|
||||||
(callPackage ../derivations/spotify.nix { })
|
(callPackage ../derivations/spotify.nix { })
|
||||||
xorg.xwininfo
|
xorg.xwininfo
|
||||||
]) ++ (with unstable; [
|
]) ++ (with unstable; [
|
||||||
rustdesk-flutter
|
|
||||||
xfce.thunar
|
xfce.thunar
|
||||||
|
rustdesk-flutter
|
||||||
nixfmt
|
nixfmt
|
||||||
btop
|
btop
|
||||||
htop
|
htop
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [ waybar swww ];
|
home.packages = with pkgs; [ waybar swww hyprland-share-picker ];
|
||||||
|
|
||||||
#test later systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
#test later systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
|
|
@ -321,7 +321,7 @@
|
||||||
bind = $mainMod, F4, killactive, # close the active window
|
bind = $mainMod, F4, killactive, # close the active window
|
||||||
bind = $mainMod, TAB, killactive, # close the active window
|
bind = $mainMod, TAB, killactive, # close the active window
|
||||||
bind = $mainMod SHIFT, TAB, killactive, # close the active window
|
bind = $mainMod SHIFT, TAB, killactive, # close the active window
|
||||||
bind = $mainMod, Escape, exec, /home/delta/scripts/swaylock # Lock the screen
|
bind = $mainMod, Escape, exec, ~/scripts/swaylock # Lock the screen
|
||||||
bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window
|
bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window
|
||||||
bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland)
|
bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland)
|
||||||
bind = $mainMod, E, exec, thunar # Show the graphical file browser
|
bind = $mainMod, E, exec, thunar # Show the graphical file browser
|
||||||
|
|
@ -496,4 +496,51 @@
|
||||||
$color14 = rgba(9CB4E3ee)
|
$color14 = rgba(9CB4E3ee)
|
||||||
$color15 = rgba(c3dde7ee)
|
$color15 = rgba(c3dde7ee)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
home.file.".config/hypr/changeLayout.sh".text = ''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g')
|
||||||
|
|
||||||
|
case $LAYOUT in
|
||||||
|
"master")
|
||||||
|
hyprctl keyword general:layout dwindle
|
||||||
|
#hyprctl keyword unbind SUPER,J
|
||||||
|
#hyprctl keyword unbind SUPER,K
|
||||||
|
## hyprctl keyword unbind SUPER,I
|
||||||
|
## hyprctl keyword unbind SUPER,D
|
||||||
|
#hyprctl keyword unbind SUPERSHIFT,Return
|
||||||
|
#hyprctl keyword unbind SUPERSHIFT,period
|
||||||
|
#hyprctl keyword unbind SUPERSHIFT,comma
|
||||||
|
#hyprctl keyword unbind SUPERCTRL,Return
|
||||||
|
#hyprctl keyword bind SUPER,J,cyclenext
|
||||||
|
#hyprctl keyword bind SUPER,K,cyclenext,prev
|
||||||
|
#hyprctl keyword bind SUPER,O,togglesplit
|
||||||
|
#hyprctl keyword bind SUPER,P,pseudo
|
||||||
|
#hyprctl keyword bind SUPERSHIFT,P,exec,hyprctl dispatch workspaceopt allpseudo
|
||||||
|
notify-send -i "/home/delta/.config/hypr/hyprland.png" "Layout" "Dwindle"
|
||||||
|
;;
|
||||||
|
"dwindle")
|
||||||
|
hyprctl keyword general:layout master
|
||||||
|
#hyprctl keyword unbind SUPER,J
|
||||||
|
#hyprctl keyword unbind SUPER,K
|
||||||
|
#hyprctl keyword unbind SUPER,O
|
||||||
|
#hyprctl keyword unbind SUPER,P
|
||||||
|
#hyprctl keyword unbind SUPERSHIFT,P
|
||||||
|
#hyprctl keyword bind SUPER,J,layoutmsg,rollnext
|
||||||
|
#hyprctl keyword bind SUPER,K,layoutmsg,rollprev
|
||||||
|
## hyprctl keyword bind SUPER,I,layoutmsg,addmaster
|
||||||
|
## hyprctl keyword bind SUPER,D,layoutmsg,removemaster
|
||||||
|
#hyprctl keyword bind SUPERSHIFT,Return,layoutmsg,swapwithmaster
|
||||||
|
#hyprctl keyword bind SUPERSHIFT,period,layoutmsg,orientationnext
|
||||||
|
#hyprctl keyword bind SUPERSHIFT,comma,layoutmsg,orientationprev
|
||||||
|
#hyprctl keyword bind SUPERCTRL,Return,layoutmsg,focusmaster
|
||||||
|
notify-send -i "/home/delta/.config/hypr/hyprland.png" "Layout" "Master"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.file.".config/hypr/"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
56
home/programs/hypr/files/env_var.conf
Normal file
56
home/programs/hypr/files/env_var.conf
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Environment Variables
|
||||||
|
# see https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||||
|
|
||||||
|
#env = BROWSER,chromium
|
||||||
|
env = TERMINAL,footclient
|
||||||
|
#env = LC_TIME,ru_RU.UTF-8
|
||||||
|
|
||||||
|
# Theming Related Variables
|
||||||
|
# Set cursor size. See FAQ below for why you might want this variable set.
|
||||||
|
# https://wiki.hyprland.org/FAQ/
|
||||||
|
#env = XCURSOR_SIZE,24
|
||||||
|
|
||||||
|
# Set a GTK theme manually, for those who want to avoid appearance tools such as lxappearance or nwg-look
|
||||||
|
#env = GTK_THEME,
|
||||||
|
|
||||||
|
# Set your cursor theme. The theme needs to be installed and readable by your user.
|
||||||
|
#env = XCURSOR_THEME,
|
||||||
|
|
||||||
|
# the line below may help with multiple monitors
|
||||||
|
#env = WLR_EGL_NO_MODIFIERS,1
|
||||||
|
|
||||||
|
#XDG Specifications
|
||||||
|
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||||
|
env = XDG_SESSION_TYPE,wayland
|
||||||
|
env = XDG_SESSION_DESKTOP,Hyprland
|
||||||
|
|
||||||
|
# Toolkit Backend Variables
|
||||||
|
|
||||||
|
# GTK: Use wayland if available, fall back to x11 if not.
|
||||||
|
#env = GDK_BACKEND,wayland,x11
|
||||||
|
|
||||||
|
# QT: Use wayland if available, fall back to x11 if not.
|
||||||
|
#env = QT_QPA_PLATFORM,wayland,xcb
|
||||||
|
|
||||||
|
# Run SDL2 applications on Wayland. Remove or set to x11 if games that
|
||||||
|
# provide older versions of SDL cause compatibility issues
|
||||||
|
env = SDL_VIDEODRIVER,wayland
|
||||||
|
|
||||||
|
# Clutter package already has wayland enabled, this variable
|
||||||
|
#will force Clutter applications to try and use the Wayland backend
|
||||||
|
env = CLUTTER_BACKEND,wayland
|
||||||
|
|
||||||
|
# QT Variables
|
||||||
|
|
||||||
|
# (From the QT documentation) enables automatic scaling, based on the monitor’s pixel density
|
||||||
|
# https://doc.qt.io/qt-5/highdpi.html
|
||||||
|
#env = QT_AUTO_SCREEN_SCALE_FACTOR,1
|
||||||
|
|
||||||
|
# Tell QT applications to use the Wayland backend, and fall back to x11 if Wayland is unavailable
|
||||||
|
#env = QT_QPA_PLATFORM,wayland,xcb
|
||||||
|
|
||||||
|
# Disables window decorations on QT applications
|
||||||
|
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||||
|
|
||||||
|
#Tells QT based applications to pick your theme from qt5ct, use with Kvantum.
|
||||||
|
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||||
29
home/programs/hypr/files/env_var_nvidia.conf
Normal file
29
home/programs/hypr/files/env_var_nvidia.conf
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Environment Variables NVIDIA Specific
|
||||||
|
# See the wiki for more info as some work is required
|
||||||
|
# https://wiki.hyprland.org/hyprland-wiki/pages/Nvidia/
|
||||||
|
env = WLR_NO_HARDWARE_CURSORS,1
|
||||||
|
|
||||||
|
# Hardware acceleration on NVIDIA GPUs
|
||||||
|
# See Archwiki Hardware Acecleration Page for details and necessary values before setting this variable.
|
||||||
|
# https://wiki.archlinux.org/title/Hardware_video_acceleration
|
||||||
|
env = LIBVA_DRIVER_NAME,nvidia
|
||||||
|
|
||||||
|
# The lines below may cause issues, proceed at your own risk
|
||||||
|
|
||||||
|
# To force GBM as a backend, set the following environment variables:
|
||||||
|
# See Archwiki Wayland Page for more details on those variables.
|
||||||
|
# https://wiki.archlinux.org/title/Wayland#Requirements
|
||||||
|
#env = GBM_BACKEND,nvidia-drm
|
||||||
|
#env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||||
|
|
||||||
|
|
||||||
|
# Controls if G-Sync capable monitors should use Variable Refresh Rate (VRR)
|
||||||
|
# See Nvidia Documentation for details.
|
||||||
|
# https://download.nvidia.com/XFree86/Linux-32bit-ARM/375.26/README/openglenvvariables.html
|
||||||
|
#env = __GL_GSYNC_ALLOWED,
|
||||||
|
|
||||||
|
# Controls if Adaptive Sync should be used. Recommended to set as “0” to avoid having problems on some games.
|
||||||
|
#env = __GL_VRR_ALLOWED,
|
||||||
|
|
||||||
|
# use legacy DRM interface instead of atomic mode setting. Might fix flickering issues.
|
||||||
|
#env = WLR_DRM_NO_ATOMIC,1
|
||||||
14
home/programs/hypr/files/gamemode.sh
Executable file
14
home/programs/hypr/files/gamemode.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==2{print $2}')
|
||||||
|
if [ "$HYPRGAMEMODE" = 1 ] ; then
|
||||||
|
hyprctl --batch "\
|
||||||
|
keyword animations:enabled 0;\
|
||||||
|
keyword decoration:drop_shadow 0;\
|
||||||
|
keyword decoration:blur:enabled 0;\
|
||||||
|
keyword general:gaps_in 0;\
|
||||||
|
keyword general:gaps_out 0;\
|
||||||
|
keyword general:border_size 1;\
|
||||||
|
keyword decoration:rounding 0"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
hyprctl reload
|
||||||
16
home/programs/hypr/files/gapsmode.sh
Executable file
16
home/programs/hypr/files/gapsmode.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
HYPRGAPSMODE=$(hyprctl getoption general:gaps_in | awk 'NR==2{print$2}')
|
||||||
|
|
||||||
|
# Check if the environment variable exists and has a value
|
||||||
|
if [ "$HYPRGAPSMODE" != "0" ]; then
|
||||||
|
hyprctl --batch "\
|
||||||
|
keyword general:gaps_in 0;\
|
||||||
|
keyword general:gaps_out 0;"
|
||||||
|
else
|
||||||
|
hyprctl --batch "\
|
||||||
|
keyword general:gaps_in 10;\
|
||||||
|
keyword general:gaps_out 3;"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit
|
||||||
|
|
||||||
BIN
home/programs/hypr/files/hyprland.png
Normal file
BIN
home/programs/hypr/files/hyprland.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
18
home/programs/hypr/files/media-binds.conf
Normal file
18
home/programs/hypr/files/media-binds.conf
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
$SCRIPT = ~/.config/HyprV/waybar/scripts
|
||||||
|
|
||||||
|
bind = , xf86audioraisevolume, exec, $SCRIPT/volume --inc
|
||||||
|
bind = , xf86audiolowervolume, exec, $SCRIPT/volume --dec
|
||||||
|
bind = , xf86AudioMicMute, exec, $SCRIPT/volume --toggle-mic
|
||||||
|
bind = , xf86audioMute, exec, $SCRIPT/volume --toggle
|
||||||
|
|
||||||
|
#bind = , XF86PowerOff, exec, swaynag -m 'Shutdown?' -Z 'No' '' -b 'Yes' 'systemctl poweroff'
|
||||||
|
|
||||||
|
bind = , xf86KbdBrightnessDown, exec, $SCRIPT/kb-brightness --dec
|
||||||
|
bind = , xf86KbdBrightnessUp, exec, $SCRIPT/kb-brightness --inc
|
||||||
|
|
||||||
|
bind = , xf86MonBrightnessDown, exec, $SCRIPT/brightness --dec
|
||||||
|
bind = , xf86MonBrightnessUp, exec, $SCRIPT/brightness --inc
|
||||||
|
|
||||||
|
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||||
|
bind = , XF86AudioNext, exec, playerctl next
|
||||||
|
bind = , XF86AudioPrev, exec, playerctl previous
|
||||||
4
home/programs/hypr/files/monitors.conf
Normal file
4
home/programs/hypr/files/monitors.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Generated by nwg-displays on 2023-12-04 at 09:21:01. Do not edit manually.
|
||||||
|
|
||||||
|
monitor=eDP-1,1920x1200@59.999001,1920x0,1.0
|
||||||
|
monitor=HDMI-A-1,1920x1080@60.0,3840x0,1.0
|
||||||
5
home/programs/hypr/files/pyprland.json.bak
Normal file
5
home/programs/hypr/files/pyprland.json.bak
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"pyprland": {
|
||||||
|
"plugins": ["shift_monitors"]
|
||||||
|
}
|
||||||
|
}
|
||||||
5
home/programs/hypr/files/pyprland.toml
Normal file
5
home/programs/hypr/files/pyprland.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[pyprland]
|
||||||
|
plugins = [
|
||||||
|
"shift_monitors",
|
||||||
|
"workspaces_follow_focus",
|
||||||
|
]
|
||||||
|
|
@ -145,6 +145,8 @@
|
||||||
thunar-volman
|
thunar-volman
|
||||||
];
|
];
|
||||||
|
|
||||||
|
xdg.ausl.extraPortals = with pkgs; [ xdg-desktop-ausl-hyprland ];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
gnome.excludePackages = [
|
gnome.excludePackages = [
|
||||||
#pkgs.gnome-connections
|
#pkgs.gnome-connections
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@
|
||||||
thunar-volman
|
thunar-volman
|
||||||
];
|
];
|
||||||
|
|
||||||
|
xdg.ausl.extraPortals = with pkgs; [ xdg-desktop-ausl-hyprland ];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/nvme0n1";
|
boot.loader.grub.device = "/dev/nvme0n1";
|
||||||
boot.loader.grub.useOSProber = true;
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,41 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.grafanavpn = {
|
||||||
|
enable = true;
|
||||||
|
description = "grafana vpn";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "15";
|
||||||
|
};
|
||||||
|
script = "/home/delta/scripts/vpn-connect-WB";
|
||||||
|
path = with pkgs; [
|
||||||
|
expect
|
||||||
|
oath-toolkit
|
||||||
|
openconnect
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.enable = true;
|
||||||
|
services.nginx.virtualHosts."grafana_first" = {
|
||||||
|
forceSSL = false;
|
||||||
|
listen = [{port = 1000; addr="0.0.0.0"; ssl=false;}];
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_pass http://123.123.123.123:3000;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
services.nginx.virtualHosts."grafana_second" = {
|
||||||
|
forceSSL = false;
|
||||||
|
listen = [{port = 1001; addr="0.0.0.0"; ssl=false;}];
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_pass http://123.123.123.123:3000;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue