chore: hostname AZLT124-L changed to AZ-LT-NIX
This commit is contained in:
114
hosts/AZ-LT-NIX/services/ad.nix
Normal file
114
hosts/AZ-LT-NIX/services/ad.nix
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
adcli # Helper library and tools for Active Directory client operations
|
||||
oddjob # Odd Job Daemon
|
||||
samba4Full # Standard Windows interoperability suite of programs for Linux and Unix
|
||||
sssd # System Security Services Daemon
|
||||
krb5 # MIT Kerberos 5
|
||||
realmd # DBus service for configuring Kerberos and other
|
||||
];
|
||||
|
||||
#
|
||||
# Security
|
||||
#
|
||||
security = {
|
||||
krb5 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
libdefaults = {
|
||||
udp_preference_limit = 0;
|
||||
default_realm = "AZ-GROUP";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pam = {
|
||||
makeHomeDir.umask = "077";
|
||||
services.login.makeHomeDir = true;
|
||||
services.sshd.makeHomeDir = true;
|
||||
};
|
||||
|
||||
sudo = {
|
||||
extraConfig = ''
|
||||
%domain\ admins ALL=(ALL:ALL) NOPASSWD: ALL
|
||||
Defaults:%domain\ admins env_keep+=TERMINFO_DIRS
|
||||
Defaults:%domain\ admins env_keep+=TERMINFO
|
||||
'';
|
||||
|
||||
# Use extraConfig because of blank space in 'domain admins'.
|
||||
# Alternatively, you can use the GID.
|
||||
# extraRules = [
|
||||
# { groups = [ "domain admins" ];
|
||||
# commands = [ { command = "ALL"; options = [ "NOPASSWD" ]; } ]; }
|
||||
# ];
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# Services
|
||||
#
|
||||
services = {
|
||||
nscd = {
|
||||
enable = true;
|
||||
config = ''
|
||||
server-user nscd
|
||||
enable-cache hosts yes
|
||||
positive-time-to-live hosts 0
|
||||
negative-time-to-live hosts 0
|
||||
shared hosts yes
|
||||
enable-cache passwd no
|
||||
enable-cache group no
|
||||
enable-cache netgroup no
|
||||
enable-cache services no
|
||||
'';
|
||||
};
|
||||
|
||||
sssd = {
|
||||
enable = true;
|
||||
config = ''
|
||||
[sssd]
|
||||
domains = az-group
|
||||
config_file_version = 2
|
||||
services = nss, pam
|
||||
|
||||
[domain/az-group]
|
||||
override_shell = /run/current-system/sw/bin/zsh
|
||||
krb5_store_password_if_offline = True
|
||||
cache_credentials = True
|
||||
krb5_realm = AZ-GROUP
|
||||
realmd_tags = manages-system joined-with-samba
|
||||
id_provider = ad
|
||||
fallback_homedir = /home/%u
|
||||
ad_domain = your_domain_lowercase
|
||||
use_fully_qualified_names = false
|
||||
ldap_id_mapping = false
|
||||
auth_provider = ad
|
||||
access_provider = ad
|
||||
chpass_provider = ad
|
||||
ad_gpo_access_control = permissive
|
||||
enumerate = true
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# Systemd
|
||||
#
|
||||
systemd = {
|
||||
services.realmd = {
|
||||
description = "Realm Discovery Service";
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["network.target"];
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "org.freedesktop.realmd";
|
||||
ExecStart = "${pkgs.realmd}/libexec/realmd";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
43
hosts/AZ-LT-NIX/services/default.nix
Normal file
43
hosts/AZ-LT-NIX/services/default.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
# ./ad.nix
|
||||
./mem0.nix
|
||||
./n8n.nix
|
||||
./netbird.nix
|
||||
./sound.nix
|
||||
./udev.nix
|
||||
];
|
||||
services = {
|
||||
espanso = {
|
||||
enable = true;
|
||||
package = pkgs.espanso-wayland;
|
||||
};
|
||||
hypridle.enable = true;
|
||||
printing.enable = true;
|
||||
gvfs.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
qdrant = {
|
||||
enable = true;
|
||||
settings = {
|
||||
service = {
|
||||
host = "0.0.0.0";
|
||||
};
|
||||
};
|
||||
};
|
||||
upower.enable = true;
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
publish = {
|
||||
addresses = true;
|
||||
workstation = true;
|
||||
userServices = true;
|
||||
};
|
||||
};
|
||||
asusd = {
|
||||
enable = true;
|
||||
};
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
};
|
||||
}
|
||||
23
hosts/AZ-LT-NIX/services/mem0.nix
Normal file
23
hosts/AZ-LT-NIX/services/mem0.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
m3ta.mem0 = {
|
||||
enable = false;
|
||||
port = 8000;
|
||||
host = "127.0.0.1";
|
||||
|
||||
# LLM Configuration
|
||||
llm = {
|
||||
provider = "openai";
|
||||
apiKeyFile = "/var/lib/mem0/openai-api-key-1"; # Use agenix or sops-nix
|
||||
};
|
||||
|
||||
# Vector Storage Configuration
|
||||
vectorStore = {
|
||||
provider = "qdrant"; # or "chroma", "pinecone", etc.
|
||||
config = {
|
||||
host = "localhost";
|
||||
port = 6333;
|
||||
collection_name = "mem0_alice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
20
hosts/AZ-LT-NIX/services/n8n.nix
Normal file
20
hosts/AZ-LT-NIX/services/n8n.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
serviceName = "n8n";
|
||||
portUtils = import ../../../lib/port-utils.nix {inherit lib;};
|
||||
servicePort = portUtils.getPort serviceName "AZLTNIX";
|
||||
in {
|
||||
services.${serviceName} = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
systemd.services.n8n = {
|
||||
environment = {
|
||||
N8N_SECURE_COOKIE = "false";
|
||||
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS = "false";
|
||||
};
|
||||
};
|
||||
}
|
||||
28
hosts/AZ-LT-NIX/services/netbird.nix
Normal file
28
hosts/AZ-LT-NIX/services/netbird.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{pkgs, ...}: {
|
||||
services.netbird.enable = true;
|
||||
|
||||
systemd.services.netbird = {
|
||||
environment = {
|
||||
NB_DISABLE_SSH_CONFIG = "true";
|
||||
};
|
||||
path = [
|
||||
pkgs.shadow
|
||||
pkgs.util-linux
|
||||
];
|
||||
};
|
||||
|
||||
programs.ssh.extraConfig = ''
|
||||
Match exec "${pkgs.netbird}/bin/netbird ssh detect %h %p"
|
||||
PreferredAuthentications password,publickey,keyboard-interactive
|
||||
PasswordAuthentication yes
|
||||
PubkeyAuthentication yes
|
||||
BatchMode no
|
||||
ProxyCommand ${pkgs.netbird}/bin/netbird ssh proxy %h %p
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile /dev/null
|
||||
CheckHostIP no
|
||||
LogLevel ERROR
|
||||
'';
|
||||
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
}
|
||||
11
hosts/AZ-LT-NIX/services/sound.nix
Normal file
11
hosts/AZ-LT-NIX/services/sound.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = false;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
}
|
||||
8
hosts/AZ-LT-NIX/services/udev.nix
Normal file
8
hosts/AZ-LT-NIX/services/udev.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="usb", MODE="0666"
|
||||
'';
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsa-udev-rules
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user