Refactor.
This commit is contained in:
parent
69088478f0
commit
667f337363
14 changed files with 173 additions and 164 deletions
|
@ -1,24 +1,12 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/63d79656-aa5b-466a-b369-be5eac3f51ab";
|
||||
|
@ -37,10 +25,5 @@
|
|||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
}
|
27
hosts/lxc/firefox-syncserver.nix
Normal file
27
hosts/lxc/firefox-syncserver.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, pkgs, secrets, ... }:
|
||||
{
|
||||
# Secrets.
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
defaultSopsFile = "${secrets}/sops.yaml";
|
||||
secrets."firefox_syncserver/sync_master_secret" = {};
|
||||
};
|
||||
|
||||
# Enable Firefox sync service.
|
||||
services.mysql.package = pkgs.mariadb;
|
||||
|
||||
services.firefox-syncserver = {
|
||||
enable = true;
|
||||
secrets = config.sops.secrets."firefox_syncserver/sync_master_secret".path;
|
||||
settings.host = "0.0.0.0";
|
||||
singleNode = {
|
||||
enable = true;
|
||||
hostname = "0.0.0.0";
|
||||
url = "https://fxsync.fern.garden";
|
||||
capacity = 1;
|
||||
};
|
||||
};
|
||||
|
||||
# Open Firefox sync service port.
|
||||
networking.firewall.allowedTCPPorts = [ 5000 ];
|
||||
}
|
7
hosts/lxc/technitium.nix
Normal file
7
hosts/lxc/technitium.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
# Enable Technitium DNS server.
|
||||
services.technitium-dns-server = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
26
hosts/server/weebill.nix
Normal file
26
hosts/server/weebill.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Open ports for DHCP server.
|
||||
networking.firewall.allowedUDPPorts = [ 53 67 ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue