From 679f8bfca097d29f379878a44d6cc1b3582ba803 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:41:23 -0600 Subject: [PATCH] reorg --- flake.nix | 10 +++++----- git.nix => home-manager/git.nix | 0 home.nix => home-manager/home.nix | 0 configuration.nix => nixos/configuration.nix | 0 loki.nix => nixos/loki.nix | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) rename git.nix => home-manager/git.nix (100%) rename home.nix => home-manager/home.nix (100%) rename configuration.nix => nixos/configuration.nix (100%) rename loki.nix => nixos/loki.nix (97%) diff --git a/flake.nix b/flake.nix index 79e8ce3..4d7d2f2 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ specialArgs = {inherit inputs outputs;}; # pkgs = import nixpkgs { system = "x86_64-linux"; }; modules = [ - ./configuration.nix # > Our main nixos configuration file < + ./nixos/configuration.nix # > Our main nixos configuration file < "${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix" ({ ... }: { nixpkgs.hostPlatform = "${system}"; @@ -45,7 +45,7 @@ }) vscode-server.nixosModules.default ({ config, pkgs, ... }: {services.vscode-server.enable = true;}) - (import ./loki.nix { + (import ./nixos/loki.nix { pkgs = nixpkgs.legacyPackages.${system}; inherit lokiPort; inherit lokiUser; @@ -61,7 +61,7 @@ "root@${hostname}" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; extraSpecialArgs = {inherit inputs outputs;}; - modules = [(import ./git.nix { repoPath = "${lokiPath}"; })]; + modules = [(import ./home-manager/git.nix { repoPath = "${lokiPath}"; })]; }; # FIXME replace with your username@hostname @@ -70,8 +70,8 @@ extraSpecialArgs = {inherit inputs outputs;}; # > Our main home-manager configuration file < modules = [ - (import ./home.nix { user = "${lokiUser}"; repoPath = "${lokiPath}"; }) - (import ./git.nix { repoPath = "${lokiPath}"; }) + (import ./home-manager/home.nix { user = "${lokiUser}"; repoPath = "${lokiPath}"; }) + (import ./home-manager/git.nix { repoPath = "${lokiPath}"; }) ]; }; }; diff --git a/git.nix b/home-manager/git.nix similarity index 100% rename from git.nix rename to home-manager/git.nix diff --git a/home.nix b/home-manager/home.nix similarity index 100% rename from home.nix rename to home-manager/home.nix diff --git a/configuration.nix b/nixos/configuration.nix similarity index 100% rename from configuration.nix rename to nixos/configuration.nix diff --git a/loki.nix b/nixos/loki.nix similarity index 97% rename from loki.nix rename to nixos/loki.nix index 8b6f8d9..221abbf 100644 --- a/loki.nix +++ b/nixos/loki.nix @@ -3,8 +3,8 @@ networking.firewall.allowedTCPPorts = [ lokiPort ]; environment.systemPackages = with pkgs; [ - (pkgs.writeShellScriptBin "loki-check" "curl http://localhost:3100/ready") - (pkgs.writeShellScriptBin "loki-logs" "journalctl -b -u loki.service -n 25") + (pkgs.writeShellScriptBin "loki-check" "curl http://localhost:${builtins.toString lokiPort}/ready") + (pkgs.writeShellScriptBin "loki-logs" "journalctl -b -u loki.service -n 10") ]; services.loki = {