Add configuration for Thinkpad E14
This commit is contained in:
parent
e501c6a766
commit
0f779af4a7
@ -14,6 +14,7 @@
|
||||
outputs = inputs: {
|
||||
nixosConfigurations = {
|
||||
w1n5t0n = import ./machines/w1n5t0n.nix inputs;
|
||||
morpheus = import ./machines/morpheus.nix inputs;
|
||||
};
|
||||
homeConfigurations = {
|
||||
me = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
|
132
machines/morpheus.nix
Normal file
132
machines/morpheus.nix
Normal file
@ -0,0 +1,132 @@
|
||||
inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
hostname = "morpheus";
|
||||
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.enp1s0.useDHCP = true;
|
||||
interfaces.wlp2s0.useDHCP = true;
|
||||
};
|
||||
# enable touchpad support
|
||||
services.xserver.libinput.enable = 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" ];
|
||||
availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
||||
kernelModules = [ ];
|
||||
luks.devices."system".device = "/dev/disk/by-uuid/06549d22-b96c-44f2-bb27-45200d5feda5";
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
# 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;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
};
|
||||
# mount tmp as tmpfs
|
||||
tmpOnTmpfs = true;
|
||||
# Enable NTFS support
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" "compress=zstd" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{ device = "/dev/disk/by-uuid/4CD4-D5AB";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" "compress=zstd" ];
|
||||
};
|
||||
|
||||
fileSystems."/swap" =
|
||||
{ device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=swap" "noatime" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/swap/swapfile"; }
|
||||
];
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user