Files
nix-config/systems/x86_64-linux/jallen-nas/default.nix
mjallen18 9ebb187a85 cleanup
2025-08-26 17:54:01 -05:00

189 lines
4.4 KiB
Nix
Executable File

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
pkgs,
namespace,
...
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./filesystems.nix
./boot.nix
./apps.nix
./ups.nix
./users.nix
./samba.nix
./services.nix
./sops.nix
];
services.kmscon.enable = true;
powerManagement.cpuFreqGovernor = "powersave";
${namespace} = {
# ###################################################
# # Boot # #
# ###################################################
bootloader.lanzaboote.enable = true;
# ###################################################
# # Desktop # #
# ###################################################
desktop.cosmic.enable = false;
# ###################################################
# # Development # #
# ###################################################
development = {
enable = true;
includeLanguages = [
"python"
"c"
];
includeContainers = true;
};
# ###################################################
# # Hardware # #
# ###################################################
hardware.nvidia = {
enable = true;
enableBeta = true;
enableOpen = true;
nvidiaSettings = true;
enableNvidiaDocker = true;
};
# ###################################################
# # Impermanence # #
# ###################################################
impermanence.enable = true;
# ###################################################
# # Monitoring # #
# ###################################################
monitoring.enable = true;
# ###################################################
# # Network # #
# ###################################################
network = {
ipv4 = {
address = "10.0.1.3/24";
method = "manual";
gateway = "10.0.1.1";
interface = "wlp6s0";
};
hostId = "4b501480";
nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "wlp6s0";
enableIPv6 = true;
};
firewall = {
enable = true;
allowPing = true;
trustedInterfaces = [ "tailscale0" ];
allowedTCPPorts = [
8008 # restic
9000 # authentik
2342 # grafana
51820 # wireguard
1025
1143
10200
10300
8127
9943 # onlyoffice
4000 # netbootxyz
4080 # netbootxyz
3000 # gitea
2222 # gitea ssh
3300
9898
6754 # lubelogger
2283 # immich
4444 # code-server
9012
8192
];
allowedUDPPorts = config.${namespace}.network.firewall.allowedTCPPorts;
};
};
# ###################################################
# # User # #
# ###################################################
user = {
name = "admin";
linger = true;
};
# ###################################################
# # Services # #
# ###################################################
services = {
grafana.enable = true;
};
};
security.tpm2 = {
enable = true;
};
# Configure environment
environment = {
systemPackages = with pkgs; [
attic-client
bcachefs-tools
cryptsetup
clevis
deconz
duperemove
efibootmgr
ffmpeg
ipset
llama-cpp
networkmanagerapplet
nut
packagekit
pass
protonmail-bridge
protonvpn-cli
python3Packages.llama-cpp-python
qrencode
rcon
sbctl
tigervnc
tpm2-tools
tpm2-tss
];
};
# Configure programs
programs = {
virt-manager.enable = true;
coolercontrol = {
enable = true;
nvidiaSupport = true;
};
};
}