formated most nix funciton inputs

This commit is contained in:
William 2024-10-01 11:13:57 -03:00
parent 702d0f195b
commit 89c8784d49
48 changed files with 88 additions and 340 deletions

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, lib, ... }:
{
services = {

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, ... }:
{
virtualisation.oci-containers.containers."cinny" = {

View file

@ -12,7 +12,6 @@
./nginx.nix
./paperless.nix
./searx.nix
./security.nix
./services.nix
./pairdrop.nix
./users.nix

View file

@ -1,9 +1,5 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
pkgs,
lib,
modulesPath,
...
@ -12,16 +8,20 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot = {
initrd = {
availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/31289617-1d84-4432-a833-680b52e88525";
@ -35,13 +35,9 @@
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, ... }:
{
services = {

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, ... }:
{
virtualisation.oci-containers.containers."librespeed" = {

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ pkgs, ... }:
{
services.minecraft-servers = {

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, pkgs, ... }:
{
services = {

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, ... }:
{
services.nginx = {
@ -14,11 +8,30 @@
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
root = inputs.homepage;
};
security.acme = {
acceptTerms = true;
defaults = {
email = "baduhai@proton.me";
dnsResolver = "1.1.1.1:53";
dnsProvider = "cloudflare";
credentialsFile = config.age.secrets.cloudflare.path;
};
certs."baduhai.dev" = {
extraDomainNames = [ "*.baduhai.dev" ];
};
};
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
age.secrets.cloudflare = {
file = ../../../secrets/cloudflare.age;
owner = "nginx";
group = "hosted";
};
}

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, ... }:
{
virtualisation.oci-containers.containers."pairdrop" = {

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, lib, ... }:
{
services = {

View file

@ -1,5 +1,4 @@
{
inputs,
config,
pkgs,
lib,

View file

@ -1,33 +0,0 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{
security.acme = {
acceptTerms = true;
defaults = {
email = "baduhai@proton.me";
dnsResolver = "1.1.1.1:53";
dnsProvider = "cloudflare";
credentialsFile = config.age.secrets.cloudflare.path;
};
certs."baduhai.dev" = {
extraDomainNames = [ "*.baduhai.dev" ];
};
};
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
age.secrets.cloudflare = {
file = ../../../secrets/cloudflare.age;
owner = "nginx";
group = "hosted";
};
}

View file

@ -1,14 +1,9 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ ... }:
{
services.postgresql.enable = true;
# TODO: remove when bug fux
# Workaround for upstream bug in NetworkManager-wait-online.service
systemd.services.NetworkManager-wait-online.enable = false;
}

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ ... }:
{
users = {

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ lib, ... }:
let
mkStringOption =

View file

@ -1,10 +1,4 @@
{
inputs,
config,
pkgs,
lib,
...
}:
{ config, ... }:
{
services = {