Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa95098b7e | ||
|
|
0906700ad6 | ||
|
|
b9302e6192 | ||
|
|
5cb262857e | ||
|
|
47e536540f | ||
|
|
282a8f8287 | ||
|
|
a9254c424d | ||
|
|
5961254878 | ||
|
|
9403ddbf08 | ||
|
|
37ff958560 |
Generated
+3
-3
@@ -707,11 +707,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1787964612,
|
||||
"narHash": "sha256-0N9nghg3nwzX6b6qc77EzjR9cu/Z+UR66FlfsCqiURs=",
|
||||
"lastModified": 1788775869,
|
||||
"narHash": "sha256-JRf1lSypbvKj6AzUZHpUA6YC1DirVuitZWOnRwcm+Ww=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e8be7818e19ada32105a8af937a6a473b38167ca",
|
||||
"rev": "58973d74f1893afe13f5902919803a0e99da0ca4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
+52
-7
@@ -46,6 +46,12 @@
|
||||
"bosona"
|
||||
"canopus"
|
||||
];
|
||||
|
||||
dm-pull-deploy = [
|
||||
"rana"
|
||||
"rigel"
|
||||
"vega"
|
||||
];
|
||||
};
|
||||
|
||||
instances = {
|
||||
@@ -182,7 +188,7 @@
|
||||
}
|
||||
)
|
||||
];
|
||||
roles.default.tags = [ "all" ];
|
||||
roles.default.tags = [ "dm-pull-deploy" ];
|
||||
roles.default.settings.action = "switch";
|
||||
};
|
||||
|
||||
@@ -314,13 +320,28 @@
|
||||
};
|
||||
roles.server.machines."alasia".settings = {
|
||||
public_url = "tailvpn.public.newedge.house";
|
||||
base_domain = "tailnet.newedge.house";
|
||||
advertise_routes = [ "10.0.10.0/24" ];
|
||||
dns = {
|
||||
magic_dns = true;
|
||||
base_domain = "tailvpn.newedge.house";
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -493,18 +514,42 @@
|
||||
buna.settings = {
|
||||
exporters.smartctl = { };
|
||||
};
|
||||
mirach.settings = {
|
||||
exporters.smartctl = { };
|
||||
};
|
||||
almach.settings = {
|
||||
exporters.smartctl = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi = {
|
||||
wifi =
|
||||
let
|
||||
networks = {
|
||||
home = { };
|
||||
glom = { };
|
||||
};
|
||||
in
|
||||
{
|
||||
module.name = "wifi";
|
||||
module.input = "clan-community";
|
||||
|
||||
roles.default = {
|
||||
machines."buna" = {
|
||||
settings.networks.home = { };
|
||||
settings.networks.glom = { };
|
||||
};
|
||||
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;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ in
|
||||
inputs.self.overlays.frappixLibsOverlay
|
||||
inputs.self.overlays.frappixPythonOverlay
|
||||
inputs.self.overlays.frappixToolsOverlay
|
||||
inputs.self.overlays.frappixAppsOverlay
|
||||
];
|
||||
|
||||
fonts.packages = [ pkgs.tlwg ];
|
||||
@@ -59,6 +60,7 @@ in
|
||||
pkgs.frappix.hrms
|
||||
pkgs.frappix.crm
|
||||
pkgs.frappix.posprinter
|
||||
pkgs.frappix.default_thai_company
|
||||
];
|
||||
sites = {
|
||||
"${sitename}" = {
|
||||
@@ -69,6 +71,7 @@ in
|
||||
"hrms"
|
||||
"crm"
|
||||
"posprinter"
|
||||
"default_thai_company"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
self.nixosModules.common
|
||||
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
@@ -23,6 +21,9 @@
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
nixpkgs.buildPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
|
||||
@@ -19,12 +19,6 @@
|
||||
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 {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ ];
|
||||
@@ -32,6 +26,13 @@
|
||||
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 {
|
||||
type = with lib.types; listOf str;
|
||||
default = [
|
||||
@@ -41,6 +42,42 @@
|
||||
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.dns = {
|
||||
base_domain = settings.base_domain;
|
||||
base_domain = settings.dns.base_domain;
|
||||
override_local_dns = true;
|
||||
nameservers.global = settings.nameservers;
|
||||
magic_dns = false;
|
||||
nameservers.global = settings.dns.nameservers;
|
||||
magic_dns = settings.dns.magic_dns;
|
||||
extra_records = settings.dns.extra_records;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
boot.supportedFilesystems = {
|
||||
ntfs = true;
|
||||
};
|
||||
}
|
||||
@@ -7,5 +7,6 @@
|
||||
frappixLibsOverlay = inputs.frappix.libsOverlay.x86_64-linux;
|
||||
frappixPythonOverlay = inputs.frappix.pythonOverlay.x86_64-linux;
|
||||
frappixToolsOverlay = inputs.frappix.toolsOverlay.x86_64-linux;
|
||||
frappixAppsOverlay = import ../pkgs/frappix/overlay.nix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
];
|
||||
})
|
||||
@@ -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 { };
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user