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 = {