diff --git a/.git-crypt/.gitattributes b/.git-crypt/.gitattributes new file mode 100644 index 0000000..665b10e --- /dev/null +++ b/.git-crypt/.gitattributes @@ -0,0 +1,4 @@ +# Do not edit this file. To specify the files to encrypt, create your own +# .gitattributes file in the directory where your files are. +* !filter !diff +*.gpg binary diff --git a/.git-crypt/keys/default/0/91FF02AD4EEBB9C7E08FF04D6BD29B53D3847632.gpg b/.git-crypt/keys/default/0/91FF02AD4EEBB9C7E08FF04D6BD29B53D3847632.gpg new file mode 100644 index 0000000..4a4cc59 Binary files /dev/null and b/.git-crypt/keys/default/0/91FF02AD4EEBB9C7E08FF04D6BD29B53D3847632.gpg differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0fe79d9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +secrets/*.secret filter=git-crypt diff=git-crypt +secrets/wireguard.nix filter=git-crypt diff=git-crypt diff --git a/.github/workflows/cachix.yaml b/.github/workflows/cachix.yaml deleted file mode 100644 index 4b2eebe..0000000 --- a/.github/workflows/cachix.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: "Cachix" -on: - push: - paths: - - '**.nix' - - '**.age' - - 'pkgs/**' - - 'flake.nix' - - 'flake.lock' - - '.github/workflows/cachix.yaml' -jobs: - format-check: - name: Format check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: cachix/install-nix-action@v31 - - - name: Run alejandra - run: nix develop --command alejandra --check . - - flake-check: - name: Flake check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: cachix/install-nix-action@v31 - - - uses: cachix/cachix-action@v16 - with: - name: alarsyo - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - extraPullNames: "nix-community" - - - name: Build package - run: nix flake check - - build-pkgs: - name: Nix packages - runs-on: ubuntu-latest - needs: [ flake-check, format-check ] - - strategy: - fail-fast: false - matrix: - name: - - grafanaDashboards/nginx - - grafanaDashboards/node-exporter - - kaleidoscope-udev-rules - - sddm-sugar-candy - - spot - - steps: - - uses: actions/checkout@v4 - - - uses: cachix/install-nix-action@v31 - - - uses: cachix/cachix-action@v16 - with: - name: alarsyo - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - extraPullNames: "nix-community" - - - name: Build package - run: nix build -L .#"${{ matrix.name }}" - - build-configs: - name: NixOS configs - runs-on: ubuntu-latest - needs: [ build-pkgs ] - - strategy: - fail-fast: false - matrix: - name: - - boreal - - hades - - talos - - thanatos - - steps: - - name: Delete huge unnecessary tools folder - run: rm -rf /opt/hostedtoolcache - - - uses: actions/checkout@v4 - - - uses: cachix/install-nix-action@v31 - - - uses: cachix/cachix-action@v16 - with: - name: alarsyo - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - extraPullNames: "nix-community" - - - name: Build package - run: nix build -L .#nixosConfigurations."${{ matrix.name }}".config.system.build.toplevel diff --git a/.github/workflows/nur-update.yaml b/.github/workflows/nur-update.yaml deleted file mode 100644 index 30b2deb..0000000 --- a/.github/workflows/nur-update.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: "NUR" -on: - push: - branches: - - 'main' - paths: - - 'pkgs/**' - - '.github/workflows/nur-update.yaml' - -jobs: - update-nur: - name: "Ping NUR repo hook" - runs-on: ubuntu-latest - steps: - - name: curl nur endpoint - run: | - curl -XPOST https://nur-update.nix-community.org/update?repo=alarsyo diff --git a/.gitignore b/.gitignore index c4a847d..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -/result diff --git a/.lohr b/.lohr index 5450957..c20d109 100644 --- a/.lohr +++ b/.lohr @@ -1,4 +1,3 @@ git@github.com:alarsyo/nixos-config git@gitlab.com:alarsyo/nixos-config git@git.sr.ht:~alarsyo/nixos-config -git@codeberg.org:alarsyo/nixos-config diff --git a/README.org b/README.org index 0b7e2ce..16dad36 100644 --- a/README.org +++ b/README.org @@ -1,25 +1,46 @@ -#+title: NixOS configurations +#+title: NixOS deployment configuration -Configuration for my computers! You may find here system configurations for -various services I host, as well as my dotfiles for daily programs. +* Services -** Packages +** Bitwarden -Various packages of mine can be found in this repo. You can easily use these -packages from Nix by [[https://github.com/nix-community/NUR][setting up the Nix User Repository]]. +Password manager, Rust lightweight version. -*** Flake +** Borg backup -If you prefer, theses packages are also exposed as a *flake* in this repo: +Creating daily backups to borgbase -- To list packages: +** fail2ban -#+begin_src sh -nix flake show -#+end_src +Keeping the bad guys away -- To install one of them: +** Gitea -#+begin_src sh -nix build github:alarsyo/nixos-config#$PACKAGE -#+end_src +Hosting for all my personal projects + +** Jellyfin + +Netflix but just for me + +** Lohr + +*** Setup + +Needs manual SSH key and known hosts setup. + +** Matrix + +My Matrix homeserver at =alarsyo.net=. Also hosting an Element web client at +[[https://chat.alarsyo.net][chat.alarsyo.net]]. + +** Miniflux + +RSS reader + +** Monitoring + +Grafana and Prometheus are currently used as a glorified =htop=. + +** Nextcloud + +** Wireguard VPN diff --git a/base/default.nix b/base/default.nix index 1607602..3331a09 100644 --- a/base/default.nix +++ b/base/default.nix @@ -1,6 +1,6 @@ -{...}: { +{ ... }: +{ imports = [ - ./gui-programs.nix ./networking.nix ./nix.nix ./programs.nix diff --git a/base/gui-programs.nix b/base/gui-programs.nix index 7057c85..f98fedf 100644 --- a/base/gui-programs.nix +++ b/base/gui-programs.nix @@ -1,95 +1,19 @@ +{ pkgs, ... }: { - pkgs, - lib, - config, - options, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - optional - ; -in { - options.my.gui = { - enable = mkEnableOption "System has some kind of screen attached"; - isNvidia = mkEnableOption "System a NVIDIA GPU"; - }; + environment.systemPackages = with pkgs; [ + alacritty + discord + feh + firefox + pavucontrol + slack + spotify + zathura + ]; - config = mkIf config.my.gui.enable { - my.displayManager.sddm.enable = true; + networking.networkmanager.enable = true; + programs.nm-applet.enable = true; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - pinentryPackage = pkgs.pinentry-qt; - }; - - services = { - xserver = { - enable = true; - # NOTE: could use `mkOptionDefault` but this feels more explicit - videoDrivers = - if config.my.gui.isNvidia - then ["nvidia"] - else options.services.xserver.videoDrivers.default; - xkb = { - layout = "fr"; - variant = "us"; - }; - }; - - libinput = { - enable = true; - touchpad = { - naturalScrolling = true; - }; - }; - - logind.lidSwitch = "suspend"; - - printing = { - enable = true; - cups-pdf.enable = true; - }; - - udev.packages = [pkgs.chrysalis]; - }; - - environment.systemPackages = builtins.attrValues { - inherit - (pkgs) - arandr - chrysalis - discord - feh - ffmpeg - gimp-with-plugins - imagemagick - mpv - obs-studio - pavucontrol - spotify - tdesktop - thunderbird - virt-manager - xcolor - zathura - ; - - inherit (pkgs.kdePackages) okular; - }; - - networking.networkmanager.enable = true; - programs.nm-applet.enable = true; - programs.steam.enable = true; - - # this is necessary to set GTK stuff in home manager - # FIXME: better interdependency between this and the home part - programs.dconf.enable = true; - - # NOTE: needed for home emacs configuration - nixpkgs.config.input-fonts.acceptLicense = true; - }; + # NOTE: needed for home emacs configuration + nixpkgs.config.input-fonts.acceptLicense = true; } diff --git a/base/networking.nix b/base/networking.nix index 02c8982..c17ed76 100644 --- a/base/networking.nix +++ b/base/networking.nix @@ -1,11 +1,6 @@ -{lib, ...}: let - inherit - (lib) - mkOption - types - ; -in { - options.my.networking.externalInterface = mkOption { +{ lib, ... }: +{ + options.my.networking.externalInterface = with lib; mkOption { type = types.nullOr types.str; default = null; example = "eth0"; diff --git a/base/nix.nix b/base/nix.nix index 01ba76e..8edfa63 100644 --- a/base/nix.nix +++ b/base/nix.nix @@ -1,27 +1,26 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ nixpkgs.config.allowUnfree = true; nix = { - package = pkgs.lixPackageSets.latest.lix; + package = pkgs.nixUnstable; + extraOptions = '' + experimental-features = nix-command flakes + ''; + + binaryCaches = [ + "https://alarsyo.cachix.org" + "https://nix-community.cachix.org" + ]; + binaryCachePublicKeys = [ + "alarsyo.cachix.org-1:A6BmcaJek5+ZDWWv3fPteHhPm6U8liS9CbDbmegPfmk=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; gc = { automatic = true; - dates = "weekly"; - options = "--delete-older-than 60d"; - persistent = true; - }; - - settings = { - experimental-features = ["nix-command" "flakes"]; - trusted-users = ["@wheel"]; - substituters = [ - "https://alarsyo.cachix.org" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "alarsyo.cachix.org-1:A6BmcaJek5+ZDWWv3fPteHhPm6U8liS9CbDbmegPfmk=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; + dates = "03:15"; + options = "--delete-older-than 30d"; }; }; } diff --git a/base/programs.nix b/base/programs.nix index 064c3e1..57d7f8b 100644 --- a/base/programs.nix +++ b/base/programs.nix @@ -1,47 +1,40 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs = { fish.enable = true; + gnupg.agent = { + enable = true; + pinentryFlavor = "curses"; + }; less.enable = true; mosh.enable = true; - tmux.enable = true; - - # setcap wrapper for network permissions - bandwhich.enable = true; - }; - - services.openssh = { - settings = { - PasswordAuthentication = false; - PermitRootLogin = "no"; - StreamLocalBindUnlink = true; + ssh = { + startAgent = true; + extraConfig = '' + AddKeysToAgent yes + ''; }; }; - environment.systemPackages = builtins.attrValues { - inherit - (pkgs) - # shell usage - bat - fd - file - ripgrep - tree - wget - pciutils - usbutils - # development - git - git-crypt - git-lfs - gnumake - gnupg - python3 - shellcheck - vim - # terminal utilities - htop - unzip - zip - ; - }; + environment.systemPackages = with pkgs; [ + # shell usage + bat + fd + ripgrep + tree + packages.tmux-thumbs + wget + + # development + git + git-crypt + gnupg + pinentry-curses + python3 + vim + + # terminal utilities + htop + stow + ]; } diff --git a/base/users.nix b/base/users.nix index acbbc0d..318a4ec 100644 --- a/base/users.nix +++ b/base/users.nix @@ -1,29 +1,22 @@ -{ - config, - lib, - pkgs, - ... -}: let +{ config, lib, pkgs, ... }: +let secrets = config.my.secrets; -in { +in +{ users.mutableUsers = false; users.users.root = { - hashedPasswordFile = config.age.secrets."users/root-hashed-password".path; + hashedPassword = secrets.shadow-hashed-password-root; }; users.users.alarsyo = { - hashedPasswordFile = config.age.secrets."users/alarsyo-hashed-password".path; + hashedPassword = secrets.shadow-hashed-password-alarsyo; isNormalUser = true; extraGroups = [ "media" "networkmanager" - "video" # for `light` permissions - "docker" "wheel" # Enable ‘sudo’ for the user. - "libvirtd" ]; shell = pkgs.fish; openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMbf1C55Hgprm4Y7iNHae2UhZbLa6SNeurDTOyq2tr1G alarsyo@yubikey" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH3rrF3VSWI4n4cpguvlmLAaU3uftuX4AVV/39S/8GO9 alarsyo@thinkpad" ]; }; diff --git a/boreal.nix b/boreal.nix index 076f749..174e1d9 100644 --- a/boreal.nix +++ b/boreal.nix @@ -1,14 +1,17 @@ -{...}: { +{ ... }: + +{ imports = [ # Default configuration ./base - - # Module definitions - ./modules + ./base/gui-programs.nix # Service definitions ./services + # Configuration secrets + ./secrets + # Host-specific config ./hosts/boreal ]; diff --git a/flake.lock b/flake.lock index 1f387d7..2677d02 100644 --- a/flake.lock +++ b/flake.lock @@ -1,192 +1,65 @@ { "nodes": { - "agenix": { - "inputs": { - "darwin": "darwin", - "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "systems": "systems" - }, + "emacs-overlay": { "locked": { - "lastModified": 1736955230, - "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=", - "owner": "ryantm", - "repo": "agenix", - "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c", - "type": "github" - }, - "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" - } - }, - "darwin": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1700795494, - "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", - "type": "github" - }, - "original": { - "owner": "lnl7", - "ref": "master", - "repo": "nix-darwin", - "type": "github" - } - }, - "disko": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1743598667, - "narHash": "sha256-ViE7NoFWytYO2uJONTAX35eGsvTYXNHjWALeHAg8OQY=", + "lastModified": 1618653777, + "narHash": "sha256-jSG1i83pmKwAx6QtkVjyCQT+/LvMEMEVeVDZcOFjRTg=", "owner": "nix-community", - "repo": "disko", - "rev": "329d3d7e8bc63dd30c39e14e6076db590a6eabe6", + "repo": "emacs-overlay", + "rev": "905883cd5de24958bfd354c6e335f38f667e7ede", "type": "github" }, "original": { "owner": "nix-community", "ref": "master", - "repo": "disko", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "ref": "main", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", + "repo": "emacs-overlay", "type": "github" } }, "home-manager": { "inputs": { "nixpkgs": [ - "agenix", - "nixpkgs" + "nixpkgs-unstable" ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1618789951, + "narHash": "sha256-EoQxcVIiaqjUwwTl1YF3zGnXtzEvOUDL3SBZ8ASELvU=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "6aa6556bcab6dc0f6398b4daa8404d788fd7a6a2", "type": "github" }, "original": { "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1758463745, - "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.05", - "repo": "home-manager", - "type": "github" - } - }, - "jujutsu": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1762395739, - "narHash": "sha256-YUrjP2tzABdy4eAV1hPmgYWU8ChcJ5B4IlmQUGm95ro=", - "owner": "jj-vcs", - "repo": "jj", - "rev": "aa2b76978c4a23cb01c61629a11b1254af3ad0d9", - "type": "github" - }, - "original": { - "owner": "jj-vcs", - "ref": "v0.35.0", - "repo": "jj", - "type": "github" - } - }, - "nixos-hardware": { - "locked": { - "lastModified": 1762847253, - "narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=", - "owner": "NixOS", - "repo": "nixos-hardware", - "rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9", - "type": "github" - }, - "original": { - "owner": "NixOS", "ref": "master", - "repo": "nixos-hardware", + "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "lastModified": 1618149891, + "narHash": "sha256-Sz3DzI1k49Puq+F5KRBsaN3gRXHDzCTG6AwK29Znw0M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", + "rev": "a7ff7a57c96588fd89370568b72751dd15d24e72", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-20.09", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1618072958, + "narHash": "sha256-QDKj58ECixtb4EJMWV5D5Lb2xdCgab1Opi4zjQWbDOg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a73020b2a150322c9832b50baeb0296ba3b13dd7", "type": "github" }, "original": { @@ -196,130 +69,12 @@ "type": "github" } }, - "nixpkgs-unstable-small": { - "locked": { - "lastModified": 1742541432, - "narHash": "sha256-hPzDbmo3T64R1rt8i8WonR/4VrSbE8ZxY6wFIguC4sc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "fa6ab1d7fdf29a4ff0ac65f01ffdaea84f105280", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1743259260, - "narHash": "sha256-ArWLUgRm1tKHiqlhnymyVqi5kLNCK5ghvm06mfCl4QY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "eb0e0f21f15c559d2ac7633dc81d079d1caf5f5f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1763622513, - "narHash": "sha256-1jQnuyu82FpiSxowrF/iFK6Toh9BYprfDqfs4BB+19M=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c58bc7f5459328e4afac201c5c4feb7c818d604b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { - "agenix": "agenix", - "disko": "disko", - "flake-utils": "flake-utils", - "home-manager": "home-manager_2", - "jujutsu": "jujutsu", - "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", - "nixpkgs-unstable-small": "nixpkgs-unstable-small" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "jujutsu", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1755139244, - "narHash": "sha256-SN1BFA00m+siVAQiGLtTwjv9LV9TH5n8tQcSziV6Nv4=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "aeae248beb2a419e39d483dd9b7fec924aba8d4d", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "emacs-overlay": "emacs-overlay", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index 9a1ee4d..fb18bcf 100644 --- a/flake.nix +++ b/flake.nix @@ -5,178 +5,88 @@ type = "github"; owner = "NixOS"; repo = "nixpkgs"; - ref = "nixos-25.05"; + ref = "nixos-20.09"; }; - nixpkgs-unstable-small = { + nixpkgs-unstable = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; - ref = "nixos-unstable-small"; + ref = "nixos-unstable"; }; - agenix = { + emacs-overlay = { type = "github"; - owner = "ryantm"; - repo = "agenix"; + owner = "nix-community"; + repo = "emacs-overlay"; + ref = "master"; }; home-manager = { type = "github"; owner = "nix-community"; repo = "home-manager"; - ref = "release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - flake-utils = { - type = "github"; - owner = "numtide"; - repo = "flake-utils"; - ref = "main"; - }; - - nixos-hardware = { - type = "github"; - owner = "NixOS"; - repo = "nixos-hardware"; ref = "master"; - }; - - disko = { - type = "github"; - owner = "nix-community"; - repo = "disko"; - ref = "master"; - }; - - jujutsu = { - type = "github"; - owner = "jj-vcs"; - repo = "jj"; - ref = "v0.35.0"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; }; - outputs = { - self, - nixpkgs, - home-manager, - agenix, - disko, - ... - } @ inputs: - { - nixosModules = { - home = { - home-manager.backupFileExtension = "hm-backup"; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.alarsyo = import ./home; - home-manager.verbose = true; - }; - nix-registry = { - nix.registry.nixpkgs.flake = nixpkgs; - nix.registry.unstable.flake = inputs.nixpkgs-unstable-small; - }; - }; + outputs = { self, nixpkgs, nixpkgs-unstable, emacs-overlay, home-manager }: { + nixosConfigurations.poseidon = nixpkgs.lib.nixosSystem rec { + system = "x86_64-linux"; + modules = + [ + ./poseidon.nix - overlays = import ./overlays; - - nixosConfigurations = let - system = "x86_64-linux"; - shared_overlays = - [ - (self: super: { - packages = import ./pkgs {pkgs = super;}; - - # packages accessible through pkgs.unstable.package - unstable = import inputs.nixpkgs-unstable-small { - inherit system; - config.allowUnfree = true; - }; - }) - - agenix.overlays.default - inputs.jujutsu.overlays.default - ] - ++ builtins.attrValues self.overlays; - sharedModules = - [ - agenix.nixosModules.default - home-manager.nixosModules.default - { - nixpkgs = { - overlays = shared_overlays; - config.permittedInsecurePackages = []; - }; - hardware.enableRedistributableFirmware = true; - } - ] - ++ (nixpkgs.lib.attrValues self.nixosModules); - in { - hades = nixpkgs.lib.nixosSystem rec { - inherit system; - modules = - [ - ./hades.nix - ] - ++ sharedModules; - }; - - boreal = nixpkgs.lib.nixosSystem rec { - inherit system; - modules = - [ - ./boreal.nix - - { - nixpkgs.overlays = [ - # uncomment this to build everything from scratch, fun but takes a - # while - # - # (self: super: { - # stdenv = super.impureUseNativeOptimizations super.stdenv; - # }) + { + nixpkgs.overlays = + let + pkgsUnstable = nixpkgs-unstable.legacyPackages.${system}; + in + [ + # packages accessible through pkgs.unstable.package + (final: prev: { + unstable = pkgsUnstable; + }) + (final: prev: { + bitwarden_rs = pkgsUnstable.bitwarden_rs; + bitwarden_rs-vault = pkgsUnstable.bitwarden_rs-vault; + }) ]; - } - ] - ++ sharedModules; - }; - - talos = nixpkgs.lib.nixosSystem { - inherit system; - modules = - [ - inputs.nixos-hardware.nixosModules.framework-13-7040-amd - disko.nixosModules.default - ./talos.nix - ] - ++ sharedModules; - }; - - thanatos = nixpkgs.lib.nixosSystem { - inherit system; - modules = - [ - disko.nixosModules.default - ./thanatos.nix - ] - ++ sharedModules; - }; - }; - } - // inputs.flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; - in { - packages = - inputs.flake-utils.lib.flattenTree - (import ./pkgs {inherit pkgs;}); - devShells.default = pkgs.mkShellNoCC { - buildInputs = [ - pkgs.alejandra + } ]; - }; - }); + }; + nixosConfigurations.boreal = nixpkgs-unstable.lib.nixosSystem rec { + system = "x86_64-linux"; + modules = + [ + ./boreal.nix + + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.alarsyo = import ./home; + home-manager.verbose = true; + } + + { + nixpkgs.overlays = [ + emacs-overlay.overlay + + (self: super: { + packages = import ./packages { pkgs = super; }; + }) + + # uncomment this to build everything from scratch, fun but takes a + # while + # + # (self: super: { + # stdenv = super.impureUseNativeOptimizations super.stdenv; + # }) + ]; + } + ]; + }; + }; } diff --git a/hades.nix b/hades.nix deleted file mode 100644 index 26018f0..0000000 --- a/hades.nix +++ /dev/null @@ -1,23 +0,0 @@ -{...}: { - imports = [ - # Default configuration - ./base - - # Module definitions - ./modules - - # Service definitions - ./services - - # Host-specific config - ./hosts/hades - ]; - - # 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 - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.05"; # Did you read the comment? -} diff --git a/home/alacritty.nix b/home/alacritty.nix deleted file mode 100644 index 87843d2..0000000 --- a/home/alacritty.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.alacritty; - alacrittyTheme = config.my.theme.alacrittyTheme; -in { - options.my.home.alacritty.enable = (mkEnableOption "Alacritty terminal") // {default = config.my.home.x.enable;}; - - config = mkIf cfg.enable { - programs.alacritty = { - enable = true; - - settings = { - env = { - WINIT_X11_SCALE_FACTOR = "1.0"; - }; - - window = { - padding = { - x = 8; - y = 8; - }; - }; - - font = { - normal = { - family = "Iosevka Fixed"; - style = "Medium"; - }; - size = 10.0; - }; - - colors = alacrittyTheme; - }; - }; - - home.packages = [pkgs.iosevka-bin]; - - # make sure font is discoverable - fonts.fontconfig.enable = true; - }; -} diff --git a/home/bat.nix b/home/bat.nix deleted file mode 100644 index f2bbfd2..0000000 --- a/home/bat.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.bat; - batTheme = config.my.theme.batTheme; -in { - options.my.home.bat = { - enable = (mkEnableOption "bat code display tool") // {default = true;}; - }; - - config = mkIf cfg.enable { - programs.bat = { - enable = true; - - config = { - theme = batTheme.name; - }; - }; - }; -} diff --git a/home/default.nix b/home/default.nix index 570fbd4..0da2e12 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,35 +1,13 @@ -{config, ...}: { +{ ... }: +{ imports = [ - ./alacritty.nix - ./bat.nix - ./direnv.nix ./emacs.nix - ./env.nix - ./firefox.nix - ./fish ./flameshot.nix - ./git.nix - ./gtk.nix - ./jj.nix - ./laptop.nix - ./mail.nix - ./rbw.nix - ./rofi.nix - ./ssh.nix - ./themes ./tmux.nix - ./tridactyl.nix ./x ]; - home.username = "alarsyo"; + home.stateVersion = "20.09"; - home.sessionVariables = let - gpgPackage = config.programs.gpg.package; - in { - BROWSER = "firefox"; - # FIXME: only set if gpg-agent not in use, otherwise home manager already does that - SSH_AUTH_SOCK = "$(${gpgPackage}/bin/gpgconf --list-dirs agent-ssh-socket)"; - XDG_DATA_HOME = "$HOME/.local/share"; - }; + home.username = "alarsyo"; } diff --git a/home/direnv.nix b/home/direnv.nix deleted file mode 100644 index 9c1b086..0000000 --- a/home/direnv.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.direnv; -in { - options.my.home.direnv = { - enable = (mkEnableOption "setup direnv usage") // {default = true;}; - }; - - config = mkIf cfg.enable { - programs.direnv = { - enable = true; - nix-direnv = { - enable = true; - }; - }; - }; -} diff --git a/home/emacs.nix b/home/emacs.nix index 529439b..5b1808e 100644 --- a/home/emacs.nix +++ b/home/emacs.nix @@ -1,39 +1,17 @@ +{ config, lib, pkgs, ... }: { - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; -in { - options.my.home.emacs = { + options.my.home.emacs = with lib; { enable = mkEnableOption "Emacs daemon configuration"; }; - config = mkIf config.my.home.emacs.enable { - home.sessionPath = ["${config.xdg.configHome}/emacs/bin"]; - home.sessionVariables = { - EDITOR = "emacsclient -t"; - }; + config = lib.mkIf config.my.home.emacs.enable { + home.packages = with pkgs; [ + sqlite # needed by org-roam - home.packages = builtins.attrValues { - inherit - (pkgs) - sqlite # needed by org-roam - - # fonts used by my config - emacs-all-the-icons-fonts - ; - - inherit - (pkgs.nerd-fonts) - iosevka - ; - }; + # fonts used by my config + input-fonts + emacs-all-the-icons-fonts + ]; # make sure above fonts are discoverable fonts.fontconfig.enable = true; @@ -41,13 +19,11 @@ in { enable = true; # generate emacsclient desktop file client.enable = true; - socketActivation.enable = true; }; programs.emacs = { enable = true; - package = pkgs.emacs30-pgtk; - extraPackages = epkgs: [epkgs.vterm epkgs.pdf-tools pkgs.lilypond epkgs.mu4e]; + package = pkgs.emacsPgtkGcc; }; }; } diff --git a/home/env.nix b/home/env.nix deleted file mode 100644 index aaeb1b6..0000000 --- a/home/env.nix +++ /dev/null @@ -1,6 +0,0 @@ -{config, ...}: { - home.sessionPath = [ - "${config.home.homeDirectory}/.cargo/bin" - "${config.home.homeDirectory}/.local/bin" - ]; -} diff --git a/home/firefox.nix b/home/firefox.nix deleted file mode 100644 index 3411adf..0000000 --- a/home/firefox.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.firefox; -in { - options.my.home.firefox = { - enable = (mkEnableOption "firefox config") // {default = config.my.home.x.enable;}; - }; - - config = mkIf cfg.enable { - programs.firefox = { - enable = true; - package = pkgs.firefox.override { - nativeMessagingHosts = [ - pkgs.tridactyl-native - ]; - }; - }; - }; -} diff --git a/home/fish/default.nix b/home/fish/default.nix deleted file mode 100644 index b415982..0000000 --- a/home/fish/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.fish; -in { - options.my.home.fish.enable = (mkEnableOption "Fish shell") // {default = true;}; - - config = mkIf cfg.enable { - home.sessionVariables = { - # automatically prompt to run program in nix-shell if it's not installed - NIX_AUTO_RUN = "1"; - NIX_AUTO_RUN_INTERACTIVE = "1"; - }; - - programs.fish = { - enable = true; - shellAliases = { - "bt" = "bluetoothctl"; - }; - shellAbbrs = { - "bton" = "bluetoothctl power on"; - "btoff" = "bluetoothctl power off"; - "btcon" = "bluetoothctl connect"; - "btdis" = "bluetoothctl disconnect"; - "btinfo" = "bluetoothctl info"; - }; - }; - - xdg.configFile."fish/functions" = {source = ./. + "/functions";}; - }; -} diff --git a/home/fish/functions/dock.fish b/home/fish/functions/dock.fish deleted file mode 100644 index fa97a4b..0000000 --- a/home/fish/functions/dock.fish +++ /dev/null @@ -1,23 +0,0 @@ -function dock - xrandr \ - --output eDP-1 --mode 1920x1080 --pos 0x120 --rotate normal \ - --output HDMI-1 --off \ - --output DP-1 --off \ - --output DP-2 --off \ - --output DP-3 --primary --mode 1920x1200 --pos 1920x0 --rotate normal \ - --output DP-4 --mode 1920x1200 --pos 3840x0 --rotate normal \ - --output DP-4 --off \ - --output DP-5 --off - - i3-msg -q '[workspace="1"]' move workspace to output DP-3 2>/dev/null - i3-msg -q '[workspace="2"]' move workspace to output DP-3 2>/dev/null - i3-msg -q '[workspace="3"]' move workspace to output DP-3 2>/dev/null - i3-msg -q '[workspace="4"]' move workspace to output DP-3 2>/dev/null - i3-msg -q '[workspace="5"]' move workspace to output DP-3 2>/dev/null - - i3-msg -q '[workspace="7"]' move workspace to output eDP-1 2>/dev/null - - i3-msg -q '[workspace="8"]' move workspace to output DP-4 2>/dev/null - i3-msg -q '[workspace="9"]' move workspace to output DP-4 2>/dev/null - i3-msg -q '[workspace="10"]' move workspace to output DP-4 2>/dev/null -end diff --git a/home/fish/functions/dock2.fish b/home/fish/functions/dock2.fish deleted file mode 100644 index 2fc244f..0000000 --- a/home/fish/functions/dock2.fish +++ /dev/null @@ -1,16 +0,0 @@ -function dock2 - xrandr \ - --output eDP-1 --mode 1920x1080 --pos 2560x0 --rotate normal \ - --output DP-1 --primary --mode 2560x1440 --pos 0x0 --rotate normal \ - --output HDMI-1 --off \ - --output DP-2 --off \ - --output HDMI-2 --off - - i3-msg -q '[workspace="1"]' move workspace to output DP-1 2>/dev/null - i3-msg -q '[workspace="2"]' move workspace to output DP-1 2>/dev/null - i3-msg -q '[workspace="3"]' move workspace to output DP-1 2>/dev/null - i3-msg -q '[workspace="4"]' move workspace to output DP-1 2>/dev/null - i3-msg -q '[workspace="9"]' move workspace to output DP-1 2>/dev/null - - i3-msg -q '[workspace="10"]' move workspace to output eDP-1 2>/dev/null -end diff --git a/home/fish/functions/exit.fish b/home/fish/functions/exit.fish deleted file mode 100644 index 2ca78d7..0000000 --- a/home/fish/functions/exit.fish +++ /dev/null @@ -1,5 +0,0 @@ -function exit \ - --description "Disown all jobs started from this shell to avoid killing them on exit" \ - --on-event fish_exit - jobs -q; and disown (jobs -p) -end diff --git a/home/fish/functions/magit.fish b/home/fish/functions/magit.fish deleted file mode 100644 index 27e2306..0000000 --- a/home/fish/functions/magit.fish +++ /dev/null @@ -1,3 +0,0 @@ -function magit - emacsclient --tty --eval '(magit-status)' --suppress-output -end diff --git a/home/fish/functions/nfl.fish b/home/fish/functions/nfl.fish deleted file mode 100644 index 48674c4..0000000 --- a/home/fish/functions/nfl.fish +++ /dev/null @@ -1,4 +0,0 @@ -function nfl - set -l flags "--commit-lock-file" - nix flake update $flags $argv -end diff --git a/home/fish/functions/undock.fish b/home/fish/functions/undock.fish deleted file mode 100644 index c855cb7..0000000 --- a/home/fish/functions/undock.fish +++ /dev/null @@ -1,10 +0,0 @@ -function undock - xrandr \ - --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal \ - --output HDMI-1 --off \ - --output DP-1 --off \ - --output DP-2 --off \ - --output DP-3 --off \ - --output DP-4 --off \ - --output DP-5 --off -end diff --git a/home/fish/functions/undock2.fish b/home/fish/functions/undock2.fish deleted file mode 100644 index d9da856..0000000 --- a/home/fish/functions/undock2.fish +++ /dev/null @@ -1,8 +0,0 @@ -function undock2 - xrandr \ - --output eDP-1 --primary --mode 1920x1080 --rotate normal \ - --output DP-1 --off \ - --output HDMI-1 --off \ - --output DP-2 --off \ - --output HDMI-2 --off -end diff --git a/home/fish/functions/wake.fish b/home/fish/functions/wake.fish deleted file mode 100644 index 5c255db..0000000 --- a/home/fish/functions/wake.fish +++ /dev/null @@ -1,14 +0,0 @@ -function wake -d "Wake-on-WiFi shortcut" -a host - if not set -q host[1] - echo "Usage: wake HOSTNAME" - return 1 - end - - switch $host - case boreal - ssh -t pi@pi.alarsyo.net "bash -ic wakywaky" - case * - echo "Unknown host!" - return 1 - end -end diff --git a/home/flameshot.nix b/home/flameshot.nix index 47e2886..359fc8c 100644 --- a/home/flameshot.nix +++ b/home/flameshot.nix @@ -1,21 +1,13 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - +{ config, lib, ... }: +let cfg = config.my.home.flameshot; -in { - options.my.home.flameshot = { +in +{ + options.my.home.flameshot = with lib; { enable = mkEnableOption "flameshot autolaunch"; }; - config.services.flameshot = mkIf cfg.enable { + config.services.flameshot = lib.mkIf cfg.enable { enable = true; }; } diff --git a/home/git.nix b/home/git.nix deleted file mode 100644 index 11a57ae..0000000 --- a/home/git.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.git; -in { - options.my.home.git.enable = (mkEnableOption "Git configuration") // {default = true;}; - - config = mkIf cfg.enable { - programs.git = { - enable = true; - - delta = { - enable = true; - options = { - syntax-theme = "Solarized (light)"; - }; - }; - lfs.enable = true; - - userEmail = "antoine@alarsyo.net"; - userName = "Antoine Martin"; - - extraConfig = { - commit = {verbose = true;}; - core = {editor = "vim";}; - init = {defaultBranch = "main";}; - pull = {rebase = true;}; - rerere = {enabled = true;}; - maintenance.prefetch.enabled = false; - }; - - aliases = { - push-wip = "push -o ci.skip"; - push-merge = "push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch"; - push-mr = "push -o merge_request.create -o merge_request.remove_source_branch"; - }; - - includes = [ - { - condition = "gitdir:~/work/lrde/"; - contents = {user = {email = "amartin@lrde.epita.fr";};}; - } - { - condition = "gitdir:~/work/prologin/"; - contents = {user = {email = "antoine.martin@prologin.org";};}; - } - { - condition = "gitdir:~/work/epita/"; - contents = {user = {email = "antoine4.martin@epita.fr";};}; - } - ]; - - ignores = [ - "/.direnv/" - "/.envrc" - ]; - }; - }; -} diff --git a/home/gtk.nix b/home/gtk.nix deleted file mode 100644 index 7be7d77..0000000 --- a/home/gtk.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.my.home.gtk; -in { - options.my.home.gtk = with lib; { - enable = (mkEnableOption "GTK configuration") // {default = config.my.home.x.enable;}; - }; - - config.gtk = lib.mkIf cfg.enable { - enable = true; - - font = { - package = pkgs.dejavu_fonts; - name = "DejaVu Sans"; - }; - - gtk2 = { - # No garbage polluting my $HOME - # - # I had this enabled but some program somehow couldn't find my - # configuration there. I think it was nm-applet. - # - #configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - }; - - iconTheme = { - package = pkgs.gnome-themes-extra; - name = "Adwaita"; - }; - - theme = { - package = pkgs.gnome-themes-extra; - name = "Adwaita"; - }; - }; -} diff --git a/home/jj.nix b/home/jj.nix deleted file mode 100644 index 5f266f8..0000000 --- a/home/jj.nix +++ /dev/null @@ -1,8 +0,0 @@ -{pkgs, ...}: { - home.packages = [ - pkgs.jujutsu - ]; - xdg.configFile = { - "jj/config.toml".source = ./jj/config.toml; - }; -} diff --git a/home/jj/config.toml b/home/jj/config.toml deleted file mode 100644 index fd339cd..0000000 --- a/home/jj/config.toml +++ /dev/null @@ -1,106 +0,0 @@ -[user] -name = "Antoine Martin" -email = "antoine@alarsyo.net" - -[ui] -diff-editor = ":builtin" -paginate = "auto" -editor = "vim" -pager = "less -FRX" -default-command = "logstatus" - -[ui.movement] -edit = false - -[git] -subprocess = true - -[snapshot] -auto-track = "none()" - -[aliases] -pdiff = ["diff", "-r", "@-"] -tug = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@-"] -ll = ["log", "-T", "builtin_log_detailed"] -l = ["log", "-T", "builtin_log_compact"] -logstatus = ["util", "exec", "--", "sh", "-c", "jj status && jj log"] - -[revset-aliases] -'closest_bookmark(to)' = 'heads(::to & bookmarks())' - -[templates] -log = "builtin_log_comfortable" - -log_node = ''' -coalesce( - if(!self, label("elided", "~")), - label( - separate(" ", - if(current_working_copy, "working_copy"), - if(immutable, "immutable"), - if(conflict, "conflict"), - if(description.starts_with("wip:"), "wip"), - if(description.starts_with("private:"), "private"), - ), - coalesce( - if(current_working_copy, "@"), - if(immutable, "◆"), - if(conflict, "×"), - if(description.starts_with("wip:"), "!"), - if(description.starts_with("private:"), "!"), - "○", - ) - ) -) -''' - -draft_commit_description = "commit_description_verbose(self)" - -[template-aliases] -"commit_description_verbose(commit)" = ''' -concat( - commit_description(commit), - "JJ: ignore-rest\n", - diff.git(), -) -''' -"changelog_entry(file)" = ''' -concat( - "* ", - f.path(), - ":\n", -) -''' -"commit_description_changelog(commit)" = ''' -concat( - commit.description(), "\n", - surround("", "\n", diff.files().map(|f| if(!commit.description().contains(f.path()), - changelog_entry(f) - ) - ).join("")), - "JJ: This commit contains the following changes:\n", - indent("JJ: ", diff.stat(72)), -) -''' -"commit_description(commit)" = ''' -concat( - commit.description(), "\n", - "JJ: This commit contains the following changes:\n", - indent("JJ: ", diff.stat(72)), -) -''' - -[[--scope]] ---when.repositories = ["~/work/lrde/"] -[--scope.user] -email = "amartin@lrde.epita.fr" - -[[--scope]] ---when.repositories = ["~/work/prologin/"] -[--scope.user] -email = "antoine.martin@prologin.org" - -[[--scope]] ---when.repositories = ["~/work/epita/"] -[--scope.user] -email = "antoine4.martin@epita.fr" diff --git a/home/laptop.nix b/home/laptop.nix deleted file mode 100644 index 28f1467..0000000 --- a/home/laptop.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - ; -in { - options.my.home.laptop = { - enable = mkEnableOption "Laptop settings"; - }; -} diff --git a/home/mail.nix b/home/mail.nix deleted file mode 100644 index d48b580..0000000 --- a/home/mail.nix +++ /dev/null @@ -1,190 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mapAttrs - mkEnableOption - mkIf - ; - inherit - (builtins) - typeOf - ; - - myName = "Antoine Martin"; - email_perso = "antoine@alarsyo.net"; - email_lrde = "amartin@lrde.epita.fr"; - email_prologin = "antoine.martin@prologin.org"; - - cfg = config.my.home.mail; - - make_mbsync_channel = patterns: - ( - if (typeOf patterns) == "list" - then { - inherit patterns; - } - else { - farPattern = patterns.far; - nearPattern = patterns.near; - } - ) - // { - extraConfig = { - Create = "Both"; - Expunge = "Both"; - Remove = "None"; - SyncState = "*"; - }; - }; - make_mbsync_channels = mapAttrs (_: value: make_mbsync_channel value); - - gmail_far_near_patterns = { - sent = { - far = "[Gmail]/Sent Mail"; - near = "Sent"; - }; - drafts = { - far = "[Gmail]/Drafts"; - near = "Drafts"; - }; - junk = { - far = "[Gmail]/Spam"; - near = "Junk"; - }; - trash = { - far = "[Gmail]/Trash"; - near = "Trash"; - }; - }; - gmail_mbsync_channels = make_mbsync_channels gmail_far_near_patterns; -in { - options.my.home.mail = { - # I *could* read email in a terminal emacs client on a server, but in - # practice I don't think it'll happen very often, so let's enable this only - # when I'm on a machine with a Xorg server. - enable = (mkEnableOption "email configuration") // {default = config.my.home.x.enable;}; - }; - - config = mkIf cfg.enable { - accounts.email = { - maildirBasePath = "${config.home.homeDirectory}/.mail"; - accounts = { - alarsyo = { - address = email_perso; - userName = email_perso; - realName = myName; - aliases = [ - "alarsyo@alarsyo.net" - "antoine@amartin.email" - "mail@antoinemartin.fr" - ]; - flavor = "plain"; # default setting - passwordCommand = "${pkgs.rbw}/bin/rbw get webmail.migadu.com ${email_perso}"; - primary = true; - mbsync = { - enable = true; - create = "both"; - expunge = "both"; - groups = { - alarsyo-main.channels = make_mbsync_channels { - main = ["INBOX" "Sent" "Drafts" "Junk" "Trash"]; - }; - alarsyo-full.channels = make_mbsync_channels { - full = ["*" "!INBOX" "!Sent" "!Drafts" "!Junk" "!Trash"]; - }; - }; - }; - msmtp.enable = true; - mu.enable = true; - imap = { - host = "imap.migadu.com"; - port = 993; - tls.enable = true; - }; - smtp = { - host = "smtp.migadu.com"; - port = 465; - tls.enable = true; - }; - }; - lrde = { - address = email_lrde; - userName = "amartin"; - realName = myName; - flavor = "plain"; # default setting - passwordCommand = "${pkgs.rbw}/bin/rbw get lre.epita.fr amartin"; - mbsync = { - enable = true; - create = "both"; - expunge = "both"; - patterns = ["*" "!Archives*"]; - extraConfig.account = { - # otherwise mbsync tries GSSAPI, but I don't have Kerberos setup - # on this machine - AuthMechs = "LOGIN"; - }; - }; - msmtp.enable = true; - mu.enable = true; - imap = { - host = "imap.lrde.epita.fr"; - port = 993; - tls.enable = true; - }; - smtp = { - host = "smtp.lrde.epita.fr"; - port = 465; - tls.enable = true; - }; - }; - prologin = { - address = email_prologin; - userName = email_prologin; - realName = myName; - aliases = [ - "alarsyo@prologin.org" - ]; - flavor = "plain"; # default setting - passwordCommand = "${pkgs.rbw}/bin/rbw get google.com ${email_prologin}-mailpass"; - primary = false; - mbsync = { - enable = true; - create = "both"; - expunge = "both"; - groups = { - prologin-main.channels = - (make_mbsync_channels { - main = ["INBOX" "membres@"]; - }) - // gmail_mbsync_channels; - prologin-info.channels = make_mbsync_channels { - info = ["info@" "info@gcc"]; - }; - }; - }; - msmtp.enable = true; - mu.enable = true; - imap = { - host = "imap.gmail.com"; - port = 993; - tls.enable = true; - }; - smtp = { - host = "smtp.gmail.com"; - port = 465; - tls.enable = true; - }; - }; - }; - }; - - programs.mbsync.enable = true; - programs.msmtp.enable = true; - programs.mu.enable = true; - }; -} diff --git a/home/rbw.nix b/home/rbw.nix deleted file mode 100644 index 2c36d63..0000000 --- a/home/rbw.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - cfg = config.my.home.mail; -in { - options.my.home.rbw = { - enable = mkEnableOption "rbw configuration"; - }; - - config = mkIf cfg.enable { - programs.rbw = { - enable = true; - settings = { - email = "antoine@alarsyo.net"; - base_url = "https://pass.alarsyo.net"; - lock_timeout = 60 * 60 * 12; - pinentry = pkgs.pinentry-qt; - }; - }; - - # `rbw-agent` should be launched on first call to `rbw`, so this shouldn't - # be necessary. - # - # However, if for instance `rbw` if first called by the emacs-daemon (when - # accessing an IMAP account password), then restarting the user service - # associated to the emacs daemon also kills the rbw-agent it spawned, - # resetting the lock status and prompting for a passphrase again. - # - # This user service makes sure the rbw-agent is started when the user - # session launches. - systemd.user.services.rbw = { - Unit = { - Description = "rbw agent autostart"; - After = "graphical-session.target"; - PartOf = "graphical-session.target"; - }; - - Install.WantedBy = ["graphical-session.target"]; - - Service = { - ExecStart = "${pkgs.rbw}/bin/rbw-agent"; - Restart = "on-abort"; - Type = "forking"; - PIDFile = "%t/rbw/pidfile"; - }; - }; - }; -} diff --git a/home/rofi.nix b/home/rofi.nix deleted file mode 100644 index 96c7447..0000000 --- a/home/rofi.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.rofi; -in { - options.my.home.rofi = { - enable = (mkEnableOption "rofi configuration") // {default = config.my.home.x.enable;}; - }; - - config = mkIf cfg.enable { - programs.rofi = { - enable = true; - - terminal = "${pkgs.alacritty}/bin/alacritty"; - }; - }; -} diff --git a/home/ssh.nix b/home/ssh.nix deleted file mode 100644 index 12e11a2..0000000 --- a/home/ssh.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.ssh; -in { - options.my.home.ssh = { - enable = (mkEnableOption "ssh configuration") // {default = true;}; - }; - - config = mkIf cfg.enable { - programs.ssh = { - enable = true; - - matchBlocks = let - addGPGAgentForwarding = hostConf: - { - remoteForwards = [ - { - # shhhh this is a path but it works - bind.address = "/run/user/1000/gnupg/S.gpg-agent.ssh"; - host.address = "/run/user/1000/gnupg/S.gpg-agent.ssh"; - } - ]; - } - // hostConf; - in { - boreal = addGPGAgentForwarding {hostname = "boreal.alarsyo.net";}; - hades = addGPGAgentForwarding {hostname = "hades.alarsyo.net";}; - thanatos = addGPGAgentForwarding {hostname = "thanatos.alarsyo.net";}; - pi = addGPGAgentForwarding { - hostname = "pi.alarsyo.net"; - user = "pi"; - }; - - "thanatos.lrde.epita.fr" = - lib.hm.dag.entryBefore ["*.lrde.epita.fr"] - (addGPGAgentForwarding { - user = "alarsyo"; - }); - - "*.lrde.epita.fr" = { - user = "amartin"; - }; - - lrde-proxyjump = { - host = "*.lrde.epita.fr !ssh.lrde.epita.fr"; - proxyJump = "ssh.lrde.epita.fr"; - }; - }; - - includes = ["prologin_config"]; - }; - }; -} diff --git a/home/themes/alacritty.nix b/home/themes/alacritty.nix deleted file mode 100644 index abdbdc7..0000000 --- a/home/themes/alacritty.nix +++ /dev/null @@ -1,93 +0,0 @@ -{lib}: let - inherit - (lib) - mkOption - types - ; - - mkColorOption = import ./color.nix {inherit lib;}; - - primaryColorModule = types.submodule { - options = { - background = mkColorOption {}; - foreground = mkColorOption {}; - }; - }; - - cursorColorModule = types.submodule { - options = { - text = mkColorOption {}; - cursor = mkColorOption {}; - }; - }; - - rainbowColorModule = types.submodule { - options = { - black = mkColorOption {}; - red = mkColorOption {}; - green = mkColorOption {}; - yellow = mkColorOption {}; - blue = mkColorOption {}; - magenta = mkColorOption {}; - cyan = mkColorOption {}; - white = mkColorOption {}; - }; - }; -in - types.submodule { - options = { - primary = mkOption { - type = primaryColorModule; - default = { - foreground = "#c5c8c6"; - background = "#1d1f21"; - }; - }; - cursor = mkOption { - type = cursorColorModule; - default = { - text = "#1d1f21"; - cursor = "#c5c8c6"; - }; - }; - normal = mkOption { - type = rainbowColorModule; - default = { - black = "#1d1f21"; - red = "#cc6666"; - green = "#b5bd68"; - yellow = "#f0c674"; - blue = "#81a2be"; - magenta = "#b294bb"; - cyan = "#8abeb7"; - white = "#c5c8c6"; - }; - }; - bright = mkOption { - type = rainbowColorModule; - default = { - black = "#666666"; - red = "#d54e53"; - green = "#b9ca4a"; - yellow = "#e7c547"; - blue = "#7aa6da"; - magenta = "#c397d8"; - cyan = "#70c0b1"; - white = "#eaeaea"; - }; - }; - dim = mkOption { - type = rainbowColorModule; - default = { - black = "#131415"; - red = "#864343"; - green = "#777c44"; - yellow = "#9e824c"; - blue = "#556a7d"; - magenta = "#75617b"; - cyan = "#5b7d78"; - white = "#828482"; - }; - }; - }; - } diff --git a/home/themes/bat.nix b/home/themes/bat.nix deleted file mode 100644 index 22e873e..0000000 --- a/home/themes/bat.nix +++ /dev/null @@ -1,15 +0,0 @@ -{lib}: let - inherit - (lib) - mkOption - types - ; -in - types.submodule { - options = { - name = mkOption { - type = types.str; - default = ""; - }; - }; - } diff --git a/home/themes/color.nix b/home/themes/color.nix deleted file mode 100644 index c1aa5af..0000000 --- a/home/themes/color.nix +++ /dev/null @@ -1,18 +0,0 @@ -{lib}: let - inherit - (lib) - mkOption - types - ; - - mkColorOption = { - default ? "#000000", - description ? "", - }: - mkOption { - inherit description default; - example = "#abcdef"; - type = types.strMatching "#[0-9a-f]{6}"; - }; -in - mkColorOption diff --git a/home/themes/default.nix b/home/themes/default.nix deleted file mode 100644 index 19c4103..0000000 --- a/home/themes/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkOption - types - ; - - themeType = types.submodule { - options = { - alacrittyTheme = mkOption { - type = import ./alacritty.nix {inherit lib;}; - default = {}; - }; - batTheme = mkOption { - type = import ./bat.nix {inherit lib;}; - default = {}; - }; - i3Theme = mkOption { - type = import ./i3.nix {inherit lib;}; - default = {}; - }; - i3BarTheme = mkOption { - type = import ./i3bar.nix {inherit lib;}; - default = {}; - }; - }; - }; -in { - options.my.theme = mkOption { - type = themeType; - default = {}; - }; - - options.my.themes = mkOption { - type = types.attrsOf themeType; - }; - - config.my.themes = { - solarizedLight = import ./solarizedLight; - }; -} diff --git a/home/themes/i3.nix b/home/themes/i3.nix deleted file mode 100644 index cd784fd..0000000 --- a/home/themes/i3.nix +++ /dev/null @@ -1,188 +0,0 @@ -{lib}: let - inherit - (lib) - mkOption - types - ; - - mkColorOption = import ./color.nix {inherit lib;}; - - barColorSetModule = types.submodule { - options = { - border = mkColorOption {}; - background = mkColorOption {}; - text = mkColorOption {}; - }; - }; - - colorSetModule = types.submodule { - options = { - border = mkColorOption {}; - childBorder = mkColorOption {}; - background = mkColorOption {}; - text = mkColorOption {}; - indicator = mkColorOption {}; - }; - }; -in - types.submodule { - options = { - bar = mkOption { - type = types.submodule { - options = { - background = mkColorOption { - default = "#000000"; - description = "Background color of the bar."; - }; - - statusline = mkColorOption { - default = "#ffffff"; - description = "Text color to be used for the statusline."; - }; - - separator = mkColorOption { - default = "#666666"; - description = "Text color to be used for the separator."; - }; - - focusedWorkspace = mkOption { - type = barColorSetModule; - default = { - border = "#4c7899"; - background = "#285577"; - text = "#ffffff"; - }; - description = '' - Border, background and text color for a workspace button when the workspace has focus. - ''; - }; - - activeWorkspace = mkOption { - type = barColorSetModule; - default = { - border = "#333333"; - background = "#5f676a"; - text = "#ffffff"; - }; - description = '' - Border, background and text color for a workspace button when the workspace is active. - ''; - }; - - inactiveWorkspace = mkOption { - type = barColorSetModule; - default = { - border = "#333333"; - background = "#222222"; - text = "#888888"; - }; - description = '' - Border, background and text color for a workspace button when the workspace does not - have focus and is not active. - ''; - }; - - urgentWorkspace = mkOption { - type = barColorSetModule; - default = { - border = "#2f343a"; - background = "#900000"; - text = "#ffffff"; - }; - description = '' - Border, background and text color for a workspace button when the workspace contains - a window with the urgency hint set. - ''; - }; - - bindingMode = mkOption { - type = barColorSetModule; - default = { - border = "#2f343a"; - background = "#900000"; - text = "#ffffff"; - }; - description = "Border, background and text color for the binding mode indicator"; - }; - }; - }; - - default = {}; - }; - - background = mkOption { - type = types.str; - default = "#ffffff"; - description = '' - Background color of the window. Only applications which do not cover - the whole area expose the color. - ''; - }; - - focused = mkOption { - type = colorSetModule; - default = { - border = "#4c7899"; - background = "#285577"; - text = "#ffffff"; - indicator = "#2e9ef4"; - childBorder = "#285577"; - }; - description = "A window which currently has the focus."; - }; - - focusedInactive = mkOption { - type = colorSetModule; - default = { - border = "#333333"; - background = "#5f676a"; - text = "#ffffff"; - indicator = "#484e50"; - childBorder = "#5f676a"; - }; - description = '' - A window which is the focused one of its container, - but it does not have the focus at the moment. - ''; - }; - - unfocused = mkOption { - type = colorSetModule; - default = { - border = "#333333"; - background = "#222222"; - text = "#888888"; - indicator = "#292d2e"; - childBorder = "#222222"; - }; - description = "A window which is not focused."; - }; - - urgent = mkOption { - type = colorSetModule; - default = { - border = "#2f343a"; - background = "#900000"; - text = "#ffffff"; - indicator = "#900000"; - childBorder = "#900000"; - }; - description = "A window which has its urgency hint activated."; - }; - - placeholder = mkOption { - type = colorSetModule; - default = { - border = "#000000"; - background = "#0c0c0c"; - text = "#ffffff"; - indicator = "#000000"; - childBorder = "#0c0c0c"; - }; - description = '' - Background and text color are used to draw placeholder window - contents (when restoring layouts). Border and indicator are ignored. - ''; - }; - }; - } diff --git a/home/themes/i3bar.nix b/home/themes/i3bar.nix deleted file mode 100644 index 0df2ff9..0000000 --- a/home/themes/i3bar.nix +++ /dev/null @@ -1,28 +0,0 @@ -{lib}: let - inherit - (lib) - mkOption - types - ; - - mkColorOption = import ./color.nix {inherit lib;}; -in - types.submodule { - options = { - theme = mkOption { - type = types.submodule { - options = { - name = mkOption { - type = types.str; - default = "plain"; - }; - overrides = mkOption { - type = types.attrsOf types.str; - default = {}; - }; - }; - }; - default = {}; - }; - }; - } diff --git a/home/themes/solarizedLight/alacritty.nix b/home/themes/solarizedLight/alacritty.nix deleted file mode 100644 index 7c69411..0000000 --- a/home/themes/solarizedLight/alacritty.nix +++ /dev/null @@ -1,55 +0,0 @@ -let - inherit - (import ./colors.nix) - base0 - base00 - base01 - base02 - base03 - base1 - base2 - base3 - blue - cyan - green - magenta - orange - red - violet - yellow - ; -in { - primary = { - background = base3; - foreground = base00; - }; - - cursor = { - text = base3; - cursor = base00; - }; - - normal = { - black = base02; - red = red; - green = green; - yellow = yellow; - blue = blue; - magenta = magenta; - cyan = cyan; - white = base2; - }; - - bright = { - black = base03; - red = orange; - green = base01; - yellow = base00; - blue = base0; - magenta = violet; - cyan = base1; - white = base3; - }; - - dim = {}; -} diff --git a/home/themes/solarizedLight/bat.nix b/home/themes/solarizedLight/bat.nix deleted file mode 100644 index 053f11c..0000000 --- a/home/themes/solarizedLight/bat.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - name = "Solarized (light)"; -} diff --git a/home/themes/solarizedLight/colors.nix b/home/themes/solarizedLight/colors.nix deleted file mode 100644 index 2426f51..0000000 --- a/home/themes/solarizedLight/colors.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - base03 = "#002b36"; # brblack - base02 = "#073642"; # black - base01 = "#586e75"; # brgreen - base00 = "#657b83"; # bryellow - base0 = "#839496"; # brblue - base1 = "#93a1a1"; # brcyan - base2 = "#eee8d5"; # white - base3 = "#fdf6e3"; # brwhite - yellow = "#b58900"; # yellow - orange = "#cb4b16"; # brred - red = "#dc322f"; # red - magenta = "#d33682"; # magenta - violet = "#6c71c4"; # brmagenta - blue = "#268bd2"; # blue - cyan = "#2aa198"; # cyan - green = "#859900"; # green -} diff --git a/home/themes/solarizedLight/default.nix b/home/themes/solarizedLight/default.nix deleted file mode 100644 index 01517b1..0000000 --- a/home/themes/solarizedLight/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - alacrittyTheme = import ./alacritty.nix; - batTheme = import ./bat.nix; - i3Theme = import ./i3.nix; - i3BarTheme = import ./i3bar.nix; -} diff --git a/home/themes/solarizedLight/i3.nix b/home/themes/solarizedLight/i3.nix deleted file mode 100644 index a5762ce..0000000 --- a/home/themes/solarizedLight/i3.nix +++ /dev/null @@ -1,72 +0,0 @@ -let - inherit - (import ./colors.nix) - base00 - base2 - base3 - blue - magenta - orange - red - yellow - ; -in { - bar = { - background = base3; - statusline = yellow; - separator = red; - - focusedWorkspace = { - border = blue; - background = blue; - text = base3; # base2 ? - }; - inactiveWorkspace = { - border = base2; - background = base2; - text = base00; - }; - activeWorkspace = { - border = blue; - background = base2; - text = yellow; - }; - urgentWorkspace = { - border = red; - background = red; - text = base3; - }; - }; - - focused = { - border = blue; - background = blue; - text = base3; - indicator = magenta; - childBorder = blue; - }; - - focusedInactive = { - border = base2; - background = base2; - text = base00; - indicator = magenta; - childBorder = base2; - }; - - unfocused = { - border = base2; - background = base2; - text = base00; - indicator = magenta; - childBorder = base2; - }; - - urgent = { - border = orange; - background = orange; - text = base3; - indicator = magenta; - childBorder = orange; - }; -} diff --git a/home/themes/solarizedLight/i3bar.nix b/home/themes/solarizedLight/i3bar.nix deleted file mode 100644 index 0e450c2..0000000 --- a/home/themes/solarizedLight/i3bar.nix +++ /dev/null @@ -1,28 +0,0 @@ -let - inherit - (import ./colors.nix) - base00 - base2 - base3 - blue - green - red - yellow - ; -in { - theme = { - name = "solarized-light"; - overrides = { - idle_bg = base2; - idle_fg = base00; - info_bg = blue; - info_fg = base3; - good_bg = green; - good_fg = base3; - warning_bg = yellow; - warning_fg = base3; - critical_bg = red; - critical_fg = base3; - }; - }; -} diff --git a/home/tmux.nix b/home/tmux.nix index 45401c3..24402eb 100644 --- a/home/tmux.nix +++ b/home/tmux.nix @@ -1,46 +1,15 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - +{ config, lib, pkgs, ... }: +let cfg = config.my.home.tmux; -in { - options.my.home.tmux = { - enable = (mkEnableOption "tmux dotfiles") // {default = true;}; +in +{ + options.my.home.tmux = with lib; { + enable = mkEnableOption "tmux dotfiles"; }; - config = mkIf cfg.enable { - programs.tmux = { - enable = true; - escapeTime = 0; - baseIndex = 1; - terminal = "screen-256color"; - clock24 = true; - - plugins = let - inherit (pkgs) tmuxPlugins; - in [ - { - plugin = tmuxPlugins.cpu; - extraConfig = '' - set -g status-right 'CPU: #{cpu_percentage} | %a %d-%h %H:%M ' - ''; - } - { - plugin = pkgs.tmuxPlugins.catppuccin; - extraConfig = '' - set -g @catppuccin_flavor 'latte' - set -g @catppuccin_window_status_style "rounded" - ''; - } - ]; - }; + config.programs.tmux = lib.mkIf cfg.enable { + enable = true; + baseIndex = 1; + plugins = with pkgs; [ packages.tmux-thumbs ]; }; } diff --git a/home/tridactyl.nix b/home/tridactyl.nix deleted file mode 100644 index 8b4647c..0000000 --- a/home/tridactyl.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.tridactyl; -in { - options.my.home.tridactyl = { - enable = (mkEnableOption "tridactyl code display tool") // {default = config.my.home.firefox.enable;}; - }; - - config = mkIf cfg.enable { - xdg.configFile."tridactyl/tridactylrc".source = ./tridactylrc; - }; -} diff --git a/home/tridactylrc b/home/tridactylrc deleted file mode 100644 index b0b07d2..0000000 --- a/home/tridactylrc +++ /dev/null @@ -1,51 +0,0 @@ -" -*- tridactylrc -*- - -" This wipes all existing settings. This means that if a setting in this file is -" removed, then it will return to default. In other words, this file serves as -" as an enforced single point of truth for Tridactyl's configuration. -sanitize tridactyllocal tridactylsync - -" Ergo-L chars, alternating between right and left hand. I also omitted -" punctuation like `-` and `,`. Tridactyl supports it but the visual hints won't -" look as good. -set hintchars rnteisualfhvdockzgxyq - -" Ctrl-F should use the browser's native 'find' functionality. -unbind - -" Tridactyl has an incomplete find mode -bind / fillcmdline find -bind ? fillcmdline find -? -bind n findnext 1 -bind N findnext -1 -bind , nohlsearch - -" case insensitive if lowercase, case sensitive if using some uppercase letters -set findcase smart - -set modeindicatormodes {"ignore": "false"} - -" New reddit is bad -" autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old") - -" Orange site / Reddit / Lobste.rs specific hints to toggle comments -bind ;c hint -Jc [class*="expand"],[class="togg"],[class="comment_folder"] - -" Use emacs as editor -set editorcmd emacsclient -c - -" copy all the things -set yankto both - -blacklistadd calendar.google.com -blacklistadd keybr.com -blacklistadd ergol.org -blacklistadd monkeytype.com -blacklistadd jellyfin.alarsyo.net -blacklistadd localhost -blacklistadd netflix.com -blacklistadd primevideo.com -blacklistadd youtube.com - -" prevent teams from crashing -seturl teams.microsoft.com superignore true diff --git a/home/x/cursor.nix b/home/x/cursor.nix deleted file mode 100644 index aa3ebbb..0000000 --- a/home/x/cursor.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.home.x.cursor; -in { - options.my.home.x.cursor.enable = (mkEnableOption "X cursor") // {default = config.my.home.x.enable;}; - - config = mkIf cfg.enable { - home.pointerCursor = { - #package = pkgs.capitaine-cursors; - #name = "capitaine-cursors"; - #package = pkgs.catppuccin-cursors.frappeDark; - #name = "catppuccin-frappe-dark-cursors"; - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Classic"; - # https://unix.stackexchange.com/a/743543 - size = 24; - x11.enable = true; - gtk.enable = true; - }; - }; -} diff --git a/home/x/default.nix b/home/x/default.nix index 5cc058b..ca92c09 100644 --- a/home/x/default.nix +++ b/home/x/default.nix @@ -1,21 +1,11 @@ +{ config, lib, pkgs, ... }: { - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - ; -in { imports = [ - ./cursor.nix ./i3.nix ./i3bar.nix ]; - options.my.home.x = { + options.my.home.x = with lib; { enable = mkEnableOption "X server configuration"; }; } diff --git a/home/x/i3.nix b/home/x/i3.nix index 0fefa09..23121bf 100644 --- a/home/x/i3.nix +++ b/home/x/i3.nix @@ -1,17 +1,6 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOptionDefault - ; - - isEnabled = config.my.home.x.i3.enable; +{ config, lib, pkgs, ... }: +let + isEnabled = config.my.home.x.enable; myTerminal = # FIXME: fix when terminal is setup in home @@ -25,192 +14,107 @@ logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot"; - i3Theme = config.my.theme.i3Theme; -in { - options.my.home.x.i3 = { - enable = mkEnableOption "i3wm configuration"; - }; - - config = mkIf isEnabled { + # colors + colorBg = "#282828"; + colorRed = "#cc241d"; + colorGreen = "#98971a"; + colorYellow = "#d79921"; + colorBlue = "#458588"; + colorPurple = "#b16286"; + colorAqua = "#689d68"; + colorGray = "#a89984"; + colorDarkGray = "#1d2021"; +in +{ + config = lib.mkIf isEnabled { my.home = { flameshot.enable = true; }; - home.packages = [pkgs.betterlockscreen pkgs.playerctl]; - - # used to control music - services.playerctld.enable = true; - xsession.windowManager.i3 = { enable = true; config = { inherit modifier; - bars = let - barConfigPath = - config.xdg.configFile."i3status-rust/config-top.toml".target; - in [ - { - statusCommand = "i3status-rs ~/${barConfigPath}"; - position = "top"; - fonts = { - names = ["DejaVuSansMono" "FontAwesome6Free"]; - size = 9.0; - }; + bars = + let + barConfigPath = + config.xdg.configFile."i3status-rust/config-top.toml".target; + in + [ + { + statusCommand = "i3status-rs ${barConfigPath}"; + position = "top"; + fonts = [ "DejaVu Sans Mono 9" ]; - colors = i3Theme.bar; + colors = { + background = colorBg; + statusline = colorYellow; - trayOutput = "primary"; - - # disable mouse scroll wheel in bar - extraConfig = '' - bindsym button4 nop - bindsym button5 nop - ''; - } - ]; - - colors = { - inherit - (i3Theme) - focused - focusedInactive - unfocused - urgent - ; - }; + focusedWorkspace = { + border = colorAqua; + background = colorAqua; + text = colorDarkGray; + }; + inactiveWorkspace = { + border = colorDarkGray; + background = colorDarkGray; + text = colorYellow; + }; + activeWorkspace = { + border = colorAqua; + background = colorDarkGray; + text = colorYellow; + }; + urgentWorkspace = { + border = colorRed; + background = colorRed; + text = colorBg; + }; + }; + } + ]; focus = { followMouse = true; mouseWarping = true; }; - workspaceAutoBackAndForth = true; + fonts = [ + "DejaVu Sans Mono 8" + ]; - fonts = { - names = ["DejaVu Sans Mono"]; - size = 8.0; - }; - - keybindings = mkOptionDefault { + keybindings = lib.mkOptionDefault { "${modifier}+Shift+e" = ''mode "${logoutMode}"''; - "${modifier}+b" = "exec --no-startup-id bluetoothctl power on"; - "${modifier}+i" = "exec emacsclient --create-frame"; - "${modifier}+o" = "exec emacsclient --create-frame --eval '(load \"${config.xdg.configHome}/doom/launch-agenda.el\")'"; - - # Volume handling - "XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%"; - "XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%"; - "XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle"; - "XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle"; - - # I need play-pause everywhere because somehow, keycode 172 seems to - # be interpreted as pause everytime when sent by my keyboard. Ugh, - # computers. - "XF86AudioPlay" = "exec --no-startup-id playerctl play-pause"; - "XF86AudioPause" = "exec --no-startup-id playerctl play-pause"; - "XF86AudioPrev" = "exec --no-startup-id playerctl previous"; - "XF86AudioNext" = "exec --no-startup-id playerctl next"; - - "XF86MonBrightnessDown" = "exec --no-startup-id light -U 5"; - "XF86MonBrightnessUp" = "exec --no-startup-id light -A 5"; - "${modifier}+XF86MonBrightnessDown" = "exec --no-startup-id light -U 0.1"; - "${modifier}+XF86MonBrightnessUp" = "exec --no-startup-id light -A 0.1"; - - "${modifier}+l" = "exec --no-startup-id betterlockscreen --lock"; - "${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show run"; - - "${modifier}+Shift+a" = ''exec --no-startup-id autorandr --change''; + "${modifier}+i" = "exec emacsclient -c"; }; - modes = let - makeModeBindings = attrs: - attrs - // { + modes = + let + makeModeBindings = attrs: attrs // { "Escape" = "mode default"; "Return" = "mode default"; }; - in - mkOptionDefault { - "${logoutMode}" = makeModeBindings { + in + { + ${logoutMode} = makeModeBindings { "l" = "exec --no-startup-id i3-msg exit, mode default"; - "s" = "exec --no-startup-id betterlockscreen --suspend, mode default"; + "s" = "exec --no-startup-id systemctl suspend, mode default"; "p" = "exec --no-startup-id systemctl poweroff, mode default"; "r" = "exec --no-startup-id systemctl reboot, mode default"; }; }; + startup = [ + # FIXME: make it conditional on "nvidia" being part of video drivers + { + command = "nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'"; + notification = false; + } + ]; + terminal = myTerminal; - - assigns = { - "10" = [ - {class = "Slack";} - {class = "discord";} - ]; - }; - - # TODO: make it configurable per machine - workspaceOutputAssign = [ - { - workspace = "1"; - output = ["DP-4" "eDP-1"]; - } - { - workspace = "2"; - output = ["DP-4" "eDP-1"]; - } - { - workspace = "3"; - output = ["DP-5" "eDP-1"]; - } - { - workspace = "4"; - output = ["DP-5" "eDP-1"]; - } - { - workspace = "5"; - output = ["DP-5" "eDP-1"]; - } - - { - workspace = "6"; - output = ["eDP-1"]; - } - { - workspace = "7"; - output = ["eDP-1"]; - } - - { - workspace = "8"; - output = ["DP-4" "eDP-1"]; - } - { - workspace = "9"; - output = ["DP-4" "eDP-1"]; - } - { - workspace = "10"; - output = ["DP-4" "eDP-1"]; - } - ]; - - window.commands = [ - { - command = "border pixel 2"; - criteria = {class = "Alacritty";}; - } - - # NOTE: should be done with an assign command, but Spotify doesn't set - # its class until after initialization, so has to be done this way. - # - # See https://i3wm.org/docs/userguide.html#assign_workspace - { - criteria = {class = "Spotify";}; - command = "move --no-auto-back-and-forth to workspace 8"; - } - ]; }; }; }; diff --git a/home/x/i3bar.nix b/home/x/i3bar.nix index a00e483..644a06b 100644 --- a/home/x/i3bar.nix +++ b/home/x/i3bar.nix @@ -1,155 +1,20 @@ +{ config, lib, pkgs, ... }: +let + isEnabled = config.my.home.x.enable; +in { - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - lists - mkIf - mkOption - optional - types - ; - - isEnabled = config.my.home.x.i3.enable; - i3BarTheme = config.my.theme.i3BarTheme; - cfg = config.my.home.x.i3bar; -in { - options.my.home.x.i3bar = { - temperature.chip = mkOption { - type = types.str; - example = "coretemp-isa-*"; - default = ""; - }; - temperature.inputs = mkOption { - type = types.listOf types.str; - example = ["Core 0" "Core 1" "Core 2" "Core 3"]; - default = ""; - }; - - networking.throughput_interfaces = mkOption { - type = types.listOf types.str; - example = ["wlp1s0"]; - default = []; - }; - }; - - config = mkIf isEnabled { - home.packages = builtins.attrValues { - inherit - (pkgs) - # FIXME: is this useful? - font-awesome - ; - }; + config = lib.mkIf isEnabled { + home.packages = with pkgs; [ + alsaUtils # Used by `sound` block + lm_sensors # Used by `temperature` block + ]; programs.i3status-rust = { enable = true; bars = { top = { - icons = "awesome5"; - settings.theme = { - theme = i3BarTheme.theme.name; - overrides = i3BarTheme.theme.overrides; - }; - - blocks = - [ - { - block = "pomodoro"; - notify_cmd = "i3nag"; - blocking_cmd = true; - } - { - block = "disk_space"; - path = "/"; - info_type = "available"; - interval = 60; - warning = 20.0; - alert = 10.0; - alert_unit = "GB"; - } - { - block = "memory"; - format = " $icon $mem_used.eng(prefix:G)/$mem_total.eng(prefix:G) "; - warning_mem = 70.0; - critical_mem = 90.0; - } - { - block = "cpu"; - interval = 1; - format = " $icon $barchart "; - } - { - block = "temperature"; - interval = 10; - format = " $icon $max "; - chip = cfg.temperature.chip; - inputs = cfg.temperature.inputs; - } - { - block = "custom"; - # TODO: get service name programmatically somehow - command = let - systemctl = lib.getExe' pkgs.systemd "systemctl"; - in - pkgs.writeShellScript "check-restic.sh" '' - BACKUP_STATUS=Good - if ${systemctl} is-failed --quiet restic-backups-backblaze.service; then - BACKUP_STATUS=Critical - fi - echo "{\"state\": \"$BACKUP_STATUS\", \"text\": \"Backup\"}" - ''; - json = true; - interval = 60; - } - ] - ++ ( - lists.optionals ((builtins.length cfg.networking.throughput_interfaces) != 0) - (map - (interface: { - block = "net"; - device = interface; - interval = 1; - missing_format = ""; - }) - cfg.networking.throughput_interfaces) - ) - ++ [ - { - block = "net"; - format = " $icon {$ip|} {SSID: $ssid|}"; - theme_overrides = { - idle_bg = {link = "good_bg";}; - idle_fg = {link = "good_fg";}; - }; - } - { - block = "sound"; - driver = "pulseaudio"; - } - ] - ++ ( - optional config.my.home.laptop.enable - { - block = "battery"; - format = " $icon $percentage ($power) "; - } - ) - ++ [ - # { - # block = "notify"; - # } - { - block = "time"; - interval = 5; - format = " $icon $timestamp.datetime(f:'%a %d/%m %T', l:fr_FR) "; - timezone = "Europe/Paris"; - } - ]; + theme = "gruvbox-light"; }; }; }; diff --git a/hosts/boreal/default.nix b/hosts/boreal/default.nix index 12b56fa..bd66dcb 100644 --- a/hosts/boreal/default.nix +++ b/hosts/boreal/default.nix @@ -1,40 +1,27 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, lib, pkgs, ... }: +let + secrets = config.my.secrets; +in { - config, - lib, - pkgs, - ... -}: { - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix - ./home.nix - - ./secrets.nix - ]; - - boot.kernelPackages = pkgs.linuxPackages; + ./home.nix + ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.tmp.useTmpfs = true; - - boot.supportedFilesystems = { - btrfs = true; - ntfs = true; - }; - - services.xserver.windowManager.i3.enable = true; - services.btrfs = { autoScrub = { enable = true; - fileSystems = ["/"]; + fileSystems = [ "/" ]; }; }; @@ -44,72 +31,57 @@ # Set your time zone. time.timeZone = "Europe/Paris"; + # The global useDHCP flag is deprecated, therefore explicitly set to false here. + # Per-interface useDHCP will be mandatory in the future, so this generated config + # replicates the default behaviour. + networking.interfaces.enp7s0.useDHCP = true; + networking.interfaces.wlp3s0.useDHCP = true; + # List services that you want to enable: my.services = { - restic-backup = { - enable = true; - repo = "b2:boreal-backup"; - passwordFile = config.age.secrets."restic-backup/boreal-password".path; - environmentFile = config.age.secrets."restic-backup/boreal-credentials".path; + wireguard = { + enable = false; + iface = "wg"; + port = 51820; - paths = [ - "/home/alarsyo" - ]; - exclude = [ - "/home/alarsyo/Downloads" - - # Rust builds using half my storage capacity - "/home/alarsyo/**/target" - "/home/alarsyo/work/rust/build" - - # don't backup nixpkgs - "/home/alarsyo/work/nixpkgs" - - # C build crap - "*.a" - "*.o" - "*.so" - - # ignore all dotfiles as .config and .cache can become quite big - "/home/alarsyo/.*" - ]; - }; - - pipewire.enable = true; - - tailscale = { - enable = true; - useRoutingFeatures = "both"; + net = { + v4 = { + subnet = "10.0.0"; + mask = 24; + }; + v6 = { + subnet = "fd42:42:42"; + mask = 64; + }; + }; }; }; services = { openssh = { enable = true; + permitRootLogin = "no"; + passwordAuthentication = false; }; - }; - my.gui = { - enable = true; - isNvidia = true; - }; - hardware = { - bluetooth = { + xserver = { enable = true; - powerOnBoot = false; - }; - nvidia = { - open = true; - modesetting.enable = true; + videoDrivers = [ "nvidia" ]; + windowManager.i3.enable = true; + layout = "fr"; + xkbVariant = "us"; }; }; - environment.systemPackages = with pkgs; [foot waybar wofi]; + sound.enable = true; + hardware.pulseaudio = { + enable = true; + extraModules = [ pkgs.pulseaudio-modules-bt ]; + package = pkgs.pulseaudioFull; + }; - programs.hyprland.enable = true; - programs.hyprlock.enable = true; - programs.waybar.enable = true; - programs.foot.enable = true; - services.displayManager.sddm.wayland.enable = true; - services.power-profiles-daemon.enable = true; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; } diff --git a/hosts/boreal/hardware-configuration.nix b/hosts/boreal/hardware-configuration.nix index cc68a01..d094221 100644 --- a/hosts/boreal/hardware-configuration.nix +++ b/hosts/boreal/hardware-configuration.nix @@ -1,34 +1,30 @@ # 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" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/1a942915-c1ae-4058-b99d-09d12d40dbd3"; - fsType = "btrfs"; - options = ["subvol=nixos" "compress=zstd:1" "noatime"]; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/1a942915-c1ae-4058-b99d-09d12d40dbd3"; + fsType = "btrfs"; + options = [ "subvol=nixos" "compress=zstd:1" "noatime" ]; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/17C7-368D"; - fsType = "vfat"; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/17C7-368D"; + fsType = "vfat"; + }; - swapDevices = []; + swapDevices = [ ]; hardware.cpu.amd.updateMicrocode = true; } diff --git a/hosts/boreal/home.nix b/hosts/boreal/home.nix index f7425b6..c39bf22 100644 --- a/hosts/boreal/home.nix +++ b/hosts/boreal/home.nix @@ -1,34 +1,9 @@ +{ ... }: { - config, - pkgs, - ... -}: { home-manager.users.alarsyo = { - home.stateVersion = "20.09"; - # Keyboard settings & i3 settings my.home.x.enable = true; - my.home.x.i3.enable = true; - my.home.x.i3bar.temperature.chip = "k10temp-pci-*"; - my.home.x.i3bar.temperature.inputs = ["Tccd1"]; - my.home.x.i3bar.networking.throughput_interfaces = ["enp8s0" "wlp4s0"]; my.home.emacs.enable = true; - - my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight; - - home.packages = builtins.attrValues { - inherit - (pkgs) - # some websites only work there :( - chromium - darktable - hugin - enblend-enfuse - # dev - rustup - ; - - inherit (pkgs.packages) spot; - }; + my.home.tmux.enable = true; }; } diff --git a/hosts/boreal/secrets.nix b/hosts/boreal/secrets.nix deleted file mode 100644 index 5d5947b..0000000 --- a/hosts/boreal/secrets.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - lib, - options, - ... -}: { - config.age = { - secrets = let - toSecret = name: {...} @ attrs: - { - file = ./../../modules/secrets + "/${name}.age"; - } - // attrs; - in - lib.mapAttrs toSecret { - "restic-backup/boreal-credentials" = {}; - "restic-backup/boreal-password" = {}; - - "users/alarsyo-hashed-password" = {}; - "users/root-hashed-password" = {}; - }; - }; -} diff --git a/hosts/hades/default.nix b/hosts/hades/default.nix deleted file mode 100644 index 5f5355b..0000000 --- a/hosts/hades/default.nix +++ /dev/null @@ -1,217 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). -{ - config, - lib, - pkgs, - ... -}: let - secrets = config.my.secrets; -in { - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - - ./home.nix - ./secrets.nix - ]; - - boot.loader.systemd-boot.enable = false; - boot.loader.grub = { - enable = true; - efiSupport = false; - devices = ["/dev/sda" "/dev/sdb"]; - }; - - boot.tmp.useTmpfs = true; - - networking.hostName = "hades"; # Define your hostname. - networking.domain = "alarsyo.net"; - - # Set your time zone. - time.timeZone = "Europe/Paris"; - - networking.useDHCP = false; - networking.interfaces.enp35s0.ipv4.addresses = [ - { - address = "95.217.121.60"; - prefixLength = 26; - } - ]; - networking.interfaces.enp35s0.ipv6.addresses = [ - { - address = "2a01:4f9:4a:3649::2"; - prefixLength = 64; - } - ]; - networking.defaultGateway = "95.217.121.1"; - networking.defaultGateway6 = { - address = "fe80::1"; - interface = "enp35s0"; - }; - networking.nameservers = ["1.1.1.1" "1.0.0.1"]; - my.networking.externalInterface = "enp35s0"; - - # List services that you want to enable: - my.services = { - fail2ban.enable = true; - - forgejo = { - enable = true; - privatePort = 8082; - }; - - immich = { - enable = true; - port = 8089; - }; - - jellyfin = { - enable = true; - }; - - lohr = { - enable = true; - port = 8083; - }; - - matrix = { - enable = true; - secretConfigFile = config.age.secrets."matrix-synapse/secret-config".path; - }; - - mealie = { - enable = true; - port = 8090; - credentialsFile = config.age.secrets."mealie/secret-config".path; - }; - - microbin = { - enable = true; - privatePort = 8088; - passwordFile = config.age.secrets."microbin/secret-config".path; - }; - - miniflux = { - enable = true; - adminCredentialsFile = config.age.secrets."miniflux/admin-credentials".path; - privatePort = 8080; - }; - - navidrome = { - enable = true; - musicFolder.path = "${config.services.nextcloud.home}/data/alarsyo/files/Musique/Songs"; - }; - - nextcloud = { - enable = true; - adminpassFile = config.age.secrets."nextcloud/admin-pass".path; - }; - - nginx.enable = true; - - paperless = { - enable = true; - port = 8085; - passwordFile = config.age.secrets."paperless/admin-password".path; - secretKeyFile = config.age.secrets."paperless/secret-key".path; - }; - - pleroma = { - enable = false; - port = 8086; - secretConfigFile = config.age.secrets."pleroma/pleroma-config".path; - }; - - restic-backup = { - enable = true; - repo = "b2:hades-backup-alarsyo"; - passwordFile = config.age.secrets."restic-backup/hades-password".path; - environmentFile = config.age.secrets."restic-backup/hades-credentials".path; - paths = ["/home/alarsyo"]; - }; - - scribe = { - enable = true; - port = 8087; - }; - - tailscale = { - enable = true; - useRoutingFeatures = "server"; - }; - - transmission = { - enable = true; - username = "alarsyo"; - }; - - vaultwarden = { - enable = true; - privatePort = 8081; - websocketPort = 3012; - }; - }; - - services = { - openssh.enable = true; - vnstat.enable = true; - - gitlab-runner = { - enable = true; - settings = { - concurrent = 4; - }; - services = { - nix = { - authenticationTokenConfigFile = config.age.secrets."gitlab-runner/hades-nix-runner-env".path; - dockerImage = "alpine"; - dockerVolumes = [ - "/nix/store:/nix/store:ro" - "/nix/var/nix/db:/nix/var/nix/db:ro" - "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" - ]; - dockerDisableCache = true; - preBuildScript = pkgs.writeScript "setup-container" '' - mkdir -p -m 0755 /nix/var/log/nix/drvs - mkdir -p -m 0755 /nix/var/nix/gcroots - mkdir -p -m 0755 /nix/var/nix/profiles - mkdir -p -m 0755 /nix/var/nix/temproots - mkdir -p -m 0755 /nix/var/nix/userpool - mkdir -p -m 1777 /nix/var/nix/gcroots/per-user - mkdir -p -m 1777 /nix/var/nix/profiles/per-user - mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root - mkdir -p -m 0700 "$HOME/.nix-defexpr" - - . ${pkgs.nix}/etc/profile.d/nix.sh - - ${pkgs.nix}/bin/nix-env -i ${lib.concatStringsSep " " (with pkgs; [nix cacert git openssh])} - - ${pkgs.nix}/bin/nix-channel --add https://nixos.org/channels/nixpkgs-unstable - ${pkgs.nix}/bin/nix-channel --update nixpkgs - - mkdir -p ~/.config/nix - echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf - ''; - environmentVariables = { - ENV = "/etc/profile"; - USER = "root"; - NIX_REMOTE = "daemon"; - PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; - NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; - }; - }; - }; - }; - }; - - virtualisation.docker.enable = true; - - environment.systemPackages = with pkgs; [ - docker-compose - ]; - - # Takes a long while to build - documentation.nixos.enable = false; -} diff --git a/hosts/hades/hardware-configuration.nix b/hosts/hades/hardware-configuration.nix deleted file mode 100644 index 57882a3..0000000 --- a/hosts/hades/hardware-configuration.nix +++ /dev/null @@ -1,29 +0,0 @@ -# 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, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = ["ahci" "sd_mod"]; - boot.initrd.kernelModules = ["dm-snapshot"]; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/2a24010c-14bd-439b-b30b-d0e18db69952"; - fsType = "ext4"; - }; - - swapDevices = []; - - powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/hades/home.nix b/hosts/hades/home.nix deleted file mode 100644 index a3737e5..0000000 --- a/hosts/hades/home.nix +++ /dev/null @@ -1,6 +0,0 @@ -{config, ...}: { - home-manager.users.alarsyo = { - home.stateVersion = "22.05"; - my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight; - }; -} diff --git a/hosts/hades/secrets.nix b/hosts/hades/secrets.nix deleted file mode 100644 index eb0fa3b..0000000 --- a/hosts/hades/secrets.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - lib, - options, - ... -}: { - config.age = { - secrets = let - toSecret = name: {...} @ attrs: - { - file = ./../../modules/secrets + "/${name}.age"; - } - // attrs; - in - lib.mapAttrs toSecret { - "gitlab-runner/hades-nix-runner-env" = {}; - - "lohr/shared-secret" = {}; - - "matrix-synapse/secret-config" = { - owner = "matrix-synapse"; - }; - - "mealie/secret-config" = {}; - - "microbin/secret-config" = {}; - - "miniflux/admin-credentials" = {}; - - "nextcloud/admin-pass" = { - owner = "nextcloud"; - }; - - "ovh/credentials" = {}; - - "paperless/admin-password" = {}; - "paperless/secret-key" = {}; - - "pleroma/pleroma-config" = { - owner = "pleroma"; - }; - - "restic-backup/hades-credentials" = {}; - "restic-backup/hades-password" = {}; - - "users/alarsyo-hashed-password" = {}; - "users/root-hashed-password" = {}; - }; - }; -} diff --git a/hosts/poseidon/default.nix b/hosts/poseidon/default.nix new file mode 100644 index 0000000..b89fdc7 --- /dev/null +++ b/hosts/poseidon/default.nix @@ -0,0 +1,146 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, lib, pkgs, ... }: +let + secrets = config.my.secrets; +in +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + + boot.supportedFilesystems = [ "btrfs" ]; + + services.btrfs = { + autoScrub = { + enable = true; + fileSystems = [ "/" ]; + }; + }; + + networking.hostName = "poseidon"; # Define your hostname. + networking.domain = "alarsyo.net"; + + # Set your time zone. + time.timeZone = "Europe/Paris"; + + # The global useDHCP flag is deprecated, therefore explicitly set to false here. + # Per-interface useDHCP will be mandatory in the future, so this generated config + # replicates the default behaviour. + networking.useDHCP = false; + networking.interfaces.eno1.ipv4.addresses = [ + { + address = "163.172.11.110"; + prefixLength = 24; + } + ]; + networking.defaultGateway = { + address = "163.172.11.1"; + interface = "eno1"; + }; + networking.nameservers = [ + "62.210.16.6" + "62.210.16.7" + ]; + my.networking.externalInterface = "eno1"; + + # List services that you want to enable: + my.services = { + bitwarden_rs = { + enable = true; + privatePort = 8081; + websocketPort = 3012; + }; + + borg-backup = { + enable = true; + repo = secrets.borg-backup-repo; + }; + + fail2ban = { + enable = true; + }; + + gitea = { + enable = true; + privatePort = 8082; + }; + + jellyfin = { + enable = true; + }; + + lohr = { + enable = true; + port = 8083; + }; + + miniflux = { + enable = true; + adminCredentialsFile = "${../../secrets/miniflux-admin-credentials.secret}"; + privatePort = 8080; + }; + + matrix = { + enable = true; + registration_shared_secret = secrets.matrix-registration-shared-secret; + }; + + monitoring = { + enable = true; + useACME = true; + domain = "monitoring.${config.networking.domain}"; + }; + + nextcloud = { + enable = true; + }; + + postgresql-backup = { + enable = true; + }; + + tgv = { + enable = true; + }; + + transmission = { + enable = true; + username = "alarsyo"; + password = secrets.transmission-password; + }; + + wireguard = { + enable = true; + iface = "wg"; + port = 51820; + + net = { + v4 = { + subnet = "10.0.0"; + mask = 24; + }; + v6 = { + subnet = "fd42:42:42"; + mask = 64; + }; + }; + }; + }; + + security.acme.acceptTerms = true; + security.acme.email = "antoine97.martin@gmail.com"; + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + services.openssh.permitRootLogin = "no"; + services.openssh.passwordAuthentication = false; +} diff --git a/hosts/poseidon/hardware-configuration.nix b/hosts/poseidon/hardware-configuration.nix new file mode 100644 index 0000000..bd2bc7a --- /dev/null +++ b/hosts/poseidon/hardware-configuration.nix @@ -0,0 +1,36 @@ +# 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, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/adcf0158-edfb-402f-82e7-61e4902af989"; + fsType = "btrfs"; + options = [ + "subvol=@nixos" + "compress=zstd" + "noatime" + ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/ff54b622-0e26-4c6e-aa0c-ac2c1e12699a"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/381a9c5e-4d71-45b4-ac62-e7414b3768fc"; } + ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; +} diff --git a/hosts/talos/default.nix b/hosts/talos/default.nix deleted file mode 100644 index bf11f17..0000000 --- a/hosts/talos/default.nix +++ /dev/null @@ -1,185 +0,0 @@ -# Edit this configuration file to define what should be installed on -# 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`). -{ - config, - lib, - pkgs, - ... -}: { - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ./disko-config.nix - - ./home.nix - ./secrets.nix - ]; - - boot.kernelPackages = pkgs.linuxPackages_6_12; - # Set Wi-Fi regulatory domain. Currently always set to '00' (world), and could - # lead to bad Wi-Fi performance - boot.kernelParams = ["cfg80211.ieee80211_regdom=FR"]; - boot.extraModulePackages = with config.boot.kernelPackages; [ - v4l2loopback - ]; - boot.extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 - ''; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot = { - enable = true; - editor = false; - consoleMode = "auto"; - }; - boot.loader.efi.canTouchEfiVariables = true; - - boot.tmp.useTmpfs = true; - - services.btrfs = { - autoScrub = { - enable = true; - fileSystems = ["/"]; - }; - }; - - networking.hostName = "talos"; # Define your hostname. - networking.domain = "alarsyo.net"; - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - networking.networkmanager = { - enable = true; - wifi.powersave = true; - }; - - # Set your time zone. - time.timeZone = "Europe/Paris"; - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - programs = { - light.enable = true; - }; - services = { - fwupd.enable = true; - openssh.enable = true; - }; - virtualisation = { - docker.enable = true; - libvirtd.enable = false; - virtualbox.host = { - enable = false; - }; - }; - - my.services = { - tailscale = { - enable = true; - useRoutingFeatures = "client"; - }; - - pipewire.enable = true; - - restic-backup = { - enable = true; - repo = "b2:talos-backup"; - passwordFile = config.age.secrets."restic-backup/talos-password".path; - environmentFile = config.age.secrets."restic-backup/talos-credentials".path; - - timerConfig = { - OnCalendar = "*-*-* 13:00:00"; # laptop only gets used during the day - }; - - paths = [ - "/home/alarsyo" - ]; - exclude = [ - "/home/alarsyo/Downloads" - - # Rust builds using half my storage capacity - "/home/alarsyo/**/target" - "/home/alarsyo/work/rust/build" - - # don't backup nixpkgs - "/home/alarsyo/work/nixpkgs" - - "/home/alarsyo/go" - - # C build crap - "*.a" - "*.o" - "*.so" - - ".direnv" - - # test vms - "*.qcow2" - "*.vbox" - "*.vdi" - - # secrets stay offline - "/home/alarsyo/**/secrets" - - # ignore all dotfiles as .config and .cache can become quite big - "/home/alarsyo/.*" - ]; - }; - }; - - my.gui.enable = true; - - hardware.bluetooth = { - enable = true; - powerOnBoot = false; - settings.General.Experimental = true; - }; - - hardware.keyboard.qmk.enable = true; - # Configure console keymap - console.keyMap = "us"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "fr_FR.UTF-8"; - LC_IDENTIFICATION = "fr_FR.UTF-8"; - LC_MEASUREMENT = "fr_FR.UTF-8"; - LC_MONETARY = "fr_FR.UTF-8"; - LC_NAME = "fr_FR.UTF-8"; - LC_PAPER = "fr_FR.UTF-8"; - LC_TELEPHONE = "fr_FR.UTF-8"; - }; - - # Enable the KDE Plasma Desktop Environment. - services.desktopManager.plasma6.enable = true; - services.desktopManager.cosmic.enable = true; - services.power-profiles-daemon.enable = true; - - environment.systemPackages = [ - pkgs.foot - # FIXME: is this needed? - pkgs.darkman - ]; - - #programs.hyprland.enable = true; - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; - }; - - # TODO: These are overriden by files from - # ~/.config/xdg-desktop-portal/sway-portals.conf so they should be moved to - # home - xdg.portal.config.sway = { - "org.freedesktop.impl.portal.Settings" = "darkman"; - "org.freedesktop.impl.portal.Inhibit" = "none"; - }; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; -} diff --git a/hosts/talos/disko-config.nix b/hosts/talos/disko-config.nix deleted file mode 100644 index 5146330..0000000 --- a/hosts/talos/disko-config.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - disko.devices = { - disk = { - nvme0n1 = { - type = "disk"; - device = "/dev/nvme0n1"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "defaults" - ]; - }; - }; - luks = { - size = "600G"; - content = { - type = "luks"; - name = "crypted"; - # disable settings.keyFile if you want to use interactive password entry - passwordFile = "/tmp/secret.key"; # Interactive - settings = { - allowDiscards = true; - #keyFile = "/tmp/secret.key"; - }; - #additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; - content = { - type = "btrfs"; - extraArgs = ["-f"]; - subvolumes = { - "@" = { - mountpoint = "/"; - mountOptions = ["compress=zstd" "noatime"]; - }; - "@home" = { - mountpoint = "/home"; - mountOptions = ["compress=zstd" "noatime"]; - }; - "@nix" = { - mountpoint = "/nix"; - mountOptions = ["compress=zstd" "noatime"]; - }; - "@persist" = { - mountpoint = "/persist"; - mountOptions = ["compress=zstd" "noatime"]; - }; - "@snapshots" = {}; - "@swap" = { - mountpoint = "/.swapvol"; - swap.swapfile.size = "8G"; - }; - }; - }; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/talos/hardware-configuration.nix b/hosts/talos/hardware-configuration.nix deleted file mode 100644 index 1d0808e..0000000 --- a/hosts/talos/hardware-configuration.nix +++ /dev/null @@ -1,29 +0,0 @@ -# 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, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix deleted file mode 100644 index 8a189d3..0000000 --- a/hosts/talos/home.nix +++ /dev/null @@ -1,219 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkOptionDefault - ; -in { - home-manager.users.alarsyo = { - home.stateVersion = "23.11"; - - my.home.laptop.enable = true; - - # Keyboard settings & i3 settings - my.home.x.enable = true; - my.home.x.i3bar.temperature.chip = "k10temp-pci-*"; - my.home.x.i3bar.temperature.inputs = ["Tctl"]; - my.home.x.i3bar.networking.throughput_interfaces = ["wlp1s0"]; - my.home.emacs.enable = true; - - my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight; - - services = { - # TODO: place in global home conf - dunst.enable = true; - wlsunset = { - enable = true; - latitude = 48.9; - longitude = 2.3; - temperature = { - day = 6500; - night = 3500; - }; - }; - darkman = { - enable = true; - settings = { - lat = 48.9; - lng = 2.3; - }; - }; - playerctld.enable = true; - }; - - home.packages = builtins.attrValues { - inherit - (pkgs) - #ansel - chromium # some websites only work there :( - font-awesome # for pretty icons - gnome-solanum - nwg-displays - shikane # output autoconfig - swaybg - zotero - grim - wl-clipboard - slurp - ; - - inherit - (pkgs.packages) - spot - ; - }; - - wayland.windowManager.sway = let - logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot"; - lock = "swaylock --daemonize --image ~/.wallpaper --scaling fill"; - in { - enable = true; - swaynag.enable = true; - wrapperFeatures.gtk = true; - config = { - modifier = "Mod4"; - input = { - "type:keyboard" = { - xkb_layout = "fr,fr"; - xkb_variant = "us,ergol"; - xkb_options = "grp:shift_caps_toggle"; - }; - "type:touchpad" = { - dwt = "enabled"; - tap = "enabled"; - middle_emulation = "enabled"; - natural_scroll = "enabled"; - }; - }; - output = { - "eDP-1" = { - scale = "1.5"; - }; - }; - fonts = { - names = ["Iosevka Fixed" "FontAwesome6Free"]; - size = 9.0; - }; - bars = []; - - workspaceAutoBackAndForth = true; - bindkeysToCode = true; - keybindings = mkOptionDefault { - "Mod4+Shift+a" = "exec shikanectl reload"; - "Mod4+Shift+e" = ''mode "${logoutMode}"''; - "Mod4+i" = "exec emacsclient --create-frame"; - "Mod4+Control+l" = "exec ${lock}"; - "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2"; - "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2"; - "XF86MonBrightnessUp" = "exec light -A 5"; - "XF86MonBrightnessDown" = "exec light -U 5"; - "XF86AudioPlay" = "exec --no-startup-id playerctl play-pause"; - "XF86AudioPause" = "exec --no-startup-id playerctl play-pause"; - "XF86AudioPrev" = "exec --no-startup-id playerctl previous"; - "XF86AudioNext" = "exec --no-startup-id playerctl next"; - }; - - modes = mkOptionDefault { - "${logoutMode}" = { - "l" = "exec --no-startup-id swaymsg exit, mode default"; - "s" = "exec --no-startup-id systemctl suspend, mode default"; - "p" = "exec --no-startup-id systemctl poweroff, mode default"; - "r" = "exec --no-startup-id systemctl reboot, mode default"; - "Escape" = "mode default"; - "Return" = "mode default"; - }; - }; - - menu = "fuzzel --list-executables-in-path"; - - startup = [ - {command = "shikane";} - {command = "waybar";} - { - command = "swaybg --image ~/.wallpaper --mode fill"; - always = true; - } - {command = "swayidle -w idlehint 1 before-sleep \"${lock}\"";} - ]; - }; - - extraConfig = '' - bindswitch --reload --locked lid:off output eDP-1 enable; - bindswitch --reload --locked lid:on output eDP-1 disable; - - bindgesture swipe:right workspace prev - bindgesture swipe:left workspace next - - set $rosewater #dc8a78 - set $flamingo #dd7878 - set $pink #ea76cb - set $mauve #8839ef - set $red #d20f39 - set $maroon #e64553 - set $peach #fe640b - set $yellow #df8e1d - set $green #40a02b - set $teal #179299 - set $sky #04a5e5 - set $sapphire #209fb5 - set $blue #1e66f5 - set $lavender #7287fd - set $text #4c4f69 - set $subtext1 #5c5f77 - set $subtext0 #6c6f85 - set $overlay2 #7c7f93 - set $overlay1 #8c8fa1 - set $overlay0 #9ca0b0 - set $surface2 #acb0be - set $surface1 #bcc0cc - set $surface0 #ccd0da - set $base #eff1f5 - set $mantle #e6e9ef - set $crust #dce0e8 - - # target title bg text indicator border - client.focused $lavender $lavender $base $rosewater $lavender - client.focused_inactive $overlay0 $base $text $rosewater $overlay0 - client.unfocused $overlay0 $base $text $rosewater $overlay0 - client.urgent $peach $base $peach $overlay0 $peach - client.placeholder $overlay0 $base $text $overlay0 $overlay0 - client.background $base - - smart_borders on - default_border pixel 3 - gaps inner 5 - gaps outer 3 - ''; - }; - - programs = { - fuzzel.enable = true; - swaylock.enable = true; - waybar = { - enable = true; - }; - }; - - home.sessionVariables = { - NIXOS_OZONE_WL = "1"; - }; - }; - - # FIXME: belongs elsewhere - services = { - logind = { - lidSwitch = "suspend"; - lidSwitchExternalPower = "ignore"; - extraConfig = '' - IdleAction=suspend - IdleActionSec=10min - ''; - }; - upower.enable = true; - }; -} diff --git a/hosts/talos/secrets.nix b/hosts/talos/secrets.nix deleted file mode 100644 index e5fae61..0000000 --- a/hosts/talos/secrets.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - lib, - options, - ... -}: { - config.age = { - secrets = let - toSecret = name: {...} @ attrs: - { - file = ./../../modules/secrets + "/${name}.age"; - } - // attrs; - in - lib.mapAttrs toSecret { - "restic-backup/talos-credentials" = {}; - "restic-backup/talos-password" = {}; - - "users/alarsyo-hashed-password" = {}; - "users/root-hashed-password" = {}; - }; - }; -} diff --git a/hosts/thanatos/default.nix b/hosts/thanatos/default.nix deleted file mode 100644 index afa74c0..0000000 --- a/hosts/thanatos/default.nix +++ /dev/null @@ -1,98 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). -{ - config, - lib, - pkgs, - ... -}: let - secrets = config.my.secrets; -in { - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ./disko-configuration.nix - ./home.nix - ./secrets.nix - ]; - - boot.loader.grub.enable = true; - boot.tmp.useTmpfs = true; - - networking.hostName = "thanatos"; # Define your hostname. - networking.domain = "lrde.epita.fr"; - - # Set your time zone. - time.timeZone = "Europe/Paris"; - - # List services that you want to enable: - my.services = { - tailscale = { - enable = true; - useRoutingFeatures = "both"; - }; - }; - - services = { - gitlab-runner = { - enable = true; - settings = { - concurrent = 4; - }; - services = { - nix = { - authenticationTokenConfigFile = config.age.secrets."gitlab-runner/thanatos-nix-runner-env".path; - dockerImage = "alpine"; - dockerVolumes = [ - "/nix/store:/nix/store:ro" - "/nix/var/nix/db:/nix/var/nix/db:ro" - "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" - ]; - dockerDisableCache = true; - preBuildScript = pkgs.writeScript "setup-container" '' - mkdir -p -m 0755 /nix/var/log/nix/drvs - mkdir -p -m 0755 /nix/var/nix/gcroots - mkdir -p -m 0755 /nix/var/nix/profiles - mkdir -p -m 0755 /nix/var/nix/temproots - mkdir -p -m 0755 /nix/var/nix/userpool - mkdir -p -m 1777 /nix/var/nix/gcroots/per-user - mkdir -p -m 1777 /nix/var/nix/profiles/per-user - mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root - mkdir -p -m 0700 "$HOME/.nix-defexpr" - - . ${pkgs.nix}/etc/profile.d/nix.sh - - ${pkgs.nix}/bin/nix-env -i ${lib.concatStringsSep " " (with pkgs; [nix cacert git openssh])} - - ${pkgs.nix}/bin/nix-channel --add https://nixos.org/channels/nixpkgs-unstable - ${pkgs.nix}/bin/nix-channel --update nixpkgs - - mkdir -p ~/.config/nix - echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf - ''; - environmentVariables = { - ENV = "/etc/profile"; - USER = "root"; - NIX_REMOTE = "daemon"; - PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; - NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; - }; - }; - default = { - authenticationTokenConfigFile = config.age.secrets."gitlab-runner/thanatos-runner-env".path; - dockerImage = "debian:stable"; - }; - }; - }; - openssh.enable = true; - }; - - virtualisation.docker.enable = true; - - environment.systemPackages = with pkgs; [ - docker-compose - ]; - - nix.gc.automatic = lib.mkForce false; -} diff --git a/hosts/thanatos/disko-configuration.nix b/hosts/thanatos/disko-configuration.nix deleted file mode 100644 index 23357cd..0000000 --- a/hosts/thanatos/disko-configuration.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/disk/by-id/ata-CT250MX500SSD1_2301E69A20C4"; - content = { - type = "gpt"; - partitions = { - boot = { - size = "1M"; - type = "EF02"; # for grub MBR - }; - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - size = "100%"; - content = { - type = "btrfs"; - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = ["compress=zstd" "noatime"]; - }; - "/home" = { - mountpoint = "/home"; - mountOptions = ["compress=zstd" "noatime"]; - }; - "/nix" = { - mountpoint = "/nix"; - mountOptions = ["compress=zstd" "noatime"]; - }; - "/swap" = { - mountpoint = "/.swapvol"; - swap.swapfile.size = "8G"; - }; - }; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/thanatos/hardware-configuration.nix b/hosts/thanatos/hardware-configuration.nix deleted file mode 100644 index f9e41a6..0000000 --- a/hosts/thanatos/hardware-configuration.nix +++ /dev/null @@ -1,29 +0,0 @@ -# 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, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/thanatos/home.nix b/hosts/thanatos/home.nix deleted file mode 100644 index bacc60b..0000000 --- a/hosts/thanatos/home.nix +++ /dev/null @@ -1,7 +0,0 @@ -{config, ...}: { - home-manager.users.alarsyo = { - home.stateVersion = "23.11"; - - my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight; - }; -} diff --git a/hosts/thanatos/secrets.nix b/hosts/thanatos/secrets.nix deleted file mode 100644 index bd58902..0000000 --- a/hosts/thanatos/secrets.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - lib, - options, - ... -}: { - config.age = { - secrets = let - toSecret = name: {...} @ attrs: - { - file = ./../../modules/secrets + "/${name}.age"; - } - // attrs; - in - lib.mapAttrs toSecret { - "users/alarsyo-hashed-password" = {}; - "users/root-hashed-password" = {}; - "gitlab-runner/thanatos-runner-env" = {}; - "gitlab-runner/thanatos-nix-runner-env" = {}; - }; - }; -} diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index ec72f4c..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{...}: { - imports = [ - ./sddm.nix - ./secrets - ./wakeonwlan.nix - ]; -} diff --git a/modules/sddm.nix b/modules/sddm.nix deleted file mode 100644 index de57ae5..0000000 --- a/modules/sddm.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.displayManager.sddm; -in { - options.my.displayManager.sddm.enable = mkEnableOption "SDDM setup"; - - config = mkIf cfg.enable { - services.displayManager.sddm = { - enable = true; - theme = "catppuccin-latte"; - wayland.enable = true; - }; - - environment.systemPackages = [ - (pkgs.catppuccin-sddm.override - { - flavor = "latte"; - }) - ]; - }; -} diff --git a/modules/secrets/default.nix b/modules/secrets/default.nix deleted file mode 100644 index d6ef6ee..0000000 --- a/modules/secrets/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - config, - lib, - options, - ... -}: { -} diff --git a/modules/secrets/gandi/api-key.age b/modules/secrets/gandi/api-key.age deleted file mode 100644 index 9a2e915..0000000 --- a/modules/secrets/gandi/api-key.age +++ /dev/null @@ -1,12 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw E972A3kem7+3ul2Ai8TV8EVkF9upClr46y1pbN+AfDY -qZdZuv+F9c46uxKWYdBKp6AGkTA5IEjcBwDlBHpEbCU --> ssh-ed25519 pX8y2g WEBknhwaTqfVzaLQRg1tfEY/aGZDFnH0PvXOZ3pC1k8 -A23ELihRVsx8jhTcJAy3a1/saKWPc6ojf8HhPHj0niw --> ssh-ed25519 z6Eu8Q IsN3L8xlk8VwrqUByYiUhthAk06KCn6hcYlZrodk/Vg -lX/SjRJIZEt1/Q6iLKFiUTHB4eH8ig4WJN79mU/AVUw --> &r29]-grease #} -100ULy2nfLIOODMNPyvq0ATuGdVBAgwcXAs ---- VkOZ7Vy9R4QPqvgAveJae/L4/nuDnQ/bAoN7UEKzxyw -wQ{3ɔ3 -m2e?. M:Df);t {zRo 񲛇E#cTE9H67qA_Lb} \ No newline at end of file diff --git a/modules/secrets/gitlab-runner/hades-nix-runner-env.age b/modules/secrets/gitlab-runner/hades-nix-runner-env.age deleted file mode 100644 index 88cf224..0000000 --- a/modules/secrets/gitlab-runner/hades-nix-runner-env.age +++ /dev/null @@ -1,7 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw S9umvubn93fPFsh/ogqAohdlvDOLYxm3hHrliw5vqAQ -EG8RYYX7i2GazNTb/bnzCPs2zrIYN/kOulJc4e5pTW4 --> ssh-ed25519 pX8y2g ux6qHpLuHTleRYpAIvO3iDztVsxPGlcu1+jzs1+MHF0 -R5wtxwQyqB1Hc6KI0U9tUOYxzHBtvkzQkgy6Z8AoOYc ---- w1Wpu3guHKTT0FDAR6KaFYLHaXYsEdCWX/7IuM2wb7Q -=nbg\\!IizA,pg pPa\p/_ut8nCL5,a ssh-ed25519 k2gHjw gFnRWwKy4sm1O4/zeVXcUk3Y451FFZmOfuDY/lI9RW0 -8Mpdm4n7JzepEg2+KRs0HfkrtVTMk0oRFBUZ7Sf08Jw --> ssh-ed25519 6UUuZw cAAsvPXReyc5s3ornw5wPSuJ3dSwcxUaG+TxJnIu8Ak -hKk7q/8jltBMXoB1G29GQBH0v/IWu29r1tGfI9QrpgU ---- 1YEL0aF6L1Hg74seiR6rUBaaPfX9/R5rc1a6O9P8skQ -4on0%lٷFv1! =-)4܅hSg D^| skS; BTo'hJ\NCu#[t>x" gZo\m \ No newline at end of file diff --git a/modules/secrets/gitlab-runner/thanatos-runner-env.age b/modules/secrets/gitlab-runner/thanatos-runner-env.age deleted file mode 100644 index fbbe156..0000000 Binary files a/modules/secrets/gitlab-runner/thanatos-runner-env.age and /dev/null differ diff --git a/modules/secrets/lohr/shared-secret.age b/modules/secrets/lohr/shared-secret.age deleted file mode 100644 index 9765da2..0000000 --- a/modules/secrets/lohr/shared-secret.age +++ /dev/null @@ -1,10 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw R7jnkS7fFFSouPgvjrCnyfWNHOanOWKVUDp4Fd2xqFU -MdWD5E8dWfDHqFNTDCqOlyMhwpfEtqhlpnx3opft70w --> ssh-ed25519 pX8y2g /CAWr94ucfxWKLWQPSQD2fl09TuUZELywWoZgHZS0AY -NeDHZc2ooKl2Bp0nAEY9P/Apdramb2TpHWpx0jkceyk --> bzN-grease F &,%3jl~w &]8&d*N6 5UJ -58BUbsIwRkkUrNoSbgbMo/o1tKttXP2YWIJs9cbfXrT6XcO+Km0g90LPbYCmsqTZ -pr8TINM2Wd8RQw ---- 7K7sEw2zIWhuR3intlPGFipaVhHli+tWHqmyobRjLYo -oۄ[\lN/X:uN k{ me0A=,h_,4S&9h1/ypaz2рT,RU \ No newline at end of file diff --git a/modules/secrets/matrix-synapse/secret-config.age b/modules/secrets/matrix-synapse/secret-config.age deleted file mode 100644 index eb23b3b..0000000 Binary files a/modules/secrets/matrix-synapse/secret-config.age and /dev/null differ diff --git a/modules/secrets/mealie/secret-config.age b/modules/secrets/mealie/secret-config.age deleted file mode 100644 index cd02884..0000000 Binary files a/modules/secrets/mealie/secret-config.age and /dev/null differ diff --git a/modules/secrets/microbin/secret-config.age b/modules/secrets/microbin/secret-config.age deleted file mode 100644 index e875004..0000000 Binary files a/modules/secrets/microbin/secret-config.age and /dev/null differ diff --git a/modules/secrets/miniflux/admin-credentials.age b/modules/secrets/miniflux/admin-credentials.age deleted file mode 100644 index 11c576f..0000000 Binary files a/modules/secrets/miniflux/admin-credentials.age and /dev/null differ diff --git a/modules/secrets/nextcloud/admin-pass.age b/modules/secrets/nextcloud/admin-pass.age deleted file mode 100644 index b3ac83d..0000000 --- a/modules/secrets/nextcloud/admin-pass.age +++ /dev/null @@ -1,9 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw md0WbIE3MSWLqqerCD4ljh4U+4fWaOhKZxl9RQt+HDo -8Wj+hn5wwzgA6D1zQEaP1WIfmmK6pXVy2ZX5OQ/N0pU --> ssh-ed25519 pX8y2g ByOhNTkxCHFkOQAOrID+bZEQzwesbnKluY6G5sSUhlg -AybKPZKzELtvWTT/Kmc+zs7KC4GB9214GUdnWMhGnmo --> QK!x#/y-grease c|K1% \ug . >WFn:bI -Cgx9qaPIUk1hGKtQYJ6kNk/+bHTJ ---- YwtEWMiVxfvMGE1ngDiy/dALw/Y9YAxduaqlVgPNqdk -zF(Ã8?VJvH(kԂ9o\!ʿN7@Y#19mV}ZضQWEǒ}v/< hT3vN 1 \ No newline at end of file diff --git a/modules/secrets/ovh/credentials.age b/modules/secrets/ovh/credentials.age deleted file mode 100644 index ab487ae..0000000 --- a/modules/secrets/ovh/credentials.age +++ /dev/null @@ -1,7 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw XED7gkKAp1ioBegA7ryqULRF1BORpW74esfIGp9zPE8 -ANxnQN+tox9KYdZvNZFZvQxOymckldPQMhFnz6fSIBo --> ssh-ed25519 pX8y2g 9wgPqL6GoOxad5AAUmDAYj0h/57AEM8VsQKq1pGTtjM -SxD++XJioZLpt6C8Xse5Nmz4wtL0Fb5NKWo5ijKpyv8 ---- 3qOJnkY3Uc4fIex9mgz2+w+su5dS7K7Tmtk1hiqkn9M -XeaLQ H2*ZT P;(jC̀k viħk`]mB ,,?!{%e(Su-SD=H#q=U;=O G+_oP]RL$ֳ\0N!"&%N<,v1ʑj1 \ No newline at end of file diff --git a/modules/secrets/paperless/admin-password.age b/modules/secrets/paperless/admin-password.age deleted file mode 100644 index 62639ad..0000000 --- a/modules/secrets/paperless/admin-password.age +++ /dev/null @@ -1,11 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw Cnh9E+IbDcTnJT0AmN1pFJ9PrT/bWswps3viYITN2yo -DwsFW60Su9sble5QFEjX5QoWVl/lMBsqAPWK+AB9epw --> ssh-ed25519 pX8y2g fMdWosCSxRpJSA3VGDEyWzeQfTJD5sPnu38MrcJJ1A8 -g16EuuS95pIeUuLZfqXR4Mey2GKiXRlxA2KRLD1RVns --> s*.sKB4H-grease V9A)DG( T ssh-ed25519 k2gHjw CoGvifgWo1JvHjx3PKJa3jR3lKrvgvKnTTui1w6UR0I -gcadr6WbTzyrPD3h3oDifFj/pMZKIzUfDXL6e6610Is --> ssh-ed25519 pX8y2g MBFa4xDU6CaH6amzlGTmFXIcAXLq2xykRd0WkeUEkQo -91jV5LUuhvOVKSg2cz3TMKI2SaZvCTzXL/xyUWbYJAg --> lkH}'\W;-grease nZ K\MP7 HUsh -vWwsKxuBXKwpTBkYERd7kPo ---- xohFX48WGxRFVYQzdbSl7l2Go90FSUPH5ml6OalKJwQ -sƀh!,(QlkV~U !B0 ~A!2np`L&{}3%{[)t/njb^{1G[G0  mo :naQ\mfG;(S \ No newline at end of file diff --git a/modules/secrets/pleroma/pleroma-config.age b/modules/secrets/pleroma/pleroma-config.age deleted file mode 100644 index 9b14639..0000000 Binary files a/modules/secrets/pleroma/pleroma-config.age and /dev/null differ diff --git a/modules/secrets/restic-backup/boreal-credentials.age b/modules/secrets/restic-backup/boreal-credentials.age deleted file mode 100644 index e7827ac..0000000 --- a/modules/secrets/restic-backup/boreal-credentials.age +++ /dev/null @@ -1,10 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 YWMQkg B5tQXcUdu751YYA4Y8uRH/DgGDi24AsXEAKkCVfg+Ro -21Gz0MsMCtWzUdVuaWdNwEU9Ts8lOQWCd7Ejf2tkxks --> ssh-ed25519 k2gHjw NIG04WnNgq5bnSl9KmvFyvpGdFlmOFtXzuYtrsFOKXM -ZYZVyIM0jnhguRmfIpRtFg0StgYTlu/P9bgxBy9dbOg --> u5-grease -MTgqDb6tqCuvdlXj9c2Y3XX1X7JfrdeKLM0EQ75ZJe+Hrntnpvn4fSlBr8QoOahm -fg ---- VzgNZ3/IBQVeYfOMGjnHPDRKoBDdxHth61pevk5+fLw -D &vN1t8w<wd>s:G_ƚyu,%@Jh"EvX \ No newline at end of file diff --git a/modules/secrets/restic-backup/boreal-password.age b/modules/secrets/restic-backup/boreal-password.age deleted file mode 100644 index 95176ee..0000000 Binary files a/modules/secrets/restic-backup/boreal-password.age and /dev/null differ diff --git a/modules/secrets/restic-backup/hades-credentials.age b/modules/secrets/restic-backup/hades-credentials.age deleted file mode 100644 index 30a9e02..0000000 Binary files a/modules/secrets/restic-backup/hades-credentials.age and /dev/null differ diff --git a/modules/secrets/restic-backup/hades-password.age b/modules/secrets/restic-backup/hades-password.age deleted file mode 100644 index 7973032..0000000 --- a/modules/secrets/restic-backup/hades-password.age +++ /dev/null @@ -1,10 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw tz1jNUQvZEVHqehFVapGqTzuRS42q/cMxyMxxKq+LzM -kA2ZKO7MJijITas44VeEKSNl801EmGea9k35OXiZ+BE --> ssh-ed25519 pX8y2g xjtYR+DLpZ8aWXSGnZwbW1LYgIzcFWirKzCFJ8XcFmk -bDXZMuNZexO3Cj0RmzjGA33Xt6eMV1zTqjkw+hFUB54 --> XL-grease ]SR-r g<"^}r I> PHC -i5h9MKFYUKNt ---- arx3EqdP9sGpt3TmJDAHNaF03UL+hfJTle+FSdlP/6A -}vjAz΍TGWvB 0<;ZY{ŽL<\ō>4o~,蚫^4^yl\Ftgd -GƲ*" \ No newline at end of file diff --git a/modules/secrets/restic-backup/poseidon-credentials.age b/modules/secrets/restic-backup/poseidon-credentials.age deleted file mode 100644 index 0b3b3a1..0000000 --- a/modules/secrets/restic-backup/poseidon-credentials.age +++ /dev/null @@ -1,10 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw oSO/cLGLMkjqRIjYewTqtOccb7CLSmODK+B6Kb/L/gk -cGU5gafJCeX/o3qqcNNPGIAXbAwm8sZi59QIDqcmWUA --> ssh-ed25519 z6Eu8Q FMOXZNxOrbT95XR5R6tul1A+aiCP/QHRsCZraA/SZmw -UXjp7Z93U56hZ9f/OijkzZ1UCRf+VVwD0b1dY04lCVs --> )-grease -qkTAz5YAzx5TLvSvmiAL1EDt3pYUgwdMMcRKDBdTBrvxeQE ---- EBQNvbSPDyq5SFKU517JyM024/zZx0DqoxMiP9jzlSs -rP+yjf>9Ȏ̷wt6sg/tS͗\fZꪝN?v -1I휹+uݾU-Cfn1`c-RCP'zB)F`VBKX \ No newline at end of file diff --git a/modules/secrets/restic-backup/poseidon-password.age b/modules/secrets/restic-backup/poseidon-password.age deleted file mode 100644 index b8ca418..0000000 Binary files a/modules/secrets/restic-backup/poseidon-password.age and /dev/null differ diff --git a/modules/secrets/restic-backup/talos-credentials.age b/modules/secrets/restic-backup/talos-credentials.age deleted file mode 100644 index 967a671..0000000 --- a/modules/secrets/restic-backup/talos-credentials.age +++ /dev/null @@ -1,7 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 k2gHjw WWJQxqfxQzLmBFPpTzuKBMhAl+ZxnQdvnaDvfpwxR00 -tEsf6xSw/MP/qJnr/SyLlkEEf/LaI7IxjVzaxRwh5FI --> ssh-ed25519 nh0dAQ yRu0VZqx+DuB3SSQaVtg+txuRu9OyJDfLDNCKg9XYk0 -xTpucapaejG2EMrZLIDt46JD3QYM4XXT1Y2F77HPQO8 ---- uZjO0dDIFesU2B/GkjpqrOJas1+K6hGbQAdFV/t1GOk -BV͵\ 8 ۑ[%l^>9\E5j(6g;(I7CS4v6iSXC`OT\;Iݜ6_ky-qKlKӠh?t \ No newline at end of file diff --git a/modules/secrets/restic-backup/talos-password.age b/modules/secrets/restic-backup/talos-password.age deleted file mode 100644 index 244ab8d..0000000 Binary files a/modules/secrets/restic-backup/talos-password.age and /dev/null differ diff --git a/modules/secrets/restic-backup/zephyrus-credentials.age b/modules/secrets/restic-backup/zephyrus-credentials.age deleted file mode 100644 index dfadadb..0000000 --- a/modules/secrets/restic-backup/zephyrus-credentials.age +++ /dev/null @@ -1,11 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 ZQuVNA KjrRurc5ztGrYO2wx0ToE8E4Yz2sbNwPi4zCGAJUK3k -+U1Ox1U4Z9ssleGchzMJGpQjFaRoqMYSLhKHXj1F2/U --> ssh-ed25519 k2gHjw W35K39F0sREO2igYKaa3zr1LKgF6xiU5YtMq3RYqkC4 -YJV8kdjMJSoRX7iLw2bQXET9zOudFuhZeHqPqHkNjuc --> (aAM-grease j{6WJ 3C& -Pfh0krD/ClkQcByosGU3CxPivvPei5tXWZHh6odkWxn29iqsKT6L1ihEgYJDlopA -8ODR4G4ax6ZY13O+qjc ---- ugjGDcsxbwlKmTN+4lUyrhD6GJPl0qk4i+4OLS2NRP0 -]#zpX7ә 1m%wF 4سcp+Q2pmxx>ň)E;~sx[S$z&rBSVz\SXrd\5Tf| -T \ No newline at end of file diff --git a/modules/secrets/restic-backup/zephyrus-password.age b/modules/secrets/restic-backup/zephyrus-password.age deleted file mode 100644 index 050d2cc..0000000 --- a/modules/secrets/restic-backup/zephyrus-password.age +++ /dev/null @@ -1,9 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 ZQuVNA H3/RLTRU8T3JY99f+b9xT5oIqPCDyxjRfFbJ7iR3/zE -CTLpdnGapstc+/epugi1CxIZ3T7JZgE4Ew14B2WuanY --> ssh-ed25519 k2gHjw wEnvcV2UApJ1MMyIQgSSkF+zhG+fugEiCieCpPBdJyc -polPsTGun9e6Bq6rogQBrmT32GQXiixxlKmuRpDDM0c --> Jt-grease rX6~ -RL6JmjlIQaG17HQQFY3hTYtTiL12Sr3RX/Scv6gO7gO8 ---- eUEOS9mtYxxW2bqzEpD+ZsyYjhHWCArPd2PiFn6wMF4 -*@-9pMDI{zükeK);+UOZ{B Sx/LIG9 1:Yݽ4x:Kfq9aO[jNXq,Z=*''tׄ !vW6nG&QwG \ No newline at end of file diff --git a/modules/secrets/secrets.nix b/modules/secrets/secrets.nix deleted file mode 100644 index ffa49fd..0000000 --- a/modules/secrets/secrets.nix +++ /dev/null @@ -1,48 +0,0 @@ -let - alarsyo = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH3rrF3VSWI4n4cpguvlmLAaU3uftuX4AVV/39S/8GO9 alarsyo@thinkpad"; - users = [alarsyo]; - - boreal = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAagal1aqZh52wEmgsw7fkCzO41o4Cx+nV4wJGZuX1RP root@boreal"; - hades = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMxw8CtKUPAiPdKDEnuS7UyRrZN5BkUwsy5UPVF8V+lt root@hades"; - talos = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMBYcmL9HZJ9SqB9OJwQ0Nt6ZbvHZTS+fzM8A6D5MPZs root@talos"; - thanatos = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID8JEAWk/8iSl8fN6/f76JkmVFwtyixTpLol4zSVsnVw root@thanatos"; - - machines = [boreal hades talos thanatos]; - - all = users ++ machines; -in { - "gandi/api-key.age".publicKeys = [alarsyo hades]; - - "gitlab-runner/hades-nix-runner-env.age".publicKeys = [alarsyo hades]; - "gitlab-runner/thanatos-runner-env.age".publicKeys = [alarsyo thanatos]; - "gitlab-runner/thanatos-nix-runner-env.age".publicKeys = [alarsyo thanatos]; - - "lohr/shared-secret.age".publicKeys = [alarsyo hades]; - - "matrix-synapse/secret-config.age".publicKeys = [alarsyo hades]; - - "mealie/secret-config.age".publicKeys = [alarsyo hades]; - - "microbin/secret-config.age".publicKeys = [alarsyo hades]; - - "miniflux/admin-credentials.age".publicKeys = [alarsyo hades]; - - "nextcloud/admin-pass.age".publicKeys = [alarsyo hades]; - - "ovh/credentials.age".publicKeys = [alarsyo hades]; - - "paperless/admin-password.age".publicKeys = [alarsyo hades]; - "paperless/secret-key.age".publicKeys = [alarsyo hades]; - - "pleroma/pleroma-config.age".publicKeys = [alarsyo hades]; - - "restic-backup/boreal-password.age".publicKeys = [alarsyo boreal]; - "restic-backup/boreal-credentials.age".publicKeys = [alarsyo boreal]; - "restic-backup/hades-password.age".publicKeys = [alarsyo hades]; - "restic-backup/hades-credentials.age".publicKeys = [alarsyo hades]; - "restic-backup/talos-password.age".publicKeys = [alarsyo talos]; - "restic-backup/talos-credentials.age".publicKeys = [alarsyo talos]; - - "users/root-hashed-password.age".publicKeys = machines ++ [alarsyo]; - "users/alarsyo-hashed-password.age".publicKeys = machines ++ [alarsyo]; -} diff --git a/modules/secrets/users/alarsyo-hashed-password.age b/modules/secrets/users/alarsyo-hashed-password.age deleted file mode 100644 index dfbbc68..0000000 Binary files a/modules/secrets/users/alarsyo-hashed-password.age and /dev/null differ diff --git a/modules/secrets/users/root-hashed-password.age b/modules/secrets/users/root-hashed-password.age deleted file mode 100644 index 6a15e89..0000000 --- a/modules/secrets/users/root-hashed-password.age +++ /dev/null @@ -1,15 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 YWMQkg mb17MHdKPO5SDXOslq38CjHLKy063L1KyN2wT85fGlE -3JnWLwx2cNmBC1vpS9KAwZQIy7B/vqLZ9QwQYNY4wMQ --> ssh-ed25519 pX8y2g mvykS4XrUSwe68MteVV52u95oySHdzRlMGVFjhQQrx8 -ztoGz8OrTMRH/0NPfnQXrVBA0Uyuuc2b0dlOXToq85U --> ssh-ed25519 SYm+hA TiL9r8l1nIvOMUpFaYmZ/5d6DRxcMHMICjrTfmbC7Wc -GfivQi5vzTUfYDVjwSxNA8t/tKtRu0QAGE+kPr4u1+I --> ssh-ed25519 nh0dAQ 9agb3Zl/7+mAIH7bcIXbY2KrHDZAjugAfKbQ0OAhIQQ -kPzKALS6Wrr5zUJngqjwGV6w5prKMWlj/WY2qi2ck4M --> ssh-ed25519 6UUuZw 36Uu//D8HuiRHFN0GOAyLxI0J3yBrTSBXuBG9pTVZA8 -KTMmUW8MvVtUm4Xjyz0JGDdz4H7Y5KxLPDeYPc0dfl4 --> ssh-ed25519 k2gHjw D3OD07mu/YnR3xVhhbX4UoChpAWSG4CYIkmQZclsjQc -kgqZizkSgB5p+1ZRd0tP/bBxZ92jt6fvAcNZe3MmgoE ---- ZuL2dvQ6+hac47fRdRWl4VHl2sRIvnF80d37EZKq94I -J)Fr@+4rF OL5|㞵ˮq[ Pm;aH Swapper<'a> { + }; + + let pane_command = format!( +- "tmux capture-pane -t {active_pane_id} -p{scroll_params} | tail -n {height} | {dir}/target/release/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}", ++ "tmux capture-pane -t {active_pane_id} -p{scroll_params} | tail -n {height} | @@replace-me@@/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}", + active_pane_id = active_pane_id, + scroll_params = scroll_params, + height = self.active_pane_height.unwrap_or(i32::MAX), +- dir = self.dir, + tmp = TMP_FILE, + args = args.join(" "), + zoom_command = zoom_command, +diff --git a/tmux-thumbs.sh b/tmux-thumbs.sh +index 92d5625..c6300c7 100755 +--- a/tmux-thumbs.sh ++++ b/tmux-thumbs.sh +@@ -35,4 +35,4 @@ add-param command string + add-param upcase-command string + add-param osc52 boolean + +-"${CURRENT_DIR}/target/release/tmux-thumbs" "${PARAMS[@]}" || true ++@@replace-me@@ "${PARAMS[@]}" || true +diff --git a/tmux-thumbs.tmux b/tmux-thumbs.tmux +index 4fc9355..87c5346 100755 +--- a/tmux-thumbs.tmux ++++ b/tmux-thumbs.tmux +@@ -8,9 +8,3 @@ THUMBS_KEY="$(tmux show-option -gqv @thumbs-key)" + THUMBS_KEY=${THUMBS_KEY:-$DEFAULT_THUMBS_KEY} + + tmux bind-key "${THUMBS_KEY}" run-shell -b "${CURRENT_DIR}/tmux-thumbs.sh" +- +-BINARY="${CURRENT_DIR}/target/release/thumbs" +- +-if [ ! -f "$BINARY" ]; then +- tmux split-window "cd ${CURRENT_DIR} && cargo build --release --target-dir=target && echo 'Press any key to continue...' && read -k1" +-fi diff --git a/packages/tmux-thumbs.nix b/packages/tmux-thumbs.nix new file mode 100644 index 0000000..cd69486 --- /dev/null +++ b/packages/tmux-thumbs.nix @@ -0,0 +1,38 @@ +{ pkgs, lib, rustPlatform, fetchFromGitHub }: +let + pname = "tmux-thumbs"; + version = "0.5.1"; + tmux-thumbs-binary = rustPlatform.buildRustPackage { + pname = pname; + version = version; + + src = fetchFromGitHub { + owner = "fcsonline"; + repo = pname; + rev = version; + sha256 = "sha256-rU+tsrYJxoqF8Odh2ucvNekc+fLnSY6kFoVFUjqaTFE="; + }; + + cargoSha256 = "sha256-/F9tftRLqC6dk7lX41C8RUMqlrgzc0nkunc0rue5zuM="; + + patches = [ ./fix.patch ]; + postPatch = '' + substituteInPlace src/swapper.rs --replace '@@replace-me@@' '$out/bin/thumbs' + ''; + meta = {}; + }; +in pkgs.tmuxPlugins.mkTmuxPlugin { + pluginName = pname; + version = version; + rtpFilePath = "tmux-thumbs.tmux"; + src = fetchFromGitHub { + owner = "fcsonline"; + repo = pname; + rev = version; + sha256 = "sha256-rU+tsrYJxoqF8Odh2ucvNekc+fLnSY6kFoVFUjqaTFE="; + }; + patches = [ ./fix.patch ]; + postInstall = '' + substituteInPlace $target/tmux-thumbs.sh --replace '@@replace-me@@' '${tmux-thumbs-binary}/bin/tmux-thumbs' + ''; +} diff --git a/pkgs/default.nix b/pkgs/default.nix deleted file mode 100644 index f9beb0d..0000000 --- a/pkgs/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{pkgs}: { - sddm-sugar-candy = pkgs.callPackage ./sddm-sugar-candy {}; - kaleidoscope-udev-rules = pkgs.callPackage ./kaleidoscope-udev-rules {}; - grafanaDashboards = pkgs.lib.recurseIntoAttrs (pkgs.callPackage ./grafana-dashboards {}); - spot = pkgs.python3Packages.toPythonModule (pkgs.callPackage ./spot {}); -} diff --git a/pkgs/grafana-dashboards/default.nix b/pkgs/grafana-dashboards/default.nix deleted file mode 100644 index f0618de..0000000 --- a/pkgs/grafana-dashboards/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{callPackage}: { - nginx = callPackage ./nginx.nix {}; - node-exporter = callPackage ./node-exporter.nix {}; -} diff --git a/pkgs/grafana-dashboards/nginx.nix b/pkgs/grafana-dashboards/nginx.nix deleted file mode 100644 index 53ca94b..0000000 --- a/pkgs/grafana-dashboards/nginx.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - stdenv, - fetchFromGitHub, - lib, - ... -}: let - inherit - (lib) - licenses - ; - - version = "0.9.0"; -in - stdenv.mkDerivation { - inherit version; - pname = "grafana-dashboard-nginx"; - - dontBuild = true; - - src = fetchFromGitHub { - owner = "nginxinc"; - repo = "nginx-prometheus-exporter"; - rev = "v${version}"; - sha256 = "sha256:04y5vpj2kv2ygdzxy3crpnx4mhpkm1ns2995kxgvjlhnyck7a5rf"; - }; - - installPhase = '' - mkdir -p $out - cp grafana/dashboard.json $out/dashboard.json - ''; - - meta = { - description = "grafana dashboard for NGINX exporter"; - homepage = "https://github.com/nginxinc/nginx-prometheus-exporter"; - license = licenses.asl20; - }; - } diff --git a/pkgs/grafana-dashboards/node-exporter.nix b/pkgs/grafana-dashboards/node-exporter.nix deleted file mode 100644 index 42f5961..0000000 --- a/pkgs/grafana-dashboards/node-exporter.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - stdenv, - fetchFromGitHub, - lib, - ... -}: let - inherit - (lib) - licenses - ; - - version = "7d61c79619e5749e629758ecd96748c010028120"; -in - stdenv.mkDerivation { - version = "master-${version}"; - pname = "grafana-dashboard-node-exporter"; - - dontBuild = true; - - src = fetchFromGitHub { - owner = "rfrail3"; - repo = "grafana-dashboards"; - rev = version; - sha256 = "sha256:1z6i76jdiw3jjigbmbqvyi8kyj4ngw0y73fv9yksr2ncjfqlhhv6"; - }; - - installPhase = '' - mkdir -p $out - cp prometheus/node-exporter-full.json $out/node-exporter-full.json - ''; - - meta = { - description = "grafana dashboard for node exporter"; - homepage = "https://github.com/rfrail3/grafana-dashboards"; - license = licenses.lgpl3Only; - }; - } diff --git a/pkgs/kaleidoscope-udev-rules/default.nix b/pkgs/kaleidoscope-udev-rules/default.nix deleted file mode 100644 index 1af8ffc..0000000 --- a/pkgs/kaleidoscope-udev-rules/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, -}: let - inherit - (lib) - licenses - ; - - version = "1.99.3"; -in - stdenv.mkDerivation { - inherit version; - pname = "kaleidoscope-udev-rules"; - - dontBuild = true; - - src = fetchFromGitHub { - owner = "keyboardio"; - repo = "Kaleidoscope"; - rev = "v${version}"; - sha256 = "sha256-4WIl/Hj23j9GLzdMcyEQvg9X7HI4WSInrLkYCkj6yhM="; - }; - - installPhase = '' - mkdir -p $out/lib/udev/rules.d - cp etc/60-kaleidoscope.rules $out/lib/udev/rules.d/ - ''; - - meta = { - description = "udev rules for kaleidoscope firmware keyboards"; - homepage = "https://github.com/keyboardio/Kaleidoscope"; - license = licenses.gpl3Only; - }; - } diff --git a/pkgs/sddm-sugar-candy/custom-conf.patch b/pkgs/sddm-sugar-candy/custom-conf.patch deleted file mode 100644 index 57bd6e2..0000000 --- a/pkgs/sddm-sugar-candy/custom-conf.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/theme.conf b/theme.conf -index f39fb68..8f3256d 100644 ---- a/theme.conf -+++ b/theme.conf -@@ -1,6 +1,6 @@ - [General] - --Background="Backgrounds/Mountain.jpg" -+Background="Backgrounds/Colorful Dune.jpg" - ## Path relative to the theme root directory. Most standard image file formats are allowed including support for transparency. (e.g. background.jpeg/illustration.GIF/Foto.png/undraw.svgz) - - DimBackgroundImage="0.0" -@@ -9,8 +9,8 @@ DimBackgroundImage="0.0" - ScaleImageCropped="true" - ## Whether the image should be cropped when scaled proportionally. Setting this to false will fit the whole image instead, possibly leaving white space. This can be exploited beautifully with illustrations (try it with "undraw.svg" included in the theme). - --ScreenWidth="1440" --ScreenHeight="900" -+ScreenWidth="1920" -+ScreenHeight="1080" - ## Adjust to your resolution to help SDDM speed up on calculations - - -@@ -44,7 +44,7 @@ MainColor="white" - ## Used for all elements when not focused/hovered etc. Usually the best effect is achieved by having this be either white or a very dark grey like #444 (not black for smoother antialias) - ## Colors can be HEX or Qt names (e.g. red/salmon/blanchedalmond). See https://doc.qt.io/qt-5/qml-color.html - --AccentColor="#fb884f" -+AccentColor="#268bd2" - ## Used for elements in focus/hover/pressed. Should be contrasting to the background and the MainColor to achieve the best effect. - - BackgroundColor="#444" -@@ -84,7 +84,7 @@ ForceLastUser="true" - ForcePasswordFocus="true" - ## Give automatic focus to the password field. Together with ForceLastUser this makes for the fastest login experience. - --ForceHideCompletePassword="false" -+ForceHideCompletePassword="true" - ## If you don't like to see any character at all not even while being entered set this to true. - - ForceHideVirtualKeyboardButton="false" -@@ -96,7 +96,8 @@ ForceHideSystemButtons="false" - AllowEmptyPassword="false" - ## Enable login for users without a password. This is discouraged. Makes the login button always enabled. - --AllowBadUsernames="false" -+## set to true to not capitalize my username -+AllowBadUsernames="true" - ## Do not change this! Uppercase letters are generally not allowed in usernames. This option is only for systems that differ from this standard! Also shows username as is instead of capitalized. - - diff --git a/pkgs/sddm-sugar-candy/default.nix b/pkgs/sddm-sugar-candy/default.nix deleted file mode 100644 index 3a31537..0000000 --- a/pkgs/sddm-sugar-candy/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - stdenv, - fetchFromGitLab, -}: -stdenv.mkDerivation rec { - pname = "sddm-sugar-candy"; - # latest master commit, no recent tags :( - version = "2b72ef6c6f720fe0ffde5ea5c7c48152e02f6c4f"; - - dontBuild = true; - installPhase = '' - mkdir -p $out/share/sddm/themes - cp -aR . $out/share/sddm/themes/sugar-candy - ''; - - patches = [./custom-conf.patch]; - - src = fetchFromGitLab { - domain = "framagit.org"; - owner = "MarianArlt"; - repo = "sddm-sugar-candy"; - rev = version; - sha256 = "sha256-XggFVsEXLYklrfy1ElkIp9fkTw4wvXbyVkaVCZq4ZLU="; - }; -} diff --git a/pkgs/spot/default.nix b/pkgs/spot/default.nix deleted file mode 100644 index 28e7609..0000000 --- a/pkgs/spot/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - stdenv, - fetchurl, - python3, -}: let - version = "2.14.1"; -in - stdenv.mkDerivation { - inherit version; - pname = "spot"; - - buildInputs = [ - python3 - ]; - - src = fetchurl { - url = "https://www.lrde.epita.fr/dload/spot/spot-${version}.tar.gz"; - sha256 = "sha256-Jd+KavTkuzrmdRWsmOPTfEMDpoLjOqpm5y10s5RZpTA="; - }; - } diff --git a/talos.nix b/poseidon.nix similarity index 80% rename from talos.nix rename to poseidon.nix index f38777d..2093e68 100644 --- a/talos.nix +++ b/poseidon.nix @@ -1,16 +1,18 @@ -{...}: { +{ ... }: + +{ imports = [ # Default configuration ./base - # Module definitions - ./modules - # Service definitions ./services + # Configuration secrets + ./secrets + # Host-specific config - ./hosts/talos + ./hosts/poseidon ]; # This value determines the NixOS release from which the default @@ -19,5 +21,5 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.11"; # Did you read the comment? + system.stateVersion = "20.09"; # Did you read the comment? } diff --git a/secrets/borg-backup-repo.secret b/secrets/borg-backup-repo.secret new file mode 100644 index 0000000..1fce44a Binary files /dev/null and b/secrets/borg-backup-repo.secret differ diff --git a/secrets/default.nix b/secrets/default.nix new file mode 100644 index 0000000..0f21d45 --- /dev/null +++ b/secrets/default.nix @@ -0,0 +1,21 @@ +{ pkgs, lib, config, ... }: +with lib; +{ + options.my.secrets = mkOption { + type = types.attrs; + }; + + config.my.secrets = { + matrix-registration-shared-secret = lib.fileContents ./matrix-registration-shared-secret.secret; + shadow-hashed-password-alarsyo = lib.fileContents ./shadow-hashed-password-alarsyo.secret; + shadow-hashed-password-root = lib.fileContents ./shadow-hashed-password-root.secret; + miniflux-admin-credentials = lib.fileContents ./miniflux-admin-credentials.secret; + borg-backup-repo = lib.fileContents ./borg-backup-repo.secret; + transmission-password = lib.fileContents ./transmission.secret; + nextcloud-admin-pass = lib.fileContents ./nextcloud-admin-pass.secret; + nextcloud-admin-user = lib.fileContents ./nextcloud-admin-user.secret; + lohr-shared-secret = lib.fileContents ./lohr-shared-secret.secret; + + wireguard = pkgs.callPackage ./wireguard.nix { }; + }; +} diff --git a/secrets/lohr-shared-secret.secret b/secrets/lohr-shared-secret.secret new file mode 100644 index 0000000..a05809e Binary files /dev/null and b/secrets/lohr-shared-secret.secret differ diff --git a/secrets/matrix-registration-shared-secret.secret b/secrets/matrix-registration-shared-secret.secret new file mode 100644 index 0000000..be505fc Binary files /dev/null and b/secrets/matrix-registration-shared-secret.secret differ diff --git a/secrets/miniflux-admin-credentials.secret b/secrets/miniflux-admin-credentials.secret new file mode 100644 index 0000000..002cd97 Binary files /dev/null and b/secrets/miniflux-admin-credentials.secret differ diff --git a/secrets/nextcloud-admin-pass.secret b/secrets/nextcloud-admin-pass.secret new file mode 100644 index 0000000..49f51ea Binary files /dev/null and b/secrets/nextcloud-admin-pass.secret differ diff --git a/secrets/nextcloud-admin-user.secret b/secrets/nextcloud-admin-user.secret new file mode 100644 index 0000000..e653faf Binary files /dev/null and b/secrets/nextcloud-admin-user.secret differ diff --git a/secrets/shadow-hashed-password-alarsyo.secret b/secrets/shadow-hashed-password-alarsyo.secret new file mode 100644 index 0000000..d4afac8 Binary files /dev/null and b/secrets/shadow-hashed-password-alarsyo.secret differ diff --git a/secrets/shadow-hashed-password-root.secret b/secrets/shadow-hashed-password-root.secret new file mode 100644 index 0000000..d4afac8 Binary files /dev/null and b/secrets/shadow-hashed-password-root.secret differ diff --git a/secrets/transmission.secret b/secrets/transmission.secret new file mode 100644 index 0000000..c47d591 Binary files /dev/null and b/secrets/transmission.secret differ diff --git a/secrets/wireguard.nix b/secrets/wireguard.nix new file mode 100644 index 0000000..3a19c05 Binary files /dev/null and b/secrets/wireguard.nix differ diff --git a/services/vaultwarden.nix b/services/bitwarden_rs.nix similarity index 59% rename from services/vaultwarden.nix rename to services/bitwarden_rs.nix index 17cede7..0dd8eff 100644 --- a/services/vaultwarden.nix +++ b/services/bitwarden_rs.nix @@ -1,27 +1,15 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; +{ config, lib, pkgs, ... }: - cfg = config.my.services.vaultwarden; +with lib; + +let + cfg = config.my.services.bitwarden_rs; my = config.my; domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; in { - options.my.services.vaultwarden = let - inherit (lib) types; - in { - enable = mkEnableOption "Vaultwarden"; + options.my.services.bitwarden_rs = { + enable = mkEnableOption "Bitwarden"; privatePort = mkOption { type = types.port; @@ -42,35 +30,29 @@ in { services.postgresql = { enable = true; - ensureDatabases = ["vaultwarden"]; - ensureUsers = [ - { - name = "vaultwarden"; - ensureDBOwnership = true; - } - ]; + initialScript = pkgs.writeText "bitwarden_rs-init.sql" '' + CREATE ROLE "bitwarden_rs" WITH LOGIN; + CREATE DATABASE "bitwarden_rs" WITH OWNER "bitwarden_rs"; + ''; }; services.postgresqlBackup = { - databases = ["vaultwarden"]; + databases = [ "bitwarden_rs" ]; }; - services.vaultwarden = { + services.bitwarden_rs = { enable = true; dbBackend = "postgresql"; config = { TZ = "Europe/Paris"; WEB_VAULT_ENABLED = true; WEBSOCKET_ENABLED = true; - WEBSOCKET_ADDRESS = "127.0.0.1"; WEBSOCKET_PORT = cfg.websocketPort; - ROCKET_ADDRESS = "127.0.0.1"; ROCKET_PORT = cfg.privatePort; SIGNUPS_ALLOWED = false; INVITATIONS_ALLOWED = false; DOMAIN = "https://pass.${domain}"; - # FIXME: should be renamed to vaultwarden eventually - DATABASE_URL = "postgresql://vaultwarden@/vaultwarden"; + DATABASE_URL = "postgresql://bitwarden_rs@/bitwarden_rs"; }; }; @@ -78,7 +60,7 @@ in { virtualHosts = { "pass.${domain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.privatePort}"; @@ -96,45 +78,48 @@ in { }; }; - security.acme.certs.${fqdn}.extraDomainNames = ["pass.${domain}"]; + # needed for bitwarden to find files to serve for the vault + environment.systemPackages = with pkgs; [ + bitwarden_rs-vault + ]; - # FIXME: should be renamed to vaultwarden eventually - my.services.restic-backup = mkIf cfg.enable { - paths = ["/var/lib/bitwarden_rs"]; - exclude = ["/var/lib/bitwarden_rs/icon_cache"]; + my.services.borg-backup = mkIf cfg.enable { + paths = [ "/var/lib/bitwarden_rs" ]; + exclude = [ "/var/lib/bitwarden_rs/icon_cache" ]; }; services.fail2ban.jails = { - vaultwarden = '' + bitwarden_rs = '' enabled = true - filter = vaultwarden + filter = bitwarden_rs port = http,https maxretry = 5 ''; # Admin page isn't enabled by default, but just in case... - vaultwarden-admin = '' + bitwarden_rs-admin = '' enabled = true - filter = vaultwarden-admin + filter = bitwarden_rs-admin port = http,https maxretry = 2 ''; }; environment.etc = { - "fail2ban/filter.d/vaultwarden.conf".text = '' + "fail2ban/filter.d/bitwarden_rs.conf".text = '' [Definition] failregex = ^.*Username or password is incorrect\. Try again\. IP: \. Username:.*$ ignoreregex = - journalmatch = _SYSTEMD_UNIT=vaultwarden.service + journalmatch = _SYSTEMD_UNIT=bitwarden_rs.service ''; - "fail2ban/filter.d/vaultwarden-admin.conf".text = '' + "fail2ban/filter.d/bitwarden_rs-admin.conf".text = '' [Definition] failregex = ^.*Invalid admin token\. IP: .*$ ignoreregex = - journalmatch = _SYSTEMD_UNIT=vaultwarden.service + journalmatch = _SYSTEMD_UNIT=bitwarden_rs.service ''; }; }; + } diff --git a/services/borg-backup.nix b/services/borg-backup.nix new file mode 100644 index 0000000..6c4e132 --- /dev/null +++ b/services/borg-backup.nix @@ -0,0 +1,67 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let cfg = config.my.services.borg-backup; +in { + options.my.services.borg-backup = { + enable = mkEnableOption "Enable Borg backups for this host"; + + repo = mkOption { + type = types.str; + default = null; + example = "deadbeef@deadbeef.repo.borgbase.com:repo"; + description = "Borgbase repo info. Required."; + }; + + paths = mkOption { + type = types.listOf types.str; + default = []; + example = [ + "/var/lib" + "/home" + ]; + description = "Paths to backup"; + }; + + exclude = mkOption { + type = types.listOf types.str; + default = []; + example = [ + # very large paths + "/var/lib/docker" + "/var/lib/systemd" + "/var/lib/libvirt" + + # temporary files created by cargo and `go build` + "**/target" + "/home/*/go/bin" + "/home/*/go/pkg" + ]; + description = "Paths to exclude from backup"; + }; + }; + + config = mkIf cfg.enable { + services.borgbackup.jobs."borgbase" = { + paths = cfg.paths; + exclude = cfg.exclude; + repo = cfg.repo; + encryption = { + mode = "repokey-blake2"; + passCommand = "cat /root/borgbackup/passphrase"; + }; + environment.BORG_RSH = "ssh -i /root/borgbackup/ssh_key"; + extraCreateArgs = "--stats --list"; + extraPruneArgs = "--stats --list"; + doInit = true; + compression = "auto,zstd"; + startAt = "daily"; + prune.keep = { + daily = 7; + weekly = 4; + monthly = 6; + }; + }; + }; +} diff --git a/services/default.nix b/services/default.nix index 51e37bf..93fe1fe 100644 --- a/services/default.nix +++ b/services/default.nix @@ -1,31 +1,23 @@ -{...}: { +{ ... }: + +{ imports = [ - ./vaultwarden.nix + ./bitwarden_rs.nix + ./borg-backup.nix ./fail2ban.nix - ./fava.nix - ./forgejo ./gitea - ./immich.nix ./jellyfin.nix ./lohr.nix ./matrix.nix - ./mealie.nix ./media.nix - ./microbin.nix ./miniflux.nix ./monitoring.nix - ./navidrome.nix ./nextcloud.nix ./nginx.nix - ./paperless.nix - ./photoprism.nix - ./pipewire.nix - ./pleroma.nix ./postgresql-backup.nix ./postgresql.nix - ./restic-backup.nix - ./scribe.nix - ./tailscale.nix + ./tgv.nix ./transmission.nix + ./wireguard.nix ]; } diff --git a/services/fail2ban.nix b/services/fail2ban.nix index 6cb1bda..8f61796 100644 --- a/services/fail2ban.nix +++ b/services/fail2ban.nix @@ -1,15 +1,7 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; +{ config, lib, pkgs, ... }: +with lib; +let cfg = config.my.services.fail2ban; in { options.my.services.fail2ban = { @@ -19,9 +11,11 @@ in { config = mkIf cfg.enable { services.fail2ban = { enable = true; - bantime = "6h"; bantime-increment.enable = true; - jails.DEFAULT.settings.findtime = "6h"; + jails.DEFAULT = '' + bantime = 6h + findtime = 6h + ''; }; }; } diff --git a/services/fava.nix b/services/fava.nix deleted file mode 100644 index 8e796f5..0000000 --- a/services/fava.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.fava; - my = config.my; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; - - secrets = config.my.secrets; -in { - options.my.services.fava = let - inherit (lib) types; - in { - enable = mkEnableOption "Fava"; - - home = mkOption { - type = types.str; - default = "/var/lib/fava"; - example = "/var/lib/fava"; - description = "Home for the fava service, where data will be stored"; - }; - - port = mkOption { - type = types.port; - default = 8080; - example = 8080; - description = "Internal port for Fava"; - }; - - filePath = mkOption { - type = types.str; - example = "my_dir/money.beancount"; - description = "File to load in Fava"; - }; - }; - - config = mkIf cfg.enable { - systemd.services.fava = { - wantedBy = ["multi-user.target"]; - serviceConfig = { - Environment = []; - ExecStart = "${pkgs.fava}/bin/fava -H 127.0.0.1 -p ${toString cfg.port} ${cfg.home}/${cfg.filePath}"; - WorkingDirectory = cfg.home; - User = "fava"; - Group = "fava"; - }; - }; - - users.users.fava = { - isSystemUser = true; - home = cfg.home; - createHome = true; - group = "fava"; - }; - users.groups.fava = {}; - - services.nginx.virtualHosts = { - "fava.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - listen = [ - # FIXME: hardcoded tailscale IP - { - addr = "100.80.61.67"; - port = 443; - ssl = true; - } - { - addr = "100.80.61.67"; - port = 80; - ssl = false; - } - ]; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}"; - }; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["fava.${domain}"]; - }; -} diff --git a/services/forgejo/default.nix b/services/forgejo/default.nix deleted file mode 100644 index 9d40402..0000000 --- a/services/forgejo/default.nix +++ /dev/null @@ -1,129 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.forgejo; - my = config.my; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; - - forgejoUser = "git"; -in { - options.my.services.forgejo = let - inherit (lib) types; - in { - enable = mkEnableOption "Personal Git hosting with Forgejo"; - - privatePort = mkOption { - type = types.port; - default = 8082; - example = 8082; - description = "Port to serve the app"; - }; - }; - - config = mkIf cfg.enable { - # use git as user to have `git clone git@git.domain` - users.users.${forgejoUser} = { - description = "Forgejo Service"; - home = config.services.forgejo.stateDir; - useDefaultShell = true; - group = forgejoUser; - - # the systemd service for the forgejo module seems to hardcode the group as - # forgejo, so, uh, just in case? - extraGroups = ["forgejo"]; - - isSystemUser = true; - }; - users.groups.${forgejoUser} = {}; - - services.forgejo = { - enable = true; - user = forgejoUser; - group = config.users.users.${forgejoUser}.group; - stateDir = "/var/lib/${forgejoUser}"; - - lfs.enable = true; - - settings = { - server = { - ROOT_URL = "https://git.${domain}/"; - DOMAIN = "git.${domain}"; - HTTP_ADDR = "127.0.0.1"; - HTTP_PORT = cfg.privatePort; - }; - log.LEVEL = "Warn"; # [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ] - repository = { - ENABLE_PUSH_CREATE_USER = true; - DEFAULT_BRANCH = "main"; - }; - - # NOTE: temporarily remove this for initial setup - service.DISABLE_REGISTRATION = true; - - # only send cookies via HTTPS - session.COOKIE_SECURE = true; - - DEFAULT.APP_NAME = "Personal Forge"; - }; - - # NixOS module uses `forgejo dump` to backup repositories and the database, - # but it produces a single .zip file that's not very restic friendly. - # I configure my backup system manually below. - dump.enable = false; - - database = { - type = "postgres"; - # user needs to be the same as forgejo user - user = forgejoUser; - name = forgejoUser; - }; - }; - - # FIXME: Borg *could* be backing up files while they're being edited by - # forgejo, so it may produce corrupt files in the snapshot if I push stuff - # around midnight. I'm not sure how `forgejo dump` handles this either, - # though. - my.services.restic-backup = { - paths = [ - config.services.forgejo.lfs.contentDir - config.services.forgejo.repositoryRoot - ]; - }; - - # NOTE: no need to use postgresql.ensureDatabases because the forgejo module - # takes care of this automatically - services.postgresqlBackup = { - databases = [config.services.forgejo.database.name]; - }; - - services.nginx = { - virtualHosts = { - "git.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.privatePort}"; - }; - }; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["git.${domain}"]; - - systemd.services.forgejo.preStart = "${pkgs.coreutils}/bin/ln -sfT ${./templates} ${config.services.forgejo.stateDir}/custom/templates"; - }; -} diff --git a/services/forgejo/templates/home.tmpl b/services/forgejo/templates/home.tmpl deleted file mode 100644 index c2d3ee2..0000000 --- a/services/forgejo/templates/home.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -{{template "base/head" .}} -
-
-
-
- -
-
-

- {{AppName}} -

-

alarsyo's personal projects are hosted here

-
-
-
-
-{{template "base/footer" .}} diff --git a/services/gitea/default.nix b/services/gitea/default.nix index 06f9b7d..641c85c 100644 --- a/services/gitea/default.nix +++ b/services/gitea/default.nix @@ -1,28 +1,14 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; +{ config, lib, pkgs, ... }: +with lib; + +let cfg = config.my.services.gitea; my = config.my; domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; - - giteaUser = "git"; in { - options.my.services.gitea = let - inherit (lib) types; - in { + options.my.services.gitea = { enable = mkEnableOption "Personal Git hosting with Gitea"; privatePort = mkOption { @@ -35,57 +21,54 @@ in { config = mkIf cfg.enable { # use git as user to have `git clone git@git.domain` - users.users.${giteaUser} = { + users.users.git = { description = "Gitea Service"; home = config.services.gitea.stateDir; useDefaultShell = true; - group = giteaUser; + group = "git"; # the systemd service for the gitea module seems to hardcode the group as # gitea, so, uh, just in case? - extraGroups = ["gitea"]; + extraGroups = [ "gitea" ]; isSystemUser = true; }; - users.groups.${giteaUser} = {}; + users.groups.git = { }; services.gitea = { enable = true; - user = giteaUser; + user = "git"; + domain = "git.${domain}"; appName = "Personal Forge"; + rootUrl = "https://git.${domain}/"; + httpAddress = "127.0.0.1"; + httpPort = cfg.privatePort; + log.level = "Warn"; # [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ] lfs.enable = true; + # NOTE: temporarily remove this for initial setup + disableRegistration = true; + + # only send cookies via HTTPS + cookieSecure = true; + settings = { - server = { - ROOT_URL = "https://git.${domain}/"; - DOMAIN = "git.${domain}"; - HTTP_ADDR = "127.0.0.1"; - HTTP_PORT = cfg.privatePort; - }; - log.LEVEL = "Warn"; # [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ] other.SHOW_FOOTER_VERSION = false; repository = { ENABLE_PUSH_CREATE_USER = true; DEFAULT_BRANCH = "main"; }; - - # NOTE: temporarily remove this for initial setup - service.DISABLE_REGISTRATION = true; - - # only send cookies via HTTPS - session.COOKIE_SECURE = true; }; # NixOS module uses `gitea dump` to backup repositories and the database, - # but it produces a single .zip file that's not very restic friendly. + # but it produces a single .zip file that's not very borg-backup friendly. # I configure my backup system manually below. dump.enable = false; database = { type = "postgres"; # user needs to be the same as gitea user - user = giteaUser; - name = giteaUser; + user = "git"; }; }; @@ -93,24 +76,22 @@ in { # gitea, so it may produce corrupt files in the snapshot if I push stuff # around midnight. I'm not sure how `gitea dump` handles this either, # though. - my.services.restic-backup = { + my.services.borg-backup = { paths = [ config.services.gitea.lfs.contentDir config.services.gitea.repositoryRoot ]; }; - # NOTE: no need to use postgresql.ensureDatabases because the gitea module - # takes care of this automatically services.postgresqlBackup = { - databases = [config.services.gitea.database.name]; + databases = [ "gitea" ]; }; services.nginx = { virtualHosts = { "git.${domain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.privatePort}"; @@ -119,8 +100,6 @@ in { }; }; - security.acme.certs.${fqdn}.extraDomainNames = ["git.${domain}"]; - systemd.services.gitea.preStart = "${pkgs.coreutils}/bin/ln -sfT ${./templates} ${config.services.gitea.stateDir}/custom/templates"; }; } diff --git a/services/gitea/templates/home.tmpl b/services/gitea/templates/home.tmpl index c2d3ee2..bff47d2 100644 --- a/services/gitea/templates/home.tmpl +++ b/services/gitea/templates/home.tmpl @@ -3,7 +3,7 @@
- +

diff --git a/services/grafana-dashboards/node-exporter-full_rev21.json b/services/grafana-dashboards/node-exporter-full_rev21.json new file mode 100644 index 0000000..d044a15 --- /dev/null +++ b/services/grafana-dashboards/node-exporter-full_rev21.json @@ -0,0 +1,13701 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [ + { + "$$hashKey": "object:1058", + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": 1860, + "graphTooltip": 0, + "id": null, + "iteration": 1595837627257, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 261, + "panels": [], + "repeat": null, + "title": "Quick CPU / Mem / Disk", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "description": "Busy state of all CPU cores together", + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 20, + "links": [], + "options": { + "fieldOptions": { + "calcs": [ + "lastNotNull" + ], + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 100, + "min": 0, + "nullValueMode": "null", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 85 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "expr": "(((count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))) - avg(sum by (mode)(irate(node_cpu_seconds_total{mode='idle',instance=\"$node\",job=\"$job\"}[5m])))) * 100) / count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))", + "hide": false, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A", + "step": 900 + } + ], + "title": "CPU Busy", + "type": "gauge" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "description": "Busy state of all CPU cores together (5 min average)", + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 155, + "links": [], + "options": { + "fieldOptions": { + "calcs": [ + "lastNotNull" + ], + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 100, + "min": 0, + "nullValueMode": "null", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 85 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "expr": "avg(node_load5{instance=\"$node\",job=\"$job\"}) / count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)) * 100", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "refId": "A", + "step": 900 + } + ], + "title": "Sys Load (5m avg)", + "type": "gauge" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "description": "Busy state of all CPU cores together (15 min average)", + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 19, + "links": [], + "options": { + "fieldOptions": { + "calcs": [ + "lastNotNull" + ], + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 100, + "min": 0, + "nullValueMode": "null", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 85 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "expr": "avg(node_load15{instance=\"$node\",job=\"$job\"}) / count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)) * 100", + "hide": false, + "intervalFactor": 1, + "refId": "A", + "step": 900 + } + ], + "title": "Sys Load (15m avg)", + "type": "gauge" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "description": "Non available RAM memory", + "gridPos": { + "h": 4, + "w": 3, + "x": 9, + "y": 1 + }, + "hideTimeOverride": false, + "id": 16, + "links": [], + "options": { + "fieldOptions": { + "calcs": [ + "lastNotNull" + ], + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 100, + "min": 0, + "nullValueMode": "null", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 80 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "expr": "((node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"}) / (node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"} )) * 100", + "format": "time_series", + "hide": true, + "intervalFactor": 1, + "refId": "A", + "step": 900 + }, + { + "expr": "100 - ((node_memory_MemAvailable_bytes{instance=\"$node\",job=\"$job\"} * 100) / node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "refId": "B", + "step": 900 + } + ], + "title": "RAM Used", + "type": "gauge" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "description": "Used Swap", + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 1 + }, + "id": 21, + "links": [], + "options": { + "fieldOptions": { + "calcs": [ + "lastNotNull" + ], + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 100, + "min": 0, + "nullValueMode": "null", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 10 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 25 + } + ] + }, + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "expr": "((node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"}) / (node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} )) * 100", + "intervalFactor": 1, + "refId": "A", + "step": 900 + } + ], + "title": "SWAP Used", + "type": "gauge" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "description": "Used Root FS", + "gridPos": { + "h": 4, + "w": 3, + "x": 15, + "y": 1 + }, + "id": 154, + "links": [], + "options": { + "fieldOptions": { + "calcs": [ + "lastNotNull" + ], + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 100, + "min": 0, + "nullValueMode": "null", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 80 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "expr": "100 - ((node_filesystem_avail_bytes{instance=\"$node\",job=\"$job\",mountpoint=\"/\",fstype!=\"rootfs\"} * 100) / node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",mountpoint=\"/\",fstype!=\"rootfs\"})", + "format": "time_series", + "intervalFactor": 1, + "refId": "A", + "step": 900 + } + ], + "title": "Root FS Used", + "type": "gauge" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "description": "Total number of CPU cores", + "format": "short", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 18, + "y": 1 + }, + "id": 14, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "maxPerRow": 6, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A", + "step": 900 + } + ], + "thresholds": "", + "title": "CPU Cores", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 1, + "description": "System uptime", + "format": "s", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 20, + "y": 1 + }, + "hideTimeOverride": true, + "id": 15, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "$$hashKey": "object:1094", + "name": "value to text", + "value": 1 + }, + { + "$$hashKey": "object:1095", + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "null", + "nullText": null, + "postfix": "s", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "node_time_seconds{instance=\"$node\",job=\"$job\"} - node_boot_time_seconds{instance=\"$node\",job=\"$job\"}", + "intervalFactor": 2, + "refId": "A", + "step": 1800 + } + ], + "thresholds": "", + "title": "Uptime", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "$$hashKey": "object:1097", + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "description": "Total RootFS", + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 18, + "y": 3 + }, + "id": 23, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "maxPerRow": 6, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",mountpoint=\"/\",fstype!=\"rootfs\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "refId": "A", + "step": 900 + } + ], + "thresholds": "70,90", + "title": "RootFS Total", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "description": "Total RAM", + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 20, + "y": 3 + }, + "id": 75, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "maxPerRow": 6, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "70%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"}", + "intervalFactor": 1, + "refId": "A", + "step": 900 + } + ], + "thresholds": "", + "title": "RAM Total", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "description": "Total SWAP", + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 22, + "y": 3 + }, + "id": 18, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "maxPerRow": 6, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "70%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"}", + "intervalFactor": 1, + "refId": "A", + "step": 900 + } + ], + "thresholds": "", + "title": "SWAP Total", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 263, + "panels": [], + "repeat": null, + "title": "Basic CPU / Mem / Net / Disk", + "type": "row" + }, + { + "aliasColors": { + "Busy": "#EAB839", + "Busy Iowait": "#890F02", + "Busy other": "#1F78C1", + "Idle": "#052B51", + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "description": "Basic CPU info", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 77, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": 250, + "sort": null, + "sortDesc": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": true, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Busy Iowait", + "color": "#890F02" + }, + { + "alias": "Idle", + "color": "#7EB26D" + }, + { + "alias": "Busy System", + "color": "#EAB839" + }, + { + "alias": "Busy User", + "color": "#0A437C" + }, + { + "alias": "Busy Other", + "color": "#6D1F62" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (instance)(irate(node_cpu_seconds_total{mode=\"system\",instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Busy System", + "refId": "A", + "step": 240 + }, + { + "expr": "sum by (instance)(irate(node_cpu_seconds_total{mode='user',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Busy User", + "refId": "B", + "step": 240 + }, + { + "expr": "sum by (instance)(irate(node_cpu_seconds_total{mode='iowait',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Busy Iowait", + "refId": "C", + "step": 240 + }, + { + "expr": "sum by (instance)(irate(node_cpu_seconds_total{mode=~\".*irq\",instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Busy IRQs", + "refId": "D", + "step": 240 + }, + { + "expr": "sum (irate(node_cpu_seconds_total{mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Busy Other", + "refId": "E", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='idle',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Idle", + "refId": "F", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Basic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "SWAP Used": "#BF1B00", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap Used": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "description": "Basic memory usage", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 6 + }, + "hiddenSeries": false, + "id": 78, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "RAM Total", + "color": "#E0F9D7", + "fill": 0, + "stack": false + }, + { + "alias": "RAM Cache + Buffer", + "color": "#052B51" + }, + { + "alias": "RAM Free", + "color": "#7EB26D" + }, + { + "alias": "Avaliable", + "color": "#DEDAF7", + "fill": 0, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "RAM Total", + "refId": "A", + "step": 240 + }, + { + "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"} - (node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} + node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "RAM Used", + "refId": "B", + "step": 240 + }, + { + "expr": "node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} + node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "RAM Cache + Buffer", + "refId": "C", + "step": 240 + }, + { + "expr": "node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "RAM Free", + "refId": "D", + "step": 240 + }, + { + "expr": "(node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "SWAP Used", + "refId": "E", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Basic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Recv_bytes_eth2": "#7EB26D", + "Recv_bytes_lo": "#0A50A1", + "Recv_drop_eth2": "#6ED0E0", + "Recv_drop_lo": "#E0F9D7", + "Recv_errs_eth2": "#BF1B00", + "Recv_errs_lo": "#CCA300", + "Trans_bytes_eth2": "#7EB26D", + "Trans_bytes_lo": "#0A50A1", + "Trans_drop_eth2": "#6ED0E0", + "Trans_drop_lo": "#E0F9D7", + "Trans_errs_eth2": "#BF1B00", + "Trans_errs_lo": "#CCA300", + "recv_bytes_lo": "#0A50A1", + "recv_drop_eth0": "#99440A", + "recv_drop_lo": "#967302", + "recv_errs_eth0": "#BF1B00", + "recv_errs_lo": "#890F02", + "trans_bytes_eth0": "#7EB26D", + "trans_bytes_lo": "#0A50A1", + "trans_drop_eth0": "#99440A", + "trans_drop_lo": "#967302", + "trans_errs_eth0": "#BF1B00", + "trans_errs_lo": "#890F02" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "Basic network info per interface", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 13 + }, + "hiddenSeries": false, + "id": 74, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\"}[5m])*8", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "recv {{device}}", + "refId": "A", + "step": 240 + }, + { + "expr": "irate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\"}[5m])*8", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "trans {{device}} ", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Basic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "pps", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 3, + "description": "Disk space used of all filesystems mounted", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 13 + }, + "height": "", + "hiddenSeries": false, + "id": 152, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "100 - ((node_filesystem_avail_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'} * 100) / node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{mountpoint}}", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk Space Used Basic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 265, + "panels": [ + { + "aliasColors": { + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "description": "", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 21 + }, + "hiddenSeries": false, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 250, + "sort": null, + "sortDesc": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": true, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode=\"system\",instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "interval": "10s", + "intervalFactor": 2, + "legendFormat": "System - Processes executing in kernel mode", + "refId": "A", + "step": 20 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='user',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "User - Normal processes executing in user mode", + "refId": "B", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='nice',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Nice - Niced processes executing in user mode", + "refId": "C", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='idle',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Idle - Waiting for something to happen", + "refId": "D", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='iowait',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Iowait - Waiting for I/O to complete", + "refId": "E", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='irq',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Irq - Servicing interrupts", + "refId": "F", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='softirq',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Softirq - Servicing softirqs", + "refId": "G", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='steal',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Steal - Time spent in other operating systems when running in a virtualized environment", + "refId": "H", + "step": 240 + }, + { + "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='guest',instance=\"$node\",job=\"$job\"}[5m])) * 100", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Guest - Time spent running a virtual CPU for a guest operating system", + "refId": "I", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "percentage", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap - Swap memory usage": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839", + "Unused - Free memory unassigned": "#052B51" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "description": "", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 21 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "sort": null, + "sortDesc": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Hardware Corrupted - *./", + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"} - node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"} - node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} - node_memory_Slab_bytes{instance=\"$node\",job=\"$job\"} - node_memory_PageTables_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapCached_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Apps - Memory used by user-space applications", + "refId": "A", + "step": 240 + }, + { + "expr": "node_memory_PageTables_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "PageTables - Memory used to map between virtual and physical memory addresses", + "refId": "B", + "step": 240 + }, + { + "expr": "node_memory_SwapCached_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "SwapCache - Memory that keeps track of pages that have been fetched from swap but not yet been modified", + "refId": "C", + "step": 240 + }, + { + "expr": "node_memory_Slab_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Slab - Memory used by the kernel to cache data structures for its own use (caches like inode, dentry, etc)", + "refId": "D", + "step": 240 + }, + { + "expr": "node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Cache - Parked file data (file content) cache", + "refId": "E", + "step": 240 + }, + { + "expr": "node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Buffers - Block device (e.g. harddisk) cache", + "refId": "F", + "step": 240 + }, + { + "expr": "node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Unused - Free memory unassigned", + "refId": "G", + "step": 240 + }, + { + "expr": "(node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Swap - Swap space used", + "refId": "H", + "step": 240 + }, + { + "expr": "node_memory_HardwareCorrupted_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working", + "refId": "I", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Stack", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "receive_packets_eth0": "#7EB26D", + "receive_packets_lo": "#E24D42", + "transmit_packets_eth0": "#7EB26D", + "transmit_packets_lo": "#E24D42" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 33 + }, + "hiddenSeries": false, + "id": 84, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:5871", + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\"}[5m])*8", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive", + "refId": "A", + "step": 240 + }, + { + "expr": "irate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\"}[5m])*8", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Transmit", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:5884", + "format": "bps", + "label": "bits out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:5885", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 3, + "description": "", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 33 + }, + "height": "", + "hiddenSeries": false, + "id": 156, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'} - node_filesystem_avail_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{mountpoint}}", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk Space Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 45 + }, + "hiddenSeries": false, + "id": 229, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Read.*/", + "transform": "negative-Y" + }, + { + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_reads_completed_total{instance=\"$node\",job=\"$job\",device=~\"$diskdevices\"}[5m])", + "intervalFactor": 4, + "legendFormat": "{{device}} - Reads completed", + "refId": "A", + "step": 480 + }, + { + "expr": "irate(node_disk_writes_completed_total{instance=\"$node\",job=\"$job\",device=~\"$diskdevices\"}[5m])", + "intervalFactor": 2, + "legendFormat": "{{device}} - Writes completed", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk IOps", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "iops", + "label": "IO read (-) / write (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "io time": "#890F02" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 3, + "description": "", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 45 + }, + "hiddenSeries": false, + "id": 42, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": null, + "sortDesc": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*read*./", + "transform": "negative-Y" + }, + { + "alias": "/.*sda.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde.*/", + "color": "#E24D42" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_read_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$diskdevices\"}[5m])", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{device}} - Successfully read bytes", + "refId": "A", + "step": 240 + }, + { + "expr": "irate(node_disk_written_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$diskdevices\"}[5m])", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{device}} - Successfully written bytes", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "I/O Usage Read / Write", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes read (-) / write (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ms", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "io time": "#890F02" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 3, + "description": "", + "fill": 4, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 57 + }, + "hiddenSeries": false, + "id": 127, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": null, + "sortDesc": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_io_time_seconds_total{instance=\"$node\",job=\"$job\",device=~\"$diskdevices\"} [5m])", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{device}} - Time spent doing I/Os", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "I/O Usage Times", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "time", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "CPU / Memory / Net / Disk", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 266, + "panels": [ + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 70 + }, + "hiddenSeries": false, + "id": 136, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 2, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_Inactive_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Inactive - Memory which has been less recently used. It is more eligible to be reclaimed for other purposes", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_Active_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Active - Memory that has been used more recently and usually not reclaimed unless absolutely necessary", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Active / Inactive", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 70 + }, + "hiddenSeries": false, + "id": 135, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Committed_AS - *./" + }, + { + "alias": "/.*CommitLimit - *./", + "color": "#BF1B00", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_Committed_AS_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Committed_AS - Amount of memory presently allocated on the system", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_CommitLimit_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "CommitLimit - Amount of memory currently available to be allocated on the system", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Commited", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 80 + }, + "hiddenSeries": false, + "id": 191, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_Inactive_file_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Inactive_file - File-backed memory on inactive LRU list", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_Inactive_anon_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Inactive_anon - Anonymous and swap cache on inactive LRU list, including tmpfs (shmem)", + "refId": "B", + "step": 4 + }, + { + "expr": "node_memory_Active_file_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Active_file - File-backed memory on active LRU list", + "refId": "C", + "step": 4 + }, + { + "expr": "node_memory_Active_anon_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Active_anon - Anonymous and swap cache on active least-recently-used (LRU) list, including tmpfs", + "refId": "D", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Active / Inactive Detail", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#052B51", + "Total RAM + Swap": "#052B51", + "Total Swap": "#614D93", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 80 + }, + "hiddenSeries": false, + "id": 130, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 2, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_Writeback_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Writeback - Memory which is actively being written back to disk", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_WritebackTmp_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "WritebackTmp - Memory used by FUSE for temporary writeback buffers", + "refId": "B", + "step": 4 + }, + { + "expr": "node_memory_Dirty_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Dirty - Memory which is waiting to get written back to the disk", + "refId": "C", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Writeback and Dirty", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 90 + }, + "hiddenSeries": false, + "id": 138, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:4131", + "alias": "ShmemHugePages - Memory used by shared memory (shmem) and tmpfs allocated with huge pages", + "fill": 0 + }, + { + "$$hashKey": "object:4138", + "alias": "ShmemHugePages - Memory used by shared memory (shmem) and tmpfs allocated with huge pages", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_Mapped_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Mapped - Used memory in mapped pages files which have been mmaped, such as libraries", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_Shmem_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Shmem - Used shared memory (shared between several processes, thus including RAM disks)", + "refId": "B", + "step": 4 + }, + { + "expr": "node_memory_ShmemHugePages_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "ShmemHugePages - Memory used by shared memory (shmem) and tmpfs allocated with huge pages", + "refId": "C", + "step": 4 + }, + { + "expr": "node_memory_ShmemPmdMapped_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "ShmemPmdMapped - Ammount of shared (shmem/tmpfs) memory backed by huge pages", + "refId": "D", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Shared and Mapped", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:4106", + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:4107", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#052B51", + "Total RAM + Swap": "#052B51", + "Total Swap": "#614D93", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 90 + }, + "hiddenSeries": false, + "id": 131, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 2, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_SUnreclaim_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "SUnreclaim - Part of Slab, that cannot be reclaimed on memory pressure", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_SReclaimable_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "SReclaimable - Part of Slab, that might be reclaimed, such as caches", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Slab", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#052B51", + "Total RAM + Swap": "#052B51", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 100 + }, + "hiddenSeries": false, + "id": 70, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_VmallocChunk_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "VmallocChunk - Largest contigious block of vmalloc area which is free", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_VmallocTotal_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "VmallocTotal - Total size of vmalloc memory area", + "refId": "B", + "step": 4 + }, + { + "expr": "node_memory_VmallocUsed_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "VmallocUsed - Amount of vmalloc area which is used", + "refId": "C", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Vmalloc", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 100 + }, + "hiddenSeries": false, + "id": 159, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_Bounce_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Bounce - Memory used for block device bounce buffers", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Bounce", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#052B51", + "Total RAM + Swap": "#052B51", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 110 + }, + "hiddenSeries": false, + "id": 129, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Inactive *./", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_AnonHugePages_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "AnonHugePages - Memory in anonymous huge pages", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_AnonPages_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "AnonPages - Memory in user pages not backed by files", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Anonymous", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 110 + }, + "hiddenSeries": false, + "id": 160, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 2, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_KernelStack_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "KernelStack - Kernel memory stack. This is not reclaimable", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_Percpu_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "PerCPU - Per CPU memory allocated dynamically by loadable modules", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Kernel / CPU", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#806EB7", + "Total RAM + Swap": "#806EB7", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 120 + }, + "hiddenSeries": false, + "id": 140, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_HugePages_Free{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "HugePages_Free - Huge pages in the pool that are not yet allocated", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_HugePages_Rsvd{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "HugePages_Rsvd - Huge pages for which a commitment to allocate from the pool has been made, but no allocation has yet been made", + "refId": "B", + "step": 4 + }, + { + "expr": "node_memory_HugePages_Surp{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "HugePages_Surp - Huge pages in the pool above the value in /proc/sys/vm/nr_hugepages", + "refId": "C", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory HugePages Counter", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "pages", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#806EB7", + "Total RAM + Swap": "#806EB7", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 120 + }, + "hiddenSeries": false, + "id": 71, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 2, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_HugePages_Total{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "HugePages - Total size of the pool of huge pages", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_Hugepagesize_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Hugepagesize - Huge Page size", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory HugePages Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#052B51", + "Total RAM + Swap": "#052B51", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 130 + }, + "hiddenSeries": false, + "id": 128, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_DirectMap1G_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "DirectMap1G - Amount of pages mapped as this size", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_DirectMap2M_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "DirectMap2M - Amount of pages mapped as this size", + "refId": "B", + "step": 4 + }, + { + "expr": "node_memory_DirectMap4k_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "DirectMap4K - Amount of pages mapped as this size", + "refId": "C", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory DirectMap", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 130 + }, + "hiddenSeries": false, + "id": 137, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_Unevictable_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Unevictable - Amount of unevictable memory that can't be swapped out for a variety of reasons", + "refId": "A", + "step": 4 + }, + { + "expr": "node_memory_Mlocked_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "MLocked - Size of pages locked to memory using the mlock() system call", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Unevictable and MLocked", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#052B51", + "Total RAM + Swap": "#052B51", + "Total Swap": "#614D93", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 140 + }, + "hiddenSeries": false, + "id": 132, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_memory_NFS_Unstable_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "NFS Unstable - Memory in NFS pages sent to the server, but not yet commited to the storage", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory NFS", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Memory Meminfo", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 267, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 176, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*out/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_vmstat_pgpgin{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pagesin - Page in operations", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_vmstat_pgpgout{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pagesout - Page out operations", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Pages In / Out", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "pages out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 23 + }, + "hiddenSeries": false, + "id": 22, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*out/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_vmstat_pswpin{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pswpin - Pages swapped in", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_vmstat_pswpout{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pswpout - Pages swapped out", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Pages Swap In / Out", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "pages out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Apps": "#629E51", + "Buffers": "#614D93", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Free": "#0A437C", + "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF", + "Inactive": "#584477", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "RAM_Free": "#E0F9D7", + "Slab": "#806EB7", + "Slab_Cache": "#E0752D", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Swap_Free": "#2F575E", + "Unused": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 33 + }, + "hiddenSeries": false, + "id": 175, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:6118", + "alias": "Pgfault - Page major and minor fault operations", + "fill": 0, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_vmstat_pgfault{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pgfault - Page major and minor fault operations", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_vmstat_pgmajfault{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pgmajfault - Major page fault operations", + "refId": "B", + "step": 4 + }, + { + "expr": "irate(node_vmstat_pgfault{instance=\"$node\",job=\"$job\"}[5m]) - irate(node_vmstat_pgmajfault{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pgminfault - Minor page fault operations", + "refId": "C", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Page Faults", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6133", + "format": "short", + "label": "faults", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6134", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Active": "#99440A", + "Buffers": "#58140C", + "Cache": "#6D1F62", + "Cached": "#511749", + "Committed": "#508642", + "Dirty": "#6ED0E0", + "Free": "#B7DBAB", + "Inactive": "#EA6460", + "Mapped": "#052B51", + "PageTables": "#0A50A1", + "Page_Tables": "#0A50A1", + "Slab_Cache": "#EAB839", + "Swap": "#BF1B00", + "Swap_Cache": "#C15C17", + "Total": "#511749", + "Total RAM": "#052B51", + "Total RAM + Swap": "#052B51", + "Total Swap": "#614D93", + "VmallocUsed": "#EA6460" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 33 + }, + "hiddenSeries": false, + "id": 307, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_vmstat_oom_kill{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "oom killer invocations ", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OOM Killer", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:5373", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:5374", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Memory Vmstat", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 293, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 24 + }, + "hiddenSeries": false, + "id": 260, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Variation*./", + "color": "#890F02" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_timex_estimated_error_seconds{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Estimated error in seconds", + "refId": "A", + "step": 240 + }, + { + "expr": "node_timex_offset_seconds{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Time offset in between local system and reference clock", + "refId": "B", + "step": 240 + }, + { + "expr": "node_timex_maxerror_seconds{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Maximum error in seconds", + "refId": "C", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Time Syncronized Drift", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "seconds", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 24 + }, + "hiddenSeries": false, + "id": 291, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_timex_loop_time_constant{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Phase-locked loop time adjust", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Time PLL Adjust", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 34 + }, + "hiddenSeries": false, + "id": 168, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Variation*./", + "color": "#890F02" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_timex_sync_status{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Is clock synchronized to a reliable server (1 = yes, 0 = no)", + "refId": "A", + "step": 240 + }, + { + "expr": "node_timex_frequency_adjustment_ratio{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Local clock frequency adjustment", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Time Syncronized Status", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 34 + }, + "hiddenSeries": false, + "id": 294, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_timex_tick_seconds{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Seconds between clock ticks", + "refId": "A", + "step": 240 + }, + { + "expr": "node_timex_tai_offset_seconds{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "International Atomic Time (TAI) offset", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Time Misc", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "seconds", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "title": "System Timesync", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 312, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 62, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_procs_blocked{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Processes blocked waiting for I/O to complete", + "refId": "A", + "step": 240 + }, + { + "expr": "node_procs_running{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Processes in runnable state", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Processes Status", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6500", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6501", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 7 + }, + "hiddenSeries": false, + "id": 315, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_processes_state{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ state }}", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Processes State", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6500", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6501", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 17 + }, + "hiddenSeries": false, + "id": 148, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_forks_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Processes forks second", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Processes Forks", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6640", + "format": "short", + "label": "forks / sec", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6641", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 17 + }, + "hiddenSeries": false, + "id": 149, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Max.*/", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(process_virtual_memory_bytes{instance=\"$node\",job=\"$job\"}[5m])", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Processes virtual memory size in bytes", + "refId": "A", + "step": 240 + }, + { + "expr": "process_resident_memory_max_bytes{instance=\"$node\",job=\"$job\"}", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Maximum amount of virtual memory available in bytes", + "refId": "B", + "step": 240 + }, + { + "expr": "irate(process_virtual_memory_bytes{instance=\"$node\",job=\"$job\"}[5m])", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Processes virtual memory size in bytes", + "refId": "C", + "step": 240 + }, + { + "expr": "irate(process_virtual_memory_max_bytes{instance=\"$node\",job=\"$job\"}[5m])", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Maximum amount of virtual memory available in bytes", + "refId": "D", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Processes Memory", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 27 + }, + "hiddenSeries": false, + "id": 313, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:709", + "alias": "PIDs limit", + "color": "#F2495C", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_processes_pids{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Number of PIDs", + "refId": "A", + "step": 240 + }, + { + "expr": "node_processes_max_processes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "PIDs limit", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "PIDs Number and Limit", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6500", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6501", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 27 + }, + "hiddenSeries": false, + "id": 305, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:4963", + "alias": "/.*waiting.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_schedstat_running_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU {{ cpu }} - seconds spent running a process", + "refId": "A", + "step": 240 + }, + { + "expr": "irate(node_schedstat_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU {{ cpu }} - seconds spent by processing waiting for this CPU", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Process schdeule stats Running / Waiting", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:4860", + "format": "s", + "label": "seconds", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:4861", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 37 + }, + "hiddenSeries": false, + "id": 314, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:709", + "alias": "Threads limit", + "color": "#F2495C", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_processes_threads{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Allocated threads", + "refId": "A", + "step": 240 + }, + { + "expr": "node_processes_max_threads{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Threads limit", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Threads Number and Limit", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6500", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6501", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "title": "System Processes", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 269, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_context_switches_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Context switches", + "refId": "A", + "step": 240 + }, + { + "expr": "irate(node_intr_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Interrupts", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Context Switches / Interrupts", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 8 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_load1{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 4, + "legendFormat": "Load 1m", + "refId": "A", + "step": 480 + }, + { + "expr": "node_load5{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 4, + "legendFormat": "Load 5m", + "refId": "B", + "step": 480 + }, + { + "expr": "node_load15{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 4, + "legendFormat": "Load 15m", + "refId": "C", + "step": 480 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "System Load", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6261", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6262", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 259, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Critical*./", + "color": "#E24D42", + "fill": 0 + }, + { + "alias": "/.*Max*./", + "color": "#EF843C", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_interrupts_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ type }} - {{ info }}", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Interrupts Detail", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 18 + }, + "hiddenSeries": false, + "id": 306, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_schedstat_timeslices_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU {{ cpu }}", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Schedule timeslices executed by each cpu", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:4860", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:4861", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 28 + }, + "hiddenSeries": false, + "id": 151, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_entropy_available_bits{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Entropy available to random number generators", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Entropy", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6568", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6569", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 28 + }, + "hiddenSeries": false, + "id": 308, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(process_cpu_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Time spent", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU time spent in user and system contexts", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:4860", + "format": "s", + "label": "seconds", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:4861", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 38 + }, + "hiddenSeries": false, + "id": 64, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:6323", + "alias": "/.*Max*./", + "color": "#890F02", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "process_max_fds{instance=\"$node\",job=\"$job\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Maximum open file descriptors", + "refId": "A", + "step": 240 + }, + { + "expr": "process_open_fds{instance=\"$node\",job=\"$job\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Open file descriptors", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "File Descriptors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6338", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6339", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "System Misc", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 304, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 26 + }, + "hiddenSeries": false, + "id": 158, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:6726", + "alias": "/.*Critical*./", + "color": "#E24D42", + "fill": 0 + }, + { + "$$hashKey": "object:6727", + "alias": "/.*Max*./", + "color": "#EF843C", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_hwmon_temp_celsius{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ chip }} {{ sensor }} temp", + "refId": "A", + "step": 240 + }, + { + "expr": "node_hwmon_temp_crit_alarm_celsius{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ chip }} {{ sensor }} Critical Alarm", + "refId": "B", + "step": 240 + }, + { + "expr": "node_hwmon_temp_crit_celsius{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ chip }} {{ sensor }} Critical", + "refId": "C", + "step": 240 + }, + { + "expr": "node_hwmon_temp_crit_hyst_celsius{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ chip }} {{ sensor }} Critical Historical", + "refId": "D", + "step": 240 + }, + { + "expr": "node_hwmon_temp_max_celsius{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ chip }} {{ sensor }} Max", + "refId": "E", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Hardware temperature monitor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:6750", + "format": "celsius", + "label": "temperature", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:6751", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 26 + }, + "hiddenSeries": false, + "id": 300, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1655", + "alias": "/.*Max*./", + "color": "#EF843C", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_cooling_device_cur_state{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "Current {{ name }} in {{ type }}", + "refId": "A", + "step": 240 + }, + { + "expr": "node_cooling_device_max_state{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Max {{ name }} in {{ type }}", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Throttle cooling device", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1678", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:1679", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 302, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_power_supply_online{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ power_supply }} online", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Power supply", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1678", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:1679", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "title": "Hardware Misc", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 296, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 10 + }, + "hiddenSeries": false, + "id": 297, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_systemd_socket_accepted_connections_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ name }} Connections", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Systemd Sockets", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 10 + }, + "hiddenSeries": false, + "id": 298, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Failed", + "color": "#F2495C" + }, + { + "alias": "Inactive", + "color": "#FF9830" + }, + { + "alias": "Active", + "color": "#73BF69" + }, + { + "alias": "Deactivating", + "color": "#FFCB7D" + }, + { + "alias": "Activating", + "color": "#C8F2C2" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"activating\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Activating", + "refId": "A", + "step": 240 + }, + { + "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"active\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Active", + "refId": "B", + "step": 240 + }, + { + "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"deactivating\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Deactivating", + "refId": "C", + "step": 240 + }, + { + "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"failed\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Failed", + "refId": "D", + "step": 240 + }, + { + "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"inactive\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Inactive", + "refId": "E", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Systemd Units State", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "title": "Systemd", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 270, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 29 + }, + "hiddenSeries": false, + "id": 9, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + { + "$$hashKey": "object:2033", + "alias": "/.*Read.*/", + "transform": "negative-Y" + }, + { + "$$hashKey": "object:2034", + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "$$hashKey": "object:2035", + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "$$hashKey": "object:2036", + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "$$hashKey": "object:2037", + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "$$hashKey": "object:2038", + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "$$hashKey": "object:2039", + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "$$hashKey": "object:2040", + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "$$hashKey": "object:2041", + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "$$hashKey": "object:2042", + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "$$hashKey": "object:2043", + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "$$hashKey": "object:2044", + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "$$hashKey": "object:2045", + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "$$hashKey": "object:2046", + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "$$hashKey": "object:2047", + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "$$hashKey": "object:2048", + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "$$hashKey": "object:2049", + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "$$hashKey": "object:2050", + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "$$hashKey": "object:2051", + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "$$hashKey": "object:2052", + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "$$hashKey": "object:2053", + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_reads_completed_total{instance=\"$node\",job=\"$job\"}[5m])", + "intervalFactor": 4, + "legendFormat": "{{device}} - Reads completed", + "refId": "A", + "step": 8 + }, + { + "expr": "irate(node_disk_writes_completed_total{instance=\"$node\",job=\"$job\"}[5m])", + "intervalFactor": 2, + "legendFormat": "{{device}} - Writes completed", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk IOps Completed", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2186", + "format": "iops", + "label": "IO read (-) / write (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:2187", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 29 + }, + "hiddenSeries": false, + "id": 33, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Read.*/", + "transform": "negative-Y" + }, + { + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_read_bytes_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 4, + "legendFormat": "{{device}} - Read bytes", + "refId": "A", + "step": 8 + }, + { + "expr": "irate(node_disk_written_bytes_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Written bytes", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk R/W Data", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": "bytes read (-) / write (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 3, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 39 + }, + "hiddenSeries": false, + "id": 37, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Read.*/", + "transform": "negative-Y" + }, + { + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_read_time_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "hide": false, + "intervalFactor": 4, + "legendFormat": "{{device}} - Read time", + "refId": "A", + "step": 8 + }, + { + "expr": "irate(node_disk_write_time_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{device}} - Write time", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk R/W Time", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "time. read (-) / write (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 39 + }, + "hiddenSeries": false, + "id": 35, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_io_time_weighted_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "intervalFactor": 4, + "legendFormat": "{{device}} - IO time weighted", + "refId": "A", + "step": 8 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk IOs Weighted", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "time", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 49 + }, + "hiddenSeries": false, + "id": 133, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Read.*/", + "transform": "negative-Y" + }, + { + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_reads_merged_total{instance=\"$node\",job=\"$job\"}[5m])", + "intervalFactor": 2, + "legendFormat": "{{device}} - Read merged", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_disk_writes_merged_total{instance=\"$node\",job=\"$job\"}[5m])", + "intervalFactor": 2, + "legendFormat": "{{device}} - Write merged", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk R/W Merged", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "iops", + "label": "I/Os", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 3, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 49 + }, + "hiddenSeries": false, + "id": 36, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_io_time_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "intervalFactor": 4, + "legendFormat": "{{device}} - IO time", + "refId": "A", + "step": 8 + }, + { + "expr": "irate(node_disk_discard_time_seconds_total{instance=\"$node\",job=\"$job\"}[5m])", + "interval": "", + "intervalFactor": 4, + "legendFormat": "{{device}} - discard time", + "refId": "B", + "step": 8 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Time Spent Doing I/Os", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "time", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 59 + }, + "hiddenSeries": false, + "id": 34, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_io_now{instance=\"$node\",job=\"$job\"}[5m])", + "intervalFactor": 4, + "legendFormat": "{{device}} - IO now", + "refId": "A", + "step": 8 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk IOs Current in Progress", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "iops", + "label": "I/Os", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 59 + }, + "hiddenSeries": false, + "id": 301, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null as zero", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:2034", + "alias": "/.*sda_.*/", + "color": "#7EB26D" + }, + { + "$$hashKey": "object:2035", + "alias": "/.*sdb_.*/", + "color": "#EAB839" + }, + { + "$$hashKey": "object:2036", + "alias": "/.*sdc_.*/", + "color": "#6ED0E0" + }, + { + "$$hashKey": "object:2037", + "alias": "/.*sdd_.*/", + "color": "#EF843C" + }, + { + "$$hashKey": "object:2038", + "alias": "/.*sde_.*/", + "color": "#E24D42" + }, + { + "$$hashKey": "object:2039", + "alias": "/.*sda1.*/", + "color": "#584477" + }, + { + "$$hashKey": "object:2040", + "alias": "/.*sda2_.*/", + "color": "#BA43A9" + }, + { + "$$hashKey": "object:2041", + "alias": "/.*sda3_.*/", + "color": "#F4D598" + }, + { + "$$hashKey": "object:2042", + "alias": "/.*sdb1.*/", + "color": "#0A50A1" + }, + { + "$$hashKey": "object:2043", + "alias": "/.*sdb2.*/", + "color": "#BF1B00" + }, + { + "$$hashKey": "object:2044", + "alias": "/.*sdb3.*/", + "color": "#E0752D" + }, + { + "$$hashKey": "object:2045", + "alias": "/.*sdc1.*/", + "color": "#962D82" + }, + { + "$$hashKey": "object:2046", + "alias": "/.*sdc2.*/", + "color": "#614D93" + }, + { + "$$hashKey": "object:2047", + "alias": "/.*sdc3.*/", + "color": "#9AC48A" + }, + { + "$$hashKey": "object:2048", + "alias": "/.*sdd1.*/", + "color": "#65C5DB" + }, + { + "$$hashKey": "object:2049", + "alias": "/.*sdd2.*/", + "color": "#F9934E" + }, + { + "$$hashKey": "object:2050", + "alias": "/.*sdd3.*/", + "color": "#EA6460" + }, + { + "$$hashKey": "object:2051", + "alias": "/.*sde1.*/", + "color": "#E0F9D7" + }, + { + "$$hashKey": "object:2052", + "alias": "/.*sdd2.*/", + "color": "#FCEACA" + }, + { + "$$hashKey": "object:2053", + "alias": "/.*sde3.*/", + "color": "#F9E2D2" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_disk_discards_completed_total{instance=\"$node\",job=\"$job\"}[5m])", + "interval": "", + "intervalFactor": 4, + "legendFormat": "{{device}} - Discards completed", + "refId": "A", + "step": 8 + }, + { + "expr": "irate(node_disk_discards_merged_total{instance=\"$node\",job=\"$job\"}[5m])", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{device}} - Discards merged", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk IOps Discards completed / merged", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2186", + "format": "iops", + "label": "IOs", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:2187", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Storage Disk", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 271, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 3, + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 78 + }, + "hiddenSeries": false, + "id": 43, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_filesystem_avail_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mountpoint}} - Available", + "metric": "", + "refId": "A", + "step": 4 + }, + { + "expr": "node_filesystem_free_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "hide": true, + "intervalFactor": 2, + "legendFormat": "{{mountpoint}} - Free", + "refId": "B", + "step": 2 + }, + { + "expr": "node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "hide": true, + "intervalFactor": 2, + "legendFormat": "{{mountpoint}} - Size", + "refId": "C", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Filesystem space available", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:3826", + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:3827", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 78 + }, + "hiddenSeries": false, + "id": 41, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_filesystem_files_free{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mountpoint}} - Free file nodes", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "File Nodes Free", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:3894", + "format": "short", + "label": "file nodes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:3895", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 88 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_filefd_maximum{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 4, + "legendFormat": "Max open files", + "refId": "A", + "step": 8 + }, + { + "expr": "node_filefd_allocated{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Open files", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "File Descriptor", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "files", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 88 + }, + "hiddenSeries": false, + "id": 219, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_filesystem_files{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mountpoint}} - File nodes total", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "File Nodes Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "file Nodes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "/ ReadOnly": "#890F02" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 98 + }, + "hiddenSeries": false, + "id": 44, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_filesystem_readonly{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{mountpoint}} - ReadOnly", + "refId": "A", + "step": 4 + }, + { + "expr": "node_filesystem_device_error{instance=\"$node\",job=\"$job\",device!~'rootfs'}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{mountpoint}} - Device error", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Filesystem in ReadOnly / Error", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:3670", + "format": "short", + "label": "counter", + "logBase": 1, + "max": "1", + "min": "0", + "show": true + }, + { + "$$hashKey": "object:3671", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Storage Filesystem", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 272, + "panels": [ + { + "aliasColors": { + "receive_packets_eth0": "#7EB26D", + "receive_packets_lo": "#E24D42", + "transmit_packets_eth0": "#7EB26D", + "transmit_packets_lo": "#E24D42" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 30 + }, + "hiddenSeries": false, + "id": 60, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_packets_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_network_transmit_packets_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{device}} - Transmit", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic by Packets", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "label": "packets out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 30 + }, + "hiddenSeries": false, + "id": 142, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_errs_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive errors", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_network_transmit_errs_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Rransmit errors", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Errors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "label": "packets out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 40 + }, + "hiddenSeries": false, + "id": 143, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_drop_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive drop", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_network_transmit_drop_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Transmit drop", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Drop", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "label": "packets out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 40 + }, + "hiddenSeries": false, + "id": 141, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_compressed_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive compressed", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_network_transmit_compressed_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Transmit compressed", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Compressed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "label": "packets out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 50 + }, + "hiddenSeries": false, + "id": 146, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_multicast_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive multicast", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Multicast", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "label": "packets out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 50 + }, + "hiddenSeries": false, + "id": 144, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_fifo_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive fifo", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_network_transmit_fifo_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Transmit fifo", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Fifo", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "label": "packets out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 60 + }, + "hiddenSeries": false, + "id": 145, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:576", + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_receive_frame_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{device}} - Receive frame", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Frame", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:589", + "format": "pps", + "label": "packets out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:590", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 60 + }, + "hiddenSeries": false, + "id": 231, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_transmit_carrier_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Statistic transmit_carrier", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Carrier", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 70 + }, + "hiddenSeries": false, + "id": 232, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Trans.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_network_transmit_colls_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}} - Transmit colls", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic Colls", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 70 + }, + "hiddenSeries": false, + "id": 61, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:663", + "alias": "NF conntrack limit", + "color": "#890F02", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_nf_conntrack_entries{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "NF conntrack entries", + "refId": "A", + "step": 4 + }, + { + "expr": "node_nf_conntrack_entries_limit{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "NF conntrack limit", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "NF Contrack", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:678", + "format": "short", + "label": "entries", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:679", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 80 + }, + "hiddenSeries": false, + "id": 230, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_arp_entries{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{ device }} - ARP entries", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ARP Entries", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "Entries", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 80 + }, + "hiddenSeries": false, + "id": 288, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_network_mtu_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{ device }} - Bytes", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "MTU", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 90 + }, + "hiddenSeries": false, + "id": 280, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_network_speed_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{ device }} - Speed", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Speed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 90 + }, + "hiddenSeries": false, + "id": 289, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_network_transmit_queue_length{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{ device }} - Interface transmit queue length", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Queue Length", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "none", + "label": "packets", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 100 + }, + "hiddenSeries": false, + "id": 290, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:232", + "alias": "/.*Dropped.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_softnet_processed_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU {{cpu}} - Processed", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_softnet_dropped_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU {{cpu}} - Dropped", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Softnet Packets", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:207", + "format": "short", + "label": "packetes drop (-) / process (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:208", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 100 + }, + "hiddenSeries": false, + "id": 310, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_softnet_times_squeezed_total{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU {{cpu}} - Squeezed", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Softnet Out of Quota", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:207", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:208", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 110 + }, + "hiddenSeries": false, + "id": 309, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_network_up{operstate=\"up\",instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{interface}} - Operational state UP", + "refId": "A", + "step": 4 + }, + { + "expr": "node_network_carrier{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "instant": false, + "legendFormat": "{{device}} - Physical link state", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Operational Status", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Network Traffic", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 273, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 13 + }, + "hiddenSeries": false, + "id": 63, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_sockstat_TCP_alloc{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "TCP_alloc - Allocated sockets", + "refId": "A", + "step": 240 + }, + { + "expr": "node_sockstat_TCP_inuse{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "TCP_inuse - Tcp sockets currently in use", + "refId": "B", + "step": 240 + }, + { + "expr": "node_sockstat_TCP_mem{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "TCP_mem - Used memory for tcp", + "refId": "C", + "step": 240 + }, + { + "expr": "node_sockstat_TCP_orphan{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "TCP_orphan - Orphan sockets", + "refId": "D", + "step": 240 + }, + { + "expr": "node_sockstat_TCP_tw{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "TCP_tw - Sockets wating close", + "refId": "E", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Sockstat TCP", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 13 + }, + "hiddenSeries": false, + "id": 124, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_sockstat_UDPLITE_inuse{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "UDPLITE_inuse - Udplite sockets currently in use", + "refId": "A", + "step": 240 + }, + { + "expr": "node_sockstat_UDP_inuse{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "UDP_inuse - Udp sockets currently in use", + "refId": "B", + "step": 240 + }, + { + "expr": "node_sockstat_UDP_mem{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "UDP_mem - Used memory for udp", + "refId": "C", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Sockstat UDP", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 126, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_sockstat_sockets_used{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Sockets_used - Sockets currently in use", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Sockstat Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "sockets", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 23 + }, + "hiddenSeries": false, + "id": 220, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_sockstat_TCP_mem_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "mem_bytes - TCP sockets in that state", + "refId": "A", + "step": 240 + }, + { + "expr": "node_sockstat_UDP_mem_bytes{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "mem_bytes - UDP sockets in that state", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Sockstat Memory Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "bytes", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 33 + }, + "hiddenSeries": false, + "id": 125, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_sockstat_FRAG_inuse{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "FRAG_inuse - Frag sockets currently in use", + "refId": "A", + "step": 240 + }, + { + "expr": "node_sockstat_FRAG_memory{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "FRAG_memory - Used memory for frag", + "refId": "B", + "step": 240 + }, + { + "expr": "node_sockstat_RAW_inuse{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "RAW_inuse - Raw sockets currently in use", + "refId": "C", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Sockstat FRAG / RAW", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1572", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1573", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Network Sockstat", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 274, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 32 + }, + "height": "", + "hiddenSeries": false, + "id": 221, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1876", + "alias": "/.*Out.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_IpExt_InOctets{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "InOctets - Received octets", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_IpExt_OutOctets{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "OutOctets - Sent octets", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Netstat IP In / Out Octets", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1889", + "format": "short", + "label": "octects out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:1890", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 32 + }, + "height": "", + "hiddenSeries": false, + "id": 81, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 300, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_Ip_Forwarding{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Forwarding - IP forwarding", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Netstat IP Forwarding", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1957", + "format": "short", + "label": "datagrams", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1958", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 42 + }, + "height": "", + "hiddenSeries": false, + "id": 115, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Out.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_Icmp_InMsgs{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "InMsgs - Messages which the entity received. Note that this counter includes all those counted by icmpInErrors", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_Icmp_OutMsgs{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "OutMsgs - Messages which this entity attempted to send. Note that this counter includes all those counted by icmpOutErrors", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ICMP In / Out", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "messages out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 42 + }, + "height": "", + "hiddenSeries": false, + "id": 50, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Out.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_Icmp_InErrors{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "InErrors - Messages which the entity received but determined as having ICMP-specific errors (bad ICMP checksums, bad length, etc.)", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ICMP Errors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "messages out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 52 + }, + "height": "", + "hiddenSeries": false, + "id": 55, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Out.*/", + "transform": "negative-Y" + }, + { + "alias": "/.*Snd.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_Udp_InDatagrams{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "InDatagrams - Datagrams received", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_Udp_OutDatagrams{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "OutDatagrams - Datagrams sent", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "UDP In / Out", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "datagrams out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 52 + }, + "height": "", + "hiddenSeries": false, + "id": 109, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_Udp_InErrors{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "InErrors - UDP Datagrams that could not be delivered to an application", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_Udp_NoPorts{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "NoPorts - UDP Datagrams received on a port with no listener", + "refId": "B", + "step": 4 + }, + { + "expr": "irate(node_netstat_UdpLite_InErrors{instance=\"$node\",job=\"$job\"}[5m])", + "interval": "", + "legendFormat": "InErrors Lite - UDPLite Datagrams that could not be delivered to an application", + "refId": "C" + }, + { + "expr": "irate(node_netstat_Udp_RcvbufErrors{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "RcvbufErrors - UDP buffer errors received", + "refId": "D", + "step": 4 + }, + { + "expr": "irate(node_netstat_Udp_SndbufErrors{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "SndbufErrors - UDP buffer errors send", + "refId": "E", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "UDP Errors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:4232", + "format": "short", + "label": "datagrams", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:4233", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 62 + }, + "height": "", + "hiddenSeries": false, + "id": 299, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Out.*/", + "transform": "negative-Y" + }, + { + "alias": "/.*Snd.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_Tcp_InSegs{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "InSegs - Segments received, including those received in error. This count includes segments received on currently established connections", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_Tcp_OutSegs{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "OutSegs - Segments sent, including those on current connections but excluding those containing only retransmitted octets", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TCP In / Out", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "datagrams out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 62 + }, + "height": "", + "hiddenSeries": false, + "id": 104, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_TcpExt_ListenOverflows{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "ListenOverflows - Times the listen queue of a socket overflowed", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_TcpExt_ListenDrops{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "ListenDrops - SYNs to LISTEN sockets ignored", + "refId": "B", + "step": 4 + }, + { + "expr": "irate(node_netstat_TcpExt_TCPSynRetrans{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "TCPSynRetrans - SYN-SYN/ACK retransmits to break down retransmissions in SYN, fast/timeout retransmits", + "refId": "C", + "step": 4 + }, + { + "expr": "irate(node_netstat_Tcp_RetransSegs{instance=\"$node\",job=\"$job\"}[5m])", + "interval": "", + "legendFormat": "RetransSegs - Segments retransmitted - that is, the number of TCP segments transmitted containing one or more previously transmitted octets", + "refId": "D" + }, + { + "expr": "irate(node_netstat_Tcp_InErrs{instance=\"$node\",job=\"$job\"}[5m])", + "interval": "", + "legendFormat": "InErrs - Segments received in error (e.g., bad TCP checksums)", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TCP Errors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 72 + }, + "height": "", + "hiddenSeries": false, + "id": 85, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:454", + "alias": "/.*MaxConn *./", + "color": "#890F02", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_netstat_Tcp_CurrEstab{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "CurrEstab - TCP connections for which the current state is either ESTABLISHED or CLOSE- WAIT", + "refId": "A", + "step": 4 + }, + { + "expr": "node_netstat_Tcp_MaxConn{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "MaxConn - Limit on the total number of TCP connections the entity can support (Dinamic is \"-1\")", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TCP Connections", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:469", + "format": "short", + "label": "connections", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:470", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 72 + }, + "height": "", + "hiddenSeries": false, + "id": 91, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*Sent.*/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_TcpExt_SyncookiesFailed{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "SyncookiesFailed - Invalid SYN cookies received", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_TcpExt_SyncookiesRecv{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "SyncookiesRecv - SYN cookies received", + "refId": "B", + "step": 4 + }, + { + "expr": "irate(node_netstat_TcpExt_SyncookiesSent{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "SyncookiesSent - SYN cookies sent", + "refId": "C", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TCP SynCookie", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "counter out (-) / in (+)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 82 + }, + "height": "", + "hiddenSeries": false, + "id": 82, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 12, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "irate(node_netstat_Tcp_ActiveOpens{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "ActiveOpens - TCP connections that have made a direct transition to the SYN-SENT state from the CLOSED state", + "refId": "A", + "step": 4 + }, + { + "expr": "irate(node_netstat_Tcp_PassiveOpens{instance=\"$node\",job=\"$job\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "PassiveOpens - TCP connections that have made a direct transition to the SYN-RCVD state from the LISTEN state", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TCP Direct Transition", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "connections", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Network Netstat", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 279, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 54 + }, + "hiddenSeries": false, + "id": 40, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_scrape_collector_duration_seconds{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{collector}} - Scrape duration", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Node Exporter Scrape Time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "seconds", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 54 + }, + "hiddenSeries": false, + "id": 157, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1969", + "alias": "/.*error.*/", + "color": "#F2495C", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node_scrape_collector_success{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{collector}} - Scrape success", + "refId": "A", + "step": 4 + }, + { + "expr": "node_textfile_scrape_error{instance=\"$node\",job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{collector}} - Scrape textfile error (1 = true)", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Node Exporter Scrape", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1484", + "format": "short", + "label": "counter", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:1485", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "title": "Node Exporter", + "type": "row" + } + ], + "refresh": "1m", + "schemaVersion": 22, + "style": "dark", + "tags": [ + "linux" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "default", + "value": "default" + }, + "hide": 0, + "includeAll": false, + "label": "datasource", + "multi": false, + "name": "DS_PROMETHEUS", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Job", + "multi": false, + "name": "job", + "options": [], + "query": "label_values(node_uname_info, job)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(node_uname_info{job=\"$job\"}, instance)", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Host:", + "multi": false, + "name": "node", + "options": [], + "query": "label_values(node_uname_info{job=\"$job\"}, instance)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "[a-z]+|nvme[0-9]+n[0-9]+", + "value": "[a-z]+|nvme[0-9]+n[0-9]+" + }, + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "diskdevices", + "options": [ + { + "selected": true, + "text": "[a-z]+|nvme[0-9]+n[0-9]+", + "value": "[a-z]+|nvme[0-9]+n[0-9]+" + } + ], + "query": "[a-z]+|nvme[0-9]+n[0-9]+", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Prometheus Node Exporter Full", + "uid": "rYdddlPWk", + "variables": { + "list": [] + }, + "version": 47, + "description": "Quick dashboard for Prometheus metrics" +} \ No newline at end of file diff --git a/services/immich.nix b/services/immich.nix deleted file mode 100644 index 511e9e0..0000000 --- a/services/immich.nix +++ /dev/null @@ -1,85 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.immich; - my = config.my; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; -in { - options.my.services.immich = let - inherit (lib) types; - in { - enable = mkEnableOption "Immich config"; - - home = mkOption { - type = types.str; - default = "/var/lib/immich"; - example = "/var/lib/immich"; - description = "Home for the immich service, where data will be stored"; - }; - - port = mkOption { - type = types.port; - example = 8080; - description = "Internal port for Immich webapp"; - }; - }; - - config = mkIf cfg.enable { - users.users.immich = { - isSystemUser = true; - home = cfg.home; - createHome = true; - group = "immich"; - }; - users.groups.immich = {}; - - services.nginx.virtualHosts = { - "immich.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - listen = [ - # FIXME: hardcoded tailscale IP - { - addr = "100.115.172.44"; - port = 443; - ssl = true; - } - { - addr = "100.115.172.44"; - port = 80; - ssl = false; - } - ]; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}"; - proxyWebsockets = true; - }; - - extraConfig = '' - proxy_connect_timeout 600; - proxy_read_timeout 600; - proxy_send_timeout 600; - client_max_body_size 1000m; - access_log syslog:server=unix:/dev/log,tag=immich; - ''; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["immich.${domain}"]; - }; -} diff --git a/services/jellyfin.nix b/services/jellyfin.nix index 3160770..09382ee 100644 --- a/services/jellyfin.nix +++ b/services/jellyfin.nix @@ -1,21 +1,12 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; +{ config, lib, pkgs, ... }: +with lib; + +let cfg = config.my.services.jellyfin; my = config.my; domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; # hardcoded in NixOS module :( jellyfinPort = 8096; @@ -24,7 +15,7 @@ in { enable = mkEnableOption "Jellyfin"; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.jellyfin = { enable = true; group = "media"; @@ -33,14 +24,12 @@ in { # Proxy to Jellyfin services.nginx.virtualHosts."jellyfin.${domain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; locations."/" = { proxyPass = "http://localhost:${toString jellyfinPort}/"; proxyWebsockets = true; }; }; - - security.acme.certs.${fqdn}.extraDomainNames = ["jellyfin.${domain}"]; }; } diff --git a/services/lohr.nix b/services/lohr.nix index cc491a8..3304d50 100644 --- a/services/lohr.nix +++ b/services/lohr.nix @@ -1,33 +1,21 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; +{ config, lib, pkgs, ... }: +with lib; + +let cfg = config.my.services.lohr; my = config.my; - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; - secrets = config.my.secrets; - lohrPkg = let - flake = builtins.getFlake "github:alarsyo/lohr?rev=cdb5808c0ced349c027aa203fda52afe95782b26"; - in + lohrPkg = + let + flake = builtins.getFlake "github:alarsyo/lohr?rev=bc32f8a565faa2055c1bbfa8c2353ce4738208b2"; + in flake.defaultPackage."x86_64-linux"; # FIXME: use correct system -in { - options.my.services.lohr = let - inherit (lib) types; - in { - enable = mkEnableOption "Lohr Mirroring Daemon"; +in +{ + options.my.services.lohr = { + enable = lib.mkEnableOption "Lohr Mirroring Daemon"; home = mkOption { type = types.str; @@ -46,23 +34,23 @@ in { config = mkIf cfg.enable { systemd.services.lohr = { - wantedBy = ["multi-user.target"]; + wantedBy = [ "multi-user.target" ]; serviceConfig = { Environment = [ "ROCKET_PORT=${toString cfg.port}" "ROCKET_LOG_LEVEL=normal" "LOHR_HOME=${cfg.home}" + # NOTE: secret cannot contain a '%', it's interpreted by systemd + "'LOHR_SECRET=${secrets.lohr-shared-secret}'" ]; - EnvironmentFile = config.age.secrets."lohr/shared-secret".path; ExecStart = "${lohrPkg}/bin/lohr"; StateDirectory = "lohr"; WorkingDirectory = "/var/lib/lohr"; User = "lohr"; Group = "lohr"; }; - path = [ - pkgs.git - pkgs.openssh + path = with pkgs; [ + git ]; }; @@ -72,19 +60,17 @@ in { createHome = true; group = "lohr"; }; - users.groups.lohr = {}; + users.groups.lohr = { }; services.nginx.virtualHosts = { "lohr.${domain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.port}"; }; }; }; - - security.acme.certs.${fqdn}.extraDomainNames = ["lohr.${domain}"]; }; } diff --git a/services/matrix.nix b/services/matrix.nix index 3e8f00e..56ef563 100644 --- a/services/matrix.nix +++ b/services/matrix.nix @@ -7,193 +7,99 @@ # - https://github.com/delroth/infra.delroth.net/blob/master/roles/matrix-synapse.nix # - https://nixos.org/manual/nixos/stable/index.html#module-services-matrix # -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - optionals - ; +{ config, lib, pkgs, ... }: +with lib; + +let cfg = config.my.services.matrix; my = config.my; - federationPort = { - public = 8448; - private = 11338; - }; - clientPort = { - public = 443; - private = 11339; - }; - + federationPort = { public = 8448; private = 11338; }; + clientPort = { public = 443; private = 11339; }; domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; in { - options.my.services.matrix = let - inherit (lib) types; - in { - enable = mkEnableOption "Matrix Synapse"; + options.my.services.matrix = { + enable = lib.mkEnableOption "Matrix Synapse"; - secretConfigFile = mkOption { - type = types.nullOr types.path; + registration_shared_secret = lib.mkOption { + type = types.str; default = null; - example = "/var/run/my_secrets/config.secret"; - description = "Secrets file included in configuration"; + example = "deadbeef"; + description = "Shared secret to register users"; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.postgresql = { enable = true; - - ensureDatabases = ["matrix-synapse"]; - ensureUsers = [ - { - name = "matrix-synapse"; - ensureDBOwnership = true; - } - ]; }; services.postgresqlBackup = { - databases = ["matrix-synapse"]; + databases = [ "matrix-synapse" ]; }; services.matrix-synapse = { enable = true; + server_name = domain; + public_baseurl = "https://matrix.${domain}"; - extraConfigFiles = optionals (cfg.secretConfigFile != null) [ - cfg.secretConfigFile + registration_shared_secret = cfg.registration_shared_secret; + + listeners = [ + # Federation + { + bind_address = "::1"; + port = federationPort.private; + tls = false; # Terminated by nginx. + x_forwarded = true; + resources = [ { names = [ "federation" ]; compress = false; } ]; + } + + # Client + { + bind_address = "::1"; + port = clientPort.private; + tls = false; # Terminated by nginx. + x_forwarded = true; + resources = [ { names = [ "client" ]; compress = false; } ]; + } ]; - - settings = let - logConfig = '' - version: 1 - - # In systemd's journal, loglevel is implicitly stored, so let's omit it - # from the message text. - formatters: - journal_fmt: - format: '%(name)s: [%(request)s] %(message)s' - - filters: - context: - (): synapse.util.logcontext.LoggingContextFilter - request: "" - - handlers: - journal: - class: systemd.journal.JournalHandler - formatter: journal_fmt - filters: [context] - SYSLOG_IDENTIFIER: synapse - - root: - level: WARN - handlers: [journal] - - disable_existing_loggers: False - ''; - in { - server_name = domain; - public_baseurl = "https://matrix.${domain}"; - - account_threepid_delegates = { - msisdn = "https://vector.im"; - }; - - listeners = [ - # Federation - { - bind_addresses = ["::1"]; - port = federationPort.private; - tls = false; # Terminated by nginx. - x_forwarded = true; - resources = [ - { - names = ["federation"]; - compress = false; - } - ]; - } - - # Client - { - bind_addresses = ["::1"]; - port = clientPort.private; - tls = false; # Terminated by nginx. - x_forwarded = true; - resources = [ - { - names = ["client"]; - compress = false; - } - ]; - } - ]; - - experimental_features = { - spaces_enabled = true; - }; - - use_presence = true; - - email = { - require_transport_security = true; - }; - - log_config = pkgs.writeText "log_config.yaml" logConfig; - }; }; services.nginx = { virtualHosts = { "matrix.${domain}" = { - onlySSL = true; - useACMEHost = fqdn; + forceSSL = true; + enableACME = true; - locations = let - proxyToClientPort = { - proxyPass = "http://[::1]:${toString clientPort.private}"; + locations = + let + proxyToClientPort = { + proxyPass = "http://[::1]:${toString clientPort.private}"; + }; + in { + # Or do a redirect instead of the 404, or whatever is appropriate + # for you. But do not put a Matrix Web client here! See the + # Element web section below. + "/".return = "404"; + + "/_matrix" = proxyToClientPort; + "/_synapse/client" = proxyToClientPort; }; - in { - # Or do a redirect instead of the 404, or whatever is appropriate - # for you. But do not put a Matrix Web client here! See the - # Element web section below. - "/".return = "404"; - - "/_matrix" = proxyToClientPort; - "/_synapse/client" = proxyToClientPort; - "/health" = proxyToClientPort; - }; listen = [ - { - addr = "0.0.0.0"; - port = clientPort.public; - ssl = true; - } - { - addr = "[::]"; - port = clientPort.public; - ssl = true; - } + { addr = "0.0.0.0"; port = clientPort.public; ssl = true; } + { addr = "[::]"; port = clientPort.public; ssl = true; } ]; + }; # same as above, but listening on the federation port "matrix.${domain}_federation" = rec { - onlySSL = true; + forceSSL = true; serverName = "matrix.${domain}"; - useACMEHost = fqdn; + useACMEHost = serverName; locations."/".return = "404"; @@ -202,37 +108,32 @@ in { }; listen = [ - { - addr = "0.0.0.0"; - port = federationPort.public; - ssl = true; - } - { - addr = "[::]"; - port = federationPort.public; - ssl = true; - } + { addr = "0.0.0.0"; port = federationPort.public; ssl = true; } + { addr = "[::]"; port = federationPort.public; ssl = true; } ]; + }; "${domain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; - locations."= /.well-known/matrix/server".extraConfig = let - server = {"m.server" = "matrix.${domain}:${toString federationPort.public}";}; - in '' + locations."= /.well-known/matrix/server".extraConfig = + let + server = { "m.server" = "matrix.${domain}:${toString federationPort.public}"; }; + in '' add_header Content-Type application/json; return 200 '${builtins.toJSON server}'; ''; - locations."= /.well-known/matrix/client".extraConfig = let - client = { - "m.homeserver" = {"base_url" = "https://matrix.${domain}";}; - "m.identity_server" = {"base_url" = "https://vector.im";}; - }; - # ACAO required to allow element-web on any URL to request this json file - in '' + locations."= /.well-known/matrix/client".extraConfig = + let + client = { + "m.homeserver" = { "base_url" = "https://matrix.${domain}"; }; + "m.identity_server" = { "base_url" = "https://vector.im"; }; + }; + # ACAO required to allow element-web on any URL to request this json file + in '' add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; return 200 '${builtins.toJSON client}'; @@ -242,7 +143,7 @@ in { # Element Web app deployment # "chat.${domain}" = { - useACMEHost = fqdn; + enableACME = true; forceSSL = true; root = pkgs.element-web.override { @@ -271,22 +172,20 @@ in { }; }; - security.acme.certs.${fqdn}.extraDomainNames = ["chat.${domain}" "matrix.${domain}" domain]; - # For administration tools. - environment.systemPackages = [pkgs.matrix-synapse]; + environment.systemPackages = [ pkgs.matrix-synapse ]; networking.firewall.allowedTCPPorts = [ clientPort.public federationPort.public ]; - my.services.restic-backup = let + my.services.borg-backup = let dataDir = config.services.matrix-synapse.dataDir; - in { - paths = [dataDir]; + in mkIf cfg.enable { + paths = [ dataDir ]; # this is just caching for other servers media, doesn't need backup - exclude = ["${dataDir}/media/remote_*"]; + exclude = [ "${dataDir}/media/remote_*" ]; }; }; } diff --git a/services/mealie.nix b/services/mealie.nix deleted file mode 100644 index 4483b17..0000000 --- a/services/mealie.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.mealie; - my = config.my; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; - listenAddress = "127.0.0.1"; -in { - options.my.services.mealie = let - inherit (lib) types; - in { - enable = mkEnableOption "Mealie"; - port = mkOption { - type = types.port; - example = 8080; - description = "Internal port for Mealie webapp"; - }; - credentialsFile = lib.mkOption { - type = types.nullOr types.path; - default = null; - example = "/run/secrets/mealie-credentials.env"; - description = '' - File containing credentials used in mealie such as {env}`POSTGRES_PASSWORD` - or sensitive LDAP options. - - Expects the format of an `EnvironmentFile=`, as described by {manpage}`systemd.exec(5)`. - ''; - }; - }; - - config = mkIf cfg.enable { - services.mealie = { - inherit listenAddress; - inherit (cfg) credentialsFile; - - enable = true; - package = pkgs.mealie; - port = cfg.port; - - settings = { - ALLOW_SIGNUP = "false"; - BASE_URL = "https://mealie.${domain}"; - TZ = config.time.timeZone; - DB_ENGINE = "postgres"; - POSTGRES_URL_OVERRIDE = "postgresql://mealie:@/mealie?host=/run/postgresql"; - }; - }; - - systemd.services.mealie = { - after = ["postgresql.service"]; - requires = ["postgresql.service"]; - serviceConfig = { - TimeoutStartSec = 600; - }; - }; - - # Set-up database - services.postgresql = { - enable = true; - ensureDatabases = ["mealie"]; - ensureUsers = [ - { - name = "mealie"; - ensureDBOwnership = true; - } - ]; - }; - - services.postgresqlBackup = { - databases = ["mealie"]; - }; - - services.nginx.virtualHosts."mealie.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - locations."/" = { - proxyPass = "http://${listenAddress}:${toString cfg.port}/"; - proxyWebsockets = true; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["mealie.${domain}"]; - - my.services.restic-backup = { - paths = ["/var/lib/mealie"]; - }; - }; -} diff --git a/services/media.nix b/services/media.nix index 37aa6d1..5b6b9ae 100644 --- a/services/media.nix +++ b/services/media.nix @@ -1,22 +1,11 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkIf - ; - - mediaServices = builtins.attrValues { - inherit - (config.my.services) - jellyfin - nextcloud - transmission - ; - }; +{ config, lib, ... }: +let + mediaServices = with config.my.services; [ + jellyfin + transmission + ]; needed = builtins.any (service: service.enable) mediaServices; -in { - config.users.groups.media = mkIf needed {}; +in +{ + config.users.groups.media = lib.mkIf needed { }; } diff --git a/services/microbin.nix b/services/microbin.nix deleted file mode 100644 index a7c53d6..0000000 --- a/services/microbin.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.microbin; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; -in { - options.my.services.microbin = let - inherit (lib) types; - in { - enable = mkEnableOption "MicroBin file sharing app"; - - privatePort = mkOption { - type = types.nullOr types.port; - default = null; - example = 8080; - description = "Port to serve the app"; - }; - - passwordFile = mkOption { - type = types.nullOr types.path; - default = null; - description = "See NixOS module description"; - }; - }; - - config = mkIf cfg.enable { - services.microbin = { - enable = true; - settings = { - MICROBIN_PORT = cfg.privatePort; - MICROBIN_BIND = "127.0.0.1"; - MICROBIN_PUBLIC_PATH = "https://drop.${domain}/"; - MICROBIN_READONLY = true; - MICROBIN_ENABLE_BURN_AFTER = true; - MICROBIN_ENABLE_READONLY = true; - MICROBIN_HIGHLIGHTSYNTAX = true; - MICROBIN_PRIVATE = true; - MICROBIN_THREADS = 2; - MICROBIN_GC_DAYS = 0; # turn off GC - MICROBIN_QR = true; - MICROBIN_ETERNAL_PASTA = true; - MICROBIN_DEFAULT_EXPIRY = "1week"; - MICROBIN_DISABLE_TELEMETRY = true; - }; - passwordFile = cfg.passwordFile; - }; - - my.services.restic-backup = { - paths = [ - config.services.microbin.dataDir - ]; - }; - - services.nginx = { - virtualHosts = { - "drop.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.privatePort}"; - }; - }; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["drop.${domain}"]; - }; -} diff --git a/services/miniflux.nix b/services/miniflux.nix index b4cf78e..297eba7 100644 --- a/services/miniflux.nix +++ b/services/miniflux.nix @@ -1,26 +1,14 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; +{ config, lib, pkgs, ... }: +with lib; + +let cfg = config.my.services.miniflux; my = config.my; domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; in { - options.my.services.miniflux = let - inherit (lib) types; - in { + options.my.services.miniflux = { enable = mkEnableOption "Serve a Miniflux instance"; adminCredentialsFile = mkOption { @@ -42,7 +30,7 @@ in { # services.postgresql is automatically enabled by services.miniflux, let's # back it up services.postgresqlBackup = { - databases = ["miniflux"]; + databases = [ "miniflux" ]; }; services.miniflux = { @@ -62,7 +50,7 @@ in { virtualHosts = { "reader.${domain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.privatePort}"; @@ -70,7 +58,5 @@ in { }; }; }; - - security.acme.certs.${fqdn}.extraDomainNames = ["reader.${domain}"]; }; } diff --git a/services/monitoring.nix b/services/monitoring.nix index a648578..68f1316 100644 --- a/services/monitoring.nix +++ b/services/monitoring.nix @@ -1,25 +1,12 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; +{ config, lib, pkgs, ... }: - cfg = config.my.services.monitoring; - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; +with lib; + +let cfg = config.my.services.monitoring; in { - options.my.services.monitoring = let - inherit (lib) types; - in { + options.my.services.monitoring = { enable = mkEnableOption "Enable monitoring"; + useACME = mkEnableOption "Get HTTPS certs"; domain = mkOption { type = types.str; @@ -27,13 +14,6 @@ in { example = "monitoring.example.com"; description = "Domain to use in reverse proxy"; }; - - scrapeInterval = mkOption { - type = types.str; - default = "15s"; - example = "1m"; - description = "prometheus scrape interval"; - }; }; config = mkIf cfg.enable { @@ -51,21 +31,13 @@ in { name = "Prometheus"; type = "prometheus"; url = "http://localhost:${toString config.services.prometheus.port}"; - jsonData = { - timeInterval = cfg.scrapeInterval; - }; } ]; dashboards = [ { name = "Node Exporter"; - options.path = pkgs.packages.grafanaDashboards.node-exporter; - disableDeletion = true; - } - { - name = "NGINX"; - options.path = pkgs.packages.grafanaDashboards.nginx; + options.path = ./grafana-dashboards; disableDeletion = true; } ]; @@ -77,45 +49,34 @@ in { port = 9090; listenAddress = "127.0.0.1"; - retentionTime = "2y"; - exporters = { node = { enable = true; - enabledCollectors = ["systemd"]; + enabledCollectors = [ "systemd" ]; port = 9100; - listenAddress = "127.0.0.1"; }; }; - globalConfig = { - scrape_interval = cfg.scrapeInterval; - }; - scrapeConfigs = [ { job_name = config.networking.hostName; - static_configs = [ - { - targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; - } - ]; + static_configs = [{ + targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; + }]; } ]; }; services.nginx = { - virtualHosts.${cfg.domain} = { + virtualHosts.${config.services.grafana.domain} = { locations."/" = { proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}"; proxyWebsockets = true; }; - forceSSL = true; - useACMEHost = fqdn; + forceSSL = cfg.useACME; + enableACME = cfg.useACME; }; }; - - security.acme.certs.${fqdn}.extraDomainNames = [cfg.domain]; }; } diff --git a/services/navidrome.nix b/services/navidrome.nix deleted file mode 100644 index ead8a5c..0000000 --- a/services/navidrome.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - optional - ; - - cfg = config.my.services.navidrome; - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; -in { - options.my.services.navidrome = let - inherit (lib) types; - in { - enable = mkEnableOption "Navidrome"; - musicFolder = { - path = mkOption { - type = types.str; - default = "./music"; - }; - backup = mkEnableOption "backup the music folder"; - }; - }; - - config = mkIf cfg.enable { - services.navidrome = { - enable = true; - settings = { - Address = "127.0.0.1"; - Port = 4533; - LastFM.Enabled = false; - MusicFolder = cfg.musicFolder.path; - }; - }; - - my.services.restic-backup = { - paths = ["/var/lib/navidrome"] ++ optional cfg.musicFolder.backup cfg.musicFolder.path; - exclude = ["/var/lib/navidrome/cache"]; - }; - - services.nginx.virtualHosts."music.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - listen = [ - # FIXME: hardcoded tailscale IP - { - addr = "100.115.172.44"; - port = 443; - ssl = true; - } - { - addr = "100.115.172.44"; - port = 80; - ssl = false; - } - ]; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.navidrome.settings.Port}/"; - proxyWebsockets = true; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["music.${domain}"]; - }; -} diff --git a/services/nextcloud.nix b/services/nextcloud.nix index b46ab7a..bf85aef 100644 --- a/services/nextcloud.nix +++ b/services/nextcloud.nix @@ -1,60 +1,41 @@ -{ - lib, - config, - pkgs, - ... -}: -# TODO: setup prometheus exporter -let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; +{ lib, config, pkgs, ... }: +# TODO: setup prometheus exporter + +let cfg = config.my.services.nextcloud; my = config.my; domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; dbName = "nextcloud"; -in { - options.my.services.nextcloud = let - inherit (lib) types; - in { - enable = mkEnableOption "NextCloud"; - - adminpassFile = mkOption { - type = types.path; - description = '' - Path to a file containing the admin's password, must be readable by - 'nextcloud' user. - ''; - }; +in +{ + options.my.services.nextcloud = { + enable = lib.mkEnableOption "NextCloud"; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.postgresql = { enable = true; - ensureDatabases = [dbName]; + ensureDatabases = [ dbName ]; ensureUsers = [ { name = "nextcloud"; - ensureDBOwnership = true; + ensurePermissions = { + "DATABASE ${dbName}" = "ALL PRIVILEGES"; + }; } ]; }; # not handled by module - systemd.services.nextcloud-setup = { - requires = ["postgresql.service"]; - after = ["postgresql.service"]; + systemd.services.nextcloud-setup= { + requires = [ "postgresql.service" ]; + after = [ "postgresql.service" ]; }; services.postgresqlBackup = { - databases = [dbName]; + databases = [ dbName ]; }; services.nextcloud = { @@ -62,52 +43,44 @@ in { hostName = "cloud.${domain}"; https = true; - package = pkgs.nextcloud31; + package = pkgs.nextcloud21; maxUploadSize = "1G"; config = { + overwriteProtocol = "https"; + + defaultPhoneRegion = "FR"; + dbtype = "pgsql"; dbuser = "nextcloud"; dbname = dbName; dbhost = "/run/postgresql"; - adminuser = "admin"; - adminpassFile = cfg.adminpassFile; - }; - - settings = { - default_phone_region = "FR"; - overwriteprotocol = "https"; + adminuser = my.secrets.nextcloud-admin-user; + adminpass = my.secrets.nextcloud-admin-pass; }; }; - users.groups.media.members = ["nextcloud"]; - services.nginx = { virtualHosts = { "cloud.${domain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; }; }; }; - security.acme.certs.${fqdn}.extraDomainNames = ["cloud.${domain}"]; - - my.services.restic-backup = let + my.services.borg-backup = let nextcloudHome = config.services.nextcloud.home; - in - mkIf cfg.enable { - paths = [nextcloudHome]; - exclude = [ - # borg can fail if *.part files disappear during backup - "${nextcloudHome}/data/*/uploads" - # image previews can take up a lot of space - "${nextcloudHome}/data/appdata_*/preview" - # specific account for huge files I don't care about losing - "${nextcloudHome}/data/misc" - ]; - }; + in lib.mkIf cfg.enable { + paths = [ nextcloudHome ]; + exclude = [ + # borg can fail if *.part files disappear during backup + "re:^${nextcloudHome}/data/[^/]+/uploads" + # image previews can take up a lot of space + "re:^${nextcloudHome}/data/appdata_[^/]+/preview" + ]; + }; }; } diff --git a/services/nginx.nix b/services/nginx.nix index e17c29b..79c1dec 100644 --- a/services/nginx.nix +++ b/services/nginx.nix @@ -1,27 +1,11 @@ # Part of config shamelessly stolen from: # # https://github.com/delroth/infra.delroth.net +{ config, lib, ... }: { - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; - - cfg = config.my.services.nginx; -in { - options.my.services.nginx = { - enable = mkEnableOption "Nginx reverse proxy"; - }; - # Whenever something defines an nginx vhost, ensure that nginx defaults are # properly set. - config = mkIf (cfg.enable) { + config = lib.mkIf ((builtins.attrNames config.services.nginx.virtualHosts) != [ ]) { services.nginx = { enable = true; statusPage = true; # For monitoring scraping. @@ -32,45 +16,6 @@ in { recommendedProxySettings = true; }; - networking.firewall.allowedTCPPorts = [80 443]; - - services.prometheus = { - exporters.nginx = { - enable = true; - listenAddress = "127.0.0.1"; - }; - - scrapeConfigs = [ - { - job_name = "nginx"; - static_configs = [ - { - targets = ["127.0.0.1:${toString config.services.prometheus.exporters.nginx.port}"]; - labels = { - instance = config.networking.hostName; - }; - } - ]; - } - ]; - }; - - security.acme = { - acceptTerms = true; - defaults.email = "antoine97.martin@gmail.com"; - - certs = let - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; - gandiKey = config.my.secrets.gandiKey; - in { - "${fqdn}" = { - dnsProvider = "ovh"; - credentialsFile = config.age.secrets."ovh/credentials".path; - group = "nginx"; - }; - }; - }; + networking.firewall.allowedTCPPorts = [ 80 443 ]; }; } diff --git a/services/paperless.nix b/services/paperless.nix deleted file mode 100644 index 96f785c..0000000 --- a/services/paperless.nix +++ /dev/null @@ -1,139 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.paperless; - my = config.my; - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; - paperlessDomain = "paperless.${domain}"; -in { - options.my.services.paperless = let - inherit (lib) types; - in { - enable = mkEnableOption "Paperless"; - - port = mkOption { - type = types.port; - default = 8080; - example = 8080; - description = "Internal port for Paperless service"; - }; - - passwordFile = mkOption { - type = types.path; - description = '' - Path to a file containing the admin's password - ''; - }; - - secretKeyFile = mkOption { - type = types.path; - description = '' - Path to a file containing the service's secret key - ''; - }; - }; - - config = mkIf cfg.enable { - services.paperless = { - enable = true; - port = cfg.port; - passwordFile = cfg.passwordFile; - settings = { - # Postgres settings - PAPERLESS_DBHOST = "/run/postgresql"; - PAPERLESS_DBUSER = "paperless"; - PAPERLESS_DBNAME = "paperless"; - - PAPERLESS_URL = "https://${paperlessDomain}"; - - PAPERLESS_OCR_LANGUAGE = "fra+eng"; - PAPERLESS_OCR_MODE = "skip"; - PAPERLESS_OCR_SKIP_ARCHIVE_FILE = "with_text"; - - PAPERLESS_TIME_ZONE = config.time.timeZone; - - PAPERLESS_ADMIN_USER = "alarsyo"; - - PAPERLESS_TASK_WORKERS = 3; - PAPERLESS_THREADS_PER_WORKER = 4; - }; - }; - - systemd.services = { - paperless-scheduler.serviceConfig = { - EnvironmentFile = cfg.secretKeyFile; - }; - - paperless-consumer.serviceConfig = { - EnvironmentFile = cfg.secretKeyFile; - }; - - paperless-web.serviceConfig = { - EnvironmentFile = cfg.secretKeyFile; - }; - }; - - services.postgresql = { - enable = true; - ensureDatabases = ["paperless"]; - ensureUsers = [ - { - name = "paperless"; - ensureDBOwnership = true; - } - ]; - }; - - systemd.services.paperless-server = { - # Make sure the DB is available - after = ["postgresql.service"]; - }; - - services.nginx.virtualHosts = { - "${paperlessDomain}" = { - forceSSL = true; - useACMEHost = fqdn; - - listen = [ - # FIXME: hardcoded tailscale IP - { - addr = "100.115.172.44"; - port = 443; - ssl = true; - } - { - addr = "100.115.172.44"; - port = 80; - ssl = false; - } - ]; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}"; - proxyWebsockets = true; - }; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = [paperlessDomain]; - - my.services.restic-backup = mkIf cfg.enable { - paths = [ - config.services.paperless.dataDir - config.services.paperless.mediaDir - ]; - }; - }; -} diff --git a/services/photoprism.nix b/services/photoprism.nix deleted file mode 100644 index 3c2d2df..0000000 --- a/services/photoprism.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.photoprism; - my = config.my; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; -in { - options.my.services.photoprism = let - inherit (lib) types; - in { - enable = mkEnableOption "Photoprism config"; - - home = mkOption { - type = types.str; - default = "/var/lib/photoprism"; - example = "/var/lib/photoprism"; - description = "Home for the photoprism service, where data will be stored"; - }; - - port = mkOption { - type = types.port; - default = 2342; - example = 8080; - description = "Internal port for Photoprism webapp"; - }; - }; - - config = mkIf cfg.enable { - users.users.photoprism = { - isSystemUser = true; - home = cfg.home; - createHome = true; - group = "photoprism"; - }; - users.groups.photoprism = {}; - - services.nginx.virtualHosts = { - "photoprism.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}"; - proxyWebsockets = true; - }; - - extraConfig = '' - proxy_connect_timeout 600; - proxy_read_timeout 600; - proxy_send_timeout 600; - client_max_body_size 500m; - access_log syslog:server=unix:/dev/log,tag=photoprism; - ''; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["photoprism.${domain}"]; - - my.services.restic-backup = mkIf cfg.enable { - paths = [ - cfg.home - ]; - exclude = [ - "${cfg.home}/storage" - ]; - }; - - services.fail2ban.jails = { - photoprism = '' - enabled = true - filter = photoprism-failed-login - port = http,https - maxretry = 3 - ''; - }; - - environment.etc = { - "fail2ban/filter.d/photoprism-failed-login.conf".text = '' - [Definition] - failregex = ^.* photoprism: - .*"POST \/api\/v1\/session HTTP[^"]*" 400 .*$ - ignoreregex = - journalmatch = _SYSTEMD_UNIT=nginx.service _TRANSPORT=syslog - ''; - }; - }; -} diff --git a/services/pipewire.nix b/services/pipewire.nix deleted file mode 100644 index 913cc28..0000000 --- a/services/pipewire.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - config, - lib, - pkgs, - options, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - optionalAttrs - ; - - cfg = config.my.services.pipewire; - my = config.my; -in { - options.my.services.pipewire = { - enable = mkEnableOption "Pipewire sound backend"; - }; - - # HACK: services.pipewire.alsa doesn't exist on 20.09, avoid evaluating this - # config (my 20.09 machine is a server anyway) - config = optionalAttrs (options ? services.pipewire.alsa) (mkIf cfg.enable { - # recommended for pipewire as well - security.rtkit.enable = true; - services.pipewire = { - enable = true; - - alsa = { - enable = true; - support32Bit = true; - }; - pulse.enable = true; - jack.enable = true; - - wireplumber.enable = true; - }; - - # FIXME: a shame pactl isn't available by itself, eventually this should be - # replaced by pw-cli or a wrapper, I guess? - environment.systemPackages = [pkgs.pulseaudio]; - }); -} diff --git a/services/pleroma.nix b/services/pleroma.nix deleted file mode 100644 index cdddc43..0000000 --- a/services/pleroma.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.pleroma; - my = config.my; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; -in { - options.my.services.pleroma = let - inherit (lib) types; - in { - enable = mkEnableOption "Pleroma"; - - port = mkOption { - type = types.port; - default = 8080; - example = 8080; - description = "Pleroma server port"; - }; - - secretConfigFile = mkOption { - type = types.str; - default = "/var/lib/pleroma/secrets.exs"; - }; - }; - - config = mkIf cfg.enable { - systemd.services.pleroma = { - path = [ - pkgs.hexdump - pkgs.exiftool - ]; - }; - - services.pleroma = { - enable = true; - secretConfigFile = cfg.secretConfigFile; - - configs = [ - '' - import Config - - config :pleroma, Pleroma.Web.Endpoint, - url: [host: "social.${domain}", scheme: "https", port: 443], - http: [ip: {127, 0, 0, 1}, port: ${toString cfg.port}] - - config :pleroma, :instance, - name: "social.alarsyo.net", - email: "contact+pleroma@alarsyo.net", - notify_email: "pleroma@alarsyo.net", - limit: 5000, - registrations_open: false, - healthcheck: true - - config :pleroma, :media_proxy, - enabled: false, - redirect_on_failure: true - #base_url: "https://cache.pleroma.social" - - config :pleroma, Pleroma.Repo, - adapter: Ecto.Adapters.Postgres, - username: "pleroma", - database: "pleroma", - hostname: "localhost" - - # Configure web push notifications - config :web_push_encryption, :vapid_details, - subject: "mailto:contact+pleroma@alarsyo.net" - - config :pleroma, :database, rum_enabled: false - config :pleroma, :instance, static_dir: "/var/lib/pleroma/static" - config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads" - - # Enable Strict-Transport-Security once SSL is working: - # config :pleroma, :http_security, - # sts: true - - config :pleroma, configurable_from_database: false - - config :pleroma, Pleroma.Upload, filters: [Pleroma.Upload.Filter.AnonymizeFilename] - '' - ]; - }; - - services.nginx.virtualHosts."social.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}/"; - proxyWebsockets = true; - extraConfig = '' - etag on; - client_max_body_size 50m; - ''; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["social.${domain}"]; - }; -} diff --git a/services/postgresql-backup.nix b/services/postgresql-backup.nix index f5518af..e8c5381 100644 --- a/services/postgresql-backup.nix +++ b/services/postgresql-backup.nix @@ -1,36 +1,28 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - ; +{ config, lib, pkgs, ... }: +with lib; + +let cfg = config.my.services.postgresql-backup; in { options.my.services.postgresql-backup = { - enable = - (mkEnableOption "Backup SQL databases") - // {default = config.services.postgresql.enable;}; + enable = mkEnableOption "Backup SQL databases"; }; config = mkIf cfg.enable { services.postgresqlBackup = { enable = true; - # Restic backup starts at midnight so create DB dump just before + # Borg backup starts at midnight so create DB dump just before startAt = "*-*-* 23:30:00"; }; - my.services.restic-backup = mkIf cfg.enable { - paths = ["/var/backup/postgresql"]; + my.services.borg-backup = mkIf cfg.enable { + paths = [ "/var/backup/postgresql" ]; # no need to store previously backed up files, as borg does the snapshoting # for us - exclude = ["/var/backup/postgresql/*.prev.sql.gz"]; + exclude = [ "/var/backup/postgresql/*.prev.sql.gz" ]; }; }; + } diff --git a/services/postgresql.nix b/services/postgresql.nix index cb5d2d1..a6d1f05 100644 --- a/services/postgresql.nix +++ b/services/postgresql.nix @@ -1,11 +1,7 @@ +{ config, pkgs, ... }: { - config, - pkgs, - lib, - ... -}: { # set postgresql version so we don't get any bad surprise config.services.postgresql = { - package = pkgs.postgresql_17; + package = pkgs.postgresql_12; }; } diff --git a/services/restic-backup.nix b/services/restic-backup.nix deleted file mode 100644 index d3d3e63..0000000 --- a/services/restic-backup.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - attrsets - concatStringsSep - mkEnableOption - mkIf - mkOption - optional - ; - - cfg = config.my.services.restic-backup; - excludeArg = "--exclude-file=" + (pkgs.writeText "excludes.txt" (concatStringsSep "\n" cfg.exclude)); - makePruneOpts = pruneOpts: - attrsets.mapAttrsToList (name: value: "--keep-${name} ${toString value}") pruneOpts; -in { - options.my.services.restic-backup = let - inherit (lib) types; - in { - enable = mkEnableOption "Enable Restic backups for this host"; - - repo = mkOption { - type = types.str; - default = null; - example = "/mnt/hdd"; - description = "Restic backup repo"; - }; - - paths = mkOption { - type = types.listOf types.str; - default = []; - example = [ - "/var/lib" - "/home" - ]; - description = "Paths to backup"; - }; - - exclude = mkOption { - type = types.listOf types.str; - default = []; - example = [ - # very large paths - "/var/lib/docker" - "/var/lib/systemd" - "/var/lib/libvirt" - - # temporary files created by `cargo` and `go build` - "**/target" - "/home/*/go/bin" - "/home/*/go/pkg" - ]; - description = "Paths to exclude from backup"; - }; - - prune = mkOption { - type = types.attrs; - default = { - daily = 7; - weekly = 4; - monthly = 6; - }; - }; - - passwordFile = mkOption { - type = types.str; - default = "/root/restic/password"; - }; - - environmentFile = mkOption { - type = types.str; - default = "/root/restic/creds"; - }; - - timerConfig = mkOption { - type = types.attrsOf types.str; - default = { - OnCalendar = "daily"; - }; - }; - }; - - config = mkIf cfg.enable { - environment.systemPackages = [pkgs.restic]; - - services.restic.backups.backblaze = { - initialize = true; - - paths = cfg.paths; - - repository = cfg.repo; - passwordFile = cfg.passwordFile; - environmentFile = cfg.environmentFile; - - extraBackupArgs = - ["--verbose=1"] - ++ optional (builtins.length cfg.exclude != 0) excludeArg; - - timerConfig = cfg.timerConfig; - - pruneOpts = makePruneOpts cfg.prune; - }; - }; -} diff --git a/services/scribe.nix b/services/scribe.nix deleted file mode 100644 index 09e5836..0000000 --- a/services/scribe.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - ; - - cfg = config.my.services.scribe; - my = config.my; - - domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; -in { - options.my.services.scribe = let - inherit (lib) types; - in { - enable = mkEnableOption "Scribe config"; - - home = mkOption { - type = types.str; - default = "/var/lib/scribe"; - example = "/var/lib/scribe"; - description = "Home for the scribe service, where data will be stored"; - }; - - port = mkOption { - type = types.port; - default = 2343; - example = 8080; - description = "Internal port for Scribe service"; - }; - }; - - config = mkIf cfg.enable { - users.users.scribe = { - isSystemUser = true; - home = cfg.home; - createHome = true; - group = "scribe"; - }; - users.groups.scribe = {}; - - services.nginx.virtualHosts = { - "scribe.${domain}" = { - forceSSL = true; - useACMEHost = fqdn; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}"; - proxyWebsockets = true; - }; - - extraConfig = '' - proxy_connect_timeout 600; - proxy_read_timeout 600; - proxy_send_timeout 600; - client_max_body_size 200m; - ''; - }; - }; - - security.acme.certs.${fqdn}.extraDomainNames = ["scribe.${domain}"]; - }; -} diff --git a/services/tailscale.nix b/services/tailscale.nix deleted file mode 100644 index b963b94..0000000 --- a/services/tailscale.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - types - ; - - cfg = config.my.services.tailscale; -in { - options.my.services.tailscale = { - enable = mkEnableOption "Tailscale"; - useRoutingFeatures = mkOption { - type = types.enum ["none" "client" "server" "both"]; - default = "none"; - }; - }; - - config = mkIf cfg.enable { - services.tailscale = { - enable = true; - package = pkgs.tailscale; - openFirewall = true; - useRoutingFeatures = cfg.useRoutingFeatures; - }; - - networking.firewall = { - trustedInterfaces = [config.services.tailscale.interfaceName]; - }; - }; -} diff --git a/services/tgv.nix b/services/tgv.nix new file mode 100644 index 0000000..eb6107e --- /dev/null +++ b/services/tgv.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: + +with lib; + +let + cfg = config.my.services.tgv; + my = config.my; +in +{ + options.my.services.tgv = { + enable = lib.mkEnableOption "TGV redirect"; + }; + + config = mkIf cfg.enable { + services.nginx.virtualHosts = { + "tgv.sexy" = { + forceSSL = true; + enableACME = true; + + locations."/".return = "301 http://www.mlgtraffic.net/"; + }; + }; + }; +} diff --git a/services/transmission.nix b/services/transmission.nix index 8f29018..de1ad10 100644 --- a/services/transmission.nix +++ b/services/transmission.nix @@ -1,31 +1,17 @@ -{ - config, - lib, - ... -}: let - inherit - (lib) - mkEnableOption - mkIf - mkOption - optionalAttrs - ; - +{ config, lib, ... }: +let cfg = config.my.services.transmission; domain = config.networking.domain; - hostname = config.networking.hostName; - fqdn = "${hostname}.${domain}"; webuiDomain = "transmission.${domain}"; transmissionRpcPort = 9091; transmissionPeerPort = 30251; downloadBase = "/media/torrents/"; -in { - options.my.services.transmission = let - inherit (lib) types; - in { +in +{ + options.my.services.transmission = with lib; { enable = mkEnableOption "Transmission torrent client"; username = mkOption { @@ -35,65 +21,46 @@ in { description = "Name of the transmission RPC user"; }; - secretConfigFile = mkOption { - type = types.nullOr types.path; - default = null; - example = "/var/run/secrets/transmission-secrets"; - description = "Path to secrets file to append to configuration"; + password = mkOption { + type = types.str; + example = "password"; + description = "Password of the transmission RPC user"; }; }; - config = mkIf cfg.enable { - services.transmission = - { - enable = true; - group = "media"; + config = lib.mkIf cfg.enable { + services.transmission = { + enable = true; + group = "media"; - settings = { - download-dir = "${downloadBase}/complete"; - incomplete-dir = "${downloadBase}/incomplete"; + settings = { + download-dir = "${downloadBase}/complete"; + incomplete-dir = "${downloadBase}/incomplete"; - peer-port = transmissionPeerPort; + peer-port = transmissionPeerPort; - rpc-enabled = true; - rpc-port = transmissionRpcPort; - rpc-authentication-required = false; + rpc-enabled = true; + rpc-port = transmissionRpcPort; + rpc-authentication-required = true; - rpc-whitelist-enabled = true; - rpc-whitelist = "127.0.0.1"; + rpc-username = cfg.username; + rpc-password = cfg.password; - rpc-host-whitelist-enabled = true; - rpc-host-whitelist = webuiDomain; - }; - - # automatically allow transmission.settings.peer-port - openPeerPorts = true; - } - // (optionalAttrs (cfg.secretConfigFile != null) { - credentialsFile = cfg.secretConfigFile; - }); + rpc-whitelist-enabled = true; + rpc-whitelist = "127.0.0.1"; + }; + }; services.nginx.virtualHosts."${webuiDomain}" = { forceSSL = true; - useACMEHost = fqdn; + enableACME = true; locations."/".proxyPass = "http://127.0.0.1:${toString transmissionRpcPort}"; - - listen = [ - # FIXME: hardcoded tailscale IP - { - addr = "100.115.172.44"; - port = 443; - ssl = true; - } - { - addr = "100.115.172.44"; - port = 80; - ssl = false; - } - ]; }; - security.acme.certs.${fqdn}.extraDomainNames = [webuiDomain]; + networking.firewall = { + allowedTCPPorts = [ transmissionPeerPort ]; + allowedUDPPorts = [ transmissionPeerPort ]; + }; }; } diff --git a/services/wireguard.nix b/services/wireguard.nix new file mode 100644 index 0000000..9d13b55 --- /dev/null +++ b/services/wireguard.nix @@ -0,0 +1,122 @@ +# Stolen from: +# +# https://gitea.belanyi.fr/ambroisie/nix-config/src/branch/main/services/wireguard.nix + +{ config, lib, pkgs, ... }: +let + cfg = config.my.services.wireguard; + hostName = config.networking.hostName; + + peers = config.my.secrets.wireguard.peers; + thisPeer = peers."${hostName}"; + otherPeers = lib.filterAttrs (name: _: name != hostName) peers; + + extIface = config.my.networking.externalInterface; +in +{ + options.my.services.wireguard = with lib; { + enable = mkEnableOption "Wireguard VPN service"; + + iface = mkOption { + type = types.str; + default = "wg"; + example = "wg0"; + description = "Name of the interface to configure"; + }; + + port = mkOption { + type = types.port; + default = 51820; + example = 55555; + description = "Port to configure for Wireguard"; + }; + + net = { + v4 = { + subnet = mkOption { + type = types.str; + default = "10.0.0"; + example = "10.100.0"; + description = "Which prefix to use for internal IPs"; + }; + mask = mkOption { + type = types.int; + default = 24; + example = 28; + description = "The CIDR mask to use on internal IPs"; + }; + }; + v6 = { + subnet = mkOption { + type = types.str; + default = "fd42:42:42"; + example = "fdc9:281f:04d7:9ee9"; + description = "Which prefix to use for internal IPs"; + }; + mask = mkOption { + type = types.int; + default = 64; + example = 68; + description = "The CIDR mask to use on internal IPs"; + }; + }; + }; + }; + + config.networking = lib.mkIf cfg.enable { + wg-quick.interfaces."${cfg.iface}" = { + listenPort = cfg.port; + address = with cfg.net; with lib; [ + "${v4.subnet}.${toString thisPeer.clientNum}/${toString v4.mask}" + "${v6.subnet}::${toString thisPeer.clientNum}/${toHexString v6.mask}" + ]; + privateKey = thisPeer.privateKey; + + peers = lib.mapAttrsToList + (name: peer: { + inherit (peer) publicKey; + } // lib.optionalAttrs (thisPeer ? externalIp) { + # Only forward from server to clients + allowedIPs = with cfg.net; [ + "${v4.subnet}.${toString peer.clientNum}/32" + "${v6.subnet}::${toString peer.clientNum}/128" + ]; + } // lib.optionalAttrs (peer ? externalIp) { + # Known addresses + endpoint = "${peer.externalIp}:${toString cfg.port}"; + } // lib.optionalAttrs (!(thisPeer ? externalIp)) { + # Forward all traffic to server + allowedIPs = with cfg.net; [ + "0.0.0.0/0" + "::/0" + ]; + # Roaming clients need to keep NAT-ing active + persistentKeepalive = 10; + }) + otherPeers; + } // lib.optionalAttrs (thisPeer ? externalIp) { + # Setup forwarding on server + postUp = with cfg.net; '' + ${pkgs.iptables}/bin/iptables -A FORWARD -i ${cfg.iface} -j ACCEPT + ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s ${v4.subnet}.1/${toString v4.mask} -o ${extIface} -j MASQUERADE + ${pkgs.iptables}/bin/ip6tables -A FORWARD -i ${cfg.iface} -j ACCEPT + ${pkgs.iptables}/bin/ip6tables -t nat -A POSTROUTING -s ${v6.subnet}::1/${toString v6.mask} -o ${extIface} -j MASQUERADE + ''; + preDown = with cfg.net; '' + ${pkgs.iptables}/bin/iptables -D FORWARD -i ${cfg.iface} -j ACCEPT + ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s ${v4.subnet}.1/${toString v4.mask} -o ${extIface} -j MASQUERADE + ${pkgs.iptables}/bin/ip6tables -D FORWARD -i ${cfg.iface} -j ACCEPT + ${pkgs.iptables}/bin/ip6tables -t nat -D POSTROUTING -s ${v6.subnet}::1/${toString v6.mask} -o ${extIface} -j MASQUERADE + ''; + + }; + + nat = lib.optionalAttrs (thisPeer ? externalIp) { + enable = true; + externalInterface = extIface; + internalInterfaces = [ cfg.iface ]; + }; + + firewall.allowedUDPPorts = lib.optional (thisPeer ? externalIp) cfg.port; + }; +} diff --git a/thanatos.nix b/thanatos.nix deleted file mode 100644 index e0c2c2d..0000000 --- a/thanatos.nix +++ /dev/null @@ -1,23 +0,0 @@ -{...}: { - imports = [ - # Default configuration - ./base - - # Module definitions - ./modules - - # Service definitions - ./services - - # Host-specific config - ./hosts/thanatos - ]; - - # 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 - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.11"; # Did you read the comment? -} diff --git a/todo.org b/todo.org deleted file mode 100644 index d1a045d..0000000 --- a/todo.org +++ /dev/null @@ -1,8 +0,0 @@ -* TODO Take a look at goldwarden when 24.05 releases - -https://github.com/quexten/goldwarden - -* TODO Setup sway correctly -** TODO This includes moving it to a proper module - -* TODO Create an adwaita package with symlinks for nm-applet icons