Skip to content

Commit

Permalink
overhaul: switch to ext4 lvm
Browse files Browse the repository at this point in the history
remove/disable unnecassary stuff to reduce boot time

disable plymouth
  • Loading branch information
JohnRTitor committed Sep 11, 2024
1 parent ed51dda commit 8e86994
Show file tree
Hide file tree
Showing 33 changed files with 224 additions and 461 deletions.
16 changes: 9 additions & 7 deletions default-host/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,31 @@
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usbhid"];
boot.initrd.kernelModules = [];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];

fileSystems."/" = {
device = "/dev/disk/by-uuid/7594aea3-de1f-466c-8420-3c7e4997fb34";
fsType = "bcachefs";
device = "/dev/lvm-pool/root";
fsType = "ext4";
};

fileSystems."/boot" = {
device = "/dev/disk/by-uuid/CF37-079C";
device = "/dev/disk/by-uuid/E804-6DF4";
fsType = "vfat";
options = ["fmask=0137" "dmask=0027"];
options = ["fmask=0022" "dmask=0022"];
};

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.enp11s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
Expand Down
2 changes: 2 additions & 0 deletions dev-environment/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@
]
++ lib.optionals servicesSettings.adb [./adb-toolchain.nix]
++ lib.optionals servicesSettings.nginx [./nginx.nix];

programs.java.enable = true;
}
25 changes: 19 additions & 6 deletions dev-environment/nginx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,35 @@
];

services.nginx.enable = true;
services.nginx.virtualHosts."johnrtitor.org" = {
services.nginx.recommendedTlsSettings = true;
services.nginx.recommendedOptimisation = true;
services.nginx.recommendedProxySettings = true;
services.nginx.recommendedZstdSettings = true;

services.nginx.virtualHosts."localhost" = {
# addSSL = true;
# enableACME = true; # for automatic certificate generation
root = "/var/www/johnrtitor.org";
root = "/var/www/localhost";
};

/*
security.acme = {
acceptTerms = true;
defaults.email = userSettings.email;
};
# security.acme = {
# acceptTerms = true;
# defaults.email = userSettings.email;
# };
*/

services.mysql = {
enable = true;
package = pkgs.mariadb;
settings.mysqld.bind-address = "localhost";
};

systemd.tmpfiles.rules = [
"d /var/www/localhost"
"f /var/www/localhost/index.php - - - - <?php phpinfo();>"
];

# hacky way to create our directory structure and index page... don't actually use this
# systemd.tmpfiles.rules = [
# "d /var/www/example.org"
Expand Down
Loading

0 comments on commit 8e86994

Please sign in to comment.