Add ochsenchopf host

This commit is contained in:
Fabian Hauser 2022-04-17 09:56:30 +02:00
parent 75e2230bd6
commit 9be69627fe
5 changed files with 104 additions and 1 deletions

View file

@ -0,0 +1,26 @@
{ config, lib, pkgs, modulesPath, hardwareModules, ... }: {
imports = with hardwareModules; [
(modulesPath + "/installer/scan/not-detected.nix")
hardwareModules.lenovo-thinkpad-x1-9th-gen
];
boot.initrd.availableKernelModules = [
"xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"
"ahci"
"usbhid"
];
boot.kernelModules = [ "kvm-intel" ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; # TODO: This should be moved to defaults
environment.systemPackages = with pkgs; [
modemmanager
libmbim
];
# CPU Configuration
hardware.cpu.intel.updateMicrocode = true;
services.throttled.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

@ -21,7 +21,7 @@
inherit system;
config.allowUnfree = true; # For vscode
};
hosts = [ "speer" "hummelberg" ];
hosts = [ "speer" "hummelberg" "ochsenchopf" ];
in {
checks.${system}.formatCheck = let pkgs = pkgsUnstable;
in pkgs.runCommand "nixfmt-check" { } ''

View file

@ -0,0 +1,35 @@
{ config, pkgs, ... }: {
imports = [
./filesystems.nix
./networking.nix
../../defaults/hardware/thinkpad-x1-gen9.nix
../../defaults/base
../../defaults/cifs-auth-fix
../../defaults/desktop
# TODO: threemaModules.openvpn
];
virtualisation = { # TODO: This should probably be somewhere else.
docker = {
enable = true;
enableOnBoot = false;
};
libvirtd.enable = true;
};
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# This value determines the NixOS release from which the default
# settings for stateful data, like fi:le locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11"; # Did you read the comment?
}

View file

@ -0,0 +1,30 @@
{ config, pkgs, lib, ... }: {
boot.initrd.luks.devices = {
"luks".device = "/dev/disk/by-label/luks";
};
fileSystems = let rootdev = "/dev/disk/by-label/hv_ochsenchopf"; in {
"/" = {
device = rootdev;
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
"/home" = {
device = rootdev;
fsType = "btrfs";
options = [ "subvol=home" ];
};
"/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
};
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
networking = {
networkmanager = {
enable = true;
#enableFccUnlock = true; # TODO: Enable with nixos 22.05
};
useDHCP = false;
hostName = "ochsenchopf";
};
}