about summary refs log tree commit diff
path: root/nix/hosts/lernaeus
diff options
context:
space:
mode:
Diffstat (limited to 'nix/hosts/lernaeus')
-rw-r--r--nix/hosts/lernaeus/configuration.nix35
-rw-r--r--nix/hosts/lernaeus/hardware-configuration.nix55
2 files changed, 56 insertions, 34 deletions
diff --git a/nix/hosts/lernaeus/configuration.nix b/nix/hosts/lernaeus/configuration.nix
index cfbc35f..26444e7 100644
--- a/nix/hosts/lernaeus/configuration.nix
+++ b/nix/hosts/lernaeus/configuration.nix
@@ -2,18 +2,24 @@
 # 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, lib, pkgs, ... }:
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
 
 let
   emile_keys = [
     "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZi43zHEsoWaQomLGaftPE5k0RqVrZyiTtGqZlpWsew emile@caladan"
     "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzLZ56SEgwZZ0OusTdSDDhpMlxSg1zPNdRLuxKOfrR5 emile@chusuk"
   ];
-in {
-  imports =
-    [ # Include the results of the hardware scan.
-      ./hardware-configuration.nix
-    ];
+in
+{
+  imports = [
+    # Include the results of the hardware scan.
+    ./hardware-configuration.nix
+  ];
 
   boot = {
     loader.systemd-boot.enable = true;
@@ -38,7 +44,10 @@ in {
   fileSystems = {
     "/".options = [ "compress=zstd" ];
     "/home".options = [ "compress=zstd" ];
-    "/nix".options = [ "compress=zstd" "noatime" ];
+    "/nix".options = [
+      "compress=zstd"
+      "noatime"
+    ];
   };
 
   networking = {
@@ -59,12 +68,15 @@ in {
     };
     emile = {
       isNormalUser = true;
-      extraGroups = ["wheel"];
+      extraGroups = [ "wheel" ];
       openssh.authorizedKeys.keys = emile_keys;
     };
   };
 
-  environment.systemPackages = with pkgs; [ vim tailscale ];
+  environment.systemPackages = with pkgs; [
+    vim
+    tailscale
+  ];
 
   programs.mosh.enable = true;
 
@@ -74,8 +86,8 @@ in {
     tailscale.enable = true;
 
     btrfs = {
-      autoScrub.enable = true;  
-      autoScrub.interval = "weekly";  
+      autoScrub.enable = true;
+      autoScrub.interval = "weekly";
     };
 
     prometheus.exporters = {
@@ -101,4 +113,3 @@ in {
     autoUpgrade.enable = true;
   };
 }
-
diff --git a/nix/hosts/lernaeus/hardware-configuration.nix b/nix/hosts/lernaeus/hardware-configuration.nix
index 389185a..2d5d8b1 100644
--- a/nix/hosts/lernaeus/hardware-configuration.nix
+++ b/nix/hosts/lernaeus/hardware-configuration.nix
@@ -1,37 +1,48 @@
 # 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, lib, pkgs, modulesPath, ... }:
-
 {
-  imports =
-    [ (modulesPath + "/installer/scan/not-detected.nix")
-    ];
+  config,
+  lib,
+  pkgs,
+  modulesPath,
+  ...
+}:
 
-  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
+{
+  imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+  boot.initrd.availableKernelModules = [
+    "xhci_pci"
+    "ahci"
+    "nvme"
+    "usbhid"
+    "usb_storage"
+    "sd_mod"
+  ];
   boot.initrd.kernelModules = [ ];
   boot.kernelModules = [ "kvm-amd" ];
   boot.extraModulePackages = [ ];
 
-  fileSystems."/" =
-    { device = "/dev/disk/by-uuid/5156d8cd-a3d3-4897-b330-156cc10f1aa1";
-      fsType = "btrfs";
-      options = [ "subvol=root" ];
-    };
+  fileSystems."/" = {
+    device = "/dev/disk/by-uuid/5156d8cd-a3d3-4897-b330-156cc10f1aa1";
+    fsType = "btrfs";
+    options = [ "subvol=root" ];
+  };
 
   boot.initrd.luks.devices."luksroot1".device = "/dev/disk/by-uuid/6c4e193a-3e6b-45e1-bb1a-aa18fbcab725";
 
-  fileSystems."/home" =
-    { device = "/dev/disk/by-uuid/5156d8cd-a3d3-4897-b330-156cc10f1aa1";
-      fsType = "btrfs";
-      options = [ "subvol=home" ];
-    };
-
-  fileSystems."/nix" =
-    { device = "/dev/disk/by-uuid/5156d8cd-a3d3-4897-b330-156cc10f1aa1";
-      fsType = "btrfs";
-      options = [ "subvol=nix" ];
-    };
+  fileSystems."/home" = {
+    device = "/dev/disk/by-uuid/5156d8cd-a3d3-4897-b330-156cc10f1aa1";
+    fsType = "btrfs";
+    options = [ "subvol=home" ];
+  };
+
+  fileSystems."/nix" = {
+    device = "/dev/disk/by-uuid/5156d8cd-a3d3-4897-b330-156cc10f1aa1";
+    fsType = "btrfs";
+    options = [ "subvol=nix" ];
+  };
 
   swapDevices = [ ];