diff --git a/hosts/h001/flake.lock b/hosts/h001/flake.lock index 987af3b..e7e5257 100644 --- a/hosts/h001/flake.lock +++ b/hosts/h001/flake.lock @@ -33,11 +33,11 @@ "ragenix": "ragenix" }, "locked": { - "lastModified": 1750780721, - "narHash": "sha256-EgWdBolm8wPXY9iuTHPXykJiQRzSnfXzkCXpNooxEB8=", + "lastModified": 1750459395, + "narHash": "sha256-i6Khg4dcHXl6keWUW8vv7+aUAFdM+1rahFg59qx2xQ8=", "ref": "refs/heads/master", - "rev": "2004734c7b7d77638874b63e147970199830c3fd", - "revCount": 500, + "rev": "1b02f9ea95ec7e81a45ec40159991065856482b7", + "revCount": 489, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, diff --git a/hosts/h001/flake.nix b/hosts/h001/flake.nix index 3f5c1ff..109440d 100644 --- a/hosts/h001/flake.nix +++ b/hosts/h001/flake.nix @@ -49,9 +49,6 @@ systemName = configuration_name; boot.systemd.enable = true; secrets.enable = true; - general = { - reporting.enable = true; - }; programs = { tailnet.enable = true; ssh.enable = true; diff --git a/hosts/h001/mods/default.nix b/hosts/h001/mods/default.nix index dbd2ac6..5d1fb62 100644 --- a/hosts/h001/mods/default.nix +++ b/hosts/h001/mods/default.nix @@ -6,5 +6,6 @@ ./adguardhome.nix ./nixarr.nix ./monitoring.nix + ./reporting.nix ]; } diff --git a/hosts/h001/mods/reporting.nix b/hosts/h001/mods/reporting.nix new file mode 100644 index 0000000..7a9eadb --- /dev/null +++ b/hosts/h001/mods/reporting.nix @@ -0,0 +1,58 @@ +{ + config, + ... +}: +{ + config = { + services.prometheus.exporters.node = { + enable = true; + port = 9100; + }; + # Create necessary directories with appropriate permissions + systemd.tmpfiles.rules = [ + "d /tmp/positions 1777 - - -" # World-writable directory for positions file + "f /tmp/positions.yaml 0666 - - -" # World-writable positions file + ]; + users.groups.systemd-journal.members = [ "promtail" ]; + services.promtail = { + enable = true; + extraFlags = [ + "-config.expand-env=true" + ]; + configuration = { + server = { + http_listen_port = 9080; + grpc_listen_port = 0; + }; + positions = { + filename = "/tmp/positions.yaml"; # Changed from /var/lib/promtail/positions.yaml + }; + clients = [ + { + url = "http://100.64.0.13:3100/loki/api/v1/push"; # Points to your Loki instance + } + ]; + scrape_configs = [ + { + job_name = "journal"; + journal = { + json = false; + max_age = "12h"; + path = "/var/log/journal"; + labels = { + job = "systemd-journal"; + host = config.networking.hostName; + }; + }; + relabel_configs = [ + { + source_labels = [ "__journal__systemd_unit" ]; + target_label = "unit"; + } + ]; + } + ]; + }; + }; + }; +} diff --git a/hosts/lio/flake.lock b/hosts/lio/flake.lock index 6a5181b..fa25b98 100644 --- a/hosts/lio/flake.lock +++ b/hosts/lio/flake.lock @@ -29,22 +29,17 @@ "inputs": { "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_2", "ragenix": "ragenix" }, "locked": { - "lastModified": 1750780721, - "narHash": "sha256-EgWdBolm8wPXY9iuTHPXykJiQRzSnfXzkCXpNooxEB8=", - "ref": "refs/heads/master", - "rev": "2004734c7b7d77638874b63e147970199830c3fd", - "revCount": 500, - "type": "git", - "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" + "path": "../../common", + "type": "path" }, "original": { - "type": "git", - "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" - } + "path": "../../common", + "type": "path" + }, + "parent": [] }, "crane": { "locked": { @@ -178,22 +173,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1749794982, - "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1741379970, "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", @@ -209,7 +188,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1750622754, "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", @@ -225,7 +204,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1750188666, "narHash": "sha256-yAfLvtbCzSigTfbsJeOrvljS7VYLAwi2RZ6F+qd+A5E=", @@ -1141,7 +1120,7 @@ "agenix": "agenix", "crane": "crane", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay" }, "locked": { @@ -1161,13 +1140,13 @@ "root": { "inputs": { "common": "common", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "ros_neovim": "ros_neovim" } }, "ros_neovim": { "inputs": { - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim", "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim", "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring", diff --git a/hosts/lio/flake.nix b/hosts/lio/flake.nix index bd71054..853d248 100644 --- a/hosts/lio/flake.nix +++ b/hosts/lio/flake.nix @@ -3,8 +3,8 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; # Use relative to get current version for testing - # common.url = "path:../../common"; - common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles"; + common.url = "path:../../common"; + # common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles"; ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim"; };