63 lines
2.1 KiB
Nix
63 lines
2.1 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
modulesPath,
|
|
...
|
|
}: {
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
];
|
|
|
|
### this machine ###
|
|
networking.hostName = "anzu";
|
|
|
|
### hardware config ###
|
|
|
|
# encrypted root
|
|
boot.initrd.luks.devices."luks-b03a8b46-6a1b-4855-9cf9-304d884f50ae".device = "/dev/disk/by-uuid/b03a8b46-6a1b-4855-9cf9-304d884f50ae";
|
|
|
|
# encrypted swap
|
|
boot.initrd.luks.devices."luks-9527937d-2d02-4feb-9a16-c9c417b33d0d".device = "/dev/disk/by-uuid/9527937d-2d02-4feb-9a16-c9c417b33d0d";
|
|
|
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
|
|
boot.initrd.kernelModules = [];
|
|
boot.kernelModules = ["kvm-amd"];
|
|
boot.extraModulePackages = [];
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-uuid/1518dbe1-8322-48d3-9fc9-cd0478ccbf43";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-uuid/1FCD-5A26";
|
|
fsType = "vfat";
|
|
options = ["fmask=0077" "dmask=0077"];
|
|
};
|
|
|
|
swapDevices = [
|
|
{device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f";}
|
|
];
|
|
|
|
# Mount SMB share
|
|
fileSystems."/mnt/share" = {
|
|
device = "//haruko/share";
|
|
fsType = "cifs";
|
|
options = let
|
|
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
|
|
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
|
|
};
|
|
|
|
# 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.enp2s0f0.useDHCP = lib.mkDefault true;
|
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
}
|