Compare commits

..
15 Commits
Author SHA1 Message Date
kurogeek fa95098b7e frappix: bump default_thai_company to 68f0817 (main) 2026-09-17 10:55:54 +00:00
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
kurogeek efa4b39782 libreoffice-fresh -> libreoffice-stable 2026-09-03 12:22:15 +07:00
kurogeek e2341b7c79 inputs/nixpkgs,home-manager,clan-core,frappix, bump version 2026-09-03 12:21:00 +07:00
kurogeek dc1c94796a machines/sirius: reduce write on disk 2026-09-02 11:34:40 +07:00
kurogeek 5b07b98f40 inventory/prometheus: add buna to monitored machines 2026-08-21 12:03:34 +07:00
kurogeek 88ac5cbd83 machines/buna: use wifi 2026-08-19 14:34:34 +07:00
14 changed files with 231 additions and 83 deletions
Generated
+26 -27
View File
@@ -135,11 +135,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781517972, "lastModified": 1788346295,
"narHash": "sha256-G8bIXFqifs/y62GNPwg20Ksf71raYwzmyN99gf1tXak=", "narHash": "sha256-k9Ol++FFhQuPya6ZNQwVhqZZkMvE1ytLtbdrbH5zkrI=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "7fc62d0c25c7a97d7027a9c248e21c97c9b3acc1", "rev": "b15797faeca7494a7fe5fde2691d93affa3d3e37",
"revCount": 14604, "revCount": 15239,
"type": "git", "type": "git",
"url": "https://git.clan.lol/clan/clan-core" "url": "https://git.clan.lol/clan/clan-core"
}, },
@@ -164,11 +164,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778718524, "lastModified": 1788308203,
"narHash": "sha256-pXLoI6Ax0EnUK6r34UM1vibVC7CfTu6j72R2692ZzPs=", "narHash": "sha256-dCOb9YIJv9I2udjqukvjlGiTyOvGnO7zVbot0PxjBGk=",
"rev": "12c552ad547d87254f33f33bddd1a2cdbeac754d", "rev": "644c49bbf121b3e256bc83ce10b5d97813d9181d",
"type": "tarball", "type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/12c552ad547d87254f33f33bddd1a2cdbeac754d.tar.gz" "url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/644c49bbf121b3e256bc83ce10b5d97813d9181d.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@@ -357,11 +357,11 @@
"std": "std" "std": "std"
}, },
"locked": { "locked": {
"lastModified": 1782964989, "lastModified": 1787631179,
"narHash": "sha256-pU2Gye+1f+nvFleBTgXdeQfrQnKaJEuO2LT7PnsJ1p0=", "narHash": "sha256-l+Zt5XNTD0f0ChkzDJURfQlFAgANIMrGYrk51SZEJKU=",
"owner": "kurogeek", "owner": "kurogeek",
"repo": "frappix", "repo": "frappix",
"rev": "ac5e2814fc1aca188080bf6b50504cd329790e56", "rev": "fcb797886ae753b26a6e4415a7f2c19ba6adcf3b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -416,11 +416,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781557312, "lastModified": 1788355065,
"narHash": "sha256-QOIRYSUFSq7L5mY3dZymaVhcnne3tPgoR9riB0WocjA=", "narHash": "sha256-gAz5oTI7ur34CfuakQduiQd/2ZhO62Bn2XXg08nZYYQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c03e4752899e55705dfa63979abd885c582a5c48", "rev": "d9d750e4fc11c10cab2da677bdd31e427f3a3a71",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -547,11 +547,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781242433, "lastModified": 1786845137,
"narHash": "sha256-bchLZZ3sRn740zyvD2icZSnNoTaanN0nw7l6fjVXO+E=", "narHash": "sha256-oQFip+v0luP8NIxJzmiW4Wu8bILsbFWom5l0zonl8hQ=",
"owner": "nix-darwin", "owner": "nix-darwin",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "aabb2037edfc0f210723b72cd5f528aab5dd3f0b", "rev": "4cff07de74b50e64bdd68cd4e722ab5b6b35ee48",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -707,11 +707,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1781359544, "lastModified": 1788775869,
"narHash": "sha256-iUuzKQcyXvopYDDzFpMK5eQKP3WIJExYny2kJtbgUcE=", "narHash": "sha256-JRf1lSypbvKj6AzUZHpUA6YC1DirVuitZWOnRwcm+Ww=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9f11f828c213641c2369a9f1fa31fe31557e3156", "rev": "58973d74f1893afe13f5902919803a0e99da0ca4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -752,16 +752,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1708640854, "lastModified": 1787579760,
"narHash": "sha256-EpcAmvIS4ErqhXtVEfd2GPpU/E/s8CCRSfYzk6FZ/fY=", "narHash": "sha256-WGhIEINOICx7bhV3WrSz0QTzv8uzaaa9AXvD1clIWpc=",
"owner": "paisano-nix", "owner": "paisano-nix",
"repo": "core", "repo": "core",
"rev": "adcf742bc9463c08764ca9e6955bd5e7dcf3a3fe", "rev": "88739c84d308876714322eb9844ede6597c1a580",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "paisano-nix", "owner": "paisano-nix",
"ref": "0.2.0",
"repo": "core", "repo": "core",
"type": "github" "type": "github"
} }
@@ -830,11 +829,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780547341, "lastModified": 1788337237,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-gkSH8VUtCo6hnysNmb9DbTuDepH2t5pv+QWjP75xKAk=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "fbf759290e0cb0a98dfc813a4eb7d53ad1dacb57",
"type": "github" "type": "github"
}, },
"original": { "original": {
+67 -18
View File
@@ -36,6 +36,7 @@
"cursa" "cursa"
"rigel" "rigel"
"vega" "vega"
"buna"
]; ];
dm-bootstrapper = [ dm-bootstrapper = [
@@ -45,6 +46,12 @@
"bosona" "bosona"
"canopus" "canopus"
]; ];
dm-pull-deploy = [
"rana"
"rigel"
"vega"
];
}; };
instances = { instances = {
@@ -181,7 +188,7 @@
} }
) )
]; ];
roles.default.tags = [ "all" ]; roles.default.tags = [ "dm-pull-deploy" ];
roles.default.settings.action = "switch"; roles.default.settings.action = "switch";
}; };
@@ -313,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" ];
nameservers = [ dns = {
"10.0.10.82" magic_dns = true;
"1.1.1.1" base_domain = "tailvpn.newedge.house";
"8.8.8.8" nameservers = [
]; "10.0.10.82"
"1.1.1.1"
"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";
}
];
};
}; };
}; };
@@ -489,21 +511,48 @@
exporters.smartctl = { }; exporters.smartctl = { };
exporters.zfs = { }; exporters.zfs = { };
}; };
}; buna.settings = {
}; exporters.smartctl = { };
};
wifi = { mirach.settings = {
module.name = "wifi"; exporters.smartctl = { };
module.input = "clan-community"; };
almach.settings = {
roles.default = { exporters.smartctl = { };
machines."buna" = {
settings.networks.home = { };
settings.networks.glom = { };
}; };
}; };
}; };
wifi =
let
networks = {
home = { };
glom = { };
};
in
{
module.name = "wifi";
module.input = "clan-community";
roles.default = {
machines."buna".settings = { inherit networks; };
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;
}
)
];
};
};
}; };
}; };
}; };
+1 -1
View File
@@ -19,7 +19,7 @@
"installedAt": 1765277591 "installedAt": 1765277591
}, },
"buna": { "buna": {
"installedAt": 1787110120 "installedAt": 1787123510
}, },
"rana": { "rana": {
"installedAt": 1773134236 "installedAt": 1773134236
+1 -1
View File
@@ -1,7 +1,7 @@
{ ... }: { ... }:
let let
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}"; hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
os = "/dev/disk/by-id/mmc-TLimmc_0xda6d8fbf"; os = "/dev/disk/by-id/usb-Generic_MassStorageClass_000000001539-0:0";
in in
{ {
+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"
]; ];
}; };
}; };
+22 -8
View File
@@ -5,8 +5,6 @@
}: }:
{ {
imports = [ imports = [
self.nixosModules.common
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@@ -23,15 +21,12 @@
nixpkgs.hostPlatform = { nixpkgs.hostPlatform = {
system = "aarch64-linux"; system = "aarch64-linux";
}; };
nixpkgs.buildPlatform = {
system = "x86_64-linux";
};
system.stateVersion = "25.11"; system.stateVersion = "25.11";
services.journald.extraConfig = ''
Storage=volatile
RuntimeMaxUse=30M
RuntimeMaxFileSize=10M
'';
services.udisks2.enable = false; services.udisks2.enable = false;
nix.settings.log-lines = 25; nix.settings.log-lines = 25;
@@ -54,6 +49,25 @@
"sd_mod" "sd_mod"
]; ];
boot = {
consoleLogLevel = 0;
kernel.sysctl = {
"fs.suid_dumpable" = 0;
"kernel.core_pattern" = "/dev/null";
};
tmp = {
useTmpfs = true;
};
};
services.journald.extraConfig = ''
Storage=none
'';
systemd = {
coredump.enable = false;
};
fileSystems."/mnt/hdd" = { fileSystems."/mnt/hdd" = {
device = "zdata/nas"; device = "zdata/nas";
fsType = "zfs"; fsType = "zfs";
+55 -17
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,14 +26,57 @@
example = [ "192.168.1.0/24" ]; example = [ "192.168.1.0/24" ];
}; };
nameservers = lib.mkOption { dns = {
type = with lib.types; listOf str; base_domain = lib.mkOption {
default = [ type = with lib.types; str;
"1.1.1.1" default = "";
"8.8.8.8" 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)";
]; };
description = "List of nameservers to pass to Tailscale clients";
example = [ "10.0.10.1" ]; nameservers = lib.mkOption {
type = with lib.types; listOf str;
default = [
"1.1.1.1"
"8.8.8.8"
];
description = "List of nameservers to pass to Tailscale clients";
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;
}; };
}; };
@@ -11,7 +11,7 @@
homeDirectory = lib.mkForce "/home/${username}"; homeDirectory = lib.mkForce "/home/${username}";
stateVersion = osConfig.system.stateVersion; stateVersion = osConfig.system.stateVersion;
packages = with pkgs; [ packages = with pkgs; [
libreoffice-fresh libreoffice-stable
element-desktop element-desktop
signal-desktop signal-desktop
brave brave
+5
View File
@@ -0,0 +1,5 @@
{
boot.supportedFilesystems = {
ntfs = true;
};
}
-5
View File
@@ -14,11 +14,6 @@
... ...
}: }:
{ {
nixpkgs.overlays = [
(final: prev: {
libreoffice = prev.libreoffice-fresh;
})
];
services.stirling-pdf = { services.stirling-pdf = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
+5 -5
View File
@@ -10,10 +10,10 @@ in
perSystem = perSystem =
{ ... }: { ... }:
{ {
clan.nixosTests.service-stirling-pdf = { # clan.nixosTests.service-stirling-pdf = {
imports = [ ./tests/vm/default.nix ]; # imports = [ ./tests/vm/default.nix ];
#
clan.modules."@clan/stirling-pdf" = module; # clan.modules."@clan/stirling-pdf" = module;
}; # };
}; };
} }
+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 = "68f08171252099920d52f5c47800d65ddf4689b3";
sha256 = "sha256-9UomP8G5K+nkAMCfn+gXbBNivLlDo0c/36FYZgHm2Cw=";
};
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 { };
}
);
}