update + dashdot container + config
This commit is contained in:
parent
87d702f4c3
commit
0131e993d8
15 changed files with 193 additions and 152 deletions
44
flake.lock
44
flake.lock
|
@ -10,11 +10,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722825873,
|
"lastModified": 1729444465,
|
||||||
"narHash": "sha256-bFNXkD+s9NuidZePiJAjjFUnsMOwXb7hEZ4JEDdSALw=",
|
"narHash": "sha256-+lCi3cQlFNGAGKaVeUNhTeR40zvMy9JX4hp1JA0dLwE=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "arion",
|
"repo": "arion",
|
||||||
"rev": "90bc85532767c785245f5c1e29ebfecb941cf8c9",
|
"rev": "94d092fffd5cfd4f09b8988aca1b857a9d37c4d6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -28,11 +28,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729099656,
|
"lastModified": 1729588208,
|
||||||
"narHash": "sha256-VftVIg7UXTy1bq+tzi1aVYOWl7PQ35IpjW88yMYjjpc=",
|
"narHash": "sha256-PNONdMd+sG7JWzNIDerX7oVZXL8FTVlSAZ1BmUo2HjE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "d7d57edb72e54891fa67a6f058a46b2bb405663b",
|
"rev": "4be2aadf13b67ffbb993deb73adff77c46b728fc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
"dotfiles": {
|
"dotfiles": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729009831,
|
"lastModified": 1729772180,
|
||||||
"narHash": "sha256-fSN4HZWxIH8n6UPoDDwn4CVA/lw7gQzBmLA2CM0Bx70=",
|
"narHash": "sha256-vDLn6/3DxyWFUKdrijmsaW4cuJhjRWCkSA8QlLzW1No=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "262d5fae27ddb7129a845dc0bb90e93c02407805",
|
"rev": "8240f7d218f9a93aca818e770da838bc9f628a98",
|
||||||
"revCount": 30,
|
"revCount": 31,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nomadics9/dotfiles.git"
|
"url": "https://github.com/nomadics9/dotfiles.git"
|
||||||
},
|
},
|
||||||
|
@ -144,11 +144,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729165983,
|
"lastModified": 1729551526,
|
||||||
"narHash": "sha256-gtcodl79t5ZbbX4TSx4RNyggasEvLdVnc/IM+RyxqJw=",
|
"narHash": "sha256-7LAGY32Xl14OVQp3y6M43/0AtHYYvV6pdyBcp3eoz0s=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "78a7a070bbcc3b37cc36080c2a3514207d427b3b",
|
"rev": "5ec753a1fc4454df9285d8b3ec0809234defb975",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -191,11 +191,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728156290,
|
"lastModified": 1729357638,
|
||||||
"narHash": "sha256-uogSvuAp+1BYtdu6UWuObjHqSbBohpyARXDWqgI12Ss=",
|
"narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "17ae88b569bb15590549ff478bab6494dde4a907",
|
"rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -207,11 +207,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728888510,
|
"lastModified": 1729413321,
|
||||||
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
|
"narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
|
"rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -240,11 +240,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728345710,
|
"lastModified": 1729587807,
|
||||||
"narHash": "sha256-lpunY1+bf90ts+sA2/FgxVNIegPDKCpEoWwOPu4ITTQ=",
|
"narHash": "sha256-YOc4033a/j1TbdLfkaSOSX2SrvlmuM+enIFoveNTCz4=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "06535d0e3d0201e6a8080dd32dbfde339b94f01b",
|
"rev": "26642e8f193f547e72d38cd4c0c4e45b49236d27",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
];
|
];
|
||||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
user = "nomad";
|
user = "nomad";
|
||||||
hostname = "vps";
|
hostname = "unkown";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages =
|
packages =
|
||||||
|
|
|
@ -27,13 +27,14 @@ in
|
||||||
"syncthing"
|
"syncthing"
|
||||||
"sleep 3; qsyncthingtray"
|
"sleep 3; qsyncthingtray"
|
||||||
"kdeconnect-indicator"
|
"kdeconnect-indicator"
|
||||||
"kdeconnectd"
|
#"kdeconnectd"
|
||||||
"dbus-update-actvation-environment --systemd --all WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
"dbus-update-actvation-environment --systemd --all WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DBUS_SESSION_BUS_ADDRESS"
|
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DBUS_SESSION_BUS_ADDRESS"
|
||||||
];
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
"XCURSOR_SIZE,24"
|
"XCURSOR_SIZE,24"
|
||||||
|
"NIXOS_OZONE_WL,1"
|
||||||
"GTK_THEME,Nightfox-Dark"
|
"GTK_THEME,Nightfox-Dark"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -41,15 +42,17 @@ in
|
||||||
kb_layout = "us,ara";
|
kb_layout = "us,ara";
|
||||||
kb_options = "grp:alt_shift_toggle";
|
kb_options = "grp:alt_shift_toggle";
|
||||||
kb_variant = "qwerty_digits";
|
kb_variant = "qwerty_digits";
|
||||||
kb_model = "";
|
#kb_model = "pc105";
|
||||||
kb_rules = "";
|
#kb_rules = "evdev";
|
||||||
follow_mouse = 1;
|
follow_mouse = 1;
|
||||||
|
|
||||||
touchpad = {
|
touchpad = {
|
||||||
natural_scroll = true;
|
natural_scroll = true;
|
||||||
|
disable_while_typing = 1;
|
||||||
|
tap-to-click = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
sensitivity = 0;
|
sensitivity = 0.1;
|
||||||
};
|
};
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
|
@ -103,6 +106,10 @@ in
|
||||||
workspace_swipe_min_speed_to_force = 5;
|
workspace_swipe_min_speed_to_force = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
vfr = true;
|
||||||
|
};
|
||||||
|
|
||||||
windowrule = [
|
windowrule = [
|
||||||
"float, file_progress"
|
"float, file_progress"
|
||||||
"float, confirm"
|
"float, confirm"
|
||||||
|
@ -112,7 +119,7 @@ in
|
||||||
"float, error"
|
"float, error"
|
||||||
"float, splash"
|
"float, splash"
|
||||||
"float, confirmreset"
|
"float, confirmreset"
|
||||||
"float, title:Open File"
|
"float, title:Open File" # decrease screen brightness
|
||||||
"float, title:branchdialog"
|
"float, title:branchdialog"
|
||||||
"float, Lxappearance"
|
"float, Lxappearance"
|
||||||
"float, Wofi"
|
"float, Wofi"
|
||||||
|
@ -234,14 +241,11 @@ in
|
||||||
"$mainMod, right, resizeactive, 40 0"
|
"$mainMod, right, resizeactive, 40 0"
|
||||||
"$mainMod, up, resizeactive, 0 -40"
|
"$mainMod, up, resizeactive, 0 -40"
|
||||||
"$mainMod, down, resizeactive, 0 40"
|
"$mainMod, down, resizeactive, 0 40"
|
||||||
#"XF86AudioMute , exec, $HOME/.config/hypr/scripts/volume mute"
|
", XF86AudioMute, exec, $HOME/.config/hypr/scripts/volume mute"
|
||||||
# "XF86AudioLowerVolume, exec, \"$HOME/.config/hypr/scripts/volume down\""
|
", XF86AudioLowerVolume, exec, $HOME/.config/hypr/scripts/volume down"
|
||||||
# "XF86AudioRaiseVolume, exec, sh -c \"$HOME/.config/hypr/scripts/volume up\""
|
", XF86AudioRaiseVolume, exec, $HOME/.config/hypr/scripts/volume up"
|
||||||
# "XF86AudioMicMute, exec, \"pactl set-source-mute @DEFAULT_SOURCE@ toggle\""
|
", XF86MonBrightnessUp, exec, $HOME/.config/hypr/scripts/brightness up"
|
||||||
#
|
", XF86MonBrightnessDown, exec, $HOME/.config/hypr/scripts/brightness down"
|
||||||
# "XF86MonBrightnessUp, exec, \"$HOME/hypr/scripts/brightness up\"" # increase screen brightness
|
|
||||||
# "XF86MonBrightnessDown, exec, \"$HOME/.config/hypr/scripts/brightness down\"" # decrease screen brightness
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ in
|
||||||
mainBar = {
|
mainBar = {
|
||||||
height = 20;
|
height = 20;
|
||||||
layer = "top";
|
layer = "top";
|
||||||
modules-left = [ "custom/launcher" "cpu" "memory" "custom/weather" "hyprland/workspaces" ];
|
modules-left = [ "custom/launcher" "custom/wg" "cpu" "memory" "custom/weather" "hyprland/workspaces" ];
|
||||||
modules-center = [ "mpris" ];
|
modules-center = [ "mpris" ];
|
||||||
modules-right = [ "network" "pulseaudio" "backlight" "battery" "clock" "tray" "hyprland/language" "custom/wallpaper" "idle_inhibitor" "custom/refresh-rate" ];
|
modules-right = [ "network" "pulseaudio" "backlight" "battery" "clock" "tray" "hyprland/language" "custom/wallpaper" "idle_inhibitor" "custom/refresh-rate" ];
|
||||||
|
|
||||||
|
@ -98,6 +98,13 @@ in
|
||||||
format-icons = [ "" "" "" "" "" ];
|
format-icons = [ "" "" "" "" "" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"custom/wg" = {
|
||||||
|
exec = "~/.config/hypr/scripts/wg-status.sh";
|
||||||
|
interval = 5;
|
||||||
|
format = "{}";
|
||||||
|
on-click = "~/.config/hypr/scripts/wg-toggle.sh";
|
||||||
|
};
|
||||||
|
|
||||||
"bluetooth" = {
|
"bluetooth" = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
format-alt = "bluetooth: {status}";
|
format-alt = "bluetooth: {status}";
|
||||||
|
@ -230,6 +237,7 @@ in
|
||||||
#custom-launcher,
|
#custom-launcher,
|
||||||
#custom-spotify,
|
#custom-spotify,
|
||||||
#custom-weather,
|
#custom-weather,
|
||||||
|
#custom-wg,
|
||||||
#custom-weather.severe,
|
#custom-weather.severe,
|
||||||
#custom-weather.sunnyDay,
|
#custom-weather.sunnyDay,
|
||||||
#custom-weather.clearNight,
|
#custom-weather.clearNight,
|
||||||
|
|
|
@ -10,15 +10,17 @@ in
|
||||||
options.features.themes.qt.enable = mkEnableOption "qt theme";
|
options.features.themes.qt.enable = mkEnableOption "qt theme";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
qt = {
|
||||||
qt.enable = true;
|
enable = true;
|
||||||
qt.platformTheme.name = "adwaita";
|
platformTheme.name = "adwaita";
|
||||||
qt.style = {
|
style = {
|
||||||
name = "adwaita-dark";
|
name = "Adwaita-dark";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs;
|
||||||
adwaita-qt6
|
[
|
||||||
];
|
adwaita-qt6
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,16 +30,23 @@
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
settings = {
|
settings = {
|
||||||
device = [
|
# device = [
|
||||||
{
|
# {
|
||||||
name = "keyboard";
|
# name = "33a6c9b0";
|
||||||
kb_layout = "us,ara";
|
# kb_layout = "us,ara";
|
||||||
}
|
# kb_variant = "qwerty_digits";
|
||||||
{
|
# kb_options = "grp:alt_shift_toggle";
|
||||||
name = "mouse";
|
# }
|
||||||
sensitivity = -0.5;
|
# {
|
||||||
}
|
# name = "338ebb50"; # xiaomi-wmi-keys
|
||||||
];
|
# kb_layout = "us";
|
||||||
|
# kb_options = ""; # Custom options if needed
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# name = "38db2b20";
|
||||||
|
# sensitivity = 0.5;
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
monitor = [
|
monitor = [
|
||||||
"eDP-1,2560x1600@60,0x0,1.25"
|
"eDP-1,2560x1600@60,0x0,1.25"
|
||||||
"DP-2,1920x1080@60,auto,1"
|
"DP-2,1920x1080@60,auto,1"
|
||||||
|
|
|
@ -115,15 +115,15 @@
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
SDL_VIDEODRIVER = "wayland";
|
SDL_VIDEODRIVER = "wayland";
|
||||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
#_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
MOZ_DRM_DEVICE = "/dev/dri/card0:/dev/dri/card1";
|
#MOZ_DRM_DEVICE = "/dev/dri/card0:/dev/dri/card1";
|
||||||
WLR_DRM_DEVICES = "/dev/dri/card0:/dev/dri/card1";
|
#WLR_DRM_DEVICES = "/dev/dri/card0:/dev/dri/card1";
|
||||||
#WLR_NO_HARDWARE_CURSORS = "1"; # if no cursor,uncomment this line
|
#WLR_NO_HARDWARE_CURSORS = "1"; # if no cursor,uncomment this line
|
||||||
#GBM_BACKEND = "nvidia-drm";
|
#GBM_BACKEND = "nvidia-drm";
|
||||||
CLUTTER_BACKEND = "wayland";
|
#CLUTTER_BACKEND = "wayland";
|
||||||
LIBVA_DRIVER_NAME = "iHD";
|
LIBVA_DRIVER_NAME = "iHD";
|
||||||
WLR_RENDERER = "vulkan";
|
#WLR_RENDERER = "vulkan";
|
||||||
VK_DRIVER_FILES = "/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json";
|
#VK_DRIVER_FILES = "/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json";
|
||||||
#__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
#__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
#__NV_PRIME_RENDER_OFFLOAD = "1";
|
#__NV_PRIME_RENDER_OFFLOAD = "1";
|
||||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
|
|
|
@ -58,8 +58,6 @@
|
||||||
NEXTCLOUD_DB = "${config.sops.placeholder.NEXTCLOUD_DB}"
|
NEXTCLOUD_DB = "${config.sops.placeholder.NEXTCLOUD_DB}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
users.users = { };
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
home-manager.users.${user} =
|
home-manager.users.${user} =
|
||||||
import ../../../home/${user}/${config.networking.hostName}.nix;
|
import ../../../home/${user}/${config.networking.hostName}.nix;
|
||||||
|
|
42
hosts/common/vps/dashdot.nix
Normal file
42
hosts/common/vps/dashdot.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
dashdotService = {
|
||||||
|
project.name = "dashdot";
|
||||||
|
services = {
|
||||||
|
dashdot = {
|
||||||
|
service = {
|
||||||
|
image = "mauricenino/dashdot:latest";
|
||||||
|
restart = "unless-stopped";
|
||||||
|
privileged = true;
|
||||||
|
ports = [
|
||||||
|
"19999:3001"
|
||||||
|
];
|
||||||
|
volumes = [
|
||||||
|
"/:/mnt/host:ro"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
DASHDOT_PAGE_TITLE = "Nomadics VPS";
|
||||||
|
DASHDOT_ALWAYS_SHOW_PERCENTAGES = "true";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.vps.dashdot.enable = mkEnableOption "Enable dashdot dashboard for VPS";
|
||||||
|
|
||||||
|
config = mkIf config.vps.dashdot.enable {
|
||||||
|
virtualisation.arion = {
|
||||||
|
backend = "docker";
|
||||||
|
projects.dashdot = {
|
||||||
|
serviceName = "dashdot";
|
||||||
|
settings = dashdotService;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
./pairdrop.nix
|
./pairdrop.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./vpn.nix
|
./vpn.nix
|
||||||
|
./dashdot.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,13 @@ let
|
||||||
service.command = [
|
service.command = [
|
||||||
"/data"
|
"/data"
|
||||||
"-a"
|
"-a"
|
||||||
"???:???@/:rw"
|
''???:???#fs@/:rw'' # till i figure out how to pass the damn env
|
||||||
"-A"
|
"-A"
|
||||||
"-a"
|
"-a"
|
||||||
"@/p"
|
"@/p"
|
||||||
];
|
];
|
||||||
service.env_file = [ "${config.sops.templates."my-env.env".path}" ];
|
service.env_file = [ "${config.sops.templates."my-env.env".path}" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,6 +54,11 @@
|
||||||
autoSuspend = true;
|
autoSuspend = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
#Network
|
#Network
|
||||||
#Define your hostname
|
#Define your hostname
|
||||||
networking.hostName = "${hostname}";
|
networking.hostName = "${hostname}";
|
||||||
|
@ -121,11 +126,6 @@
|
||||||
zsh
|
zsh
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
#Firewall
|
#Firewall
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "i915" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ in
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||||
# intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
# intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||||
# libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
# vaapiVdpau
|
vaapiVdpau
|
||||||
# mesa.drivers
|
mesa.drivers
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
pairdrop.enable = true;
|
pairdrop.enable = true;
|
||||||
syncthing.enable = true;
|
syncthing.enable = true;
|
||||||
vpn.enable = true;
|
vpn.enable = true;
|
||||||
|
dashdot.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
|
@ -38,89 +39,70 @@
|
||||||
# Configure log format using mkForce to make sure it takes effect
|
# Configure log format using mkForce to make sure it takes effect
|
||||||
logFormat = lib.mkForce ''
|
logFormat = lib.mkForce ''
|
||||||
level INFO
|
level INFO
|
||||||
output file /var/log/caddy/access.log {
|
|
||||||
roll_size 50mb
|
|
||||||
roll_keep 5
|
|
||||||
roll_keep_for 720h
|
|
||||||
}
|
|
||||||
format caddy
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Reverse proxy configuration for each domain
|
# Reverse proxy configuration for each domain
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
fs.nmd.mov {
|
(logging) {
|
||||||
reverse_proxy localhost:5000
|
log {
|
||||||
log
|
output file /var/log/caddy/{args[0]}.log {
|
||||||
}
|
roll_size 50mb
|
||||||
|
roll_keep 5
|
||||||
vpn.nmd.mov {
|
roll_keep_for 720h
|
||||||
reverse_proxy localhost:51821
|
}
|
||||||
log
|
}
|
||||||
}
|
|
||||||
|
|
||||||
s.nmd.mov {
|
|
||||||
reverse_proxy localhost:8384
|
|
||||||
log
|
|
||||||
}
|
|
||||||
|
|
||||||
drop.nmd.mov {
|
|
||||||
reverse_proxy localhost:3000
|
|
||||||
log
|
|
||||||
}
|
|
||||||
|
|
||||||
dot.nmd.mov {
|
|
||||||
reverse_proxy localhost:19999
|
|
||||||
|
|
||||||
basic_auth /* {
|
|
||||||
nomad $2a$12$toBh5sfXyxigtHGNY4t8tO7YYQp6i3aZk/O0qd19lgk0LRz5eqDVi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
nmd.mov {
|
|
||||||
root * /var/www/goaccess
|
|
||||||
|
|
||||||
file_server
|
|
||||||
|
|
||||||
reverse_proxy /ws localhost:7890
|
|
||||||
|
|
||||||
basic_auth /* {
|
|
||||||
nomad $2a$12$toBh5sfXyxigtHGNY4t8tO7YYQp6i3aZk/O0qd19lgk0LRz5eqDVi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
fs.nmd.mov {
|
||||||
|
reverse_proxy localhost:5000
|
||||||
|
import logging fs
|
||||||
|
}
|
||||||
|
|
||||||
|
vpn.nmd.mov {
|
||||||
|
reverse_proxy localhost:51821
|
||||||
|
import logging vpn
|
||||||
|
}
|
||||||
|
|
||||||
|
s.nmd.mov {
|
||||||
|
reverse_proxy localhost:8384
|
||||||
|
import logging s
|
||||||
|
}
|
||||||
|
|
||||||
|
drop.nmd.mov {
|
||||||
|
reverse_proxy localhost:3000
|
||||||
|
import logging drop
|
||||||
|
}
|
||||||
|
|
||||||
|
dot.nmd.mov {
|
||||||
|
reverse_proxy localhost:19999
|
||||||
|
|
||||||
|
basic_auth /* {
|
||||||
|
nomad $2a$12$toBh5sfXyxigtHGNY4t8tO7YYQp6i3aZk/O0qd19lgk0LRz5eqDVi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dash.nmd.mov {
|
||||||
|
reverse_proxy localhost:8080
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
nmd.mov {
|
||||||
|
root * /var/www/goaccess
|
||||||
|
|
||||||
|
file_server
|
||||||
|
|
||||||
|
reverse_proxy /ws_fs localhost:7890
|
||||||
|
reverse_proxy /ws_drop localhost:7891
|
||||||
|
reverse_proxy /ws_vpn localhost:7892
|
||||||
|
reverse_proxy /ws_sync localhost:7893
|
||||||
|
|
||||||
|
basic_auth /* {
|
||||||
|
nomad $2a$12$toBh5sfXyxigtHGNY4t8tO7YYQp6i3aZk/O0qd19lgk0LRz5eqDVi
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.netdata = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.netdata.override {
|
|
||||||
withCloudUi = true;
|
|
||||||
};
|
|
||||||
extraPluginPaths = [ "/etc/netdata/custom-plugins.d" ];
|
|
||||||
configDir = {
|
|
||||||
# Add the custom plugin script to the Netdata configuration directory
|
|
||||||
"plugins.d/caddy_visitors.sh" = pkgs.writeText "caddy_visitors.sh" ''
|
|
||||||
#!/bin/env/sh
|
|
||||||
|
|
||||||
# Path to the Caddy JSON access log file
|
|
||||||
log_file="/var/log/caddy/access.log"
|
|
||||||
|
|
||||||
# Extract unique visitor IPs from JSON log file
|
|
||||||
unique_visitors=$(jq -r "select(.request.remote_ip != null) | .request.remote_ip" "$log_file" | sort | uniq | wc -l)
|
|
||||||
|
|
||||||
# Define the chart
|
|
||||||
echo CHART caddy_visitors.unique_ips "Unique Visitors from Caddy Logs" "IPs" "Caddy Logs" caddy_visitors line $((netdata_update_every * 10)) 1
|
|
||||||
echo DIMENSION unique_visitors "" absolute 1 1
|
|
||||||
|
|
||||||
# Output the result in a format that Netdata understands
|
|
||||||
echo BEGIN caddy_visitors.unique_ips
|
|
||||||
echo SET unique_visitors = $unique_visitors
|
|
||||||
echo END
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkForce false;
|
networking.useDHCP = lib.mkForce false;
|
||||||
services.cloud-init = {
|
services.cloud-init = {
|
||||||
|
@ -185,10 +167,6 @@
|
||||||
22
|
22
|
||||||
80
|
80
|
||||||
443
|
443
|
||||||
5000
|
|
||||||
4400
|
|
||||||
3000
|
|
||||||
8384
|
|
||||||
22000
|
22000
|
||||||
51821
|
51821
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue