Compare commits

..
Author SHA1 Message Date
kurogeek 0906700ad6 deneb: add default_thai_company frappe app to poyerp
Package git.b4l.co.th/newedge/default_thai_company as a frappix app
    (pkgs/frappix/default-thai-company.nix) and expose it through a new
    frappixAppsOverlay that extends the pkgs.frappix scope. Install it on
    the poyerp.newedge.house site on deneb.
2026-09-15 16:18:30 +07:00
kurogeek b9302e6192 clanService/prometheus: add mirach and almach 2026-09-11 10:53:00 +07:00
kurogeek 5cb262857e inventory/wifi: retry autoconnect and auth indefinitely
Set connection.autoconnect-retries=0 and connection.auth-retries=0 on the
NetworkManager profiles generated by the clan wifi module for buna, so a
flaky AP or slow auth never leaves the connection permanently blocked.
2026-09-09 04:15:18 +00:00
kurogeek 47e536540f flake: bump nixpkgs to fix broken prettier build
prettier 3.9.6 in nixpkgs e8be781 failed to build (stale pnpm lockfile in
binding-wasm32-wasi), breaking nix fmt. Fixed upstream in 58973d7.
2026-09-08 08:35:21 +00:00
kurogeek 282a8f8287 clanService/personal-computer: supportedFilesystems ntfs 2026-09-04 14:06:30 +07:00
kurogeek a9254c424d machines/sirius: buildPlatform.system = x86_64-linux 2026-09-04 13:43:04 +07:00
kurogeek 5961254878 machines/sirius: rm common module 2026-09-04 13:42:10 +07:00
kurogeek 9403ddbf08 clanService/headscale: adjust magic dns settings 2026-09-03 17:17:36 +07:00
kurogeek 37ff958560 inventory/auto-pull-update: limited to selected machines until a build machine is present 2026-09-03 13:58:29 +07:00
9 changed files with 177 additions and 40 deletions
Generated
+3 -3
View File
@@ -707,11 +707,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1787964612, "lastModified": 1788775869,
"narHash": "sha256-0N9nghg3nwzX6b6qc77EzjR9cu/Z+UR66FlfsCqiURs=", "narHash": "sha256-JRf1lSypbvKj6AzUZHpUA6YC1DirVuitZWOnRwcm+Ww=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e8be7818e19ada32105a8af937a6a473b38167ca", "rev": "58973d74f1893afe13f5902919803a0e99da0ca4",
"type": "github" "type": "github"
}, },
"original": { "original": {
+52 -7
View File
@@ -46,6 +46,12 @@
"bosona" "bosona"
"canopus" "canopus"
]; ];
dm-pull-deploy = [
"rana"
"rigel"
"vega"
];
}; };
instances = { instances = {
@@ -182,7 +188,7 @@
} }
) )
]; ];
roles.default.tags = [ "all" ]; roles.default.tags = [ "dm-pull-deploy" ];
roles.default.settings.action = "switch"; roles.default.settings.action = "switch";
}; };
@@ -314,13 +320,28 @@
}; };
roles.server.machines."alasia".settings = { roles.server.machines."alasia".settings = {
public_url = "tailvpn.public.newedge.house"; public_url = "tailvpn.public.newedge.house";
base_domain = "tailnet.newedge.house";
advertise_routes = [ "10.0.10.0/24" ]; advertise_routes = [ "10.0.10.0/24" ];
dns = {
magic_dns = true;
base_domain = "tailvpn.newedge.house";
nameservers = [ nameservers = [
"10.0.10.82" "10.0.10.82"
"1.1.1.1" "1.1.1.1"
"8.8.8.8" "8.8.8.8"
]; ];
extra_records = [
{
name = "poyerp.newedge.house";
type = "A";
value = "10.0.10.1";
}
{
name = "glomerp.newedge.house";
type = "A";
value = "10.0.10.1";
}
];
};
}; };
}; };
@@ -493,18 +514,42 @@
buna.settings = { buna.settings = {
exporters.smartctl = { }; exporters.smartctl = { };
}; };
mirach.settings = {
exporters.smartctl = { };
};
almach.settings = {
exporters.smartctl = { };
};
}; };
}; };
wifi = { wifi =
let
networks = {
home = { };
glom = { };
};
in
{
module.name = "wifi"; module.name = "wifi";
module.input = "clan-community"; module.input = "clan-community";
roles.default = { roles.default = {
machines."buna" = { machines."buna".settings = { inherit networks; };
settings.networks.home = { };
settings.networks.glom = { }; extraModules = [
}; (
{ lib, ... }:
{
# profile names match the network attr names above;
# 0 = retry forever for both (defaults: 4 autoconnect attempts, 3 auth attempts)
networking.networkmanager.ensureProfiles.profiles = lib.mapAttrs (_: _: {
connection.autoconnect-retries = 0;
connection.auth-retries = 0;
}) networks;
}
)
];
}; };
}; };
+3
View File
@@ -25,6 +25,7 @@ in
inputs.self.overlays.frappixLibsOverlay inputs.self.overlays.frappixLibsOverlay
inputs.self.overlays.frappixPythonOverlay inputs.self.overlays.frappixPythonOverlay
inputs.self.overlays.frappixToolsOverlay inputs.self.overlays.frappixToolsOverlay
inputs.self.overlays.frappixAppsOverlay
]; ];
fonts.packages = [ pkgs.tlwg ]; fonts.packages = [ pkgs.tlwg ];
@@ -59,6 +60,7 @@ in
pkgs.frappix.hrms pkgs.frappix.hrms
pkgs.frappix.crm pkgs.frappix.crm
pkgs.frappix.posprinter pkgs.frappix.posprinter
pkgs.frappix.default_thai_company
]; ];
sites = { sites = {
"${sitename}" = { "${sitename}" = {
@@ -69,6 +71,7 @@ in
"hrms" "hrms"
"crm" "crm"
"posprinter" "posprinter"
"default_thai_company"
]; ];
}; };
}; };
+3 -2
View File
@@ -5,8 +5,6 @@
}: }:
{ {
imports = [ imports = [
self.nixosModules.common
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@@ -23,6 +21,9 @@
nixpkgs.hostPlatform = { nixpkgs.hostPlatform = {
system = "aarch64-linux"; system = "aarch64-linux";
}; };
nixpkgs.buildPlatform = {
system = "x86_64-linux";
};
system.stateVersion = "25.11"; system.stateVersion = "25.11";
+47 -9
View File
@@ -19,12 +19,6 @@
description = "Public URL for accessing the instance"; description = "Public URL for accessing the instance";
}; };
base_domain = lib.mkOption {
type = with lib.types; str;
default = "";
description = "Defines the base domain to create the hostnames for MagicDNS in Headscale. `base_domain` must be a FQDN, without the trailing dot. The FQDN of the hosts will be `hostname.base_domain (e.g. myhost.tailnet.example.com)";
};
advertise_routes = lib.mkOption { advertise_routes = lib.mkOption {
type = with lib.types; listOf str; type = with lib.types; listOf str;
default = [ ]; default = [ ];
@@ -32,6 +26,13 @@
example = [ "192.168.1.0/24" ]; example = [ "192.168.1.0/24" ];
}; };
dns = {
base_domain = lib.mkOption {
type = with lib.types; str;
default = "";
description = "Defines the base domain to create the hostnames for MagicDNS in Headscale. `base_domain` must be a FQDN, without the trailing dot. The FQDN of the hosts will be `hostname.base_domain (e.g. myhost.tailnet.example.com)";
};
nameservers = lib.mkOption { nameservers = lib.mkOption {
type = with lib.types; listOf str; type = with lib.types; listOf str;
default = [ default = [
@@ -41,6 +42,42 @@
description = "List of nameservers to pass to Tailscale clients"; description = "List of nameservers to pass to Tailscale clients";
example = [ "10.0.10.1" ]; example = [ "10.0.10.1" ];
}; };
magic_dns = lib.mkOption {
type = with lib.types; bool;
default = true;
description = "Whether to enable MagicDNS";
};
extra_records = lib.mkOption {
type =
with lib.types;
nullOr (
listOf (submodule {
options = {
name = lib.mkOption {
type = lib.types.str;
description = "DNS record name.";
example = "grafana.tailnet.example.com";
};
type = lib.mkOption {
type = lib.types.enum [
"A"
"AAAA"
];
description = "DNS record type.";
example = "A";
};
value = lib.mkOption {
type = lib.types.str;
description = "DNS record value (IP address).";
example = "100.64.0.3";
};
};
})
);
};
};
}; };
}; };
@@ -170,10 +207,11 @@
settings.server_url = "https://${settings.public_url}"; settings.server_url = "https://${settings.public_url}";
settings.dns = { settings.dns = {
base_domain = settings.base_domain; base_domain = settings.dns.base_domain;
override_local_dns = true; override_local_dns = true;
nameservers.global = settings.nameservers; nameservers.global = settings.dns.nameservers;
magic_dns = false; magic_dns = settings.dns.magic_dns;
extra_records = settings.dns.extra_records;
}; };
}; };
+5
View File
@@ -0,0 +1,5 @@
{
boot.supportedFilesystems = {
ntfs = true;
};
}
+1
View File
@@ -7,5 +7,6 @@
frappixLibsOverlay = inputs.frappix.libsOverlay.x86_64-linux; frappixLibsOverlay = inputs.frappix.libsOverlay.x86_64-linux;
frappixPythonOverlay = inputs.frappix.pythonOverlay.x86_64-linux; frappixPythonOverlay = inputs.frappix.pythonOverlay.x86_64-linux;
frappixToolsOverlay = inputs.frappix.toolsOverlay.x86_64-linux; frappixToolsOverlay = inputs.frappix.toolsOverlay.x86_64-linux;
frappixAppsOverlay = import ../pkgs/frappix/overlay.nix;
}; };
} }
+35
View File
@@ -0,0 +1,35 @@
{
buildPythonPackage,
pythonRelaxDepsHook,
flit-core,
mkAssets,
fetchFromGitea,
}:
let
version = "0.0.1";
src = fetchFromGitea {
domain = "git.b4l.co.th";
owner = "newedge";
repo = "default_thai_company";
rev = "caad6e77da35c9359b0dbd75ff0f39bb01891caf";
sha256 = "sha256-LH7E1EkecNPrhfQWSlWzPHHuJLM6SReCAifcFPDr61o=";
};
in
buildPythonPackage (finalAttrs: {
# pname doubles as the frappe app name (services.frappe reads app.pname)
pname = "default_thai_company";
inherit version;
pyproject = true;
src = mkAssets {
inherit (finalAttrs) pname version;
inherit src;
yarnHash = "sha256-oZgyP0hTU9bxszOVg3Bmiu6yos2d2Inc1Do8To4z8GQ=";
};
nativeBuildInputs = [
pythonRelaxDepsHook
flit-core
];
})
+9
View File
@@ -0,0 +1,9 @@
# Extends the frappix app scope with in-house frappe apps.
# Must be applied after frappixFrappeOverlay (needs prev.frappix).
final: prev: {
frappix = prev.frappix.overrideScope (
ffinal: _fprev: {
default_thai_company = ffinal.callPackage ./default-thai-company.nix { };
}
);
}