nixos-configuration/maschines/w1n5t0n.nix

97 lines
2.4 KiB
Nix
Raw Normal View History

2022-02-15 15:44:40 +01:00
inputs:
let
system = "x86_64-linux";
hostname = "w1n5t0n";
in
inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = [
{ system.stateVersion = "21.11"; }
(import ./common.nix inputs)
({ pkgs, lib, ... }: {
networking.hostName = hostname;
users.users.me = {
isNormalUser = true;
createHome = true;
extraGroups = [
"adbusers"
"audio"
"davfs2"
"disk"
"docker"
"networkmanager"
"plugdev"
"users"
"uucp"
"vboxusers"
"video"
"wheel"
];
shell = pkgs.zsh;
};
boot = {
initrd = {
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ "dm-snapshot" ];
luks.devices.root = {
device = "/dev/nvme0n1p2";
preLVM = true;
};
};
kernelModules = [ "kvm-intel" ];
# use latest kernel
kernelPackages = pkgs.linuxPackages.latest;
kernel.sysctl = {
# function keys on keychron keyboard won't work otherwise
"module.hid_apple.parameters.fnmode" = "2";
};
# Use the systemd-boot EFI boot loader.
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# mount tmp as tmpfs
tmpOnTmpfs = true;
# Enable NTFS support
supportedFilesystems = [ "ntfs" ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/35f68af7-92fe-41ed-9338-8766ad7fbd5f";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0DD8-8BF6";
fsType = "vfat";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/c1bdaad5-2080-4e08-b37f-cd74e5edc734"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware = {
opengl = {
extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
];
};
};
})
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit system;
hostname = hostname;
};
users.me = import ../users/me.nix;
};
}
];
}