Fix: imports
This commit is contained in:
parent
36d368063a
commit
e3c3d5ee8b
7 changed files with 23 additions and 18 deletions
|
|
@ -16,13 +16,16 @@
|
|||
pennsardin = {
|
||||
ip = "192.168.50.12";
|
||||
};
|
||||
terre-neuvas = {
|
||||
ip = "192.168.50.11";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
forgejo = {
|
||||
home = "/var/lib/services/forgejo";
|
||||
url = "govel.porzh.me";
|
||||
port = "3000";
|
||||
port = 3000;
|
||||
};
|
||||
goaccess = {
|
||||
home = "/var/lib/www/goaccess";
|
||||
|
|
@ -35,7 +38,7 @@
|
|||
};
|
||||
outline = {
|
||||
url = "notes.porzh.me";
|
||||
port = "3001";
|
||||
port = 3001;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
globals = import ../../config/globals.nix ;
|
||||
in {
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
|
|
@ -55,16 +57,16 @@
|
|||
useDHCP = false;
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.0.3";
|
||||
address = globals.network.terre-neuvas.ip;
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = {
|
||||
interface = "br0";
|
||||
address = "192.168.0.254";
|
||||
address = globals.network.gateway;
|
||||
};
|
||||
nameservers = ["192.168.0.254" "1.1.1.1"];
|
||||
nameservers = [ globals.network.gateway "1.1.1.1"];
|
||||
bridges.br0.interfaces = ["eno1"];
|
||||
};
|
||||
systemd.network = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, ...}:
|
||||
let
|
||||
import ../../config/globals.nix;
|
||||
globals = import ../../config/globals.nix;
|
||||
in {
|
||||
# --- Utilisateur dédié ---
|
||||
users.users.git = {
|
||||
|
|
@ -44,7 +44,7 @@ in {
|
|||
enable = true;
|
||||
virtualHosts.${globals.services.forgejo.url} = {
|
||||
extraConfig = ''
|
||||
reverse_proxy localhost:${globals.services.forgejo.port}
|
||||
reverse_proxy localhost:${toString globals.services.forgejo.port}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, ...}:
|
||||
let
|
||||
imports = ../../config/globals.nix ;
|
||||
globals = import ../../config/globals.nix ;
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
goaccess
|
||||
|
|
@ -25,7 +25,7 @@ in {
|
|||
};
|
||||
services.caddy = {
|
||||
virtualHosts = {
|
||||
globals.services.goaccess.url = {
|
||||
"${globals.services.goaccess.url}" = {
|
||||
extraConfig = ''
|
||||
root * ${globals.services.goaccess.home}
|
||||
file_server browse
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
import ../../config/globals.nix ;
|
||||
globals = import ../../config/globals.nix ;
|
||||
in {
|
||||
services = {
|
||||
outline = {
|
||||
|
|
@ -11,7 +11,7 @@ in {
|
|||
smtp = {
|
||||
host = globals.smtp.host ;
|
||||
username = globals.smtp.user ;
|
||||
passwordFile = "/run/secrets/proton_pass";
|
||||
passwordFile = "/etc/secrets/protonpass";
|
||||
fromEmail = globals.smtp.user;
|
||||
replyEmail = globals.smtp.user;
|
||||
port = globals.smtp.port;
|
||||
|
|
@ -23,7 +23,7 @@ in {
|
|||
enable = true;
|
||||
virtualHosts.${globals.services.outline.url} = {
|
||||
extraConfig = ''
|
||||
reverse_proxy localhost:${globals.services.outline.port}
|
||||
reverse_proxy localhost:${toString globals.services.outline.port}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, lib, ...}:
|
||||
let
|
||||
import = ../../config/globals.nix ;
|
||||
globals = import ../../config/globals.nix ;
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
hugo
|
||||
|
|
@ -44,7 +44,7 @@ in {
|
|||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
globals.services.levr.url = {
|
||||
"${globals.services.levr.url}" = {
|
||||
extraConfig = ''
|
||||
@http {
|
||||
protocol http
|
||||
|
|
@ -54,7 +54,7 @@ in {
|
|||
file_server
|
||||
|
||||
log {
|
||||
output file /var/log/caddy/access-${global.services.levr.url}.log
|
||||
output file /var/log/caddy/access-${globals.services.levr.url}.log
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
import ../../config/globals.nix ;
|
||||
globals = import ../../config/globals.nix ;
|
||||
porzhSite = pkgs.stdenv.mkDerivation {
|
||||
pname = "porzh-site";
|
||||
version = "1.0";
|
||||
|
|
@ -14,7 +14,7 @@ in {
|
|||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
globals.domain = {
|
||||
"${globals.domain}" = {
|
||||
serverAliases = [ "www.${globals.domain}" ];
|
||||
extraConfig = ''
|
||||
root * ${porzhSite}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue