diff --git a/flake.nix b/flake.nix index b58302d..79e8ce3 100644 --- a/flake.nix +++ b/flake.nix @@ -27,24 +27,29 @@ hostname = "loki"; lokiUser = "loki"; lokiPath = "/srv/loki"; + lokiPort = 3100; in { nixosConfigurations = { # FIXME replace with your hostname ${hostname} = nixpkgs.lib.nixosSystem { - inherit system; specialArgs = {inherit inputs outputs;}; # pkgs = import nixpkgs { system = "x86_64-linux"; }; modules = [ ./configuration.nix # > Our main nixos configuration file < "${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix" ({ ... }: { + nixpkgs.hostPlatform = "${system}"; system.stateVersion = "${stateVersion}"; time.timeZone = "${timeZone}"; }) vscode-server.nixosModules.default ({ config, pkgs, ... }: {services.vscode-server.enable = true;}) - (import ./loki.nix { pkgs = nixpkgs.legacyPackages.${system}; userName = "${lokiUser}";}) + (import ./loki.nix { + pkgs = nixpkgs.legacyPackages.${system}; + inherit lokiPort; + inherit lokiUser; + }) ]; }; }; diff --git a/loki.nix b/loki.nix index f81e60d..8b6f8d9 100644 --- a/loki.nix +++ b/loki.nix @@ -1,7 +1,4 @@ -{ pkgs, userName, ... }: -let - lokiPort = 3100; -in +{ pkgs, lokiUser, lokiPort ? (3100), ... }: { networking.firewall.allowedTCPPorts = [ lokiPort ]; @@ -12,7 +9,7 @@ in services.loki = { enable = true; - user = "${userName}"; + user = "${lokiUser}"; configuration = { server.http_listen_port = lokiPort;