thinkpad-2025-01-06-10-40-25
This commit is contained in:
87
machine/thinkpad/configuration.nix
Normal file
87
machine/thinkpad/configuration.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
# ../../configs/borg.nix
|
||||
../../configs/common-linux.nix
|
||||
../../configs/docker.nix
|
||||
../../configs/libvirtd.nix
|
||||
../../configs/user.nix
|
||||
];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../../secrets/secrets-mini.yaml;
|
||||
};
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
luks.devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/7f2eb00d-49d8-416f-a742-5af5ce871483";
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
# extraModulePackages = with pkgs.linuxPackages_latest; [rtl88x2bu];
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
networking = {
|
||||
hostName = "thinkpad";
|
||||
useDHCP = true;
|
||||
firewall = {enable = false;};
|
||||
# interfaces = {
|
||||
# br0 = {
|
||||
# useDHCP = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
# bridges.br0.interfaces = ["enp3s0"];
|
||||
|
||||
nftables.enable = true;
|
||||
|
||||
wireless = {
|
||||
enable = true;
|
||||
networks.Skynet-mobil.psk = "***";
|
||||
interfaces = [ "wlp0s20f3" ];
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
# systemPackages = with pkgs; [
|
||||
# nyx
|
||||
# snapraid
|
||||
# mergerfs
|
||||
# ];
|
||||
# persistence."/persist" = {
|
||||
# directories = [
|
||||
# # "/var/lib/docker"
|
||||
# "/var/lib/tor"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
locate = {
|
||||
prunePaths = ["/mnt" "/nix"];
|
||||
};
|
||||
};
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powertop.enable = true;
|
||||
# cpuFreqGovernor = "powersave";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
72
machine/thinkpad/hardware-configuration.nix
Normal file
72
machine/thinkpad/hardware-configuration.nix
Normal file
@ -0,0 +1,72 @@
|
||||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6de51510-623b-4ae4-b0ba-a319057eb6ea";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/6de51510-623b-4ae4-b0ba-a319057eb6ea";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/6de51510-623b-4ae4-b0ba-a319057eb6ea";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix"];
|
||||
};
|
||||
|
||||
fileSystems."/persist" = {
|
||||
device = "/dev/disk/by-uuid/6de51510-623b-4ae4-b0ba-a319057eb6ea";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=persist"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "/dev/disk/by-uuid/6de51510-623b-4ae4-b0ba-a319057eb6ea";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=log"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/7785-083C";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/ded22b9d-440d-46d8-8246-b52deca7a49c";}
|
||||
];
|
||||
|
||||
# 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.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Reference in New Issue
Block a user