summaryrefslogtreecommitdiff
path: root/os/cez
diff options
context:
space:
mode:
Diffstat (limited to 'os/cez')
-rw-r--r--os/cez/configuration.nix3
-rw-r--r--os/cez/hardware-configuration.nix22
-rw-r--r--os/cez/modules/specialisation.nix3
-rw-r--r--os/cez/modules/tlp.nix3
-rw-r--r--os/cez/modules/wireguard.nix30
-rw-r--r--os/cez/modules/www.nix46
6 files changed, 38 insertions, 69 deletions
diff --git a/os/cez/configuration.nix b/os/cez/configuration.nix
index af2d144..a069f21 100644
--- a/os/cez/configuration.nix
+++ b/os/cez/configuration.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
../pc/configuration.nix
./hardware-configuration.nix
diff --git a/os/cez/hardware-configuration.nix b/os/cez/hardware-configuration.nix
index f1d5f32..3877852 100644
--- a/os/cez/hardware-configuration.nix
+++ b/os/cez/hardware-configuration.nix
@@ -1,4 +1,11 @@
-{ modulesPath, nixos-hardware, config, pkgs, lib, ... }:
+{
+ modulesPath,
+ nixos-hardware,
+ config,
+ pkgs,
+ lib,
+ ...
+}:
{
imports = [
@@ -13,10 +20,12 @@
};
services.xserver.videoDrivers = [ "modesetting" ];
- swapDevices = [{
- device = "/swapfile";
- size = 14 * 1024; # 14GB
- }];
+ swapDevices = [
+ {
+ device = "/swapfile";
+ size = 14 * 1024; # 14GB
+ }
+ ];
boot = {
kernelPackages = lib.mkForce pkgs.linuxPackages;
@@ -24,8 +33,7 @@
blacklistedKernelModules = [ "k10temp" ];
extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
- initrd.luks.devices."crypt".device =
- "/dev/disk/by-uuid/84acd784-caad-41a1-a2e4-39468d01fefd";
+ initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/84acd784-caad-41a1-a2e4-39468d01fefd";
};
fileSystems = {
diff --git a/os/cez/modules/specialisation.nix b/os/cez/modules/specialisation.nix
index abc08e8..e401e1b 100644
--- a/os/cez/modules/specialisation.nix
+++ b/os/cez/modules/specialisation.nix
@@ -1,4 +1,5 @@
-{ lib, ... }: {
+{ lib, ... }:
+{
specialisation.nvidia.configuration = {
boot = {
kernelParams = [ "transparent_hugepage=always" ];
diff --git a/os/cez/modules/tlp.nix b/os/cez/modules/tlp.nix
index 1ccd539..887dcec 100644
--- a/os/cez/modules/tlp.nix
+++ b/os/cez/modules/tlp.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
services.tlp = {
enable = true;
diff --git a/os/cez/modules/wireguard.nix b/os/cez/modules/wireguard.nix
index c52087a..47b857a 100644
--- a/os/cez/modules/wireguard.nix
+++ b/os/cez/modules/wireguard.nix
@@ -1,4 +1,5 @@
-{ config, pkgs, ... }: let
+{ config, pkgs, ... }:
+let
domain = config.global.userdata.domain;
wgIface = "kay";
@@ -21,8 +22,9 @@
fi
'';
};
-in {
- sops.secrets."misc/wireguard" = {};
+in
+{
+ sops.secrets."misc/wireguard" = { };
networking.wg-quick.interfaces.${wgIface} = {
autostart = false;
@@ -31,16 +33,18 @@ in {
mtu = 1412;
privateKeyFile = config.sops.secrets."misc/wireguard".path;
- peers = [{
- publicKey = "wJMyQDXmZO4MjYRk6NK4+J6ZKWLTTZygAH+OwbPjOiw=";
- allowedIPs = [
- "10.0.1.0/24"
- "104.16.0.0/12"
- "172.64.0.0/13"
- ];
- endpoint = "${domain}:51820";
- persistentKeepalive = 25;
- }];
+ peers = [
+ {
+ publicKey = "wJMyQDXmZO4MjYRk6NK4+J6ZKWLTTZygAH+OwbPjOiw=";
+ allowedIPs = [
+ "10.0.1.0/24"
+ "104.16.0.0/12"
+ "172.64.0.0/13"
+ ];
+ endpoint = "${domain}:51820";
+ persistentKeepalive = 25;
+ }
+ ];
};
environment.systemPackages = [ helper ];
diff --git a/os/cez/modules/www.nix b/os/cez/modules/www.nix
deleted file mode 100644
index 9ec20da..0000000
--- a/os/cez/modules/www.nix
+++ /dev/null
@@ -1,46 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-let
- domain = config.global.userdata.domain;
-in
-{
- services.nginx = {
- enable = true;
-
- recommendedTlsSettings = true;
- recommendedOptimisation = true;
- recommendedGzipSettings = true;
- recommendedProxySettings = true;
- recommendedBrotliSettings = true;
-
- virtualHosts.${domain} = {
- forceSSL = true;
- enableACME = true;
- useACMEHost = domain;
- locations."= /" = {
- extraConfig = "add_header Content-Type text/html;";
- return = ''200
- '<!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Nix Cache</title>
- </head>
- <body>
- <center>
- <h1 style="font-size: 8em">
- ❄️ Nix Cache
- </h1>
- <p style="font-weight: bold">
- Public Key: nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k=
- </p>
- </center>
- </body>
- </html>'
- '';
- };
- };
-
- };
- };
-}