feat: big refactor

This commit is contained in:
Jacob Bachmann 2024-09-07 15:10:22 +02:00
parent 2c09c21833
commit ebedec9768
No known key found for this signature in database
GPG key ID: 7753026D577922A6
159 changed files with 1927 additions and 2222 deletions

28
hosts/T430/default.nix Executable file → Normal file
View file

@ -1,17 +1,18 @@
{ ... }@inputs: {
{ ... }@inputs:
{
imports = [
./hardware.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t430
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
./hardware.nix
../../modules
];
networking.hostName = "T430";
bchmnn = {
gui = {
enable = true;
greeter.enable = false;
@ -24,16 +25,21 @@
};
bluetooth.enable = true;
printing.enable = true;
vpn.enable = true;
sync.enable = true;
devenv.enable = true;
virtualisation.enable = true;
games.enable = true;
ratbag.enable = true;
ai.enable = false;
collections = {
cli-utils.enable = true;
profiling.enable = true;
development.enable = true;
vpn.enable = true;
virtualisation.enable = true;
games.enable = true;
};
services = {
flare-solvarr.enable = true;
jackett.enable = true;
syncthing.enable = true;
};
};
}

View file

@ -1,9 +1,21 @@
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sr_mod"
"sdhci_pci"
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -11,47 +23,53 @@
boot.resumeDevice = "/dev/disk/by-label/ROOT";
boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/b7a904b2-cceb-47fc-832a-701e386a95db";
fileSystems."/" =
{
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=@" "compress=zstd" "noatime" ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [
"subvol=@"
"compress=zstd"
"noatime"
];
};
fileSystems."/home" =
{
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd" "noatime" ];
};
fileSystems."/home" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [
"subvol=@home"
"compress=zstd"
"noatime"
];
};
fileSystems."/nix" =
{
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=@nix" "compress=zstd" "noatime" ];
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [
"subvol=@nix"
"compress=zstd"
"noatime"
];
};
fileSystems."/swap" =
{
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=@swap" "noatime" ];
};
fileSystems."/swap" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [
"subvol=@swap"
"noatime"
];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/EFI";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/EFI";
fsType = "vfat";
};
swapDevices = [{
device = "/swap/swapfile";
}];
swapDevices = [ { device = "/swap/swapfile"; } ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}