hopefully fixed hades config?

This commit is contained in:
serenity-F 2024-11-19 20:02:44 +10:00
parent 5b8e02a0dc
commit 24c691cfae
No known key found for this signature in database
4 changed files with 59 additions and 119 deletions

View file

@ -15,7 +15,19 @@
## Crikey !
time.timeZone = "Australia/Brisbane";
i18n.defaultLocale = "en_AU.UTF-8";
i18n = {
defaultLocale = "en_AU.UTF-8";
extraLocaleSettings = {
LC_NAME = "en_AU.UTF-8";
LC_TIME = "en_AU.UTF-8";
LC_PAPER = "en_AU.UTF-8";
LC_ADDRESS = "en_AU.UTF-8";
LC_MONETARY = "en_AU.UTF-8";
LC_TELEPHONE = "en_AU.UTF-8";
LC_MEASUREMENT = "en_AU.UTF-8";
LC_IDENTIFICATION = "en_AU.UTF-8";
};
};
## Genuinely dunno what these do hey, like isnt sudo
## already restricted to @wheel only?

View file

@ -5,8 +5,8 @@
imports = [
## Selected host modules for import
./hardware.nix # hardware configuration
./network.nix # network configuration
./extra.nix # configuration.nix substitute
#./zfs.nix # zfs configuration
## Selected core modules for import

View file

@ -1,47 +1,29 @@
{ lib, config, modulesPath, pkgs, ... }:
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
## Enable swap on luks
boot = {
initrd = {
systemd.enable = true;
secrets = { "/boot/crypto_keyfile.bin" = null; };
luks = {
devices = {
"luks-b964f685-be70-4f87-9bd2-00cb7ba0e756" = {
device = "/dev/disk/by-uuid/b964f685-be70-4f87-9bd2-00cb7ba0e756";
keyFile = "/boot/crypto_keyfile.bin";
};
"luks-6779ede9-16e6-42f4-a13e-6da0627f8d45" = {
device = "/dev/disk/by-uuid/6779ede9-16e6-42f4-a13e-6da0627f8d45";
keyFile = "/boot/crypto_keyfile.bin";
};
};
};
};
imports =
[ # Include the results of the hardware scan.
./hardware.nix
];
loader = {
efi = { canTouchEfiVariables = true; };
## For some reason GPT/UEFI didn't work, so neither does systemd-boot
## stuck using MBR/DOS and GRUB instead
grub = {
enable = true;
device = "/dev/nvme0n1";
useOSProber = true;
enableCryptodisk = true;
};
};
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/nvme0n1";
boot.loader.grub.useOSProber = true;
# Setup keyfile
boot.initrd.secrets = {
"/boot/crypto_keyfile.bin" = null;
};
## 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.enp0s31f6.useDHCP = lib.mkDefault true;
#networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
boot.loader.grub.enableCryptodisk = true;
boot.initrd.luks.devices."luks-34a5d7fd-7f3a-4778-8d3a-c7bdec52e96c".keyFile = "/boot/crypto_keyfile.bin";
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -1,88 +1,34 @@
{ lib, config, modulesPath, ... }:
# 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 = [
## Include results from the (non-existent) hardware scan
## as well as the host-specific hardware config options
(modulesPath + "/installer/scan/not-detected.nix")
];
fileSystems."/" = {
device = "/dev/disk/by-uuid/11de1abe-9a4b-47be-8d1f-034ea9c357df";
fsType = "ext4";
};
fileSystems."/home/serenity/Disks/Tartarus" = {
device = "/dev/disk/by-uuid/26d8d9d1-67d2-4d61-a092-10ed7368b9f6";
fsType = "ext4";
options = [ "users" ];
};
swapDevices = [ {
device = "/dev/disk/by-uuid/2321fc38-ebae-464e-b19b-f929bf18f0f1";
} ];
## Enable swap on luks
boot = {
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
supportedFilesystems = [
"xfs"
"ntfs"
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
initrd = {
systemd.enable = true;
kernelModules = [ ];
availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
secrets = {
"/boot/crypto_keyfile.bin" = null;
};
luks = {
devices = {
"luks-b964f685-be70-4f87-9bd2-00cb7ba0e756" = {
device = "/dev/disk/by-uuid/b964f685-be70-4f87-9bd2-00cb7ba0e756";
keyFile = "/boot/crypto_keyfile.bin";
};
"luks-6779ede9-16e6-42f4-a13e-6da0627f8d45" = {
device = "/dev/disk/by-uuid/6779ede9-16e6-42f4-a13e-6da0627f8d45";
keyFile = "/boot/crypto_keyfile.bin";
};
};
};
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d67a9243-b1d6-47a7-8ae6-bac5c63e7d0e";
fsType = "ext4";
};
loader = {
efi = {
canTouchEfiVariables = true;
};
## For some reason GPT/UEFI didn't work, so neither does systemd-boot
## stuck using MBR/DOS and GRUB instead
grub = {
enable = true;
device = "/dev/nvme0n1";
useOSProber = true;
enableCryptodisk = true;
};
};
boot.initrd.luks.devices."luks-34a5d7fd-7f3a-4778-8d3a-c7bdec52e96c".device = "/dev/disk/by-uuid/34a5d7fd-7f3a-4778-8d3a-c7bdec52e96c";
};
## 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`.
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.enp0s31f6.useDHCP = lib.mkDefault true;
#networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp8s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;