better variables
This commit is contained in:
@@ -27,24 +27,29 @@
|
|||||||
hostname = "loki";
|
hostname = "loki";
|
||||||
lokiUser = "loki";
|
lokiUser = "loki";
|
||||||
lokiPath = "/srv/loki";
|
lokiPath = "/srv/loki";
|
||||||
|
lokiPort = 3100;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# FIXME replace with your hostname
|
# FIXME replace with your hostname
|
||||||
${hostname} = nixpkgs.lib.nixosSystem {
|
${hostname} = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
# pkgs = import nixpkgs { system = "x86_64-linux"; };
|
# pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix # > Our main nixos configuration file <
|
./configuration.nix # > Our main nixos configuration file <
|
||||||
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||||
({ ... }: {
|
({ ... }: {
|
||||||
|
nixpkgs.hostPlatform = "${system}";
|
||||||
system.stateVersion = "${stateVersion}";
|
system.stateVersion = "${stateVersion}";
|
||||||
time.timeZone = "${timeZone}";
|
time.timeZone = "${timeZone}";
|
||||||
})
|
})
|
||||||
vscode-server.nixosModules.default
|
vscode-server.nixosModules.default
|
||||||
({ config, pkgs, ... }: {services.vscode-server.enable = true;})
|
({ 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;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
7
loki.nix
7
loki.nix
@@ -1,7 +1,4 @@
|
|||||||
{ pkgs, userName, ... }:
|
{ pkgs, lokiUser, lokiPort ? (3100), ... }:
|
||||||
let
|
|
||||||
lokiPort = 3100;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [ lokiPort ];
|
networking.firewall.allowedTCPPorts = [ lokiPort ];
|
||||||
|
|
||||||
@@ -12,7 +9,7 @@ in
|
|||||||
|
|
||||||
services.loki = {
|
services.loki = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "${userName}";
|
user = "${lokiUser}";
|
||||||
|
|
||||||
configuration = {
|
configuration = {
|
||||||
server.http_listen_port = lokiPort;
|
server.http_listen_port = lokiPort;
|
||||||
|
|||||||
Reference in New Issue
Block a user