Compare commits

..

No commits in common. "d065751bdb375ca20c85fe31def3621753c5ea6c" and "f7be91ca0e14d746b450f966a6536b852cf5682b" have entirely different histories.

View file

@ -14,6 +14,7 @@
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
specialArgs.inputs.vscode-server.nixosModules.default
]; ];
# System basics # System basics
@ -44,45 +45,44 @@
# i18n.defaultLocale = "en_US.UTF-8"; # i18n.defaultLocale = "en_US.UTF-8";
# Networking # Networking
networking = { networking.hostName = "nixos-server";
hostName = "heimserver"; networking.useDHCP = false;
useDHCP = false; networking.hostId = "5506a8e7";
hostId = "5506a8e7"; networking.interfaces.eth0.ipv4.addresses = [
interfaces.eth0.ipv4.addresses = [ {
{ address = "192.168.69.69";
address = "192.168.69.69"; prefixLength = 24;
prefixLength = 24; }
} ];
]; networking.defaultGateway = "192.168.69.1";
defaultGateway = "192.168.69.1"; #networking.nameservers = [ "1.1.1.1" ];
#nameservers = [ "1.1.1.1" ]; networking.firewall.enable = true;
firewall.enable = true; networking.firewall.allowedTCPPorts = [
firewall.allowedTCPPorts = [ 22
22 53
53 80
80 443
443 2222 # forgejo ssh
2222 # forgejo ssh 8184 # forgejo frontend
8184 # forgejo frontend 8123 # homeassistant
8123 # homeassistant 5580 # homeassistant matter
5580 # homeassistant matter 2283 # immich
2283 # immich 3003 # immich ml
3003 # immich ml 1984 # frigate go2rtc
1984 # frigate go2rtc 8971 # frigate
8971 # frigate 8554 # frigate rtsp
8554 # frigate rtsp 8555 # frigate rtsp
8555 # frigate rtsp 2055 # ntopng sink
2055 # ntopng sink 8182 # ntopng frontend
8182 # ntopng frontend 3000 # adguardhome frontend
8183 # adguardhome frontend 8183 # adguardhome frontend
9000 9000
]; ];
firewall.allowedUDPPorts = [ networking.firewall.allowedUDPPorts = [
53 53
8555 # frigate rtsp 8555 # frigate rtsp
2055 # ntopng sink 2055 # ntopng sink
]; ];
};
# Users # Users
users.users.root = { users.users.root = {
@ -100,6 +100,7 @@
# Packages # Packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim
nano nano
wget wget
curl curl
@ -227,12 +228,6 @@
}; };
}; };
# systemd.services.forgejo.preStart =
# ''
# ${lib.getExe cfg.package} admin user create --admin --email "root@localhost" --username crazychaoz --password temp123 || true
# '';
# services.borgbackup.jobs."forgejo" = { # services.borgbackup.jobs."forgejo" = {
# paths = config.services.forgejo.repositoryRoot; # paths = config.services.forgejo.repositoryRoot;
# repo = "/backup/forgejo"; # repo = "/backup/forgejo";
@ -261,6 +256,10 @@
}; };
}; };
# systemd.services.forgejo.preStart =
# ''
# ${lib.getExe cfg.package} admin user create --admin --email "root@localhost" --username crazychaoz --password temp123 || true
# '';
# Virtualisation # Virtualisation
virtualisation = { virtualisation = {
@ -308,19 +307,7 @@
"--privileged" "--privileged"
]; ];
}; };
containers.mosquitto = {
#autoStart = true;
volumes = [
"mosquitto:/mosquitto"
"/run/dbus:/run/dbus:ro"
"/etc/localtime:/etc/localtime:ro"
];
# Note: The image will not be updated on rebuilds, unless the version label changes
image = "eclipse-mosquitto";
extraOptions = [
"--network=host"
];
};
containers.frigate = { containers.frigate = {
#autoStart = true; #autoStart = true;
volumes = [ volumes = [
@ -336,6 +323,19 @@
"--network=host" "--network=host"
]; ];
}; };
containers.mosquitto = {
#autoStart = true;
volumes = [
"mosquitto:/mosquitto"
"/run/dbus:/run/dbus:ro"
"/etc/localtime:/etc/localtime:ro"
];
# Note: The image will not be updated on rebuilds, unless the version label changes
image = "eclipse-mosquitto";
extraOptions = [
"--network=host"
];
};
containers.netflow2ng = { containers.netflow2ng = {
# Note: The image will not be updated on rebuilds, unless the version label changes # Note: The image will not be updated on rebuilds, unless the version label changes
image = "synfinatic/netflow2ng:v0.1.0"; image = "synfinatic/netflow2ng:v0.1.0";
@ -362,7 +362,7 @@
interfaces = [ "tcp://0.0.0.0:5556" ]; interfaces = [ "tcp://0.0.0.0:5556" ];
extraConfig = '' extraConfig = ''
--dns-mode 1 --dns-mode 1
--local-networks "185.27.122.0/24=WAN,192.168.69.0/24=LAN,192.168.42.0/24=Wireguard"''; --local-networks "185.27.122.0/24=WAN,192.168.69.0/24=LAN"'';
}; };
services.influxdb.enable = true; services.influxdb.enable = true;
@ -395,7 +395,6 @@
"nix-command" "nix-command"
"flakes" "flakes"
]; ];
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";