inputs: let system = "x86_64-linux"; hostname = "w1n5t0n"; in inputs.nixpkgs.lib.nixosSystem { inherit system; modules = [ { system.stateVersion = "22.05"; } (import ./common.nix inputs) (import ./dev.nix inputs) (import ./entertainment.nix inputs) (import ./office.nix inputs) ({ pkgs, lib, ... }: { system.autoUpgrade = { enable = true; allowReboot = false; }; networking = { hostName = hostname; interfaces.eno1.useDHCP = true; }; 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; }; } ]; }